ms-inline-asm.c revision 15490fd42d7d8dca2f9b5b3a9dc074892ca1acd7
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, TYPE cat // expected-error {{Unable to lookup TYPE of expr!}}
25  }
26  f();
27  __asm {
28    mov eax, SIZE foo // expected-error {{Unsupported directive!}}
29  }
30  f();
31  __asm {
32    mov eax, LENGTH foo // expected-error {{Unsupported directive!}}
33  }
34
35}
36