C++: Uncomment preprocessor test cases and add addition #if test case

Note that the new test case shows that line splicing is not correctly handled
in the case of `#if`.
This commit is contained in:
Jeroen Ketema
2025-01-16 16:42:35 +01:00
parent 02ac61f328
commit dca87f3727
3 changed files with 18 additions and 4 deletions

View File

@@ -68,3 +68,10 @@ int templateClassContext<T> :: val = MACRO_TEMPLATECLASSCONTEXT_REFERENCED;
#define INSTANTIATION
templateClassContext<int> tcci;
#define BAR
#if defined(BAR) && \
defined(BAR)
#warning BAR defined
#endif