http://llvm.org/bugs/show_bug.cgi?id=7672
Summary: Invalid cv qualifier for non-member function error
could be better
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
This code:
$ cat a.cpp
struct Foo {
unsigned F(unsigned a, unsigned b) const;
};
unsigned F(unsigned a, unsigned b) const {
return a + b * 37 - 927;
}
Produces this error message with clang++:
a.cpp:5:10: error: type qualifier is not allowed on this function
unsigned F(unsigned a, unsigned b) const {
^
1 error generated.
It doesn't explain why the qualifier isn't correct. By contrast, g++ does
better:
a.cpp:5: error: non-member function ‘unsigned int F(unsigned int, unsigned
int)’ cannot have cv-qualifier
It mentions that it's a non-member function.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs