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 | 0fd787bb8529ace1cb7af592193ba22d0bab2d36 (patch) | |
tree | e9402768305c0162689e0cd776f94a07e3bfc02d /lib/Lex/HeaderSearch.cpp | |
parent | c3ba24f8af1ded9ec494960061f544e953dc4abf (diff) |
Tweak the module auto-import heuristics a bit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139887 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/HeaderSearch.cpp')
-rw-r--r-- | lib/Lex/HeaderSearch.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Lex/HeaderSearch.cpp b/lib/Lex/HeaderSearch.cpp index 8a35080fe0..ca641d4c0d 100644 --- a/lib/Lex/HeaderSearch.cpp +++ b/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(), |