]> granicus.if.org Git - clang/commitdiff
[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)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166793 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/ms-inline-asm.c

index 0c34b0fb4de823054d86c85bfb61ba0bfd146d5a..f6a0fdcb42eb64a7b590519c0f8f48fe653a5907 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!}}
+  }
+
 }