summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Modules')
-rw-r--r--clang/test/Modules/Inputs/macros-indirect.h1
-rw-r--r--clang/test/Modules/Inputs/macros.h1
-rw-r--r--clang/test/Modules/macros.c4
3 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/macros-indirect.h b/clang/test/Modules/Inputs/macros-indirect.h
new file mode 100644
index 00000000000..c90300e464f
--- /dev/null
+++ b/clang/test/Modules/Inputs/macros-indirect.h
@@ -0,0 +1 @@
+#define INDIRECTLY_IN_MACROS 1
diff --git a/clang/test/Modules/Inputs/macros.h b/clang/test/Modules/Inputs/macros.h
index 27f43c0626e..a0ae7a31582 100644
--- a/clang/test/Modules/Inputs/macros.h
+++ b/clang/test/Modules/Inputs/macros.h
@@ -17,3 +17,4 @@ int (INTEGER);
extern int __MODULE__;
#endif
+#include "macros-indirect.h"
diff --git a/clang/test/Modules/macros.c b/clang/test/Modules/macros.c
index 92ea88a4802..3ca53005cf3 100644
--- a/clang/test/Modules/macros.c
+++ b/clang/test/Modules/macros.c
@@ -28,6 +28,10 @@
# error MODULE macro should not be visible
#endif
+#ifndef INDIRECTLY_IN_MACROS
+# error INDIRECTLY_IN_MACROS should be visible
+#endif
+
// CHECK-PREPROCESSED: double d
double d;
DOUBLE *dp = &d;
OpenPOWER on IntegriCloud