[llvm-bugs] [Bug 41715] New: Typo correction blocks template argument correction suggestions

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 2 11:59:34 PDT 2019


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: unassignedclangbugs at nondot.org
          Reporter: rnk at google.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190502/646b6b94/attachment.html>


More information about the llvm-bugs mailing list