Don't try to typo-correct 'super' in an objc method.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 14 Mar 2013 22:56:43 +0000 (22:56 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 14 Mar 2013 22:56:43 +0000 (22:56 +0000)
commit3e56dd4fc94a189505f80c09422470f81ce19ca4
tree6b65ba5a0c3e4c5624378c230cfd2e4ef922b78e
parent4a89501f820d6472e680f8187e3fe30a6559f140
Don't try to typo-correct 'super' in an objc method.

This created 2 issues:

1) Performance issue, since typo-correction with PCH/modules is rather expensive.
2) Correctness issue, since if it managed to "correct" 'super' then bogus compiler errors would
be emitted, like this:

3.m:8:3: error: unknown type name 'super'; did you mean 'super1'?
  super.x = 0;
  ^~~~~
  super1
t3.m:5:13: note: 'super1' declared here
typedef int super1;
            ^
t3.m:8:8: error: expected identifier or '('
  super.x = 0;
       ^

llvm-svn: 177126
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/Sema/Sema.cpp
clang/lib/Sema/SemaCodeComplete.cpp
clang/lib/Sema/SemaLookup.cpp
clang/test/SemaObjC/typo-correction.m [new file with mode: 0644]