[LLVMbugs] [Bug 9317] New: Clang shouldn't complain about errors in the fix itself suggests
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Thu Feb 24 11:03:47 PST 2011
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=9317
           Summary: Clang shouldn't complain about errors in the fix
                    itself suggests
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: zhanyong.wan at gmail.com
                CC: llvmbugs at cs.uiuc.edu
$ cat typo.cc
void revoke(const char*) {}
namespace foo {
void Invoke(int n) {}
}
void Test() {
  Invoke(42);
}
$ clang typo.cc
typo.cc:8:3: error: use of undeclared identifier 'Invoke'; did you mean
'revoke'?
  Invoke(42);
  ^~~~~~
  revoke
typo.cc:1:6: note: 'revoke' declared here
void revoke(const char*) {}
     ^
typo.cc:8:10: error: cannot initialize a parameter of type 'const char *' with
an rvalue of type 'int'
  Invoke(42);
         ^~
typo.cc:1:24: note: passing argument to parameter here
void revoke(const char*) {}
                       ^
2 errors generated.
The first error is legit, although it can be better.
The second error doesn't make sense.  Clang shouldn't generate new errors in
the fix itself suggests, as the "fix" (Invoke => revoke) may not be what the
user wants.
-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
    
    
More information about the llvm-bugs
mailing list