summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorAleksei Sidorin <a.sidorin@samsung.com>2018-01-09 14:25:05 +0000
committerAleksei Sidorin <a.sidorin@samsung.com>2018-01-09 14:25:05 +0000
commit47dbaf6c8e7108631a6c296c6915cd9fca12eacd (patch)
tree4d520202998d6a18a116d1954b878c41c2aa8b57 /clang/lib
parent5d909be91b32cd7627f328844fbee39f80033292 (diff)
downloadbcm5719-llvm-47dbaf6c8e7108631a6c296c6915cd9fca12eacd.tar.gz
bcm5719-llvm-47dbaf6c8e7108631a6c296c6915cd9fca12eacd.zip
[ASTImporter] Fix missing SourceLoc import for ObjCMethodDecl selectors
Patch by Nico Rieck, test case by Sean Callanan! Differential Revision: https://reviews.llvm.org/D6550 llvm-svn: 322079
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/ASTImporter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp
index cca43eed3e6..11d31156b8e 100644
--- a/clang/lib/AST/ASTImporter.cpp
+++ b/clang/lib/AST/ASTImporter.cpp
@@ -2857,9 +2857,13 @@ Decl *ASTNodeImporter::VisitObjCMethodDecl(ObjCMethodDecl *D) {
ToParams[I]->setOwningFunction(ToMethod);
ToMethod->addDeclInternal(ToParams[I]);
}
+
SmallVector<SourceLocation, 12> SelLocs;
D->getSelectorLocs(SelLocs);
- ToMethod->setMethodParams(Importer.getToContext(), ToParams, SelLocs);
+ for (SourceLocation &Loc : SelLocs)
+ Loc = Importer.Import(Loc);
+
+ ToMethod->setMethodParams(Importer.getToContext(), ToParams, SelLocs);
ToMethod->setLexicalDeclContext(LexicalDC);
Importer.Imported(D, ToMethod);
OpenPOWER on IntegriCloud