File: redefined-group.td

package info (click to toggle)
swiftlang 6.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,791,604 kB
  • sloc: cpp: 9,901,740; ansic: 2,201,431; asm: 1,091,827; python: 308,252; objc: 82,166; f90: 80,126; lisp: 38,358; pascal: 25,559; sh: 20,429; ml: 5,058; perl: 4,745; makefile: 4,484; awk: 3,535; javascript: 3,018; xml: 918; fortran: 664; cs: 573; ruby: 396
file content (43 lines) | stat: -rw-r--r-- 2,281 bytes parent folder | download | duplicates (16)
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
// RUN: clang-tblgen -gen-clang-diag-groups -I%S %s -o /dev/null 2>&1 | FileCheck %s
include "DiagnosticBase.inc"

def NamedGroup : DiagGroup<"a">;
def InNamedGroup1 : Warning<"">, InGroup<DiagGroup<"a">>;
def InNamedGroup2 : Warning<"">, InGroup  < DiagGroup<"a"> >;
// CHECK: redefined-group.td:[[@LINE-3]]:5: error: group 'a' is defined more than once
// CHECK: redefined-group.td:[[@LINE-3]]:5: note: also implicitly defined here
// CHECK: redefined-group.td:[[@LINE-3]]:5: note: also implicitly defined here

def : DiagGroup<"b">;
def InUnnamedGroup : Warning<"">, InGroup<DiagGroup<"b">>;
// CHECK: redefined-group.td:[[@LINE-2]]:1: error: group 'b' is defined more than once
// CHECK: redefined-group.td:[[@LINE-2]]:5: note: also implicitly defined here

def ImplicitGroup1 : Warning<"">, InGroup<DiagGroup<"c">>;
def ImplicitGroup2 : Warning<"">, InGroup<DiagGroup<"c">>;
def ImplicitGroup3 : Warning<"">,
  InGroup<DiagGroup<"c">>;
// CHECK: redefined-group.td:[[@LINE-4]]:5: error: group 'c' is implicitly defined more than once
// CHECK: redefined-group.td:[[@LINE-4]]:5: note: also implicitly defined here
// CHECK: redefined-group.td:[[@LINE-4]]:5: note: also implicitly defined here

def NamedAndUnnamed : DiagGroup<"d">;
def : DiagGroup<"d">;
// CHECK: redefined-group.td:[[@LINE-2]]:5: error: group 'd' is defined more than once
// CHECK: redefined-group.td:[[@LINE-2]]:1: note: also defined here

def : DiagGroup<"e">;
def NamedAndUnnamed2 : DiagGroup<"e">;
// CHECK: redefined-group.td:[[@LINE-1]]:5: error: group 'e' is defined more than once
// CHECK: redefined-group.td:[[@LINE-3]]:1: note: also defined here

def InGroupF1 : Warning<"">, InGroup<DiagGroup<"f">>;
def : DiagGroup<"f">; // FIXME: It'd be nice to also note this, but it's hard to detect.
def InGroupF2 : Warning<"">, InGroup<DiagGroup<"f">>;
def GroupF : DiagGroup<"f">;
def InGroupF3 : Warning<"">, InGroup<GroupF>;
def InGroupF4 : Warning<"">, InGroup<DiagGroup<"f">>;
// CHECK: redefined-group.td:[[@LINE-5]]:1: error: group 'f' is defined more than once
// CHECK: redefined-group.td:[[@LINE-7]]:5: note: also implicitly defined here
// CHECK: redefined-group.td:[[@LINE-6]]:5: note: also implicitly defined here
// CHECK: redefined-group.td:[[@LINE-4]]:5: note: also implicitly defined here