}
// Determine whether this is the module we're building or not.
- // FIXME: Do we still need the ".." hack?
- bool AutomaticImport = Module &&
- !Filename.substr(SlashPos + 1).startswith("..");
-
+ bool AutomaticImport = Module;
FrameworkName.append(Filename.begin()+SlashPos+1, Filename.end());
if (const FileEntry *FE = FileMgr.getFile(FrameworkName.str(),
/*openFile=*/!AutomaticImport)) {
if (AutomaticImport)
- *SuggestedModule = Module;
+ *SuggestedModule = HS.findModuleForHeader(FE);
return FE;
}
const FileEntry *FE = FileMgr.getFile(FrameworkName.str(),
/*openFile=*/!AutomaticImport);
if (FE && AutomaticImport)
- *SuggestedModule = Module;
+ *SuggestedModule = HS.findModuleForHeader(FE);
return FE;
}
Module *mod2;
int getDependsOther() { return depends_on_module_other; }
+
+void testSubframeworkOther() {
+ double *sfo1 = sub_framework_other; // expected-error{{use of undeclared identifier 'sub_framework_other'}}
+}
+
+// Test header cross-subframework include pattern.
+#include <DependsOnModule/../Frameworks/SubFramework.framework/Headers/Other.h> // expected-warning{{treating #include as an import of module 'DependsOnModule.SubFramework'}}
+
+void testSubframeworkOtherAgain() {
+ double *sfo1 = sub_framework_other;
+}