[analyzer] Some built-in macros are 'Unknown' while others are well substituted

It seems that the analyzer can not properly certain built-in macros.

void dump_builtin_macros() {
clang_analyzer_dump(LINE); // 11 S32b
clang_analyzer_dump(FILE); // &Element{“/home/myuser/builtin-macros.cpp”,0 S64b,char}
clang_analyzer_dump(DATE); // &Element{“Sep 1 2020”,0 S64b,char}
clang_analyzer_dump(TIME); // &Element{“19:40:54”,0 S64b,char}
clang_analyzer_dump(COUNTER); // 0 S32b
clang_analyzer_dump(func); // Unknown
clang_analyzer_dump(PRETTY_FUNCTION); // Unknown


As you can see __func__ and __PRETTY_FUNCTION__ macros are not modelled correctly.
I’m suspecting some misconfiguration of the preprocessor or something.
Do you know where should I have a look to fix this?


(re-add the list)

In the meanwhile, I figured it out :smiley:
The patch is on the way: https://reviews.llvm.org/D87004


Pavel Labath <labath@google.com> ezt írta (időpont: 2020. szept. 2., Sze, 13:05):