2009-12-15 23:14:24 +03:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2007-11-22 02:27:34 +03:00
|
|
|
|
|
|
|
void f1() {
|
2010-07-22 11:11:21 +04:00
|
|
|
// PR7673: Some versions of GCC support an empty clobbers section.
|
|
|
|
asm ("ret" : : :);
|
2007-11-22 02:27:34 +03:00
|
|
|
}
|
2008-02-09 22:57:29 +03:00
|
|
|
|
|
|
|
void f2() {
|
|
|
|
asm("foo" : "=r" (a)); // expected-error {{use of undeclared identifier 'a'}}
|
|
|
|
asm("foo" : : "r" (b)); // expected-error {{use of undeclared identifier 'b'}}
|
|
|
|
}
|
2008-05-28 03:32:43 +04:00
|
|
|
|
|
|
|
|
|
|
|
// rdar://5952468
|
|
|
|
__asm ; // expected-error {{expected '(' after 'asm'}}
|
|
|
|
|
2011-12-02 04:35:46 +04:00
|
|
|
// <rdar://problem/10465079> - Don't crash on wide string literals in 'asm'.
|
|
|
|
int foo asm (L"bar"); // expected-error {{cannot use wide string literal in 'asm'}}
|
|
|
|
|