https://llvm.org/bugs/show_bug.cgi?id=26641
Bug ID: 26641 Summary: Spell checking makes diagnostic worse when forgetting template parameters on a template Product: clang Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: nicolaswe...@gmx.de CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified This is is a good experience: $ cat test.cc #include <vector> void f() { std::vector v; } $ clang -c test.cc test.cc:4:8: error: use of class template 'std::vector' requires template arguments std::vector v; ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:477:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY vector ^ 1 error generated. This isn't: $ cat test.cc #include <ratio> #include <vector> void f() { std::vector v; } $ clang -c test.cc test.cc:5:8: error: no type named 'vector' in namespace 'std'; did you mean 'hecto'? std::vector v; ~~~~~^~~~~~ hecto /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ratio:265:43: note: 'hecto' declared here typedef ratio< 100LL, 1LL> hecto; ^ 1 error generated. We probably should prefer the original diagnostic if there's a template with an edit distance of 0 that's just missing the type parameters. -- 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