Skip to content

Commit 2d15163

Browse files
committed
CPP: Test of a comment inside #if 0.
1 parent 1e0e319 commit 2d15163

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

cpp/ql/test/query-tests/Documentation/CommentedOutCode/CommentedOutCode.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
| test2.cpp:91:1:95:2 | /*\n#ifdef MYMACRO\n\t// ...\n#endif // #ifdef MYMACRO\n*/ | This comment appears to contain commented-out code |
1212
| test2.cpp:107:21:107:43 | // #include "config2.h" | This comment appears to contain commented-out code |
1313
| test2.cpp:115:16:115:35 | /* #ifdef MYMACRO */ | This comment appears to contain commented-out code |
14+
| test2.cpp:117:1:117:24 | // commented_out_code(); | This comment appears to contain commented-out code |
15+
| test2.cpp:120:2:120:25 | // commented_out_code(); | This comment appears to contain commented-out code |
1416
| test.c:2:1:2:22 | // commented out code; | This comment appears to contain commented-out code |
1517
| test.c:4:1:7:8 | // some; | This comment appears to contain commented-out code |
1618
| test.c:9:1:13:8 | // also; | This comment appears to contain commented-out code |

cpp/ql/test/query-tests/Documentation/CommentedOutCode/test2.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,9 @@ void myFunction();
113113
#endif /* #ifdef MYMACRO */
114114

115115
#error "error" /* #ifdef MYMACRO */
116+
117+
// commented_out_code();
118+
119+
#if 0
120+
// commented_out_code();
121+
#endif

0 commit comments

Comments
 (0)