https://llvm.org/bugs/show_bug.cgi?id=25834
Bug ID: 25834 Summary: Bad error message for extra parens around declaration inside if Product: clang Version: unspecified Hardware: Macintosh OS: MacOS X Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: h...@apple.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified This code: extern int foo(); int main(void) { if ((auto x = foo())) { return 1; } return 0; } When compiled with `clang++ -std=c++11` produces the following error messages: test.cc:5:15: error: expected ')' if ((auto x = foo())) { ^ test.cc:5:9: note: to match this '(' if ((auto x = foo())) { ^ test.cc:5:25: error: expected expression if ((auto x = foo())) { ^ 2 errors generated. This is not a great error message. I'd expect something like "declaration with extraneous parentheses" and a fixit to remove the extra parentheses. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs