summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-08-18 01:16:55 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-08-18 01:16:55 +0000
commit3dba7ebde4e53e3b6feced891cecd4b045e82780 (patch)
tree6694e66b6595dfc34d36d8b61d4f783045475065 /clang/test/Modules
parentf2b5ec6ef427d8d4129ac5e78ceb319af60a2f99 (diff)
downloadbcm5719-llvm-3dba7ebde4e53e3b6feced891cecd4b045e82780.tar.gz
bcm5719-llvm-3dba7ebde4e53e3b6feced891cecd4b045e82780.zip
PR28438: Update the information on an identifier with local definitions before
trying to write out its macro graph, in case we imported a module that added another module macro between the most recent local definition and the end of the module. llvm-svn: 279024
Diffstat (limited to 'clang/test/Modules')
-rw-r--r--clang/test/Modules/Inputs/PR28438/a.h1
-rw-r--r--clang/test/Modules/Inputs/PR28438/b1.h2
-rw-r--r--clang/test/Modules/Inputs/PR28438/b2.h0
-rw-r--r--clang/test/Modules/Inputs/PR28438/module.modulemap2
-rw-r--r--clang/test/Modules/pr28438.cpp9
5 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/PR28438/a.h b/clang/test/Modules/Inputs/PR28438/a.h
new file mode 100644
index 00000000000..a7e26ac6cdb
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR28438/a.h
@@ -0,0 +1 @@
+#define FOO
diff --git a/clang/test/Modules/Inputs/PR28438/b1.h b/clang/test/Modules/Inputs/PR28438/b1.h
new file mode 100644
index 00000000000..262976e357f
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR28438/b1.h
@@ -0,0 +1,2 @@
+#define FOO
+#include "a.h"
diff --git a/clang/test/Modules/Inputs/PR28438/b2.h b/clang/test/Modules/Inputs/PR28438/b2.h
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR28438/b2.h
diff --git a/clang/test/Modules/Inputs/PR28438/module.modulemap b/clang/test/Modules/Inputs/PR28438/module.modulemap
new file mode 100644
index 00000000000..cb77d47b6ce
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR28438/module.modulemap
@@ -0,0 +1,2 @@
+module A { header "a.h" export * }
+module B { module B1 { header "b1.h" export * } module B2 { header "b2.h" export * } }
diff --git a/clang/test/Modules/pr28438.cpp b/clang/test/Modules/pr28438.cpp
new file mode 100644
index 00000000000..b8b9077046a
--- /dev/null
+++ b/clang/test/Modules/pr28438.cpp
@@ -0,0 +1,9 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fsyntax-only -verify %s -fmodules -fmodules-cache-path=%t -I%S/Inputs/PR28438 -fimplicit-module-maps
+
+#include "a.h"
+#include "b2.h"
+
+#pragma clang __debug macro FOO
+
+FOO // xpected-no-diagnostics
OpenPOWER on IntegriCloud