[LLVMbugs] [Bug 9911] New: Bad typo correction: variable name "fool" -> "bool"
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri May 13 14:55:17 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9911
Summary: Bad typo correction: variable name "fool" -> "bool"
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Keywords: quality-of-implementation
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: matthewbg at google.com
CC: llvmbugs at cs.uiuc.edu, nlewycky at google.com
The following code produces some terrible diagnostics:
int *test(UnknownType *fool) { return 0; }
<stdin>:1:11: error: use of undeclared identifier 'UnknownType'
int *test(UnknownType *fool) { return 0; }
^
<stdin>:1:24: error: use of undeclared identifier 'fool'; did you mean 'bool'?
int *test(UnknownType *fool) { return 0; }
^
<stdin>:1:29: error: expected ';' after top level declarator
int *test(UnknownType *fool) { return 0; }
^
;
3 errors generated.
Nick's comment on our internal bug:
Because it didn't know "UnknownType" it tried to autocorrect fool to bool. No
clang, no. And then what's with putting the ; after it, this is a function
definition!
--
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