summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/libclang')
-rw-r--r--clang/tools/libclang/CXIndexDataConsumer.cpp7
-rw-r--r--clang/tools/libclang/CXIndexDataConsumer.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/clang/tools/libclang/CXIndexDataConsumer.cpp b/clang/tools/libclang/CXIndexDataConsumer.cpp
index 1981cabbbe4..cb8aebfd0c4 100644
--- a/clang/tools/libclang/CXIndexDataConsumer.cpp
+++ b/clang/tools/libclang/CXIndexDataConsumer.cpp
@@ -95,7 +95,7 @@ public:
if (isa<ObjCImplDecl>(LexicalDC) && !D->isThisDeclarationADefinition())
DataConsumer.handleSynthesizedObjCMethod(D, DeclLoc, LexicalDC);
else
- DataConsumer.handleObjCMethod(D);
+ DataConsumer.handleObjCMethod(D, DeclLoc);
return true;
}
@@ -801,7 +801,8 @@ bool CXIndexDataConsumer::handleObjCCategoryImpl(const ObjCCategoryImplDecl *D)
return handleObjCContainer(D, CategoryLoc, getCursor(D), CatDInfo);
}
-bool CXIndexDataConsumer::handleObjCMethod(const ObjCMethodDecl *D) {
+bool CXIndexDataConsumer::handleObjCMethod(const ObjCMethodDecl *D,
+ SourceLocation Loc) {
bool isDef = D->isThisDeclarationADefinition();
bool isContainer = isDef;
bool isSkipped = false;
@@ -814,7 +815,7 @@ bool CXIndexDataConsumer::handleObjCMethod(const ObjCMethodDecl *D) {
DeclInfo DInfo(!D->isCanonicalDecl(), isDef, isContainer);
if (isSkipped)
DInfo.flags |= CXIdxDeclFlag_Skipped;
- return handleDecl(D, D->getLocation(), getCursor(D), DInfo);
+ return handleDecl(D, Loc, getCursor(D), DInfo);
}
bool CXIndexDataConsumer::handleSynthesizedObjCProperty(
diff --git a/clang/tools/libclang/CXIndexDataConsumer.h b/clang/tools/libclang/CXIndexDataConsumer.h
index 718a2a18b1b..16162cb83f7 100644
--- a/clang/tools/libclang/CXIndexDataConsumer.h
+++ b/clang/tools/libclang/CXIndexDataConsumer.h
@@ -418,7 +418,7 @@ public:
bool handleObjCCategory(const ObjCCategoryDecl *D);
bool handleObjCCategoryImpl(const ObjCCategoryImplDecl *D);
- bool handleObjCMethod(const ObjCMethodDecl *D);
+ bool handleObjCMethod(const ObjCMethodDecl *D, SourceLocation Loc);
bool handleSynthesizedObjCProperty(const ObjCPropertyImplDecl *D);
bool handleSynthesizedObjCMethod(const ObjCMethodDecl *D, SourceLocation Loc,
OpenPOWER on IntegriCloud