aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Modules/embed-files.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-12-01 03:32:49 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-12-01 03:32:49 +0000
commit64daf7b1a5c24fe09045dc15b2bc55cc702633e1 (patch)
tree8dad84c41bb47286a879572fafe1c5655c5a2e5c /clang/test/Modules/embed-files.cpp
parent38518e9f538b3ad1e1d0f1c0a0448f084872ca69 (diff)
downloadllvm-64daf7b1a5c24fe09045dc15b2bc55cc702633e1.zip
llvm-64daf7b1a5c24fe09045dc15b2bc55cc702633e1.tar.gz
llvm-64daf7b1a5c24fe09045dc15b2bc55cc702633e1.tar.bz2
[modules] Don't reject multiple modules providing contents for the same embedded file.
llvm-svn: 254365
Diffstat (limited to 'clang/test/Modules/embed-files.cpp')
-rw-r--r--clang/test/Modules/embed-files.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Modules/embed-files.cpp b/clang/test/Modules/embed-files.cpp
new file mode 100644
index 0000000..a1db218
--- /dev/null
+++ b/clang/test/Modules/embed-files.cpp
@@ -0,0 +1,15 @@
+// RUN: rm -rf %t
+// RUN: mkdir %t
+// RUN: echo 'module a { header "a.h" } module b { header "b.h" }' > %t/modulemap
+// RUN: echo 'extern int t;' > %t/t.h
+// RUN: echo '#include "t.h"' > %t/a.h
+// RUN: echo '#include "t.h"' > %t/b.h
+
+// RUN: %clang_cc1 -fmodules -I%t -fmodules-cache-path=%t -fmodule-map-file=%t/modulemap -fmodules-embed-all-files %s -verify
+#include "a.h"
+char t; // expected-error {{different type}}
+// expected-note@t.h:1 {{here}}
+#include "t.h"
+#include "b.h"
+char t; // expected-error {{different type}}
+// expected-note@t.h:1 {{here}}