ms-inline-asm.c revision 96bd14bf5833e26db0744fb94cfc85b2a67ae5c5
1// REQUIRES: x86-64-registered-target
2// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -fasm-blocks -fenable-experimental-ms-inline-asm -Wno-microsoft -verify -fsyntax-only
3
4void t1(void) {
5 __asm __asm // expected-error {{__asm used with no assembly instructions}}
6}
7
8void f() {
9  int foo;
10  __asm {
11    mov eax, eax
12    .unknowndirective // expected-error {{unknown directive}}
13  }
14  f();
15  __asm {
16    mov eax, 1+=2 // expected-error 2 {{unknown token in expression}}
17  }
18  f();
19  __asm {
20    mov eax, 1+++ // expected-error 2 {{unknown token in expression}}
21  }
22  f();
23  __asm {
24    mov eax, LENGTH bar // expected-error {{Unable to lookup expr!}}
25  }
26  f();
27  __asm {
28    mov eax, SIZE bar // expected-error {{Unable to lookup expr!}}
29  }
30  f();
31  __asm {
32    mov eax, TYPE bar // expected-error {{Unable to lookup expr!}}
33  }
34}
35