https://bugs.llvm.org/show_bug.cgi?id=44493
Bug ID: 44493
Summary: Assertion failure when expanding variadic macros for
plist output
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: dcough...@apple.com
Reporter: xazax....@gmail.com
CC: dcough...@apple.com, llvm-bugs@lists.llvm.org
I get the following assertion failure:
clang-10:
/usr/local/google/home/xazax/LLVM/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp:1171:
(anonymous namespace)::MacroNameAndArgs
getMacroNameAndArgs(clang::SourceLocation, const clang::Preprocessor &):
Assertion `TheTok.is(tok::r_paren) && "Expanded macro argument acquisition
failed! After the end of the loop" " this token should be ')'!"' failed.
I vaguely recall variadic macros not being supported yet, but I think we should
not have an assert failure.
Minimal repro:
#define log(args...) \
do { \
} while (0)
int main(int argc, char** argv) {
log("arg");
log("arg", "arg2");
int a;
a & 0xffc00000;
return 0;
}
Command line:
clang-10 --analyze --analyzer-output plist-multi-file -o out.plist -Xclang
-analyzer-config -Xclang expand-macros=true minimal.cpp
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs