https://llvm.org/bugs/show_bug.cgi?id=29055
Bug ID: 29055 Summary: Improve diagnostic for assigning a type to a variable. Product: clang Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: gonzalob...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified This: struct A {}; auto a = decltype(A{}); produces this error: 4 : error: expected '(' for function-style cast or type construction auto a = decltype(A{}); ~~~~~~~~~~~~~^ Either the user meant something like: auto a = decltype(A{}){}; or it meant "using" instead of "auto": using a = decltype(A{}); While the current error message is technically correct, it should be more user friendly. It would be better if it would suggest both options in a note. -- 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