2013-01-25 04:46:39 +08:00
|
|
|
// REQUIRES: disabled
|
2013-01-23 03:38:32 +08:00
|
|
|
// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -fasm-blocks -Wno-microsoft -verify -fsyntax-only
|
2012-09-25 03:57:59 +08:00
|
|
|
|
|
|
|
void t1(void) {
|
2012-10-23 10:43:30 +08:00
|
|
|
__asm __asm // expected-error {{__asm used with no assembly instructions}}
|
|
|
|
}
|
|
|
|
|
|
|
|
void f() {
|
2012-10-27 02:33:59 +08:00
|
|
|
int foo;
|
2012-10-23 10:43:30 +08:00
|
|
|
__asm {
|
|
|
|
mov eax, eax
|
|
|
|
.unknowndirective // expected-error {{unknown directive}}
|
|
|
|
}
|
|
|
|
f();
|
|
|
|
__asm {
|
|
|
|
mov eax, 1+=2 // expected-error 2 {{unknown token in expression}}
|
|
|
|
}
|
|
|
|
f();
|
|
|
|
__asm {
|
|
|
|
mov eax, 1+++ // expected-error 2 {{unknown token in expression}}
|
|
|
|
}
|
2013-01-18 08:51:29 +08:00
|
|
|
f();
|
|
|
|
__asm {
|
|
|
|
mov eax, LENGTH bar // expected-error {{Unable to lookup expr!}}
|
|
|
|
}
|
|
|
|
f();
|
|
|
|
__asm {
|
|
|
|
mov eax, SIZE bar // expected-error {{Unable to lookup expr!}}
|
|
|
|
}
|
|
|
|
f();
|
|
|
|
__asm {
|
|
|
|
mov eax, TYPE bar // expected-error {{Unable to lookup expr!}}
|
|
|
|
}
|
2012-09-25 03:57:59 +08:00
|
|
|
}
|