diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-12-01 03:32:49 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-12-01 03:32:49 +0000 |
commit | 8ad3521b882e57820bac6b8968cb09455861dc74 (patch) | |
tree | 6ae038d05093d0a09f1683df6f66a17e7d3a4e98 /test | |
parent | 8c57950603ca9fdb7b0dfd285900f71d7a888e09 (diff) | |
download | clang-8ad3521b882e57820bac6b8968cb09455861dc74.tar.gz |
[modules] Don't reject multiple modules providing contents for the same embedded file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Modules/embed-files.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Modules/embed-files.cpp b/test/Modules/embed-files.cpp new file mode 100644 index 0000000000..a1db21852d --- /dev/null +++ b/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}} |