Fixes all spots I could identify that use SourceLocs without importing them first.
Details
- Reviewers
spyffe nrieck xazax.hun szepet jingham - Commits
- rG47dbaf6c8e71: [ASTImporter] Fix missing SourceLoc import for ObjCMethodDecl selectors
rL322079: [ASTImporter] Fix missing SourceLoc import for ObjCMethodDecl selectors
rC322079: [ASTImporter] Fix missing SourceLoc import for ObjCMethodDecl selectors
Diff Detail
- Repository
- rC Clang
Event Timeline
This patch lacks tests. If you add at least minimal test case (I'm not familiar with ObjC and its front-end, unfortunately), I will no have any concerns. Also adding Sean.
Will anybody object if I commit this change without a test? This bug seems to be pretty obvious but, unfortunately, I'm not familiar with Objective C.
Hmm, the transforming in place of SelLocs reads a little weirdly to me, but other than that the code seems fine.
Is your concern that you don't know how to write an Objective-C test that would cover this? It looks to me like an Objective-C interface with a method:
@interface MyClass { } -(int)addInt:(int)a toInt:(int)b moduloInt:(int)c; @end
might be enough for an ASTMerge test. If you want to make clang-import-test use this code, then we might need to add one or two things into that tester to handle Objective-C method lookup.
This chunk should be fixed by r236012.