Skip to content

Commit 1122fff

Browse files
mattmccutchen-ccikakje
authored andcommitted
Revert unintended CR/LF changes to non-3C files that originated in (#962)
277d84a. We first submitted them in PR #837, but Mandeep noticed (#837 (review)) and the unintended changes were removed from that PR in 74bfcaf. However, when the squash of PR #837 was merged with the original commits in cfc998e, the unintended changes were incorrectly retained. They got submitted again in the next 3C PR (#891), and no one noticed that time. (cherry picked from commit cfe00ea)
1 parent 5209229 commit 1122fff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1582
-1582
lines changed

clang/automation/README.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
This directory contains scripts used for automated builds and testing
2-
of the Checked C clang compiler.
1+
This directory contains scripts used for automated builds and testing
2+
of the Checked C clang compiler.

clang/docs/DriverArchitecture.png

2 Bytes
Loading

clang/docs/PCHLayout.png

2 Bytes
Loading

clang/test/AST/ast-dump-invalid.cpp

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
1-
// RUN: not %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -fms-extensions -ast-dump -ast-dump-filter Test %s | FileCheck -check-prefix CHECK -strict-whitespace %s
2-
3-
namespace TestInvalidRParenOnCXXUnresolvedConstructExpr {
4-
template <class T>
5-
void f(T i, T j) {
6-
return T (i, j;
7-
}
8-
}
9-
10-
// CHECK: NamespaceDecl {{.*}} <{{.*}}> {{.*}} TestInvalidRParenOnCXXUnresolvedConstructExpr
11-
// CHECK-NEXT: `-FunctionTemplateDecl
12-
// CHECK-NEXT: |-TemplateTypeParmDecl
13-
// CHECK-NEXT: `-FunctionDecl
14-
// CHECK-NEXT: |-ParmVarDecl
15-
// CHECK-NEXT: |-ParmVarDecl
16-
// CHECK-NEXT: `-CompoundStmt
17-
// CHECK-NEXT: `-ReturnStmt
18-
// CHECK-NEXT: `-CXXUnresolvedConstructExpr {{.*}} <col:10, col:16> 'T'
19-
// CHECK-NEXT: |-DeclRefExpr {{.*}} <col:13> 'T' lvalue ParmVar {{.*}} 'i' 'T'
20-
// CHECK-NEXT: `-DeclRefExpr {{.*}} <col:16> 'T' lvalue ParmVar {{.*}} 'j' 'T'
21-
22-
23-
namespace TestInvalidIf {
24-
int g(int i) {
25-
if (invalid_condition)
26-
return 4;
27-
else
28-
return i;
29-
}
30-
}
31-
// CHECK: NamespaceDecl {{.*}} <{{.*}}> {{.*}} TestInvalidIf
32-
// CHECK-NEXT: `-FunctionDecl
33-
// CHECK-NEXT: |-ParmVarDecl
34-
// CHECK-NEXT: `-CompoundStmt
35-
// CHECK-NEXT: `-IfStmt {{.*}} <line:25:3, line:28:12>
36-
// CHECK-NEXT: |-OpaqueValueExpr {{.*}} <<invalid sloc>> 'bool'
37-
// CHECK-NEXT: |-ReturnStmt {{.*}} <line:26:5, col:12>
38-
// CHECK-NEXT: | `-IntegerLiteral {{.*}} <col:12> 'int' 4
39-
// CHECK-NEXT: `-ReturnStmt {{.*}} <line:28:5, col:12>
40-
// CHECK-NEXT: `-ImplicitCastExpr {{.*}} <col:12> 'int' <LValueToRValue>
41-
// CHECK-NEXT: `-DeclRefExpr {{.*}} <col:12> 'int' lvalue ParmVar {{.*}} 'i' 'int'
42-
43-
namespace TestInvalidFunctionDecl {
44-
struct Str {
45-
double foo1(double, invalid_type);
46-
};
47-
double Str::foo1(double, invalid_type)
48-
{ return 45; }
49-
}
50-
// CHECK: NamespaceDecl {{.*}} <{{.*}}> {{.*}} TestInvalidFunctionDecl
51-
// CHECK-NEXT: |-CXXRecordDecl {{.*}} <line:44:1, line:46:1> line:44:8 struct Str definition
52-
// CHECK: | |-CXXRecordDecl {{.*}} <col:1, col:8> col:8 implicit struct Str
53-
// CHECK-NEXT: | `-CXXMethodDecl {{.*}} <line:45:4, col:36> col:11 invalid foo1 'double (double, int)'
54-
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:16> col:22 'double'
55-
// CHECK-NEXT: | `-ParmVarDecl {{.*}} <col:24, <invalid sloc>> col:36 invalid 'int'
56-
// CHECK-NEXT: `-CXXMethodDecl {{.*}} parent {{.*}} <line:47:1, line:48:14> line:47:13 invalid foo1 'double (double, int)'
57-
// CHECK-NEXT: |-ParmVarDecl {{.*}} <col:18> col:24 'double'
58-
// CHECK-NEXT: |-ParmVarDecl {{.*}} <col:26, <invalid sloc>> col:38 invalid 'int'
59-
// CHECK-NEXT: `-CompoundStmt {{.*}} <line:48:1, col:14>
60-
// CHECK-NEXT: `-ReturnStmt {{.*}} <col:3, col:10>
61-
// CHECK-NEXT: `-ImplicitCastExpr {{.*}} <col:10> 'double' <IntegralToFloating>
62-
// CHECK-NEXT: `-IntegerLiteral {{.*}} <col:10> 'int' 45
1+
// RUN: not %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -fms-extensions -ast-dump -ast-dump-filter Test %s | FileCheck -check-prefix CHECK -strict-whitespace %s
2+
3+
namespace TestInvalidRParenOnCXXUnresolvedConstructExpr {
4+
template <class T>
5+
void f(T i, T j) {
6+
return T (i, j;
7+
}
8+
}
9+
10+
// CHECK: NamespaceDecl {{.*}} <{{.*}}> {{.*}} TestInvalidRParenOnCXXUnresolvedConstructExpr
11+
// CHECK-NEXT: `-FunctionTemplateDecl
12+
// CHECK-NEXT: |-TemplateTypeParmDecl
13+
// CHECK-NEXT: `-FunctionDecl
14+
// CHECK-NEXT: |-ParmVarDecl
15+
// CHECK-NEXT: |-ParmVarDecl
16+
// CHECK-NEXT: `-CompoundStmt
17+
// CHECK-NEXT: `-ReturnStmt
18+
// CHECK-NEXT: `-CXXUnresolvedConstructExpr {{.*}} <col:10, col:16> 'T'
19+
// CHECK-NEXT: |-DeclRefExpr {{.*}} <col:13> 'T' lvalue ParmVar {{.*}} 'i' 'T'
20+
// CHECK-NEXT: `-DeclRefExpr {{.*}} <col:16> 'T' lvalue ParmVar {{.*}} 'j' 'T'
21+
22+
23+
namespace TestInvalidIf {
24+
int g(int i) {
25+
if (invalid_condition)
26+
return 4;
27+
else
28+
return i;
29+
}
30+
}
31+
// CHECK: NamespaceDecl {{.*}} <{{.*}}> {{.*}} TestInvalidIf
32+
// CHECK-NEXT: `-FunctionDecl
33+
// CHECK-NEXT: |-ParmVarDecl
34+
// CHECK-NEXT: `-CompoundStmt
35+
// CHECK-NEXT: `-IfStmt {{.*}} <line:25:3, line:28:12>
36+
// CHECK-NEXT: |-OpaqueValueExpr {{.*}} <<invalid sloc>> 'bool'
37+
// CHECK-NEXT: |-ReturnStmt {{.*}} <line:26:5, col:12>
38+
// CHECK-NEXT: | `-IntegerLiteral {{.*}} <col:12> 'int' 4
39+
// CHECK-NEXT: `-ReturnStmt {{.*}} <line:28:5, col:12>
40+
// CHECK-NEXT: `-ImplicitCastExpr {{.*}} <col:12> 'int' <LValueToRValue>
41+
// CHECK-NEXT: `-DeclRefExpr {{.*}} <col:12> 'int' lvalue ParmVar {{.*}} 'i' 'int'
42+
43+
namespace TestInvalidFunctionDecl {
44+
struct Str {
45+
double foo1(double, invalid_type);
46+
};
47+
double Str::foo1(double, invalid_type)
48+
{ return 45; }
49+
}
50+
// CHECK: NamespaceDecl {{.*}} <{{.*}}> {{.*}} TestInvalidFunctionDecl
51+
// CHECK-NEXT: |-CXXRecordDecl {{.*}} <line:44:1, line:46:1> line:44:8 struct Str definition
52+
// CHECK: | |-CXXRecordDecl {{.*}} <col:1, col:8> col:8 implicit struct Str
53+
// CHECK-NEXT: | `-CXXMethodDecl {{.*}} <line:45:4, col:36> col:11 invalid foo1 'double (double, int)'
54+
// CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:16> col:22 'double'
55+
// CHECK-NEXT: | `-ParmVarDecl {{.*}} <col:24, <invalid sloc>> col:36 invalid 'int'
56+
// CHECK-NEXT: `-CXXMethodDecl {{.*}} parent {{.*}} <line:47:1, line:48:14> line:47:13 invalid foo1 'double (double, int)'
57+
// CHECK-NEXT: |-ParmVarDecl {{.*}} <col:18> col:24 'double'
58+
// CHECK-NEXT: |-ParmVarDecl {{.*}} <col:26, <invalid sloc>> col:38 invalid 'int'
59+
// CHECK-NEXT: `-CompoundStmt {{.*}} <line:48:1, col:14>
60+
// CHECK-NEXT: `-ReturnStmt {{.*}} <col:3, col:10>
61+
// CHECK-NEXT: `-ImplicitCastExpr {{.*}} <col:10> 'double' <IntegralToFloating>
62+
// CHECK-NEXT: `-IntegerLiteral {{.*}} <col:10> 'int' 45
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10 -std=c++11 -ast-dump %s | FileCheck %s
2-
// CHECK: CXXCtorInitializer Field {{.*}} 'ptr' 'void *'
3-
// CHECK: CXXCtorInitializer Field {{.*}} 'q' 'Q'
4-
5-
@interface NSObject
6-
@end
7-
8-
@interface I : NSObject
9-
@end
10-
11-
struct Q { Q(); };
12-
13-
struct S {
14-
S();
15-
void *ptr = nullptr;
16-
Q q;
17-
};
18-
19-
@implementation I
20-
S::S() {}
21-
@end
1+
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10 -std=c++11 -ast-dump %s | FileCheck %s
2+
// CHECK: CXXCtorInitializer Field {{.*}} 'ptr' 'void *'
3+
// CHECK: CXXCtorInitializer Field {{.*}} 'q' 'Q'
4+
5+
@interface NSObject
6+
@end
7+
8+
@interface I : NSObject
9+
@end
10+
11+
struct Q { Q(); };
12+
13+
struct S {
14+
S();
15+
void *ptr = nullptr;
16+
Q q;
17+
};
18+
19+
@implementation I
20+
S::S() {}
21+
@end
Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
// RUN: %clang_cc1 -ast-dump %s 2>&1 | FileCheck %s
2-
3-
// CHECK-LABEL: example0
4-
void example0() {
5-
double d = 2.0;
6-
// CHECK: VarDecl{{.*}}rd 'double &'
7-
// CHECK-NEXT: DeclRefExpr
8-
double &rd = d;
9-
// CHECK: VarDecl{{.*}}rcd 'const double &'
10-
// CHECK-NEXT: ImplicitCastExpr{{.*}}'const double' lvalue <NoOp>
11-
const double &rcd = d;
12-
}
13-
14-
struct A { };
15-
struct B : A { } b;
16-
17-
// CHECK-LABEL: example1
18-
void example1() {
19-
// CHECK: VarDecl{{.*}}ra 'A &'
20-
// CHECK: ImplicitCastExpr{{.*}}'A' lvalue <DerivedToBase (A)>
21-
A &ra = b;
22-
// CHECK: VarDecl{{.*}}rca 'const A &'
23-
// CHECK: ImplicitCastExpr{{.*}}'const A' lvalue <DerivedToBase (A)>
24-
// CHECK-NOT: MaterializeTemporaryExpr
25-
// CHECK: ImplicitCastExpr{{.*}}'const B' lvalue <NoOp>
26-
const A& rca = b;
27-
}
28-
29-
extern B f();
30-
31-
struct X {
32-
operator B();
33-
} x;
34-
35-
// CHECK-LABEL: example2
36-
void example2() {
37-
// CHECK: VarDecl{{.*}}rca 'const A &'
38-
// CHECK: ImplicitCastExpr{{.*}}'const A' lvalue <DerivedToBase (A)>
39-
// CHECK: MaterializeTemporaryExpr{{.*}}'const B'
40-
// CHECK: ImplicitCastExpr{{.*}}'const B' <NoOp>
41-
// CHECK: CallExpr{{.*}}B
42-
const A &rca = f();
43-
// CHECK: VarDecl{{.*}}r 'const A &'
44-
// CHECK: ImplicitCastExpr{{.*}}'const A' lvalue <DerivedToBase (A)>
45-
// CHECK: MaterializeTemporaryExpr{{.*}}'const B'
46-
// CHECK: ImplicitCastExpr{{.*}}'const B' <NoOp>
47-
// CHECK: CXXMemberCallExpr{{.*}}'B'
48-
const A& r = x;
49-
}
50-
51-
// CHECK-LABEL: example3
52-
void example3() {
53-
// CHECK: VarDecl{{.*}}rcd2 'const double &'
54-
// CHECK: ImplicitCastExpr{{.*}} <IntegralToFloating>
55-
const double& rcd2 = 2;
56-
}
1+
// RUN: %clang_cc1 -ast-dump %s 2>&1 | FileCheck %s
2+
3+
// CHECK-LABEL: example0
4+
void example0() {
5+
double d = 2.0;
6+
// CHECK: VarDecl{{.*}}rd 'double &'
7+
// CHECK-NEXT: DeclRefExpr
8+
double &rd = d;
9+
// CHECK: VarDecl{{.*}}rcd 'const double &'
10+
// CHECK-NEXT: ImplicitCastExpr{{.*}}'const double' lvalue <NoOp>
11+
const double &rcd = d;
12+
}
13+
14+
struct A { };
15+
struct B : A { } b;
16+
17+
// CHECK-LABEL: example1
18+
void example1() {
19+
// CHECK: VarDecl{{.*}}ra 'A &'
20+
// CHECK: ImplicitCastExpr{{.*}}'A' lvalue <DerivedToBase (A)>
21+
A &ra = b;
22+
// CHECK: VarDecl{{.*}}rca 'const A &'
23+
// CHECK: ImplicitCastExpr{{.*}}'const A' lvalue <DerivedToBase (A)>
24+
// CHECK-NOT: MaterializeTemporaryExpr
25+
// CHECK: ImplicitCastExpr{{.*}}'const B' lvalue <NoOp>
26+
const A& rca = b;
27+
}
28+
29+
extern B f();
30+
31+
struct X {
32+
operator B();
33+
} x;
34+
35+
// CHECK-LABEL: example2
36+
void example2() {
37+
// CHECK: VarDecl{{.*}}rca 'const A &'
38+
// CHECK: ImplicitCastExpr{{.*}}'const A' lvalue <DerivedToBase (A)>
39+
// CHECK: MaterializeTemporaryExpr{{.*}}'const B'
40+
// CHECK: ImplicitCastExpr{{.*}}'const B' <NoOp>
41+
// CHECK: CallExpr{{.*}}B
42+
const A &rca = f();
43+
// CHECK: VarDecl{{.*}}r 'const A &'
44+
// CHECK: ImplicitCastExpr{{.*}}'const A' lvalue <DerivedToBase (A)>
45+
// CHECK: MaterializeTemporaryExpr{{.*}}'const B'
46+
// CHECK: ImplicitCastExpr{{.*}}'const B' <NoOp>
47+
// CHECK: CXXMemberCallExpr{{.*}}'B'
48+
const A& r = x;
49+
}
50+
51+
// CHECK-LABEL: example3
52+
void example3() {
53+
// CHECK: VarDecl{{.*}}rcd2 'const double &'
54+
// CHECK: ImplicitCastExpr{{.*}} <IntegralToFloating>
55+
const double& rcd2 = 2;
56+
}
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
// RUN: %clang_cc1 -fsyntax-only -std=c++1z %s -verify
2-
3-
class NonCopyable {
4-
NonCopyable(const NonCopyable&) = delete; //expected-note3{{explicitly marked deleted here}}
5-
int x = 10;
6-
void foo() {
7-
auto L = [this] { return x; };
8-
const auto &M = [*this] { return x; };//expected-error{{call to deleted}}
9-
const auto &M2 = [this] () -> auto&& {
10-
++x;
11-
return [*this] { //expected-error{{call to deleted}} expected-warning{{reference to local}}
12-
return ++x; //expected-error{{read-only}}
13-
};
14-
};
15-
const auto &M3 = [*this] () mutable -> auto&& { //expected-error{{call to deleted}}
16-
++x;
17-
return [this] { // expected-warning{{reference to local}}
18-
return x;
19-
};
20-
};
21-
}
22-
};
1+
// RUN: %clang_cc1 -fsyntax-only -std=c++1z %s -verify
2+
3+
class NonCopyable {
4+
NonCopyable(const NonCopyable&) = delete; //expected-note3{{explicitly marked deleted here}}
5+
int x = 10;
6+
void foo() {
7+
auto L = [this] { return x; };
8+
const auto &M = [*this] { return x; };//expected-error{{call to deleted}}
9+
const auto &M2 = [this] () -> auto&& {
10+
++x;
11+
return [*this] { //expected-error{{call to deleted}} expected-warning{{reference to local}}
12+
return ++x; //expected-error{{read-only}}
13+
};
14+
};
15+
const auto &M3 = [*this] () mutable -> auto&& { //expected-error{{call to deleted}}
16+
++x;
17+
return [this] { // expected-warning{{reference to local}}
18+
return x;
19+
};
20+
};
21+
}
22+
};
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2-
// expected-no-diagnostics
3-
4-
// NOTE: This file intentionally uses DOS-style line endings to test
5-
// that we don't propagate them into string literals as per [lex.string]p4.
6-
7-
constexpr const char* p = R"(a\
8-
b
9-
c)";
10-
11-
static_assert(p[0] == 'a', "");
12-
static_assert(p[1] == '\\', "");
13-
static_assert(p[2] == '\n', "");
14-
static_assert(p[3] == 'b', "");
15-
static_assert(p[4] == '\n', "");
16-
static_assert(p[5] == 'c', "");
17-
static_assert(p[6] == '\0', "");
1+
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2+
// expected-no-diagnostics
3+
4+
// NOTE: This file intentionally uses DOS-style line endings to test
5+
// that we don't propagate them into string literals as per [lex.string]p4.
6+
7+
constexpr const char* p = R"(a\
8+
b
9+
c)";
10+
11+
static_assert(p[0] == 'a', "");
12+
static_assert(p[1] == '\\', "");
13+
static_assert(p[2] == '\n', "");
14+
static_assert(p[3] == 'b', "");
15+
static_assert(p[4] == '\n', "");
16+
static_assert(p[5] == 'c', "");
17+
static_assert(p[6] == '\0', "");

0 commit comments

Comments
 (0)