summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/ms-inline-asm.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/ms-inline-asm.c')
-rw-r--r--clang/test/Sema/ms-inline-asm.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/clang/test/Sema/ms-inline-asm.c b/clang/test/Sema/ms-inline-asm.c
index 4c9dfd0b599..169c27f535d 100644
--- a/clang/test/Sema/ms-inline-asm.c
+++ b/clang/test/Sema/ms-inline-asm.c
@@ -1,5 +1,20 @@
-// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -fms-extensions -fenable-experimental-ms-inline-asm -verify -fsyntax-only
+// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -fms-extensions -fenable-experimental-ms-inline-asm -Wno-microsoft -verify -fsyntax-only
void t1(void) {
- __asm __asm // expected-warning {{MS-style inline assembly is not supported}} expected-error {{__asm used with no assembly instructions}}
+ __asm __asm // expected-error {{__asm used with no assembly instructions}}
+}
+
+void f() {
+ __asm {
+ mov eax, eax
+ .unknowndirective // expected-error {{unknown directive}}
+ }
+ f();
+ __asm {
+ mov eax, 1+=2 // expected-error 2 {{unknown token in expression}}
+ }
+ f();
+ __asm {
+ mov eax, 1+++ // expected-error 2 {{unknown token in expression}}
+ }
}
OpenPOWER on IntegriCloud