diff options
| author | Douglas Gregor <dgregor@apple.com> | 2011-09-16 00:22:46 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2011-09-16 00:22:46 +0000 |
| commit | 88b4ddfa91eca9512ce3d289e9471d3f02677ad3 (patch) | |
| tree | 03bb8f9d64add74243e8be8e3daf0996ebbabbe4 /clang/lib | |
| parent | b1feced6769403efb7953c0b1692e17025ce04b1 (diff) | |
| download | bcm5719-llvm-88b4ddfa91eca9512ce3d289e9471d3f02677ad3.tar.gz bcm5719-llvm-88b4ddfa91eca9512ce3d289e9471d3f02677ad3.zip | |
Tweak the module auto-import heuristics a bit
llvm-svn: 139887
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Lex/HeaderSearch.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp index 8a35080fe04..ca641d4c0dc 100644 --- a/clang/lib/Lex/HeaderSearch.cpp +++ b/clang/lib/Lex/HeaderSearch.cpp @@ -289,7 +289,8 @@ const FileEntry *DirectoryLookup::DoFrameworkLookup( /// Determine whether this is the module we're building or not. bool AutomaticImport = SuggestedModule && - (BuildingModule != StringRef(Filename.begin(), SlashPos)); + (BuildingModule != StringRef(Filename.begin(), SlashPos)) && + !Filename.substr(SlashPos + 1).startswith(".."); FrameworkName.append(Filename.begin()+SlashPos+1, Filename.end()); if (const FileEntry *FE = FileMgr.getFile(FrameworkName.str(), |

