[LLVMbugs] [Bug 23564] New: Bad diagnostic message for static class functions
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon May 18 13:24:40 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23564
Bug ID: 23564
Summary: Bad diagnostic message for static class functions
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: dcheng at google.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
$ cat bad_msg.cc
#define MY_EXPORT __attribute__((visibility("default")))
struct Foo {
MY_EXPORT static int AwesomeFunction(int, int);
};
int main() {
return Foo::AwesomeFunction(-1);
}
$ clang++ bad_msg.cc
bad_msg.cc:8:33: error: too few arguments to function call, expected 2, have 1
return Foo::AwesomeFunction(-1);
~~~~~~~~~~~~~~~~~~~~ ^
bad_msg.cc:4:3: note: 'AwesomeFunction' declared here
MY_EXPORT static int AwesomeFunction(int, int);
^
bad_msg.cc:1:19: note: expanded from macro 'MY_EXPORT'
#define MY_EXPORT __attribute__((visibility("default")))
^
1 error generated.
Tracing through the macro definition isn't useful here, since it's misleading:
the actual function definition isn't inside the macro.
This is at r233105
--
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/20150518/756e23ce/attachment.html>
More information about the llvm-bugs
mailing list