diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-03-14 22:56:43 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-03-14 22:56:43 +0000 |
commit | 3e56dd4fc94a189505f80c09422470f81ce19ca4 (patch) | |
tree | 6b65ba5a0c3e4c5624378c230cfd2e4ef922b78e /clang/lib/Sema/SemaCodeComplete.cpp | |
parent | 4a89501f820d6472e680f8187e3fe30a6559f140 (diff) | |
download | bcm5719-llvm-3e56dd4fc94a189505f80c09422470f81ce19ca4.tar.gz bcm5719-llvm-3e56dd4fc94a189505f80c09422470f81ce19ca4.zip |
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
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCodeComplete.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index 78d8518b234..6bb954315ab 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/lib/Sema/SemaCodeComplete.cpp @@ -5315,7 +5315,7 @@ void Sema::CodeCompleteObjCSuperMessage(Scope *S, SourceLocation SuperLoc, } else { // "super" may be the name of a type or variable. Figure out which // it is. - IdentifierInfo *Super = &Context.Idents.get("super"); + IdentifierInfo *Super = getSuperIdentifier(); NamedDecl *ND = LookupSingleName(S, Super, SuperLoc, LookupOrdinaryName); if ((CDecl = dyn_cast_or_null<ObjCInterfaceDecl>(ND))) { |