https://bugs.llvm.org/show_bug.cgi?id=41715

            Bug ID: 41715
           Summary: Typo correction blocks template argument correction
                    suggestions
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangb...@nondot.org
          Reporter: r...@google.com
                CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@metafoo.co.uk

Consider:

-------
$ cat t.cpp
struct DIBuilder;
template <typename T = int>
struct IRBuilder {
};
void foo() {
  IRBuilder obj;
}

$ clang -c t.cpp
t.cpp:4:3: error: unknown type name 'IRBuilder'; did you mean 'DIBuilder'?
  IRBuilder obj;
  ^~~~~~~~~
  DIBuilder
t.cpp:1:8: note: 'DIBuilder' declared here
struct DIBuilder {};
       ^
1 error generated.

$ clang -c t.cpp  -fno-spell-checking
t.cpp:4:3: error: use of class template 'IRBuilder' requires template arguments
  IRBuilder obj;
  ^
t.cpp:2:36: note: template is declared here
template <typename T = int> struct IRBuilder {};
~~~~~~~~~~~~~~~~~~~~~~~~~~~        ^
1 error generated.
------

If the identifier being corrected directly matches a template, it seems more
likely that it's supposed to have template arguments.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to