mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C++: Add more preprocessor tests
This commit is contained in:
15
cpp/ql/test/library-tests/preprocessor/preprocessor/pp23.cpp
Normal file
15
cpp/ql/test/library-tests/preprocessor/preprocessor/pp23.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
// semmle-extractor-options: -std=c++23
|
||||
|
||||
#define BAR
|
||||
|
||||
#ifdef FOO
|
||||
#warning C++23 1
|
||||
#elifdef BAR
|
||||
#warning C++23 2
|
||||
#endif
|
||||
|
||||
#ifdef FOO
|
||||
#warning C++23 3
|
||||
#elifndef FOO
|
||||
#warning C++23 3
|
||||
#endif
|
||||
@@ -0,0 +1,3 @@
|
||||
// semmle-extractor-options: --microsoft
|
||||
|
||||
#import "test.tlb"
|
||||
@@ -1,4 +1,13 @@
|
||||
| a.h:0:0:0:0 | a.h | 1 | 1 | 1 | 19 | IncludeNext | "a.h" | N/A |
|
||||
| pp23.cpp:0:0:0:0 | pp23.cpp | 3 | 1 | 3 | 11 | Macro | BAR | |
|
||||
| pp23.cpp:0:0:0:0 | pp23.cpp | 5 | 1 | 5 | 10 | PreprocessorIfdef | FOO | N/A |
|
||||
| pp23.cpp:0:0:0:0 | pp23.cpp | 7 | 1 | 7 | 12 | PreprocessorElif | BAR | N/A |
|
||||
| pp23.cpp:0:0:0:0 | pp23.cpp | 8 | 1 | 8 | 16 | PreprocessorWarning | C++23 2 | N/A |
|
||||
| pp23.cpp:0:0:0:0 | pp23.cpp | 9 | 1 | 9 | 6 | PreprocessorEndif | N/A | N/A |
|
||||
| pp23.cpp:0:0:0:0 | pp23.cpp | 11 | 1 | 11 | 10 | PreprocessorIfdef | FOO | N/A |
|
||||
| pp23.cpp:0:0:0:0 | pp23.cpp | 13 | 1 | 13 | 13 | PreprocessorElif | FOO | N/A |
|
||||
| pp23.cpp:0:0:0:0 | pp23.cpp | 14 | 1 | 14 | 16 | PreprocessorWarning | C++23 3 | N/A |
|
||||
| pp23.cpp:0:0:0:0 | pp23.cpp | 15 | 1 | 15 | 6 | PreprocessorEndif | N/A | N/A |
|
||||
| pp.cpp:0:0:0:0 | pp.cpp | 1 | 1 | 1 | 16 | PreprocessorIf | defined(FOO) | N/A |
|
||||
| pp.cpp:0:0:0:0 | pp.cpp | 3 | 1 | 3 | 19 | PreprocessorElif | !defined(BAR) | N/A |
|
||||
| pp.cpp:0:0:0:0 | pp.cpp | 4 | 1 | 4 | 11 | Macro | BAR | |
|
||||
@@ -40,3 +49,5 @@
|
||||
| pp.h:0:0:0:0 | pp.h | 7 | 1 | 11 | 8 | Macro | MULTILINE | world a long |
|
||||
| pp.h:0:0:0:0 | pp.h | 13 | 1 | 14 | 11 | PreprocessorUndef | MULTILINE | N/A |
|
||||
| pp.h:0:0:0:0 | pp.h | 16 | 1 | 17 | 8 | Include | "pp.h" | N/A |
|
||||
| test.tlh:0:0:0:0 | test.tlh | 1 | 1 | 1 | 12 | PreprocessorPragma | once | N/A |
|
||||
| test.tlh:0:0:0:0 | test.tlh | 3 | 1 | 3 | 21 | PreprocessorWarning | type library | N/A |
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#warning type library
|
||||
Reference in New Issue
Block a user