aboutsummaryrefslogtreecommitdiff
path: root/test/Modules/macros.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-10-12 00:16:50 +0000
committerDouglas Gregor <dgregor@apple.com>2012-10-12 00:16:50 +0000
commit54c8a40ed658676b1f3f983728feae488c501477 (patch)
tree47ddb13c62d45ea8ee26c02a35015cddc7781605 /test/Modules/macros.c
parent6ec69c3f436babcdb83fd7ecb2ad722d8719bd89 (diff)
Track which particular submodule #undef's a macro, so that the actual
#undef only occurs if that submodule is imported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165773 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules/macros.c')
-rw-r--r--test/Modules/macros.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/Modules/macros.c b/test/Modules/macros.c
index 8f6a20aa93..8db3915f24 100644
--- a/test/Modules/macros.c
+++ b/test/Modules/macros.c
@@ -107,10 +107,6 @@ void test1() {
# error TOP should be visible
#endif
-#ifndef TOP_LEFT_UNDEF
-# error TOP_LEFT_UNDEF should be visible
-#endif
-
void test2() {
int i;
float f;
@@ -129,3 +125,13 @@ void test3() {
double d;
LEFT_RIGHT_DIFFERENT *dp = &d; // okay
}
+
+#ifndef TOP_RIGHT_UNDEF
+# error TOP_RIGHT_UNDEF should still be defined
+#endif
+
+@__experimental_modules_import macros_right.undef;
+
+#ifdef TOP_RIGHT_UNDEF
+# error TOP_RIGHT_UNDEF should not be defined
+#endif