Index: test/Misc/inline-asm-diags.c =================================================================== --- /dev/null +++ test/Misc/inline-asm-diags.c @@ -0,0 +1,25 @@ +// RUN: not %clang -c --target=armv7a-arm-none-eabi %s -o /dev/null 2>&1 | FileCheck %s + +void foo2() { + asm(" wibble"); +} + +// CHECK: 4:6: error: invalid instruction +// CHECK: asm(" wibble"); +// CHECK: ^ +// CHECK: :1:3: note: instantiated into assembly here +// CHECK: wibble +// CHECK: ^~~~~~ + +void foo() { + asm(" .word -bar"); + asm(" .word -foo"); +} + +// CHECK: :1:3: error: expected relocatable expression +// CHECK: .word -bar +// CHECK: ^ + +// CHECK: :1:3: error: expected relocatable expression +// CHECK: .word -foo +// CHECK: ^