[ms-inline asm] Add test case for r166792.
authorChad Rosier <mcrosier@apple.com>
Fri, 26 Oct 2012 18:33:59 +0000 (18:33 +0000)
committerChad Rosier <mcrosier@apple.com>
Fri, 26 Oct 2012 18:33:59 +0000 (18:33 +0000)
llvm-svn: 166793

clang/test/Sema/ms-inline-asm.c

index 0c34b0f..f6a0fdc 100644 (file)
@@ -6,6 +6,7 @@ void t1(void) {
 }
 
 void f() {
+  int foo;
   __asm { 
     mov eax, eax
     .unknowndirective // expected-error {{unknown directive}}
@@ -18,4 +19,17 @@ void f() {
   __asm {
     mov eax, 1+++ // expected-error 2 {{unknown token in expression}}
   }
+  f();
+  __asm {
+    mov eax, TYPE cat // expected-error {{Unable to lookup TYPE of expr!}}
+  }
+  f();
+  __asm {
+    mov eax, SIZE foo // expected-error {{Unsupported directive!}}
+  }
+  f();
+  __asm {
+    mov eax, LENGTH foo // expected-error {{Unsupported directive!}}
+  }
+
 }