1 # RUN: not llvm-mc -triple=x86_64 %s -o /dev/null 2>&1 | FileCheck %s --match-full-lines --strict-whitespace
3 # CHECK:{{.*}}.s:[[#@LINE+3]]:36: error: missing parameter qualifier for 'parameter' in macro 'missing_qualifier'
4 # CHECK-NEXT:.macro missing_qualifier parameter:
6 .macro missing_qualifier parameter:
8 # CHECK-NEXT:{{.*}}.s:[[#@LINE+3]]:43: error: missing parameter qualifier for 'parameter' in macro 'non_identifier_qualifier'
9 # CHECK-NEXT:.macro non_identifier_qualifier parameter:0
11 .macro non_identifier_qualifier parameter:0
13 # CHECK-NEXT:{{.*}}.s:[[#@LINE+3]]:36: error: invalid_qualifier is not a valid parameter qualifier for 'parameter' in macro 'invalid_qualifier'
14 # CHECK-NEXT:.macro invalid_qualifier parameter:invalid_qualifier
16 .macro invalid_qualifier parameter:invalid_qualifier
18 # CHECK-NEXT:{{.*}}.s:[[#@LINE+3]]:40: warning: pointless default value for required parameter 'parameter' in macro 'pointless_default'
19 # CHECK-NEXT:.macro pointless_default parameter:req=default
21 .macro pointless_default parameter:req=default
24 # CHECK-NEXT:{{.*}}.s:[[#@LINE+5]]:17: error: missing value for required parameter 'parameter' in macro 'missing_required'
25 # CHECK-NEXT:missing_required
27 .macro missing_required parameter:req
31 # CHECK-NEXT:{{.*}}.s:[[#@LINE+5]]:24: error: missing value for required parameter 'second' in macro 'missing_second_required'
32 # CHECK-NEXT:missing_second_required
34 .macro missing_second_required first=0 second:req
36 missing_second_required
38 # CHECK-NEXT:{{.*}}.s:[[#@LINE+8]]:24: error: missing value for required parameter 'second' in macro 'second_third_required'
39 # CHECK-NEXT:second_third_required 0
41 # CHECK-NEXT:{{.*}}.s:[[#@LINE+5]]:24: error: missing value for required parameter 'third' in macro 'second_third_required'
42 # CHECK-NEXT:second_third_required 0
44 .macro second_third_required first=0 second:req third:req
46 second_third_required
0
48 # CHECK-NEXT:{{.*}}.s:[[#@LINE+3]]:38: error: missing value for required parameter 'second' in macro 'second_third_required'
49 # CHECK-NEXT:second_third_required third=3 first=1
51 second_third_required third
=3 first
=1