Improved source location extraction for directive.

This commit is contained in:
idrissrio
2025-03-21 09:46:54 +01:00
parent 11c71f03f3
commit 878e621a38
2 changed files with 14 additions and 7 deletions

View File

@@ -111,3 +111,8 @@ templateClassContext<int> tcci;
defined(BAZ)
#define CONDITIONAL_MACRO_4 4
#endif
#if defined /* // test */ SIMPLE_COMMENT //this comment \
(defined(SIMPLE_COMMENT)) spans over multiple lines
#endif

View File

@@ -38,25 +38,27 @@
| pp.cpp:0:0:0:0 | pp.cpp | 61 | 1 | 61 | 7 | PreprocessorEndif | N/A | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 69 | 1 | 69 | 21 | Macro | INSTANTIATION | |
| pp.cpp:0:0:0:0 | pp.cpp | 72 | 1 | 72 | 11 | Macro | BAR | |
| pp.cpp:0:0:0:0 | pp.cpp | 74 | 1 | 75 | 13 | PreprocessorIf | defined(BAR) && defined(BAR) | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 74 | 1 | 75 | 15 | PreprocessorIf | defined(BAR) && defined(BAR) | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 76 | 1 | 76 | 20 | PreprocessorWarning | BAR defined | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 77 | 1 | 77 | 6 | PreprocessorEndif | N/A | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 79 | 1 | 80 | 18 | PreprocessorIf | defined MACROTHREE && (defined(MACROONE)) | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 79 | 1 | 80 | 45 | PreprocessorIf | defined MACROTHREE && (defined(MACROONE)) | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 81 | 1 | 81 | 6 | PreprocessorEndif | N/A | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 83 | 1 | 84 | 26 | PreprocessorIf | defined SIMPLE_COMMENT | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 83 | 1 | 83 | 26 | PreprocessorIf | defined SIMPLE_COMMENT | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 85 | 1 | 85 | 6 | PreprocessorEndif | N/A | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 87 | 1 | 88 | 15 | PreprocessorIf | defined(FOO) && defined(BAR) | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 87 | 1 | 88 | 17 | PreprocessorIf | defined(FOO) && defined(BAR) | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 90 | 1 | 90 | 6 | PreprocessorEndif | N/A | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 92 | 1 | 94 | 14 | PreprocessorIf | defined(FOO) && defined(BAR) && !defined(BAZ) | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 92 | 1 | 94 | 19 | PreprocessorIf | defined(FOO) && defined(BAR) && !defined(BAZ) | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 96 | 1 | 96 | 6 | PreprocessorEndif | N/A | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 98 | 1 | 98 | 13 | Macro | FOO | 8 |
| pp.cpp:0:0:0:0 | pp.cpp | 99 | 1 | 99 | 13 | Macro | BAR | 2 |
| pp.cpp:0:0:0:0 | pp.cpp | 100 | 1 | 100 | 13 | Macro | BAZ | 4 |
| pp.cpp:0:0:0:0 | pp.cpp | 101 | 1 | 104 | 3 | PreprocessorIf | ((FOO / BAR) == 4) && ((BAZ * QUX) > 10) | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 101 | 1 | 104 | 11 | PreprocessorIf | ((FOO / BAR) == 4) && ((BAZ * QUX) > 10) | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 106 | 1 | 106 | 6 | PreprocessorEndif | N/A | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 109 | 1 | 111 | 10 | PreprocessorIf | defined(FOO) && defined(BAR) && defined(BAZ) | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 109 | 1 | 111 | 15 | PreprocessorIf | defined(FOO) && defined(BAR) && defined(BAZ) | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 112 | 1 | 112 | 29 | Macro | CONDITIONAL_MACRO_4 | 4 |
| pp.cpp:0:0:0:0 | pp.cpp | 113 | 1 | 113 | 6 | PreprocessorEndif | N/A | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 116 | 1 | 116 | 40 | PreprocessorIf | defined SIMPLE_COMMENT | N/A |
| pp.cpp:0:0:0:0 | pp.cpp | 118 | 1 | 118 | 6 | PreprocessorEndif | N/A | N/A |
| pp.h:0:0:0:0 | pp.h | 1 | 1 | 1 | 12 | PreprocessorPragma | once | N/A |
| pp.h:0:0:0:0 | pp.h | 2 | 1 | 2 | 29 | PreprocessorWarning | "This should happen" | N/A |
| pp.h:0:0:0:0 | pp.h | 3 | 1 | 3 | 27 | PreprocessorLine | 33 "emerald_city.h" | N/A |