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