diff options
| author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2017-08-10 15:16:24 +0000 |
|---|---|---|
| committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2017-08-10 15:16:24 +0000 |
| commit | fca5abc9d23354a98562b55f4ee80347c7ae2c6a (patch) | |
| tree | 20f2c6fbe3bcb86307939aaf13202678f57ee762 /clang/test | |
| parent | 926e2d39bf3862200586fbb061afb3121391dfc2 (diff) | |
| download | bcm5719-llvm-fca5abc9d23354a98562b55f4ee80347c7ae2c6a.tar.gz bcm5719-llvm-fca5abc9d23354a98562b55f4ee80347c7ae2c6a.zip | |
[Modules] Prevent #import to reenter header if not building a module.
When non-modular headers are imported while not building a module but
in -fmodules mode, be conservative and preserve the default #import
semantic: do not reenter headers.
rdar://problem/33745031
llvm-svn: 310605
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Modules/Inputs/import-textual/x.h | 6 | ||||
| -rw-r--r-- | clang/test/Modules/import-textual-nomodules.m | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/import-textual/x.h b/clang/test/Modules/Inputs/import-textual/x.h new file mode 100644 index 00000000000..9b41ccd0bdc --- /dev/null +++ b/clang/test/Modules/Inputs/import-textual/x.h @@ -0,0 +1,6 @@ +#ifndef RANDOM_DEP + +@interface X +@end + +#endif // RANDOM_DEP diff --git a/clang/test/Modules/import-textual-nomodules.m b/clang/test/Modules/import-textual-nomodules.m new file mode 100644 index 00000000000..7cf8c1e186d --- /dev/null +++ b/clang/test/Modules/import-textual-nomodules.m @@ -0,0 +1,8 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fsyntax-only -fmodules -fimplicit-module-maps -I%S/Inputs/import-textual -fmodules-cache-path=%t %s -verify + +// expected-no-diagnostics + +#import "x.h" +#import "x.h" + |

