[LLVMbugs] [Bug 11874] bad diagnostics when class-name and function name conflict
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue May 1 17:12:45 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=11874
Kaelyn Uhrain <rikka at google.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Kaelyn Uhrain <rikka at google.com> 2012-05-01 19:12:45 CDT ---
As of r155965, clang now tries harder to find and diagnose the missing tag type
in potential declarations:
b5933700.cc:6:11: error: must use 'class' tag to refer to type 'foo' in this
scope
const foo* f1 = 0; // Good but not perfect.
^
class
b5933700.cc:2:6: note: class 'foo' is hidden by a non-type declaration of 'foo'
here
void foo();
^
b5933700.cc:7:5: error: must use 'class' tag to refer to type 'foo' in this
scope
foo* f2 = 0; // Bad diagnostic.
^
class
b5933700.cc:2:6: note: class 'foo' is hidden by a non-type declaration of 'foo'
here
void foo();
^
b5933700.cc:8:5: error: must use 'class' tag to refer to type 'foo' in this
scope
foo f3; // Terrible diagnostic!!
^
class
b5933700.cc:2:6: note: class 'foo' is hidden by a non-type declaration of 'foo'
here
void foo();
--
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.
More information about the llvm-bugs
mailing list