[clang-tidy][use-internal-linkage]fix false positives for global overloaded operator...
[llvm-project.git] / lld / test / COFF / conflict-mangled.test
blob92f0c46467077bbdabd95f07d9c16a06fb51a799
1 # RUN: yaml2obj %s -o %t1.obj
2 # RUN: yaml2obj %s -o %t2.obj
3 # RUN: not lld-link /out:%t.exe %t1.obj %t2.obj >& %t.log
4 # RUN: FileCheck %s < %t.log
5 # RUN: not lld-link /out:%t.exe /demangle %t1.obj %t2.obj 2>&1 | FileCheck %s
6 # RUN: not lld-link /out:%t.exe /demangle:no %t1.obj %t2.obj 2>&1 | FileCheck --check-prefix=NODEMANGLE %s
8 # NODEMANGLE: duplicate symbol: ?mangled@@YAHXZ
9 # NODEMANGLE: defined at {{.+}}1.obj
10 # NODEMANGLE: defined at {{.+}}2.obj
12 # CHECK: duplicate symbol: int __cdecl mangled(void)
13 # CHECK: defined at {{.+}}1.obj
14 # CHECK: defined at {{.+}}2.obj
16 --- !COFF
17 header:
18   Machine:         IMAGE_FILE_MACHINE_AMD64
19   Characteristics: []
20 sections:
21   - Name:            .text
22     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
23     Alignment:       16
24     SectionData:     000000000000
25 symbols:
26   - Name:            .text
27     Value:           0
28     SectionNumber:   1
29     SimpleType:      IMAGE_SYM_TYPE_NULL
30     ComplexType:     IMAGE_SYM_DTYPE_NULL
31     StorageClass:    IMAGE_SYM_CLASS_STATIC
32     SectionDefinition:
33       Length:          6
34       NumberOfRelocations: 0
35       NumberOfLinenumbers: 0
36       CheckSum:        0
37       Number:          0
38   - Name:            '?mangled@@YAHXZ'
39     Value:           0
40     SectionNumber:   1
41     SimpleType:      IMAGE_SYM_TYPE_NULL
42     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
43     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
44 ...