[cfe-commits] r139887 - /cfe/trunk/lib/Lex/HeaderSearch.cpp

Douglas Gregor dgregor at apple.com
Thu Sep 15 17:22:46 PDT 2011


Author: dgregor
Date: Thu Sep 15 19:22:46 2011
New Revision: 139887

URL: http://llvm.org/viewvc/llvm-project?rev=139887&view=rev
Log:
Tweak the module auto-import heuristics a bit

Modified:
    cfe/trunk/lib/Lex/HeaderSearch.cpp

Modified: cfe/trunk/lib/Lex/HeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/HeaderSearch.cpp?rev=139887&r1=139886&r2=139887&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/HeaderSearch.cpp (original)
+++ cfe/trunk/lib/Lex/HeaderSearch.cpp Thu Sep 15 19:22:46 2011
@@ -289,7 +289,8 @@
 
   /// 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(),





More information about the cfe-commits mailing list