Skip to content

Commit 3c54722

Browse files
committed
C++: Accept changes after C++ extractor preprocessor fix
1 parent 5eda853 commit 3c54722

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

cpp/ql/test/library-tests/preprocessor/preprocessor/pp.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,22 @@ templateClassContext<int> tcci;
142142
> 10)
143143
#define CONDITIONAL_MACRO_3 3
144144
#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+
\

cpp/ql/test/library-tests/preprocessor/preprocessor/preproc.expected

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@
6868
| pp.cpp:0:0:0:0 | pp.cpp | 136 | 1 | 136 | 13 | Macro | BAZ | 4 |
6969
| pp.cpp:0:0:0:0 | pp.cpp | 137 | 1 | 142 | 8 | PreprocessorIf | ((FOO / BAR) == 4) && ((BAZ * QUX) > 10) | N/A |
7070
| 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 |
7177
| pp.h:0:0:0:0 | pp.h | 1 | 1 | 1 | 12 | PreprocessorPragma | once | N/A |
7278
| pp.h:0:0:0:0 | pp.h | 2 | 1 | 2 | 29 | PreprocessorWarning | "This should happen" | N/A |
7379
| pp.h:0:0:0:0 | pp.h | 3 | 1 | 3 | 27 | PreprocessorLine | 33 "emerald_city.h" | N/A |

0 commit comments

Comments
 (0)