File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
cpp/ql/test/library-tests/preprocessor/preprocessor Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -142,3 +142,22 @@ templateClassContext<int> tcci;
142
142
> 10 )
143
143
#define CONDITIONAL_MACRO_3 3
144
144
#endif
145
+
146
+ #define X 1
147
+ #define Y 2
148
+ #if defined(X) && \
149
+ /* this is a comment*/ defined(Y) \
150
+ // another comment
151
+ #endif
152
+
153
+ #warning FOO\
154
+ \
155
+ \
156
+ \
157
+ BAR
158
+
159
+
160
+ #warning foo \
161
+ \
162
+ /* comment */ \
163
+ \
Original file line number Diff line number Diff line change 68
68
| pp.cpp:0:0:0:0 | pp.cpp | 136 | 1 | 136 | 13 | Macro | BAZ | 4 |
69
69
| pp.cpp:0:0:0:0 | pp.cpp | 137 | 1 | 142 | 8 | PreprocessorIf | ((FOO / BAR) == 4) && ((BAZ * QUX) > 10) | N/A |
70
70
| pp.cpp:0:0:0:0 | pp.cpp | 144 | 1 | 144 | 6 | PreprocessorEndif | N/A | N/A |
71
+ | pp.cpp:0:0:0:0 | pp.cpp | 146 | 1 | 146 | 11 | Macro | X | 1 |
72
+ | pp.cpp:0:0:0:0 | pp.cpp | 147 | 1 | 147 | 11 | Macro | Y | 2 |
73
+ | pp.cpp:0:0:0:0 | pp.cpp | 148 | 1 | 149 | 38 | PreprocessorIf | defined(X) && defined(Y) | N/A |
74
+ | pp.cpp:0:0:0:0 | pp.cpp | 151 | 1 | 151 | 6 | PreprocessorEndif | N/A | N/A |
75
+ | pp.cpp:0:0:0:0 | pp.cpp | 153 | 1 | 157 | 3 | PreprocessorWarning | FOOBAR | N/A |
76
+ | pp.cpp:0:0:0:0 | pp.cpp | 160 | 1 | 160 | 14 | PreprocessorWarning | foo | N/A |
71
77
| pp.h:0:0:0:0 | pp.h | 1 | 1 | 1 | 12 | PreprocessorPragma | once | N/A |
72
78
| pp.h:0:0:0:0 | pp.h | 2 | 1 | 2 | 29 | PreprocessorWarning | "This should happen" | N/A |
73
79
| pp.h:0:0:0:0 | pp.h | 3 | 1 | 3 | 27 | PreprocessorLine | 33 "emerald_city.h" | N/A |
You can’t perform that action at this time.
0 commit comments