[LLVMbugs] [Bug 23431] New: Unhelpful diagnostics upon unknown function-like macro invocation
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed May 6 05:04:58 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23431
Bug ID: 23431
Summary: Unhelpful diagnostics upon unknown function-like macro
invocation
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: stephan.bergmann.secondary at googlemail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
> $ cat test.cc
> void f() { M("" << ""); }
>
> $ clang++ -fsyntax-only test.cc
> test.cc:1:17: error: invalid operands to binary expression ('const char *' and 'const char *')
> void f() { M("" << ""); }
> ~~ ^ ~~
> 1 error generated.
doesn't mention at all that M is unknown, and if M is e.g. defined as
#define M(x) std::cout << x
then the provided diagnostics is kind of a red herring. (Happens in practice,
cf. e.g.,
<http://cgit.freedesktop.org/libreoffice/core/commit/?id=c47f7dfb3045b7b029859ea1fac80143b996945b>.)
--
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/20150506/70d0dc58/attachment.html>
More information about the llvm-bugs
mailing list