1 | // RUN: clang-tblgen -gen-clang-diag-groups -I%S %s -o /dev/null 2>&1 | FileCheck --strict-whitespace %s |
2 | include "DiagnosticBase.inc" |
3 | |
4 | def NamedGroup : DiagGroup<"name">; |
5 | |
6 | def InNamedGroup : Warning<"">, InGroup<DiagGroup<"name">>; |
7 | // CHECK: tg-fixits.td:[[@LINE-1]]:1: error: group 'name' is referred to anonymously |
8 | // CHECK-NEXT: {{^def InNamedGroup : Warning<"">, InGroup<DiagGroup<"name">>;}} |
9 | |
10 | def Wrapped : Warning<"">, InGroup<DiagGroup< |
11 | "name">>; |
12 | // CHECK: tg-fixits.td:[[@LINE-2]]:1: error: group 'name' is referred to anonymously |
13 | // CHECK-NEXT: {{^def Wrapped : Warning<"">, InGroup<DiagGroup<}} |
14 | |
15 | def AlsoWrapped : Warning<"">, InGroup< |
16 | DiagGroup<"name">>; |
17 | // CHECK: tg-fixits.td:[[@LINE-2]]:1: error: group 'name' is referred to anonymously |
18 | |
19 | // The following line has Unicode characters in it; do not change them! |
20 | // FIXME: For now, we just give up on printing carets/ranges/fixits for |
21 | // lines with Unicode in them, because SMDiagnostic don't keep a byte<->column |
22 | // map around to line things up like Clang does. |
23 | def Unicode : Warning<"ユニコード">, InGroup<DiagGroup<"name">>; |
24 | // CHECK: tg-fixits.td:[[@LINE-1]]:1: error: group 'name' is referred to anonymously |
25 | // CHECK-NEXT: def Unicode : Warning<"{{[^"]+}}">, InGroup<DiagGroup<"name">>; |
26 | |