Skip to content

Commit af7edc5

Browse files
authored
Fix a couple missing standard headers (#4791)
* Insert `<cstddef>` in files using `size_t` Signed-off-by: Henner Zeller <[email protected]> * Insert `<string>` in files using `std::string` Signed-off-by: Henner Zeller <[email protected]> * Insert `<vector>` in files using `std::vector` Signed-off-by: Henner Zeller <[email protected]> * Insert `<utility>` in files using `std::move` Signed-off-by: Henner Zeller <[email protected]> * Insert `<string>` in files using `std::to_string` Signed-off-by: Henner Zeller <[email protected]> * Include `<memory>` in files using `std::unique_ptr`, `std::shared...` `std::unique_ptr`, `std::make_unique`, `std::shared_ptr`, and `std::make_shared` Signed-off-by: Henner Zeller <[email protected]> * Include `<utility>` in files using `std::pair` Signed-off-by: Henner Zeller <[email protected]> * Include `<map>` in files using `std::map` Signed-off-by: Henner Zeller <[email protected]> * Include `<limits>` in files using `std::numeric_limits` Signed-off-by: Henner Zeller <[email protected]> * Include `<cassert>` in files using `assert` Signed-off-by: Henner Zeller <[email protected]> --------- Signed-off-by: Henner Zeller <[email protected]>
1 parent ea9cf6a commit af7edc5

File tree

241 files changed

+589
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+589
-0
lines changed

runtime/Cpp/runtime/src/ANTLRErrorListener.h

100755100644
+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#pragma once
77

8+
#include <string>
9+
#include <cstddef>
810
#include "RecognitionException.h"
911

1012
namespace antlrcpp {

runtime/Cpp/runtime/src/ANTLRFileStream.cpp

100755100644
+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <string>
67
#include "ANTLRFileStream.h"
78

89
using namespace antlr4;

runtime/Cpp/runtime/src/ANTLRFileStream.h

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#pragma once
77

8+
#include <string>
9+
#include <cstddef>
810
#include "ANTLRInputStream.h"
911

1012
namespace antlr4 {

runtime/Cpp/runtime/src/ANTLRInputStream.cpp

100755100644
+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <cassert>
7+
#include <utility>
8+
#include <string>
69
#include <string.h>
710

811
#include "Exceptions.h"

runtime/Cpp/runtime/src/ANTLRInputStream.h

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#pragma once
77

8+
#include <string>
9+
#include <cstddef>
810
#include <string_view>
911

1012
#include "CharStream.h"

runtime/Cpp/runtime/src/BaseErrorListener.cpp

100755100644
+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <string>
7+
#include <cstddef>
68
#include "BaseErrorListener.h"
79
#include "RecognitionException.h"
810

runtime/Cpp/runtime/src/BaseErrorListener.h

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#pragma once
77

8+
#include <string>
9+
#include <cstddef>
810
#include "ANTLRErrorListener.h"
911

1012
namespace antlrcpp {

runtime/Cpp/runtime/src/BufferedTokenStream.cpp

100755100644
+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <memory>
7+
#include <string>
8+
#include <utility>
9+
#include <vector>
10+
#include <cstddef>
611
#include "WritableToken.h"
712
#include "Lexer.h"
813
#include "RuleContext.h"

runtime/Cpp/runtime/src/BufferedTokenStream.h

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
#pragma once
77

8+
#include <memory>
9+
#include <vector>
10+
#include <string>
11+
#include <cstddef>
812
#include "TokenStream.h"
913

1014
namespace antlr4 {

runtime/Cpp/runtime/src/CharStream.h

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#pragma once
77

8+
#include <string>
89
#include "IntStream.h"
910
#include "misc/Interval.h"
1011

runtime/Cpp/runtime/src/CommonToken.cpp

100755100644
+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <utility>
7+
#include <string>
8+
#include <cstddef>
69
#include "TokenSource.h"
710
#include "CharStream.h"
811
#include "Recognizer.h"

runtime/Cpp/runtime/src/CommonToken.h

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
#pragma once
77

8+
#include <utility>
9+
#include <string>
10+
#include <cstddef>
811
#include "WritableToken.h"
912

1013
namespace antlr4 {

runtime/Cpp/runtime/src/CommonTokenFactory.cpp

100755100644
+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <utility>
7+
#include <memory>
8+
#include <string>
9+
#include <cstddef>
610
#include "misc/Interval.h"
711
#include "CommonToken.h"
812
#include "CharStream.h"

runtime/Cpp/runtime/src/CommonTokenFactory.h

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
#pragma once
77

8+
#include <utility>
9+
#include <memory>
10+
#include <string>
11+
#include <cstddef>
812
#include "TokenFactory.h"
913

1014
namespace antlr4 {

runtime/Cpp/runtime/src/CommonTokenStream.cpp

100755100644
+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <cstddef>
67
#include "Token.h"
78

89
#include "CommonTokenStream.h"

runtime/Cpp/runtime/src/CommonTokenStream.h

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#pragma once
77

8+
#include <cstddef>
89
#include "BufferedTokenStream.h"
910

1011
namespace antlr4 {

runtime/Cpp/runtime/src/ConsoleErrorListener.cpp

100755100644
+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <string>
7+
#include <cstddef>
68
#include "ConsoleErrorListener.h"
79

810
using namespace antlr4;

runtime/Cpp/runtime/src/ConsoleErrorListener.h

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#pragma once
77

8+
#include <string>
9+
#include <cstddef>
810
#include "BaseErrorListener.h"
911

1012
namespace antlr4 {

runtime/Cpp/runtime/src/DefaultErrorStrategy.cpp

100755100644
+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <string>
7+
#include <cstddef>
68
#include "NoViableAltException.h"
79
#include "misc/IntervalSet.h"
810
#include "atn/ParserATNSimulator.h"

runtime/Cpp/runtime/src/DefaultErrorStrategy.h

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
#pragma once
77

8+
#include <memory>
9+
#include <vector>
10+
#include <string>
11+
#include <cstddef>
812
#include "ANTLRErrorStrategy.h"
913
#include "misc/IntervalSet.h"
1014

runtime/Cpp/runtime/src/DiagnosticErrorListener.cpp

100755100644
+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <vector>
7+
#include <string>
8+
#include <cstddef>
69
#include "atn/PredictionContext.h"
710
#include "atn/ATNConfig.h"
811
#include "atn/ATNConfigSet.h"

runtime/Cpp/runtime/src/DiagnosticErrorListener.h

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#pragma once
77

8+
#include <string>
9+
#include <cstddef>
810
#include "BaseErrorListener.h"
911

1012
namespace antlr4 {

runtime/Cpp/runtime/src/Exceptions.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <string>
67
#include "Exceptions.h"
78

89
using namespace antlr4;

runtime/Cpp/runtime/src/Exceptions.h

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#pragma once
77

8+
#include <string>
89
#include "antlr4-common.h"
910

1011
namespace antlr4 {

runtime/Cpp/runtime/src/FailedPredicateException.cpp

100755100644
+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <cstddef>
67
#include "atn/ParserATNSimulator.h"
78
#include "Parser.h"
89
#include "atn/PredicateTransition.h"

runtime/Cpp/runtime/src/FailedPredicateException.h

100755100644
+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#pragma once
77

8+
#include <string>
9+
#include <cstddef>
810
#include "RecognitionException.h"
911

1012
namespace antlr4 {

runtime/Cpp/runtime/src/FlatHashMap.h

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#if ANTLR4CPP_USING_ABSEIL
3131
#include "absl/container/flat_hash_map.h"
3232
#else
33+
#include <utility>
3334
#include <unordered_map>
3435
#endif
3536

runtime/Cpp/runtime/src/IntStream.cpp

100755100644
+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <string>
67
#include "IntStream.h"
78

89
using namespace antlr4;

runtime/Cpp/runtime/src/IntStream.h

100755100644
+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
#pragma once
77

8+
#include <limits>
9+
#include <string>
10+
#include <cstddef>
811
#include "antlr4-common.h"
912

1013
namespace antlr4 {

runtime/Cpp/runtime/src/InterpreterRuleContext.cpp

100755100644
+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <cstddef>
67
#include "InterpreterRuleContext.h"
78

89
using namespace antlr4;

runtime/Cpp/runtime/src/InterpreterRuleContext.h

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#pragma once
77

8+
#include <cstddef>
89
#include "ParserRuleContext.h"
910

1011
namespace antlr4 {

runtime/Cpp/runtime/src/Lexer.cpp

100755100644
+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <memory>
7+
#include <utility>
8+
#include <vector>
9+
#include <cstddef>
610
#include "atn/LexerATNSimulator.h"
711
#include "Exceptions.h"
812
#include "misc/Interval.h"

runtime/Cpp/runtime/src/Lexer.h

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55

66
#pragma once
77

8+
#include <limits>
9+
#include <memory>
10+
#include <vector>
11+
#include <string>
12+
#include <cstddef>
813
#include "Recognizer.h"
914
#include "TokenSource.h"
1015
#include "CharStream.h"

runtime/Cpp/runtime/src/LexerInterpreter.cpp

100755100644
+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <vector>
7+
#include <string>
8+
#include <cstddef>
69
#include "atn/ATNType.h"
710
#include "atn/LexerATNSimulator.h"
811
#include "dfa/DFA.h"

runtime/Cpp/runtime/src/LexerInterpreter.h

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#pragma once
77

8+
#include <vector>
9+
#include <string>
810
#include "Lexer.h"
911
#include "atn/PredictionContext.h"
1012
#include "atn/PredictionContextCache.h"

runtime/Cpp/runtime/src/LexerNoViableAltException.cpp

100755100644
+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <string>
7+
#include <cstddef>
68
#include "misc/Interval.h"
79
#include "support/CPPUtils.h"
810
#include "CharStream.h"

runtime/Cpp/runtime/src/LexerNoViableAltException.h

100755100644
+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#pragma once
77

8+
#include <string>
9+
#include <cstddef>
810
#include "RecognitionException.h"
911
#include "atn/ATNConfigSet.h"
1012

runtime/Cpp/runtime/src/ListTokenSource.cpp

100755100644
+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <memory>
7+
#include <utility>
8+
#include <vector>
9+
#include <cstddef>
610
#include "Token.h"
711
#include "CommonToken.h"
812
#include "CharStream.h"

runtime/Cpp/runtime/src/ListTokenSource.h

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
#pragma once
77

8+
#include <memory>
9+
#include <vector>
10+
#include <string>
11+
#include <cstddef>
812
#include "TokenSource.h"
913
#include "CommonTokenFactory.h"
1014

runtime/Cpp/runtime/src/Parser.cpp

100755100644
+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <map>
7+
#include <memory>
8+
#include <utility>
9+
#include <vector>
10+
#include <cstddef>
611
#include "atn/ATNDeserializationOptions.h"
712
#include "tree/pattern/ParseTreePatternMatcher.h"
813
#include "dfa/DFA.h"

runtime/Cpp/runtime/src/Parser.h

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
#pragma once
77

8+
#include <vector>
9+
#include <string>
10+
#include <cstddef>
811
#include "Recognizer.h"
912
#include "tree/ParseTreeListener.h"
1013
#include "tree/ParseTree.h"

runtime/Cpp/runtime/src/ParserInterpreter.cpp

100755100644
+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* can be found in the LICENSE.txt file in the project root.
44
*/
55

6+
#include <utility>
7+
#include <vector>
8+
#include <string>
9+
#include <cstddef>
610
#include "dfa/DFA.h"
711
#include "atn/RuleStartState.h"
812
#include "InterpreterRuleContext.h"

0 commit comments

Comments
 (0)