Imported Upstream version 6.10.0.49

Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-01-16 16:38:04 +00:00
parent d94e79959b
commit 468663ddbb
48518 changed files with 2789335 additions and 61176 deletions

View File

@@ -0,0 +1,32 @@
#ifndef BASIC_H
#define BASIC_H
class Parent {
public:
virtual void func() {}
};
class Derived : public Parent {
public:
virtual void func() {}
// CHECK: virtual void func() override {}
};
extern void ext(int (&)[5], const Parent &);
void func(int t) {
int ints[5];
for (unsigned i = 0; i < 5; ++i) {
int &e = ints[i];
e = t;
// CHECK: for (auto & elem : ints) {
// CHECK-NEXT: elem = t;
}
Derived d;
ext(ints, d);
}
#endif // BASIC_H

View File

@@ -0,0 +1,25 @@
---
MainSourceFile: source1.cpp
Diagnostics:
- DiagnosticName: test-basic
Message: Fix
FilePath: $(path)/basic.h
FileOffset: 242
Replacements:
- FilePath: $(path)/basic.h
Offset: 242
Length: 26
ReplacementText: 'auto & elem : ints'
- FilePath: $(path)/basic.h
Offset: 276
Length: 22
ReplacementText: ''
- FilePath: $(path)/basic.h
Offset: 298
Length: 1
ReplacementText: elem
- FilePath: $(path)/../basic/basic.h
Offset: 148
Length: 0
ReplacementText: 'override '
...

View File

@@ -0,0 +1,13 @@
---
MainSourceFile: source2.cpp
Diagnostics:
- DiagnosticName: test-basic
Message: Fix
FilePath: $(path)/basic.h
FileOffset: 148
Replacements:
- FilePath: $(path)/basic.h
Offset: 148
Length: 0
ReplacementText: 'override '
...

View File

@@ -0,0 +1,17 @@
#ifndef COMMON_H
#define COMMON_H
extern void ext(int (&)[5]);
void func(int t) {
int ints[5];
for (unsigned i = 0; i < 5; ++i) {
ints[i] = t;
}
int *i = 0;
ext(ints);
}
#endif // COMMON_H

View File

@@ -0,0 +1,11 @@
There are conflicting changes to $(path)/common.h:
The following changes conflict:
Replace 8:8-8:33 with "auto & i : ints"
Replace 8:8-8:33 with "int & elem : ints"
The following changes conflict:
Replace 9:5-9:11 with "elem"
Replace 9:5-9:11 with "i"
The following changes conflict:
Remove 12:3-12:14
Insert at 12:12 (int*)
Replace 12:12-12:12 with "nullptr"

View File

@@ -0,0 +1,21 @@
---
MainSourceFile: source1.cpp
Diagnostics:
- DiagnosticName: test-conflict
Message: Fix
FilePath: $(path)/common.h
FileOffset: 106
Replacements:
- FilePath: $(path)/common.h
Offset: 106
Length: 26
ReplacementText: 'auto & i : ints'
- FilePath: $(path)/common.h
Offset: 140
Length: 7
ReplacementText: i
- FilePath: $(path)/common.h
Offset: 160
Length: 12
ReplacementText: ''
...

View File

@@ -0,0 +1,21 @@
---
MainSourceFile: source2.cpp
Diagnostics:
- DiagnosticName: test-conflict
Message: Fix
FilePath: $(path)/common.h
FileOffset: 106
Replacements:
- FilePath: $(path)/common.h
Offset: 106
Length: 26
ReplacementText: 'int & elem : ints'
- FilePath: $(path)/common.h
Offset: 140
Length: 7
ReplacementText: elem
- FilePath: $(path)/common.h
Offset: 169
Length: 1
ReplacementText: nullptr
...

View File

@@ -0,0 +1,13 @@
---
MainSourceFile: source1.cpp
Diagnostics:
- DiagnosticName: test-conflict
Message: Fix
FilePath: $(path)/common.h
FileOffset: 169
Replacements:
- FilePath: $(path)/common.h
Offset: 169
Length: 0
ReplacementText: "(int*)"
...

View File

@@ -0,0 +1,6 @@
// This file intentionally uses a CRLF newlines!
void foo() {
int *x = 0;
}

View File

@@ -0,0 +1,6 @@
// This file intentionally uses a CRLF newlines!
void foo() {
int *x = nullptr;
}

View File

@@ -0,0 +1,13 @@
---
MainSourceFile: source1.cpp
Diagnostics:
- DiagnosticName: test-crlf
Message: Fix
FilePath: $(path)/crlf.cpp
FileOffset: 79
Replacements:
- FilePath: $(path)/crlf.cpp
Offset: 79
Length: 1
ReplacementText: nullptr
...

View File

@@ -0,0 +1,6 @@
class C {};
void f() { // This comment necessary to prevent formatting as void f() { ... }
C *a = new C();
// CHECK: {{^\ \ auto\ a\ \=\ new\ C\(\);}}
}

View File

@@ -0,0 +1,13 @@
---
MainSourceFile: no.cpp
Diagnostics:
- DiagnosticName: test-no
Message: Fix
FilePath: $(path)/no.cpp
FileOffset: 94
Replacements:
- FilePath: $(path)/no.cpp
Offset: 94
Length: 3
ReplacementText: 'auto '
...

View File

@@ -0,0 +1,22 @@
class MyType012345678901234567890123456789 {};
void g(int, int*, int, int*, int, int*, int);
void f() {
MyType012345678901234567890123456789 *a =
new MyType012345678901234567890123456789();
// CHECK: {{^\ \ auto\ a\ \=\ new\ MyType012345678901234567890123456789\(\);}}
int iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii;
int jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj;
int kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk;
int mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm;
g(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii, 0, jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj,
0, kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk, 0, mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm);
// CHECK: g(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii, nullptr,
// CHECK-NEXT: jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj, nullptr,
// CHECK-NEXT: kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk, nullptr,
// CHECK-NEXT: mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm);
delete a;
}

View File

@@ -0,0 +1,27 @@
# These replacements are out of order on purpose to test that they get sorted
# so that formatting happens correctly.
---
MainSourceFile: yes.cpp
Diagnostics:
- DiagnosticName: test-yes
Message: Fix
FilePath: $(path)/yes.cpp
FileOffset: 494
Replacements:
- FilePath: $(path)/yes.cpp
Offset: 494
Length: 1
ReplacementText: nullptr
- FilePath: $(path)/yes.cpp
Offset: 410
Length: 1
ReplacementText: nullptr
- FilePath: $(path)/yes.cpp
Offset: 454
Length: 1
ReplacementText: nullptr
- FilePath: $(path)/yes.cpp
Offset: 108
Length: 38
ReplacementText: 'auto '
...

View File

@@ -0,0 +1,12 @@
---
MainSourceFile: ''
Replacements:
- FilePath: idontexist.h
Offset: 2669
Length: 0
ReplacementText: ' override'
- FilePath: idontexist.h
Offset: 2669
Length: 0
ReplacementText: ' override'
...