[llvm-bugs] [Bug 44493] New: Assertion failure when expanding variadic macros for plist output
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jan 8 15:37:25 PST 2020
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: dcoughlin at apple.com
Reporter: xazax.hun at gmail.com
CC: dcoughlin at apple.com, llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200108/80afb84e/attachment.html>
More information about the llvm-bugs
mailing list