http://llvm.org/bugs/show_bug.cgi?id=7794
Summary: Poor diagnostic for cast from enum to int&
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Created an attachment (id=5309)
--> (http://llvm.org/bugs/attachment.cgi?id=5309)
test case
Test case attached. In particular, the first error should be complaining about
a bad cast, not about anything related to compound literals.
% clang -fsyntax-only ~/clang/testcases/enum_int_bad_diagnostic.cc
/home/matthewbg/clang/testcases/enum_int_bad_diagnostic.cc:6:32: error:
expected '{' in compound literal
for (MyEnum e = a; ; ++(int&)e);
^
/home/matthewbg/clang/testcases/enum_int_bad_diagnostic.cc:6:32: error:
expected ')'
/home/matthewbg/clang/testcases/enum_int_bad_diagnostic.cc:6:7: note: to match
this '('
for (MyEnum e = a; ; ++(int&)e);
^
2 errors generated.
--
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