https://llvm.org/bugs/show_bug.cgi?id=24424
Bug ID: 24424 Summary: Too much information printed in macro diagnostic message Product: clang Version: trunk Hardware: PC OS: Linux Status: ASSIGNED Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: zheng...@google.com CC: llvm-bugs@lists.llvm.org, rtr...@google.com Blocks: 24423 Classification: Unclassified #define F(x) x + 1 #define NO_INITIATION(x) int a = F(x) * 2 NO_INITIATION(a); Should print: reduced-diags-macros.cpp:7:15: warning: variable 'a' is uninitialized when used within its own initialization [-Wuninitialized] NO_INITIATION(a); ~~~~~~~~~~~~~~^~ reduced-diags-macros.cpp:4:37: note: expanded from macro 'NO_INITIATION' #define NO_INITIATION(x) int a = FF(x) * 2 ^ Acually print: reduced-diags-macros.cpp:7:15: warning: variable 'a' is uninitialized when used within its own initialization [-Wuninitialized] NO_INITIATION(a); ~~~~~~~~~~~~~~^~ reduced-diags-macros.cpp:4:37: note: expanded from macro 'NO_INITIATION' #define NO_INITIATION(x) int a = FF(x) * 2 ^ reduced-diags-macros.cpp:3:15: note: expanded from macro 'FF' #define FF(x) x + 1 ^ The last macro expansion should not be printed. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs