macro-qualifier-diagnostics.s
2.31 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# RUN: not llvm-mc -triple i386 -o /dev/null %s 2>&1 | FileCheck %s
.macro missing_qualifier parameter:
# CHECK: error: missing parameter qualifier for 'parameter' in macro 'missing_qualifier'
# CHECK: .macro missing_qualifier parameter:
# CHECK: ^
.macro non_identifier_qualifier parameter:0
# CHECK: error: missing parameter qualifier for 'parameter' in macro 'non_identifier_qualifier'
# CHECK: .macro non_identifier_qualifier parameter:0
# CHECK: ^
.macro invalid_qualifier parameter:invalid_qualifier
# CHECK: error: invalid_qualifier is not a valid parameter qualifier for 'parameter' in macro 'invalid_qualifier'
# CHECK: .macro invalid_qualifier parameter:invalid_qualifier
# CHECK: ^
.macro pointless_default parameter:req=default
.endm
# CHECK: warning: pointless default value for required parameter 'parameter' in macro 'pointless_default'
# CHECK: .macro pointless_default parameter:req=default
# CHECK: ^
.macro missing_required_parameter parameter:req
.endm
missing_required_parameter
# CHECK: error: missing value for required parameter 'parameter' in macro 'missing_required_parameter'
# CHECK: missing_required_parameter
# CHECK: ^
.macro missing_second_required_argument first=0 second:req
.endm
missing_second_required_argument
# CHECK: error: missing value for required parameter 'second' in macro 'missing_second_required_argument'
# CHECK: missing_second_required_argument
# CHECK: ^
.macro second_third_required first=0 second:req third:req
.endm
second_third_required 0
# CHECK: error: missing value for required parameter 'second' in macro 'second_third_required'
# CHECK: second_third_required 0
# CHECK: ^
# CHECK: error: missing value for required parameter 'third' in macro 'second_third_required'
# CHECK: second_third_required 0
# CHECK: ^
second_third_required third=3 first=1
# CHECK: error: missing value for required parameter 'second' in macro 'second_third_required'
# CHECK: second_third_required third=3 first=1
# CHECK: ^