From a15364152cf4d6267a82b616151de301291f2f5b Mon Sep 17 00:00:00 2001 From: Yuka Takahashi Date: Tue, 10 Jul 2018 12:17:34 +0000 Subject: [modules] Fix 37878; Autoload subdirectory modulemaps with specific LangOpts Summary: Reproducer and errors: https://bugs.llvm.org/show_bug.cgi?id=37878 lookupModule was falling back to loadSubdirectoryModuleMaps when it couldn't find ModuleName in (proper) search paths. This was causing iteration over all files in the search path subdirectories for example "/usr/include/foobar" in bugzilla case. Users don't expect Clang to load modulemaps in subdirectories implicitly, and also the disk access is not cheap. if (AllowExtraModuleMapSearch) true with ObjC with @import ModuleName. Reviewers: rsmith, aprantl, bruno Subscribers: cfe-commits, teemperor, v.g.vassilev Differential Revision: https://reviews.llvm.org/D48367 llvm-svn: 336660 --- clang/test/Modules/Inputs/autoload-subdirectory/c.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 clang/test/Modules/Inputs/autoload-subdirectory/c.h (limited to 'clang/test/Modules/Inputs/autoload-subdirectory/c.h') diff --git a/clang/test/Modules/Inputs/autoload-subdirectory/c.h b/clang/test/Modules/Inputs/autoload-subdirectory/c.h new file mode 100644 index 00000000000..e5a45250f9f --- /dev/null +++ b/clang/test/Modules/Inputs/autoload-subdirectory/c.h @@ -0,0 +1,7 @@ +class nyan { + bool x, y; + +public: + nyan(){}; + ~nyan(){}; +}; -- cgit v1.2.3