aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Preprocessor/directives_asm.S
blob: a384b911005f707ce040bbe55df2342c2066e502 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// 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