diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -7526,6 +7526,7 @@ ReturnType = Type->getReturnType(); QualType DeclType = Context.getTypeDeclType(RD); + DeclType = Context.getElaboratedType(ETK_None, nullptr, DeclType, nullptr); DeclType = Context.getAddrSpaceQualType(DeclType, MD->getMethodQualifiers().getAddressSpace()); QualType ExpectedReturnType = Context.getLValueReferenceType(DeclType); @@ -14441,6 +14442,7 @@ return nullptr; QualType ArgType = Context.getTypeDeclType(ClassDecl); + ArgType = Context.getElaboratedType(ETK_None, nullptr, ArgType, nullptr); LangAS AS = getDefaultCXXMethodAddrSpace(); if (AS != LangAS::Default) ArgType = Context.getAddrSpaceQualType(ArgType, AS); @@ -14783,6 +14785,7 @@ // constructor rules. QualType ArgType = Context.getTypeDeclType(ClassDecl); + ArgType = Context.getElaboratedType(ETK_None, nullptr, ArgType, nullptr); LangAS AS = getDefaultCXXMethodAddrSpace(); if (AS != LangAS::Default) ArgType = Context.getAddrSpaceQualType(ArgType, AS); @@ -15155,6 +15158,7 @@ QualType ClassType = Context.getTypeDeclType(ClassDecl); QualType ArgType = ClassType; + ArgType = Context.getElaboratedType(ETK_None, nullptr, ArgType, nullptr); bool Const = ClassDecl->implicitCopyConstructorHasConstParam(); if (Const) ArgType = ArgType.withConst(); @@ -15299,6 +15303,7 @@ QualType ClassType = Context.getTypeDeclType(ClassDecl); QualType ArgType = ClassType; + ArgType = Context.getElaboratedType(ETK_None, nullptr, ArgType, nullptr); LangAS AS = getDefaultCXXMethodAddrSpace(); if (AS != LangAS::Default) ArgType = Context.getAddrSpaceQualType(ClassType, AS); diff --git a/clang/test/AST/ast-dump-decl.cpp b/clang/test/AST/ast-dump-decl.cpp --- a/clang/test/AST/ast-dump-decl.cpp +++ b/clang/test/AST/ast-dump-decl.cpp @@ -344,8 +344,8 @@ // CHECK-NEXT: | |-CXXDestructorDecl 0x{{.+}} col:5 used ~TestClassTemplate 'void () noexcept' // CHECK-NEXT: | |-CXXMethodDecl 0x{{.+}} col:9 j 'int ()' // CHECK-NEXT: | |-FieldDecl 0x{{.+}} col:9 i 'int' -// CHECK-NEXT: | `-CXXConstructorDecl 0x{{.+}} col:30 implicit constexpr TestClassTemplate 'void (const testClassTemplateDecl::TestClassTemplate &)' inline default trivial noexcept-unevaluated 0x{{.+}} -// CHECK-NEXT: | `-ParmVarDecl 0x{{.+}} col:30 'const testClassTemplateDecl::TestClassTemplate &' +// CHECK-NEXT: | `-CXXConstructorDecl 0x{{.+}} col:30 implicit constexpr TestClassTemplate 'void (const TestClassTemplate &)' inline default trivial noexcept-unevaluated 0x{{.+}} +// CHECK-NEXT: | `-ParmVarDecl 0x{{.+}} col:30 'const TestClassTemplate &' // CHECK-NEXT: |-ClassTemplateSpecialization 0x{{.+}} 'TestClassTemplate' // CHECK-NEXT: |-ClassTemplateSpecialization 0x{{.+}} 'TestClassTemplate' // CHECK-NEXT: `-ClassTemplateSpecialization 0x{{.+}} 'TestClassTemplate' @@ -544,10 +544,10 @@ // CHECK-NEXT: | `-ClassTemplateSpecialization 0x{{.+}} 'TestClassTemplate' // CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:31 implicit used constexpr TestClassTemplate 'void () noexcept' inline default trivial // CHECK-NEXT: | `-CompoundStmt 0x{{.+}} - // CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:31 implicit constexpr TestClassTemplate 'void (const testCanonicalTemplate::TestClassTemplate &)' inline default trivial noexcept-unevaluated 0x{{.+}} - // CHECK-NEXT: | `-ParmVarDecl 0x{{.+}} col:31 'const testCanonicalTemplate::TestClassTemplate &' - // CHECK-NEXT: `-CXXConstructorDecl 0x{{.+}} col:31 implicit constexpr TestClassTemplate 'void (testCanonicalTemplate::TestClassTemplate &&)' inline default trivial noexcept-unevaluated 0x{{.+}} - // CHECK-NEXT: `-ParmVarDecl 0x{{.+}} col:31 'testCanonicalTemplate::TestClassTemplate &&' + // CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:31 implicit constexpr TestClassTemplate 'void (const TestClassTemplate &)' inline default trivial noexcept-unevaluated 0x{{.+}} + // CHECK-NEXT: | `-ParmVarDecl 0x{{.+}} col:31 'const TestClassTemplate &' + // CHECK-NEXT: `-CXXConstructorDecl 0x{{.+}} col:31 implicit constexpr TestClassTemplate 'void (TestClassTemplate &&)' inline default trivial noexcept-unevaluated 0x{{.+}} + // CHECK-NEXT: `-ParmVarDecl 0x{{.+}} col:31 'TestClassTemplate &&' template class TestClassTemplate2; @@ -572,10 +572,10 @@ // CHECK-NEXT: |-CXXRecordDecl 0x{{.+}} col:31 implicit class TestClassTemplate2 // CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:31 implicit used constexpr TestClassTemplate2 'void () noexcept' inline default trivial // CHECK-NEXT: | `-CompoundStmt 0x{{.+}} - // CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:31 implicit constexpr TestClassTemplate2 'void (const testCanonicalTemplate::TestClassTemplate2 &)' inline default trivial noexcept-unevaluated 0x{{.+}} - // CHECK-NEXT: | `-ParmVarDecl 0x{{.+}} col:31 'const testCanonicalTemplate::TestClassTemplate2 &' - // CHECK-NEXT: `-CXXConstructorDecl 0x{{.+}} col:31 implicit constexpr TestClassTemplate2 'void (testCanonicalTemplate::TestClassTemplate2 &&)' inline default trivial noexcept-unevaluated 0x{{.+}} - // CHECK-NEXT: `-ParmVarDecl 0x{{.+}} col:31 'testCanonicalTemplate::TestClassTemplate2 &&' + // CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:31 implicit constexpr TestClassTemplate2 'void (const TestClassTemplate2 &)' inline default trivial noexcept-unevaluated 0x{{.+}} + // CHECK-NEXT: | `-ParmVarDecl 0x{{.+}} col:31 'const TestClassTemplate2 &' + // CHECK-NEXT: `-CXXConstructorDecl 0x{{.+}} col:31 implicit constexpr TestClassTemplate2 'void (TestClassTemplate2 &&)' inline default trivial noexcept-unevaluated 0x{{.+}} + // CHECK-NEXT: `-ParmVarDecl 0x{{.+}} col:31 'TestClassTemplate2 &&' // CHECK: ClassTemplateDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:[[@LINE-26]]:3, col:31> col:31 TestClassTemplate2 // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:21 typename depth 0 index 0 T1 diff --git a/clang/test/AST/ast-dump-expr-json.cpp b/clang/test/AST/ast-dump-expr-json.cpp --- a/clang/test/AST/ast-dump-expr-json.cpp +++ b/clang/test/AST/ast-dump-expr-json.cpp @@ -7986,7 +7986,7 @@ // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "ctorType": { -// CHECK-NEXT: "qualType": "void (const NS::X &) noexcept" +// CHECK-NEXT: "qualType": "void (const X &) noexcept" // CHECK-NEXT: }, // CHECK-NEXT: "hadMultipleCandidates": true, // CHECK-NEXT: "constructionKind": "complete", @@ -8007,7 +8007,8 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "const NS::X" +// CHECK-NEXT: "desugaredQualType": "const NS::X", +// CHECK-NEXT: "qualType": "const X" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "castKind": "NoOp", @@ -8142,7 +8143,7 @@ // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "ctorType": { -// CHECK-NEXT: "qualType": "void (const NS::X &) noexcept" +// CHECK-NEXT: "qualType": "void (const X &) noexcept" // CHECK-NEXT: }, // CHECK-NEXT: "hadMultipleCandidates": true, // CHECK-NEXT: "constructionKind": "complete", @@ -8163,7 +8164,8 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "const NS::X" +// CHECK-NEXT: "desugaredQualType": "const NS::X", +// CHECK-NEXT: "qualType": "const X" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "castKind": "NoOp", @@ -8424,7 +8426,7 @@ // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "ctorType": { -// CHECK-NEXT: "qualType": "void (const NS::X &) noexcept" +// CHECK-NEXT: "qualType": "void (const X &) noexcept" // CHECK-NEXT: }, // CHECK-NEXT: "hadMultipleCandidates": true, // CHECK-NEXT: "constructionKind": "complete", @@ -8445,7 +8447,8 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "const NS::X" +// CHECK-NEXT: "desugaredQualType": "const NS::X", +// CHECK-NEXT: "qualType": "const X" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "castKind": "NoOp", @@ -8752,7 +8755,7 @@ // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "ctorType": { -// CHECK-NEXT: "qualType": "void (const NS::X &) noexcept" +// CHECK-NEXT: "qualType": "void (const X &) noexcept" // CHECK-NEXT: }, // CHECK-NEXT: "hadMultipleCandidates": true, // CHECK-NEXT: "constructionKind": "complete", @@ -8773,7 +8776,8 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "const NS::X" +// CHECK-NEXT: "desugaredQualType": "const NS::X", +// CHECK-NEXT: "qualType": "const X" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "castKind": "NoOp", @@ -8908,7 +8912,7 @@ // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "ctorType": { -// CHECK-NEXT: "qualType": "void (const NS::X &) noexcept" +// CHECK-NEXT: "qualType": "void (const X &) noexcept" // CHECK-NEXT: }, // CHECK-NEXT: "hadMultipleCandidates": true, // CHECK-NEXT: "constructionKind": "complete", @@ -8929,7 +8933,8 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "const NS::X" +// CHECK-NEXT: "desugaredQualType": "const NS::X", +// CHECK-NEXT: "qualType": "const X" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "castKind": "NoOp", @@ -9190,7 +9195,7 @@ // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "ctorType": { -// CHECK-NEXT: "qualType": "void (const NS::X &) noexcept" +// CHECK-NEXT: "qualType": "void (const X &) noexcept" // CHECK-NEXT: }, // CHECK-NEXT: "hadMultipleCandidates": true, // CHECK-NEXT: "constructionKind": "complete", @@ -9211,7 +9216,8 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "const NS::X" +// CHECK-NEXT: "desugaredQualType": "const NS::X", +// CHECK-NEXT: "qualType": "const X" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "castKind": "NoOp", diff --git a/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp b/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp --- a/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp +++ b/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp @@ -539,7 +539,7 @@ // ANALYZER-NEXT: 1: (CXXConstructExpr, [B4.2], A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: 3: a -// CHECK-NEXT: 4: [B4.3] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 4: [B4.3] (ImplicitCastExpr, NoOp, const A) // WARNINGS-NEXT: 5: [B4.4] (CXXConstructExpr, A) // ANALYZER-NEXT: 5: [B4.4] (CXXConstructExpr, [B4.6], A) // CHECK-NEXT: 6: A b = a; @@ -625,7 +625,7 @@ // ANALYZER-NEXT: 1: (CXXConstructExpr, [B8.2], A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: 3: a -// CHECK-NEXT: 4: [B8.3] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 4: [B8.3] (ImplicitCastExpr, NoOp, const A) // WARNINGS-NEXT: 5: [B8.4] (CXXConstructExpr, A) // ANALYZER-NEXT: 5: [B8.4] (CXXConstructExpr, [B8.6], A) // CHECK-NEXT: 6: A b = a; @@ -674,7 +674,7 @@ // CHECK-NEXT: Succs (1): B2 // CHECK: [B4] // CHECK-NEXT: 1: a -// CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const A) // WARNINGS-NEXT: 3: [B4.2] (CXXConstructExpr, A) // ANALYZER-NEXT: 3: [B4.2] (CXXConstructExpr, [B4.4], A) // CHECK-NEXT: 4: A b = a; @@ -765,7 +765,7 @@ // CHECK-NEXT: Succs (2): B8 B7 // CHECK: [B10] // CHECK-NEXT: 1: a -// CHECK-NEXT: 2: [B10.1] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 2: [B10.1] (ImplicitCastExpr, NoOp, const A) // WARNINGS-NEXT: 3: [B10.2] (CXXConstructExpr, A) // ANALYZER-NEXT: 3: [B10.2] (CXXConstructExpr, [B10.4], A) // CHECK-NEXT: 4: A b = a; @@ -919,7 +919,7 @@ // ANALYZER-NEXT: 1: (CXXConstructExpr, [B2.2], A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: 3: a -// CHECK-NEXT: 4: [B2.3] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 4: [B2.3] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 5: [B2.4] (CXXConstructExpr, A) // CHECK-NEXT: 6: A b = a; // CHECK-NEXT: 7: b @@ -960,7 +960,7 @@ // ANALYZER-NEXT: 1: (CXXConstructExpr, [B2.2], A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: 3: a -// CHECK-NEXT: 4: [B2.3] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 4: [B2.3] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 5: [B2.4] (CXXConstructExpr, A) // CHECK-NEXT: 6: A b = a; // CHECK-NEXT: 7: b @@ -1049,7 +1049,7 @@ // CHECK-NEXT: Succs (1): B2 // CHECK: [B4] // CHECK-NEXT: 1: a -// CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const A) // WARNINGS-NEXT: 3: [B4.2] (CXXConstructExpr, A) // ANALYZER-NEXT: 3: [B4.2] (CXXConstructExpr, [B4.4], A) // CHECK-NEXT: 4: A b = a; @@ -1193,7 +1193,7 @@ // CHECK-NEXT: Succs (2): B8 B7 // CHECK: [B10] // CHECK-NEXT: 1: b -// CHECK-NEXT: 2: [B10.1] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 2: [B10.1] (ImplicitCastExpr, NoOp, const A) // WARNINGS-NEXT: 3: [B10.2] (CXXConstructExpr, A) // ANALYZER-NEXT: 3: [B10.2] (CXXConstructExpr, [B10.4], A) // CHECK-NEXT: 4: A c = b; diff --git a/clang/test/Analysis/lifetime-cfg-output.cpp b/clang/test/Analysis/lifetime-cfg-output.cpp --- a/clang/test/Analysis/lifetime-cfg-output.cpp +++ b/clang/test/Analysis/lifetime-cfg-output.cpp @@ -189,7 +189,7 @@ // CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: 3: a -// CHECK-NEXT: 4: [B4.3] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 4: [B4.3] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 5: [B4.4] (CXXConstructExpr, A) // CHECK-NEXT: 6: A b = a; // CHECK-NEXT: 7: b @@ -269,7 +269,7 @@ // CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: 3: a -// CHECK-NEXT: 4: [B8.3] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 4: [B8.3] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 5: [B8.4] (CXXConstructExpr, A) // CHECK-NEXT: 6: A b = a; // CHECK-NEXT: 7: b @@ -318,7 +318,7 @@ // CHECK-NEXT: Succs (1): B2 // CHECK: [B4] // CHECK-NEXT: 1: a -// CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 3: [B4.2] (CXXConstructExpr, A) // CHECK-NEXT: 4: A b = a; // CHECK-NEXT: 5: b @@ -404,7 +404,7 @@ // CHECK-NEXT: Succs (2): B8 B7 // CHECK: [B10] // CHECK-NEXT: 1: a -// CHECK-NEXT: 2: [B10.1] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 2: [B10.1] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 3: [B10.2] (CXXConstructExpr, A) // CHECK-NEXT: 4: A b = a; // CHECK-NEXT: 5: b @@ -540,7 +540,7 @@ // CHECK-NEXT: Succs (1): B2 // CHECK: [B4] // CHECK-NEXT: 1: a -// CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 3: [B4.2] (CXXConstructExpr, A) // CHECK-NEXT: 4: A b = a; // CHECK-NEXT: 5: b @@ -626,7 +626,7 @@ // CHECK-NEXT: Succs (2): B8 B7 // CHECK: [B10] // CHECK-NEXT: 1: b -// CHECK-NEXT: 2: [B10.1] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 2: [B10.1] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 3: [B10.2] (CXXConstructExpr, A) // CHECK-NEXT: 4: A c = b; // CHECK-NEXT: 5: c diff --git a/clang/test/Analysis/missing-bind-temporary.cpp b/clang/test/Analysis/missing-bind-temporary.cpp --- a/clang/test/Analysis/missing-bind-temporary.cpp +++ b/clang/test/Analysis/missing-bind-temporary.cpp @@ -24,13 +24,13 @@ // CHECK-NEXT: 1: (CXXConstructExpr, [B1.2], B) // CHECK-NEXT: 2: B i; // CHECK-NEXT: 3: operator= -// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, FunctionToPointerDecay, class variant_0::B &(*)(class variant_0::B &&) noexcept) +// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, FunctionToPointerDecay, B &(*)(B &&) noexcept) // CHECK-NEXT: 5: i -// CHECK-NEXT: 6: {} (CXXConstructExpr, [B1.7], [B1.8], class variant_0::B) +// CHECK-NEXT: 6: {} (CXXConstructExpr, [B1.7], [B1.8], B) // CHECK-NEXT: 7: [B1.6] (BindTemporary) // CHECK-NEXT: 8: [B1.7] // CHECK-NEXT: 9: [B1.5] = [B1.8] (OperatorCall) -// CHECK-NEXT: 10: ~variant_0::B() (Temporary object destructor) +// CHECK-NEXT: 10: ~B() (Temporary object destructor) // CHECK-NEXT: 11: [B1.2].~B() (Implicit destructor) void foo(int) { B i; @@ -66,9 +66,9 @@ // CHECK-NEXT: 1: (CXXConstructExpr, [B1.2], B) // CHECK-NEXT: 2: B i; // CHECK-NEXT: 3: operator= -// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, FunctionToPointerDecay, class variant_1::B &(*)(class variant_1::B &&) noexcept) +// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, FunctionToPointerDecay, B &(*)(B &&) noexcept) // CHECK-NEXT: 5: i -// CHECK-NEXT: 6: {} (CXXConstructExpr, class variant_1::B) +// CHECK-NEXT: 6: {} (CXXConstructExpr, B) // CHECK-NEXT: 7: [B1.6] // CHECK-NEXT: 8: [B1.5] = [B1.7] (OperatorCall) // CHECK-NEXT: 9: [B1.2].~B() (Implicit destructor) @@ -106,14 +106,14 @@ // CHECK-NEXT: 1: (CXXConstructExpr, [B1.2], B) // CHECK-NEXT: 2: B i; // CHECK-NEXT: 3: operator= -// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, FunctionToPointerDecay, class variant_2::B &(*)(class variant_2::B &&) noexcept) +// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, FunctionToPointerDecay, B &(*)(B &&) noexcept) // CHECK-NEXT: 5: i // CHECK-NEXT: 6: {} // CHECK-NEXT: 7: {} // CHECK-NEXT: 8: [B1.7] (BindTemporary) // CHECK-NEXT: 9: [B1.8] // CHECK-NEXT: 10: [B1.5] = [B1.9] (OperatorCall) -// CHECK-NEXT: 11: ~variant_2::B() (Temporary object destructor) +// CHECK-NEXT: 11: ~B() (Temporary object destructor) // CHECK-NEXT: 12: [B1.2].~B() (Implicit destructor) template void foo(T) { B i; diff --git a/clang/test/Analysis/scopes-cfg-output.cpp b/clang/test/Analysis/scopes-cfg-output.cpp --- a/clang/test/Analysis/scopes-cfg-output.cpp +++ b/clang/test/Analysis/scopes-cfg-output.cpp @@ -149,7 +149,7 @@ // CHECK-NEXT: 3: A a; // CHECK-NEXT: 4: CFGScopeBegin(b) // CHECK-NEXT: 5: a -// CHECK-NEXT: 6: [B4.5] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 6: [B4.5] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 7: [B4.6] (CXXConstructExpr, [B4.8], A) // CHECK-NEXT: 8: A b = a; // CHECK-NEXT: 9: b @@ -242,7 +242,7 @@ // CHECK-NEXT: 3: A a; // CHECK-NEXT: 4: CFGScopeBegin(b) // CHECK-NEXT: 5: a -// CHECK-NEXT: 6: [B8.5] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 6: [B8.5] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 7: [B8.6] (CXXConstructExpr, [B8.8], A) // CHECK-NEXT: 8: A b = a; // CHECK-NEXT: 9: b @@ -295,7 +295,7 @@ // CHECK: [B4] // CHECK-NEXT: 1: CFGScopeBegin(b) // CHECK-NEXT: 2: a -// CHECK-NEXT: 3: [B4.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 3: [B4.2] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 4: [B4.3] (CXXConstructExpr, [B4.5], A) // CHECK-NEXT: 5: A b = a; // CHECK-NEXT: 6: b @@ -394,7 +394,7 @@ // CHECK: [B10] // CHECK-NEXT: 1: CFGScopeBegin(b) // CHECK-NEXT: 2: a -// CHECK-NEXT: 3: [B10.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 3: [B10.2] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 4: [B10.3] (CXXConstructExpr, [B10.5], A) // CHECK-NEXT: 5: A b = a; // CHECK-NEXT: 6: b @@ -539,7 +539,7 @@ // CHECK: [B4] // CHECK-NEXT: 1: CFGScopeBegin(b) // CHECK-NEXT: 2: a -// CHECK-NEXT: 3: [B4.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 3: [B4.2] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 4: [B4.3] (CXXConstructExpr, [B4.5], A) // CHECK-NEXT: 5: A b = a; // CHECK-NEXT: 6: b @@ -639,7 +639,7 @@ // CHECK: [B10] // CHECK-NEXT: 1: CFGScopeBegin(c) // CHECK-NEXT: 2: b -// CHECK-NEXT: 3: [B10.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 3: [B10.2] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 4: [B10.3] (CXXConstructExpr, [B10.5], A) // CHECK-NEXT: 5: A c = b; // CHECK-NEXT: 6: c @@ -836,10 +836,10 @@ // CHECK-NEXT: 4: *[B4.3] // CHECK-NEXT: 5: auto &i // CHECK-NEXT: 6: operator= -// CHECK-NEXT: 7: [B4.6] (ImplicitCastExpr, FunctionToPointerDecay, class A &(*)(const class A &) +// CHECK-NEXT: 7: [B4.6] (ImplicitCastExpr, FunctionToPointerDecay, A &(*)(const A &) // CHECK-NEXT: 8: i // CHECK-NEXT: 9: b -// CHECK-NEXT: 10: [B4.9] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 10: [B4.9] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 11: [B4.8] = [B4.10] (OperatorCall) // CHECK-NEXT: 12: CFGScopeEnd(i) // CHECK-NEXT: Preds (1): B2 diff --git a/clang/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp b/clang/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp --- a/clang/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp +++ b/clang/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp @@ -21,9 +21,9 @@ } namespace C { - class C {}; // expected-note {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'B::B' to 'const C::C &' for 1st argument}} + class C {}; // expected-note {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'B::B' to 'const C &' for 1st argument}} #if __cplusplus >= 201103L // C++11 or later - // expected-note@-2 {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'B::B' to 'C::C &&' for 1st argument}} + // expected-note@-2 {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'B::B' to 'C &&' for 1st argument}} #endif void func(C); // expected-note {{'C::func' declared here}} \ // expected-note {{passing argument to parameter here}} diff --git a/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/dcl.fct.def.default/p2.cpp b/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/dcl.fct.def.default/p2.cpp --- a/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/dcl.fct.def.default/p2.cpp +++ b/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/dcl.fct.def.default/p2.cpp @@ -14,11 +14,11 @@ }; struct AssignmentRet1 { - AssignmentRet1&& operator=(AssignmentRet1&&) = default; // expected-error {{explicitly-defaulted move assignment operator must return 'move::AssignmentRet1 &'}} + AssignmentRet1&& operator=(AssignmentRet1&&) = default; // expected-error {{explicitly-defaulted move assignment operator must return 'AssignmentRet1 &'}} }; struct AssignmentRet2 { - const AssignmentRet2& operator=(AssignmentRet2&&) = default; // expected-error {{explicitly-defaulted move assignment operator must return 'move::AssignmentRet2 &'}} + const AssignmentRet2& operator=(AssignmentRet2&&) = default; // expected-error {{explicitly-defaulted move assignment operator must return 'AssignmentRet2 &'}} }; struct ConstAssignment { @@ -62,11 +62,11 @@ }; struct AssignmentRet1 { - AssignmentRet1&& operator=(const AssignmentRet1&) = default; // expected-error {{explicitly-defaulted copy assignment operator must return 'copy::AssignmentRet1 &'}} + AssignmentRet1&& operator=(const AssignmentRet1&) = default; // expected-error {{explicitly-defaulted copy assignment operator must return 'AssignmentRet1 &'}} }; struct AssignmentRet2 { - const AssignmentRet2& operator=(const AssignmentRet2&) = default; // expected-error {{explicitly-defaulted copy assignment operator must return 'copy::AssignmentRet2 &'}} + const AssignmentRet2& operator=(const AssignmentRet2&) = default; // expected-error {{explicitly-defaulted copy assignment operator must return 'AssignmentRet2 &'}} }; struct ConstAssignment { diff --git a/clang/test/Index/print-type.cpp b/clang/test/Index/print-type.cpp --- a/clang/test/Index/print-type.cpp +++ b/clang/test/Index/print-type.cpp @@ -196,7 +196,7 @@ // CHECK: TemplateRef=Specialization:66:8 [type=] [typekind=Invalid] [isPOD=0] // CHECK: CallExpr=Specialization:66:8 [type=Specialization &>] [typekind=Elaborated] [templateargs/1= [type=Specialization &] [typekind=LValueReference]] [canonicaltype=Specialization &>] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=Specialization &] [typekind=LValueReference]] [isPOD=1] // CHECK: VarDecl=autoTemplRefParam:72:6 (Definition) [type=Specialization &>] [typekind=Auto] [templateargs/1= [type=Specialization &] [typekind=LValueReference]] [canonicaltype=Specialization &>] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=Specialization &] [typekind=LValueReference]] [isPOD=1] -// CHECK: UnexposedExpr=templRefParam:71:40 [type=const Specialization &>] [typekind=Record] const [templateargs/1= [type=Specialization &] [typekind=LValueReference]] [isPOD=1] +// CHECK: UnexposedExpr=templRefParam:71:40 [type=const Specialization &>] [typekind=Elaborated] const [templateargs/1= [type=Specialization &] [typekind=LValueReference]] [canonicaltype=const Specialization &>] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=Specialization &] [typekind=LValueReference]] [isPOD=1] [isAnonRecDecl=0] // CHECK: DeclRefExpr=templRefParam:71:40 [type=Specialization &>] [typekind=Elaborated] [templateargs/1= [type=Specialization &] [typekind=LValueReference]] [canonicaltype=Specialization &>] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=Specialization &] [typekind=LValueReference]] [isPOD=1] // CHECK: TypeAliasDecl=baz:76:7 (Definition) [type=baz] [typekind=Typedef] [templateargs/1= [type=A] [typekind=Elaborated]] [canonicaltype=A] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=void] [typekind=Void]] [isPOD=0] // CHECK: VarDecl=autoTemplPointer:78:6 (Definition) [type=Specialization &> *] [typekind=Auto] [canonicaltype=Specialization &> *] [canonicaltypekind=Pointer] [isPOD=1] [pointeetype=Specialization &>] [pointeekind=Auto] diff --git a/clang/test/Misc/diag-template-diffing.cpp b/clang/test/Misc/diag-template-diffing.cpp --- a/clang/test/Misc/diag-template-diffing.cpp +++ b/clang/test/Misc/diag-template-diffing.cpp @@ -850,7 +850,7 @@ void foo(A::X &ax, B::X bx) { // CHECK-ELIDE-NOTREE: no viable overloaded '=' - // CHECK-ELIDE-NOTREE: no known conversion from 'B::X' to 'const rdar12931988::A::X' + // CHECK-ELIDE-NOTREE: no known conversion from 'B::X' to 'const X' ax = bx; } diff --git a/clang/test/SemaCXX/conversion-function.cpp b/clang/test/SemaCXX/conversion-function.cpp --- a/clang/test/SemaCXX/conversion-function.cpp +++ b/clang/test/SemaCXX/conversion-function.cpp @@ -452,9 +452,9 @@ struct A { operator enum E { e } (); // expected-error {{'PR18234::A::E' cannot be defined in a type specifier}} operator struct S { int n; } (); // expected-error {{'PR18234::A::S' cannot be defined in a type specifier}} - // expected-note@-1 {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'struct A' to 'const PR18234::A::S &' for 1st argument}} + // expected-note@-1 {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'struct A' to 'const S &' for 1st argument}} #if __cplusplus >= 201103L - // expected-note@-3 {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'struct A' to 'PR18234::A::S &&' for 1st argument}} + // expected-note@-3 {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'struct A' to 'S &&' for 1st argument}} #endif } a; A::S s = a; // expected-error {{no viable conversion from 'struct A' to 'A::S'}} diff --git a/clang/test/SemaCXX/cxx11-call-to-deleted-constructor.cpp b/clang/test/SemaCXX/cxx11-call-to-deleted-constructor.cpp --- a/clang/test/SemaCXX/cxx11-call-to-deleted-constructor.cpp +++ b/clang/test/SemaCXX/cxx11-call-to-deleted-constructor.cpp @@ -34,7 +34,7 @@ { Matrix winI(0, 3); RGBFValue* inputPreL; - winI = { inputPreL->at() }; // expected-error {{call to deleted constructor of 'cva::Matrix &&'}} + winI = { inputPreL->at() }; // expected-error {{call to deleted constructor of 'Matrix &&'}} } } diff --git a/clang/test/SemaCXX/deduced-return-type-cxx14.cpp b/clang/test/SemaCXX/deduced-return-type-cxx14.cpp --- a/clang/test/SemaCXX/deduced-return-type-cxx14.cpp +++ b/clang/test/SemaCXX/deduced-return-type-cxx14.cpp @@ -283,7 +283,7 @@ namespace DefaultedMethods { struct A { - auto operator=(const A&) = default; // expected-error {{must return 'DefaultedMethods::A &'}} + auto operator=(const A&) = default; // expected-error {{must return 'A &'}} A &operator=(A&&); // expected-note {{previous}} }; auto A::operator=(A&&) = default; // expected-error {{return type of out-of-line definition of 'DefaultedMethods::A::operator=' differs from that in the declaration}}