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/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 3a0431f..928ffb8 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -148,7 +148,7 @@
SourceLocation categoryLoc, rparenLoc;
IdentifierInfo *categoryId = 0;
if (Tok.is(tok::code_completion)) {
- Actions.CodeCompleteObjCInterfaceCategory(CurScope, nameId);
+ Actions.CodeCompleteObjCInterfaceCategory(CurScope, nameId, nameLoc);
ConsumeToken();
}
@@ -211,7 +211,7 @@
// Code completion of superclass names.
if (Tok.is(tok::code_completion)) {
- Actions.CodeCompleteObjCSuperclass(CurScope, nameId);
+ Actions.CodeCompleteObjCSuperclass(CurScope, nameId, nameLoc);
ConsumeToken();
}
@@ -1229,7 +1229,7 @@
IdentifierInfo *categoryId = 0;
if (Tok.is(tok::code_completion)) {
- Actions.CodeCompleteObjCImplementationCategory(CurScope, nameId);
+ Actions.CodeCompleteObjCImplementationCategory(CurScope, nameId, nameLoc);
ConsumeToken();
}