Feed proper source-location information into Sema::LookupSingleResult,
in case it ends up doing something that might trigger diagnostics
(template instantiation, ambiguity reporting, access
reporting). Noticed while working on PR6831.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101412 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 2ef74fc..1be5f7a 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -1406,6 +1406,7 @@
/// It is preferable to use the elaborated form and explicitly handle
/// ambiguity and overloaded.
NamedDecl *LookupSingleName(Scope *S, DeclarationName Name,
+ SourceLocation Loc,
LookupNameKind NameKind,
RedeclarationKind Redecl
= NotForRedeclaration);
@@ -1416,7 +1417,7 @@
bool LookupParsedName(LookupResult &R, Scope *S, CXXScopeSpec *SS,
bool AllowBuiltinCreation = false,
bool EnteringContext = false);
- ObjCProtocolDecl *LookupProtocol(IdentifierInfo *II);
+ ObjCProtocolDecl *LookupProtocol(IdentifierInfo *II, SourceLocation IdLoc);
void LookupOverloadedOperatorName(OverloadedOperatorKind Op, Scope *S,
QualType T1, QualType T2,
@@ -1468,7 +1469,8 @@
//@}
ObjCInterfaceDecl *getObjCInterfaceDecl(IdentifierInfo *&Id,
- SourceLocation RecoverLoc = SourceLocation());
+ SourceLocation IdLoc,
+ bool TypoCorrection = false);
NamedDecl *LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID,
Scope *S, bool ForRedeclaration,
SourceLocation Loc);
@@ -4338,12 +4340,15 @@
virtual void CodeCompleteObjCProtocolDecl(Scope *S);
virtual void CodeCompleteObjCInterfaceDecl(Scope *S);
virtual void CodeCompleteObjCSuperclass(Scope *S,
- IdentifierInfo *ClassName);
+ IdentifierInfo *ClassName,
+ SourceLocation ClassNameLoc);
virtual void CodeCompleteObjCImplementationDecl(Scope *S);
virtual void CodeCompleteObjCInterfaceCategory(Scope *S,
- IdentifierInfo *ClassName);
+ IdentifierInfo *ClassName,
+ SourceLocation ClassNameLoc);
virtual void CodeCompleteObjCImplementationCategory(Scope *S,
- IdentifierInfo *ClassName);
+ IdentifierInfo *ClassName,
+ SourceLocation ClassNameLoc);
virtual void CodeCompleteObjCPropertyDefinition(Scope *S,
DeclPtrTy ObjCImpDecl);
virtual void CodeCompleteObjCPropertySynthesizeIvar(Scope *S,