Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Anders Carlsson | eecf847 | 2007-11-21 23:27:34 +0000 | [diff] [blame] | 2 | |
| 3 | void f1() { |
| 4 | asm ("ret" : : :); // expected-error {{expected string literal}} |
| 5 | } |
Anders Carlsson | 8bd36fc | 2008-02-09 19:57:29 +0000 | [diff] [blame] | 6 | |
| 7 | void f2() { |
| 8 | asm("foo" : "=r" (a)); // expected-error {{use of undeclared identifier 'a'}} |
| 9 | asm("foo" : : "r" (b)); // expected-error {{use of undeclared identifier 'b'}} |
| 10 | } |
Chris Lattner | aec3a1e | 2008-05-27 23:32:43 +0000 | [diff] [blame] | 11 | |
| 12 | |
| 13 | // rdar://5952468 |
| 14 | __asm ; // expected-error {{expected '(' after 'asm'}} |
| 15 | |