[LLVMbugs] [Bug 14738] New: clang doesn't typo-correct types in objective-c method definitions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Dec 28 22:21:18 PST 2012


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

             Bug #: 14738
           Summary: clang doesn't typo-correct types in objective-c method
                    definitions
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


In the following program, clang offers a typo correction for the typo in
main(), but not for the type in the objc method "foo:":

Nicos-MacBook-Pro:src thakis$ cat foo.mm
namespace nam {
enum foobar {bar};
}

@interface I
@end

@implementation I

- (void)foo:(foobar)f {
}

@end

int main() {
  foobar f;
}
Nicos-MacBook-Pro:src thakis$ clang -c foo.mm
foo.mm:10:14: error: expected a type
- (void)foo:(foobar)f {
             ^
foo.mm:16:3: error: unknown type name 'foobar'; did you mean 'nam::foobar'?
  foobar f;
  ^~~~~~
  nam::foobar
foo.mm:2:6: note: 'nam::foobar' declared here
enum foobar {bar};
     ^
2 errors generated.

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