Skip to content

Commit 5435f14

Browse files
authored
More header includes towards each file being self-contained (#4794)
* Include `<sstream>` in files using `std::stringstream` Signed-off-by: Henner Zeller <[email protected]> * Include `<exception>` in files using exceptions Signed-off-by: Henner Zeller <[email protected]> * Include `<unordered_map>` in files using `std::unordered_map` Signed-off-by: Henner Zeller <[email protected]> * Include `<unordered_set>` in files using `std::unordered_set` Signed-off-by: Henner Zeller <[email protected]> * Include `<memory>` in files using `std::addressof` Signed-off-by: Henner Zeller <[email protected]> * Include `<string_view>` in files using `std::string_view` Signed-off-by: Henner Zeller <[email protected]> --------- Signed-off-by: Henner Zeller <[email protected]>
1 parent ec1b5f3 commit 5435f14

Some content is hidden

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

67 files changed

+73
-0
lines changed

runtime/Cpp/runtime/src/ANTLRErrorListener.h

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

66
#pragma once
77

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

runtime/Cpp/runtime/src/ANTLRErrorStrategy.h

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

66
#pragma once
77

8+
#include <exception>
89
#include "antlr4-common.h"
910
#include "Token.h"
1011

runtime/Cpp/runtime/src/ANTLRInputStream.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_view>
67
#include <cassert>
78
#include <utility>
89
#include <string>

runtime/Cpp/runtime/src/BailErrorStrategy.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 <exception>
67
#include "Exceptions.h"
78
#include "Token.h"
89
#include "ParserRuleContext.h"

runtime/Cpp/runtime/src/BailErrorStrategy.h

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

66
#pragma once
77

8+
#include <exception>
89
#include "antlr4-common.h"
910
#include "Token.h"
1011
#include "DefaultErrorStrategy.h"

runtime/Cpp/runtime/src/BaseErrorListener.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 <exception>
67
#include <string>
78
#include <cstddef>
89
#include "BaseErrorListener.h"

runtime/Cpp/runtime/src/BaseErrorListener.h

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

66
#pragma once
77

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

runtime/Cpp/runtime/src/BufferedTokenStream.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 <sstream>
67
#include <memory>
78
#include <string>
89
#include <utility>

runtime/Cpp/runtime/src/CommonToken.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 <sstream>
67
#include <utility>
78
#include <string>
89
#include <cstddef>

runtime/Cpp/runtime/src/ConsoleErrorListener.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 <exception>
67
#include <string>
78
#include <cstddef>
89
#include "Token.h"

runtime/Cpp/runtime/src/ConsoleErrorListener.h

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

66
#pragma once
77

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

runtime/Cpp/runtime/src/DefaultErrorStrategy.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 <exception>
67
#include <string>
78
#include <cstddef>
89
#include "NoViableAltException.h"

runtime/Cpp/runtime/src/DefaultErrorStrategy.h

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

66
#pragma once
77

8+
#include <exception>
89
#include <memory>
910
#include <vector>
1011
#include <string>

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 <exception>
67
#include <string>
78
#include "Exceptions.h"
89

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 <exception>
89
#include <string>
910
#include "antlr4-common.h"
1011

runtime/Cpp/runtime/src/Lexer.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 <sstream>
67
#include <memory>
78
#include <utility>
89
#include <vector>

runtime/Cpp/runtime/src/Parser.h

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

66
#pragma once
77

8+
#include <exception>
89
#include <vector>
910
#include <string>
1011
#include <cstddef>

runtime/Cpp/runtime/src/ParserRuleContext.h

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

66
#pragma once
77

8+
#include <exception>
89
#include <vector>
910
#include <string>
1011
#include <cstddef>

runtime/Cpp/runtime/src/ProxyErrorListener.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 <exception>
67
#include <string>
78
#include <cstddef>
89
#include "Token.h"

runtime/Cpp/runtime/src/ProxyErrorListener.h

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

66
#pragma once
77

8+
#include <exception>
89
#include <string>
910
#include <cstddef>
1011
#include "ANTLRErrorListener.h"

runtime/Cpp/runtime/src/Recognizer.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_view>
67
#include <map>
78
#include <vector>
89
#include <string>

runtime/Cpp/runtime/src/Recognizer.h

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

66
#pragma once
77

8+
#include <string_view>
89
#include <limits>
910
#include <map>
1011
#include <vector>

runtime/Cpp/runtime/src/RuleContext.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 <sstream>
67
#include <vector>
78
#include <string>
89
#include <cstddef>

runtime/Cpp/runtime/src/TokenStreamRewriter.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 <unordered_map>
67
#include <vector>
78
#include <string>
89
#include <cstddef>

runtime/Cpp/runtime/src/TokenStreamRewriter.h

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

66
#pragma once
77

8+
#include <unordered_map>
89
#include <map>
910
#include <vector>
1011
#include <string>

runtime/Cpp/runtime/src/UnbufferedCharStream.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 <exception>
67
#include <string>
78
#include <utility>
89
#include <cstddef>

runtime/Cpp/runtime/src/UnbufferedTokenStream.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 <sstream>
67
#include <memory>
78
#include <utility>
89
#include <string>

runtime/Cpp/runtime/src/Vocabulary.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_view>
67
#include <utility>
78
#include <vector>
89
#include <string>

runtime/Cpp/runtime/src/Vocabulary.h

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

66
#pragma once
77

8+
#include <string_view>
89
#include <vector>
910
#include <string>
1011
#include <cstddef>

runtime/Cpp/runtime/src/atn/ATN.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 <sstream>
67
#include <cstddef>
78
#include "atn/LL1Analyzer.h"
89
#include "atn/ATNState.h"

runtime/Cpp/runtime/src/atn/ATNConfig.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 <sstream>
67
#include <utility>
78
#include <string>
89
#include <cstddef>

runtime/Cpp/runtime/src/atn/ATNConfig.h

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

66
#pragma once
77

8+
#include <unordered_set>
89
#include <vector>
910
#include <string>
1011
#include <cstddef>

runtime/Cpp/runtime/src/atn/ATNConfigSet.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 <sstream>
67
#include <cassert>
78
#include <utility>
89
#include <vector>

runtime/Cpp/runtime/src/atn/ATNDeserializer.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454

5555
#include "atn/ATNDeserializer.h"
5656

57+
#include <string_view>
5758
#include <memory>
5859
#include <utility>
5960
#include <cstddef>

runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp

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

66
#include "atn/ArrayPredictionContext.h"
77

8+
#include <memory>
9+
#include <sstream>
810
#include <cassert>
911
#include <utility>
1012
#include <vector>

runtime/Cpp/runtime/src/atn/DecisionInfo.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 <sstream>
67
#include <string>
78
#include <cstddef>
89
#include "atn/ErrorInfo.h"

runtime/Cpp/runtime/src/atn/LL1Analyzer.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 <unordered_set>
67
#include <vector>
78
#include <cstddef>
89
#include "atn/RuleStopState.h"

runtime/Cpp/runtime/src/atn/LexerChannelAction.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 <memory>
67
#include <string>
78
#include <cstddef>
89
#include "misc/MurmurHash.h"

runtime/Cpp/runtime/src/atn/LexerCustomAction.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 <memory>
67
#include <string>
78
#include <cstddef>
89
#include "misc/MurmurHash.h"

runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.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 <memory>
67
#include <utility>
78
#include <string>
89
#include <cstddef>

runtime/Cpp/runtime/src/atn/LexerModeAction.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 <memory>
67
#include <string>
78
#include <cstddef>
89
#include "misc/MurmurHash.h"

runtime/Cpp/runtime/src/atn/LexerMoreAction.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 <memory>
67
#include <string>
78
#include <cstddef>
89
#include "misc/MurmurHash.h"

runtime/Cpp/runtime/src/atn/LexerPopModeAction.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 <memory>
67
#include <string>
78
#include <cstddef>
89
#include "misc/MurmurHash.h"

runtime/Cpp/runtime/src/atn/LexerPushModeAction.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 <memory>
67
#include <string>
78
#include <cstddef>
89
#include "misc/MurmurHash.h"

runtime/Cpp/runtime/src/atn/LexerSkipAction.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 <memory>
67
#include <string>
78
#include <cstddef>
89
#include "misc/MurmurHash.h"

runtime/Cpp/runtime/src/atn/LexerTypeAction.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 <memory>
67
#include <string>
78
#include <cstddef>
89
#include "misc/MurmurHash.h"

runtime/Cpp/runtime/src/atn/PredictionContext.cpp

+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 <unordered_set>
7+
#include <unordered_map>
8+
#include <sstream>
69
#include <cassert>
710
#include <limits>
811
#include <memory>

runtime/Cpp/runtime/src/atn/PredictionMode.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 <unordered_map>
67
#include <memory>
78
#include <vector>
89
#include <cstddef>

runtime/Cpp/runtime/src/atn/PredictionMode.h

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

66
#pragma once
77

8+
#include <unordered_map>
89
#include <vector>
910
#include <cstddef>
1011
#include "antlr4-common.h"

0 commit comments

Comments
 (0)