Is there an existing issue for this?
Current Behavior
In CMSIS solution v1.68, compiler toolchain specific predefined macros are added to compile_macros.h and a .clangd file is generated to include this compile_macros.h when (re)loading a project.
However, macros defined in this compile_macros.h would cause many false syntax checking errors from clangd for C++ codes.
e.g. For some C++17 features testing code in the attached project,
When using AC6, the macros in the generated compile_macros.h are not sufficient. Adding an additional -D__ARMCOMPILER_LIBCXX=1 can resolve these false errors. (However, one user's real-world C++ project would still have many false errors for template classes and template functions.)

When using CLANG, the macros in the generated compile_macros.h would cause many false errors. Removing the entire compile_macros.h include can resolve all false errors. One user's opinion is that this compile_macros.h is completely unnecessary when using CLANG.

Since for now the compile_macros.h is global to entire project, instead of individually for each file, some macros like __STDC_VERSION__ do cause issues for C++ code for a project mixed with C and C++ code.
Blinky_AC6.zip
Blinky_CLANG.zip
Expected Behavior
No response
Steps To Reproduce
No response
Affected tools
Affected operating systems
Environment
No response
Is there an existing issue for this?
Current Behavior
In CMSIS solution v1.68, compiler toolchain specific predefined macros are added to compile_macros.h and a .clangd file is generated to include this compile_macros.h when (re)loading a project.
However, macros defined in this compile_macros.h would cause many false syntax checking errors from clangd for C++ codes.
e.g. For some C++17 features testing code in the attached project,

When using AC6, the macros in the generated compile_macros.h are not sufficient. Adding an additional
-D__ARMCOMPILER_LIBCXX=1can resolve these false errors. (However, one user's real-world C++ project would still have many false errors for template classes and template functions.)When using CLANG, the macros in the generated compile_macros.h would cause many false errors. Removing the entire compile_macros.h include can resolve all false errors. One user's opinion is that this compile_macros.h is completely unnecessary when using CLANG.

Since for now the compile_macros.h is global to entire project, instead of individually for each file, some macros like
__STDC_VERSION__do cause issues for C++ code for a project mixed with C and C++ code.Blinky_AC6.zip
Blinky_CLANG.zip
Expected Behavior
No response
Steps To Reproduce
No response
Affected tools
Affected operating systems
Environment
No response