llvm-project/clang/test/Preprocessor/directives_asm.S
John Brawn 9b2895469b Use explicit target in clang/test/Preprocessor/directives_asm.S
This prevents the test from failing when the default target doesn't
support the .warning directive.
2023-03-07 18:06:41 +00:00

27 lines
719 B
ArmAsm

// REQUIRES: x86-registered-target
// RUN: %clang --target=i386-pc-linux -c %s -o /dev/null 2>&1 | FileCheck %s
// Check that preprocessor directives are recognised as such, but lines starting
// with a # that aren't directives are instead treated as comments.
#define MACRO .warning "This is a macro"
MACRO
// CHECK: directives_asm.S:8:9: warning: This is a macro
#not a preprocessing directive
// CHECK-NOT: error: invalid preprocessing directive
# 100
.warning "line number should not change"
// CHECK: directives_asm.S:18:9: warning: line number should not change
#line 100
.warning "line number should change"
// CHECK: directives_asm.S:101:9: warning: line number should change