aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2012-03-01 04:18:49 +0000
committerAaron Ballman <aaron@aaronballman.com>2012-03-01 04:18:49 +0000
commit7abe1666f225b6d1a11aa7ed19d9a0dcc49391cb (patch)
tree1f00308f151460e44b2fc9af6abec81749d045c3 /test/Preprocessor
parent6454a02e7bbda180ef3867b6ae3c1aee327a34a7 (diff)
Implements support for #pragma include_alias in ms compatibility mode. Fixes PR10705.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151800 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor')
-rw-r--r--test/Preprocessor/pragma_microsoft.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Preprocessor/pragma_microsoft.c b/test/Preprocessor/pragma_microsoft.c
index b68d6e363e..88925ffdb2 100644
--- a/test/Preprocessor/pragma_microsoft.c
+++ b/test/Preprocessor/pragma_microsoft.c
@@ -38,3 +38,20 @@ void f()
// this warning should go away.
MACRO_WITH__PRAGMA // expected-warning {{expression result unused}}
}
+
+
+// This should include macro_arg_directive even though the include
+// is looking for test.h This allows us to assign to "n"
+#pragma include_alias("test.h", "macro_arg_directive.h" )
+#include "test.h"
+void test( void ) {
+ n = 12;
+}
+
+#pragma include_alias("foo.h", <bar.h>) // expected-warning {{pragma include_alias requires matching include directives (e.g include_alias("foo.h", "bar.h") or include_alias(<foo.h>, <bar.h>))}}
+#pragma include_alias("test.h") // expected-warning {{pragma include_alias expected ','}}
+
+// Make sure that the names match exactly for a replacement, including path information. If
+// this were to fail, we would get a file not found error
+#pragma include_alias(".\pp-record.h", "does_not_exist.h")
+#include "pp-record.h"