[LLVMbugs] [Bug 14444] New: Poor suggestion from typo correction

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 27 15:33:23 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=14444

             Bug #: 14444
           Summary: Poor suggestion from typo correction
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: richard-llvm at metafoo.co.uk
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


src/tools/clang/lib/Sema/SemaDeclCXX.cpp:532:36: error: no member named
'getParam' in 'clang::FunctionDecl'; did you mean 'setParams'?
      ParmVarDecl *NewParam = New->getParam(New->getMinRequiredArguments());
                                   ^~~~~~~~
                                   setParams

No. I meant getParamDecl. There are a couple of clues to suggest which one I
was looking for:

 1) The correct correction involves only one change (adding 'Decl'). The
incorrect one involves two changes ('g' -> 's', and adding a trailing 's').

 2) We have one correction which adds a missing suffix and another which
'fixes' a typo. The former is more likely to be intended, because it's probably
not a typo if there is another method which starts with that string.

-- 
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