diff --git a/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp b/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp --- a/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp +++ b/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp @@ -564,18 +564,7 @@ TypeLoc Loc = *TLoc; while (Loc.getTypeLocClass() == TypeLoc::Qualified) Loc = Loc.getNextTypeLoc(); - if (Loc.getTypeLocClass() == TypeLoc::Elaborated) { - NestedNameSpecifierLoc NestedNameSpecifier = - Loc.castAs().getQualifierLoc(); - // This happens for friend declaration of a base class with injected class - // name. - if (!NestedNameSpecifier.getNestedNameSpecifier()) - return; - const Type *SpecifierType = - NestedNameSpecifier.getNestedNameSpecifier()->getAsType(); - if (SpecifierType && SpecifierType->isRecordType()) - return; - } + // FIXME: avoid changing injected class names. fixTypeLoc(Result, startLocationForType(Loc), endLocationForType(Loc), Loc); } else if (const auto *VarRef = Result.Nodes.getNodeAs("var_ref")) { diff --git a/clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp b/clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp --- a/clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp +++ b/clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp @@ -215,7 +215,8 @@ // Uses of most types: just look at what the typeLoc refers to. MatchFinder->addMatcher( typeLoc(isExpansionInMainFile(), - loc(qualType(hasDeclaration(Types.bind("use"))))), + loc(qualType(allOf(unless(elaboratedType()), + hasDeclaration(Types.bind("use")))))), this); // Uses of typedefs: these are often transparent to hasDeclaration, so we need // to handle them explicitly. diff --git a/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp --- a/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp @@ -87,9 +87,9 @@ const auto ConstantExpr = ignoringParenImpCasts( anyOf(integerLiteral(), unaryOperator(hasUnaryOperand(IntegerExpr)), binaryOperator(hasLHS(IntegerExpr), hasRHS(IntegerExpr)))); - const auto IntegerCallExpr = ignoringParenImpCasts( - callExpr(anyOf(hasType(isInteger()), hasType(enumType())), - unless(isInTemplateInstantiation()))); + const auto IntegerCallExpr = ignoringParenImpCasts(callExpr( + anyOf(hasType(isInteger()), hasType(hasCanonicalType(enumType()))), + unless(isInTemplateInstantiation()))); const auto SizeOfExpr = sizeOfExpr(hasArgumentOfType( hasUnqualifiedDesugaredType(type().bind("sizeof-arg-type")))); const auto SizeOfZero = @@ -147,8 +147,8 @@ const auto StructAddrOfExpr = unaryOperator( hasOperatorName("&"), hasUnaryOperand(ignoringParenImpCasts( hasType(hasCanonicalType(recordType()))))); - const auto PointerToStructType = - hasUnqualifiedDesugaredType(pointerType(pointee(recordType()))); + const auto PointerToStructType = hasUnqualifiedDesugaredType( + pointerType(pointee(hasCanonicalType(recordType())))); const auto PointerToStructExpr = ignoringParenImpCasts(expr( hasType(hasCanonicalType(PointerToStructType)), unless(cxxThisExpr()))); diff --git a/clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp --- a/clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp @@ -30,9 +30,9 @@ mapAnyOf(cxxConstructExpr, cxxUnresolvedConstructExpr) .with(hasParent(compoundStmt().bind("compound")), anyOf(hasType(cxxRecordDecl(hasNonTrivialDestructor())), - hasType(templateSpecializationType( + hasType(hasCanonicalType(templateSpecializationType( hasDeclaration(classTemplateDecl(has( - cxxRecordDecl(hasNonTrivialDestructor())))))))) + cxxRecordDecl(hasNonTrivialDestructor()))))))))) .bind("expr"), this); } diff --git a/clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp b/clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp --- a/clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp +++ b/clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp @@ -95,7 +95,12 @@ // case of overloaded functions, so detection of redundant casts is trickier // in this case. Don't emit "redundant cast" warnings for function // pointer/reference types. - if (SourceTypeAsWritten == DestTypeAsWritten) { + QualType Src = SourceTypeAsWritten, Dst = DestTypeAsWritten; + if (const auto *ElTy = dyn_cast(Src)) + Src = ElTy->getNamedType(); + if (const auto *ElTy = dyn_cast(Dst)) + Dst = ElTy->getNamedType(); + if (Src == Dst) { diag(CastExpr->getBeginLoc(), "redundant cast to the same type") << FixItHint::CreateRemoval(ReplaceRange); return; diff --git a/clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp b/clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp --- a/clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp +++ b/clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp @@ -36,7 +36,8 @@ // otherwise the matcher does not work correctly, because it // will not explicitly ignore enum conditions. unless(ignoringImpCasts( - declRefExpr(hasType(enumType())).bind("enum-condition")))))) + declRefExpr(hasType(hasCanonicalType(enumType()))) + .bind("enum-condition")))))) .bind("switch"), this); diff --git a/clang-tools-extra/clang-tidy/misc/MisplacedConstCheck.cpp b/clang-tools-extra/clang-tidy/misc/MisplacedConstCheck.cpp --- a/clang-tools-extra/clang-tidy/misc/MisplacedConstCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/MisplacedConstCheck.cpp @@ -21,12 +21,13 @@ pointee(anyOf(isConstQualified(), ignoringParens(functionType())))))); Finder->addMatcher( - valueDecl( - hasType(isConstQualified()), - hasType(typedefType(hasDeclaration(anyOf( - typedefDecl(NonConstAndNonFunctionPointerType).bind("typedef"), - typeAliasDecl(NonConstAndNonFunctionPointerType) - .bind("typeAlias")))))) + valueDecl(hasType(qualType( + isConstQualified(), + elaboratedType(namesType(typedefType(hasDeclaration( + anyOf(typedefDecl(NonConstAndNonFunctionPointerType) + .bind("typedef"), + typeAliasDecl(NonConstAndNonFunctionPointerType) + .bind("typeAlias"))))))))) .bind("decl"), this); } diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp --- a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp @@ -400,7 +400,7 @@ return true; if (const auto *Cast = Parents[0].get()) { if ((Cast->getCastKind() == CK_NoOp && - Cast->getType() == E->getType().withConst()) || + Context->hasSameType(Cast->getType(), E->getType().withConst())) || (Cast->getCastKind() == CK_LValueToRValue && !Cast->getType().isNull() && Cast->getType()->isFundamentalType())) return false; diff --git a/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp b/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp --- a/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp @@ -48,7 +48,8 @@ static TypeMatcher notTemplateSpecConstRefType() { return lValueReferenceType( - pointee(unless(templateSpecializationType()), isConstQualified())); + pointee(unless(elaboratedType(namesType(templateSpecializationType()))), + isConstQualified())); } static TypeMatcher nonConstValueType() { diff --git a/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp --- a/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp @@ -153,22 +153,24 @@ // ((Base*)this)->operator=((Base)Other); // // So we are looking for a member call that fulfills: - if (match(traverse(TK_AsIs, - compoundStmt(has(ignoringParenImpCasts(cxxMemberCallExpr( - // - The object is an implicit cast of 'this' to a - // pointer to - // a base class. - onImplicitObjectArgument(implicitCastExpr( - hasImplicitDestinationType( - pointsTo(type(equalsNode(Base)))), - hasSourceExpression(cxxThisExpr()))), - // - The called method is the operator=. - callee(cxxMethodDecl(isCopyAssignmentOperator())), - // - The argument is (an implicit cast to a Base of) - // the argument taken by "Operator". - argumentCountIs(1), - hasArgument(0, declRefExpr(to(varDecl( - equalsNode(Param)))))))))), + if (match(traverse( + TK_AsIs, + compoundStmt(has(ignoringParenImpCasts(cxxMemberCallExpr( + // - The object is an implicit cast of 'this' to a + // pointer to + // a base class. + onImplicitObjectArgument(implicitCastExpr( + hasImplicitDestinationType(hasCanonicalType(pointsTo( + type(equalsNode(Base->getCanonicalTypeInternal() + .getTypePtr()))))), + hasSourceExpression(cxxThisExpr()))), + // - The called method is the operator=. + callee(cxxMethodDecl(isCopyAssignmentOperator())), + // - The argument is (an implicit cast to a Base of) + // the argument taken by "Operator". + argumentCountIs(1), + hasArgument( + 0, declRefExpr(to(varDecl(equalsNode(Param)))))))))), *Compound, *Context) .empty()) return false; diff --git a/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp --- a/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp @@ -90,7 +90,9 @@ if (TL.getQualifierLoc() && !TraverseNestedNameSpecifierLoc(TL.getQualifierLoc())) return false; - return TraverseTypeLoc(TL.getNamedTypeLoc(), true); + const auto *T = TL.getTypePtr(); + return TraverseTypeLoc(TL.getNamedTypeLoc(), + T->getKeyword() != ETK_None || T->getQualifier()); } bool VisitDeclRefExpr(DeclRefExpr *S) { diff --git a/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.h b/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.h --- a/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.h +++ b/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.h @@ -25,7 +25,7 @@ StaticAccessedThroughInstanceCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), NameSpecifierNestingThreshold( - Options.get("NameSpecifierNestingThreshold", 3U)) {} + Options.get("NameSpecifierNestingThreshold", 2U)) {} void storeOptions(ClangTidyOptions::OptionMap &Opts) override; void registerMatchers(ast_matchers::MatchFinder *Finder) override; diff --git a/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp b/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp --- a/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp @@ -17,18 +17,13 @@ namespace tidy { namespace readability { -static unsigned getNameSpecifierNestingLevel(const QualType &QType) { - if (const ElaboratedType *ElType = QType->getAs()) { - const NestedNameSpecifier *NestedSpecifiers = ElType->getQualifier(); - unsigned NameSpecifierNestingLevel = 1; - do { - NameSpecifierNestingLevel++; - NestedSpecifiers = NestedSpecifiers->getPrefix(); - } while (NestedSpecifiers); - - return NameSpecifierNestingLevel; - } - return 0; +static unsigned getNameSpecifierNestingLevel(QualType T) { + unsigned NestingLevel = 0; + if (const auto *ET = T->getAs()) + for (const NestedNameSpecifier *NNS = ET->getQualifier(); NNS; + NNS = NNS->getPrefix()) + ++NestingLevel; + return NestingLevel; } void StaticAccessedThroughInstanceCheck::storeOptions( diff --git a/clang-tools-extra/clangd/FindTarget.cpp b/clang-tools-extra/clangd/FindTarget.cpp --- a/clang-tools-extra/clangd/FindTarget.cpp +++ b/clang-tools-extra/clangd/FindTarget.cpp @@ -967,7 +967,10 @@ // ElaboratedTypeLoc will reports information for its inner type loc. // Otherwise we loose information about inner types loc's qualifier. TypeLoc Inner = L.getNamedTypeLoc().getUnqualifiedLoc(); - TypeLocsToSkip.insert(Inner.getBeginLoc()); + if (L.getBeginLoc() == Inner.getBeginLoc()) + return RecursiveASTVisitor::TraverseTypeLoc(Inner); + else + TypeLocsToSkip.insert(Inner.getBeginLoc()); return RecursiveASTVisitor::TraverseElaboratedTypeLoc(L); } diff --git a/clang-tools-extra/clangd/unittests/ASTTests.cpp b/clang-tools-extra/clangd/unittests/ASTTests.cpp --- a/clang-tools-extra/clangd/unittests/ASTTests.cpp +++ b/clang-tools-extra/clangd/unittests/ASTTests.cpp @@ -71,7 +71,7 @@ template class Foo {}; ^auto v = Foo(); )cpp", - "Foo", + "Foo", }, { R"cpp( // auto on initializer list. @@ -92,7 +92,7 @@ return Foo(); } )cpp", - "struct Foo", + "Foo", }, { R"cpp( // decltype in trailing return type @@ -101,7 +101,7 @@ return Foo(); } )cpp", - "struct Foo", + "Foo", }, { R"cpp( // auto in function return type @@ -110,7 +110,7 @@ return Foo(); } )cpp", - "struct Foo", + "Foo", }, { R"cpp( // auto& in function return type @@ -120,7 +120,7 @@ return x; } )cpp", - "struct Foo", + "Foo", }, { R"cpp( // auto* in function return type @@ -130,7 +130,7 @@ return x; } )cpp", - "struct Foo", + "Foo", }, { R"cpp( // const auto& in function return type @@ -140,7 +140,7 @@ return x; } )cpp", - "struct Foo", + "Foo", }, { R"cpp( // decltype(auto) in function return (value) @@ -149,7 +149,7 @@ return Foo(); } )cpp", - "struct Foo", + "Foo", }, { R"cpp( // decltype(auto) in function return (ref) @@ -159,7 +159,7 @@ return (x); } )cpp", - "struct Foo &", + "Foo &", }, { R"cpp( // decltype(auto) in function return (const ref) @@ -169,7 +169,7 @@ return (x); } )cpp", - "const struct Foo &", + "const Foo &", }, { R"cpp( // auto on alias diff --git a/clang-tools-extra/clangd/unittests/DumpASTTests.cpp b/clang-tools-extra/clangd/unittests/DumpASTTests.cpp --- a/clang-tools-extra/clangd/unittests/DumpASTTests.cpp +++ b/clang-tools-extra/clangd/unittests/DumpASTTests.cpp @@ -120,7 +120,8 @@ expression: DeclRef - operator+ expression: MaterializeTemporary - lvalue expression: CXXTemporaryObject - Foo - type: Record - Foo + type: Elaborated + type: Record - Foo expression: IntegerLiteral - 42 )"}, {R"cpp( diff --git a/clang-tools-extra/clangd/unittests/FindTargetTests.cpp b/clang-tools-extra/clangd/unittests/FindTargetTests.cpp --- a/clang-tools-extra/clangd/unittests/FindTargetTests.cpp +++ b/clang-tools-extra/clangd/unittests/FindTargetTests.cpp @@ -1516,13 +1516,14 @@ { R"cpp( void foo() { - class {} $0^x; - int (*$1^fptr)(int $2^a, int) = nullptr; + $0^class {} $1^x; + int (*$2^fptr)(int $3^a, int) = nullptr; } )cpp", - "0: targets = {x}, decl\n" - "1: targets = {fptr}, decl\n" - "2: targets = {a}, decl\n"}, + "0: targets = {}\n" + "1: targets = {x}, decl\n" + "2: targets = {fptr}, decl\n" + "3: targets = {a}, decl\n"}, // Namespace aliases should be handled properly. { R"cpp( diff --git a/clang-tools-extra/clangd/unittests/HoverTests.cpp b/clang-tools-extra/clangd/unittests/HoverTests.cpp --- a/clang-tools-extra/clangd/unittests/HoverTests.cpp +++ b/clang-tools-extra/clangd/unittests/HoverTests.cpp @@ -426,7 +426,7 @@ [](HoverInfo &HI) { HI.Name = "auto"; HI.Kind = index::SymbolKind::TypeAlias; - HI.Definition = "struct S"; + HI.Definition = "S"; }}, // undeduced auto {R"cpp( @@ -549,7 +549,7 @@ HI.NamespaceScope = ""; HI.Definition = "Color x = RED"; HI.Kind = index::SymbolKind::Variable; - HI.Type = "enum Color"; + HI.Type = "Color"; HI.Value = "RED (0xffffff85)"; // Symbolic on an expression. }}, {R"cpp( @@ -793,7 +793,7 @@ HI.Kind = index::SymbolKind::Variable; HI.NamespaceScope = ""; HI.Definition = "X x"; - HI.Type = "struct X"; + HI.Type = "X"; }}, {// Don't crash on null types. R"cpp(auto [^[[x]]] = 1; /*error-ok*/)cpp", @@ -1793,7 +1793,7 @@ [](HoverInfo &HI) { HI.Name = "auto"; HI.Kind = index::SymbolKind::TypeAlias; - HI.Definition = "struct Bar"; + HI.Definition = "Bar"; HI.Documentation = "auto function return with trailing type"; }}, { @@ -1806,7 +1806,7 @@ [](HoverInfo &HI) { HI.Name = "decltype"; HI.Kind = index::SymbolKind::TypeAlias; - HI.Definition = "struct Bar"; + HI.Definition = "Bar"; HI.Documentation = "trailing return type"; }}, { @@ -1819,7 +1819,7 @@ [](HoverInfo &HI) { HI.Name = "auto"; HI.Kind = index::SymbolKind::TypeAlias; - HI.Definition = "struct Bar"; + HI.Definition = "Bar"; HI.Documentation = "auto in function return"; }}, { @@ -1833,7 +1833,7 @@ [](HoverInfo &HI) { HI.Name = "auto"; HI.Kind = index::SymbolKind::TypeAlias; - HI.Definition = "struct Bar"; + HI.Definition = "Bar"; HI.Documentation = "auto& in function return"; }}, { @@ -1847,7 +1847,7 @@ [](HoverInfo &HI) { HI.Name = "auto"; HI.Kind = index::SymbolKind::TypeAlias; - HI.Definition = "struct Bar"; + HI.Definition = "Bar"; HI.Documentation = "auto* in function return"; }}, { @@ -1861,7 +1861,7 @@ [](HoverInfo &HI) { HI.Name = "auto"; HI.Kind = index::SymbolKind::TypeAlias; - HI.Definition = "struct Bar"; + HI.Definition = "Bar"; HI.Documentation = "const auto& in function return"; }}, { @@ -1874,7 +1874,7 @@ [](HoverInfo &HI) { HI.Name = "decltype"; HI.Kind = index::SymbolKind::TypeAlias; - HI.Definition = "struct Bar"; + HI.Definition = "Bar"; HI.Documentation = "decltype(auto) in function return"; }}, { @@ -1964,7 +1964,7 @@ [](HoverInfo &HI) { HI.Name = "decltype"; HI.Kind = index::SymbolKind::TypeAlias; - HI.Definition = "struct Bar"; + HI.Definition = "Bar"; HI.Documentation = "decltype of function with trailing return type."; }}, diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone-copy-constructor-init.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone-copy-constructor-init.cpp --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone-copy-constructor-init.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone-copy-constructor-init.cpp @@ -144,7 +144,6 @@ class X12 : public CopyableAlias { X12(const X12 &other) {} // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: calling a base constructor - // CHECK-FIXES: X12(const X12 &other) {} }; template @@ -166,7 +165,7 @@ class X15 : public CopyableAlias2 { X15(const X15 &other) {} // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: calling a base constructor - // CHECK-FIXES: X15(const X15 &other) {} + // CHECK-FIXES: X15(const X15 &other) : Copyable5(other) {} }; class X16 : public NonCopyable { diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-memory-comparison-32bits.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-memory-comparison-32bits.cpp --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-memory-comparison-32bits.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-memory-comparison-32bits.cpp @@ -28,6 +28,6 @@ void test() { S a, b; std::memcmp(&a, &b, sizeof(S)); - // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'inner_padding::S' which does not have a unique object representation; consider comparing the members of the object manually + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'S' which does not have a unique object representation; consider comparing the members of the object manually } } // namespace inner_padding diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-memory-comparison.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-memory-comparison.cpp --- a/clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-memory-comparison.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-memory-comparison.cpp @@ -16,7 +16,7 @@ void f(C &c1, C &c2) { if (!std::memcmp(&c1, &c2, sizeof(C))) { - // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: comparing object representation of non-standard-layout type 'sei_cert_example_oop57_cpp::C'; consider using a comparison operator instead + // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: comparing object representation of non-standard-layout type 'C'; consider using a comparison operator instead } } } // namespace sei_cert_example_oop57_cpp @@ -30,7 +30,7 @@ void test() { S a, b; std::memcmp(&a, &b, sizeof(S)); - // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'inner_padding_64bit_only::S' which does not have a unique object representation; consider comparing the members of the object manually + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'S' which does not have a unique object representation; consider comparing the members of the object manually } } // namespace inner_padding_64bit_only @@ -47,17 +47,17 @@ void testDerived() { Derived a, b; std::memcmp(&a, &b, sizeof(Base)); - // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'padding_in_base::Derived' which does not have a unique object representation; consider comparing the members of the object manually + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'Derived' which does not have a unique object representation; consider comparing the members of the object manually std::memcmp(&a, &b, sizeof(Derived)); - // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'padding_in_base::Derived' which does not have a unique object representation; consider comparing the members of the object manually + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'Derived' which does not have a unique object representation; consider comparing the members of the object manually } void testDerived2() { Derived2 a, b; std::memcmp(&a, &b, sizeof(Base)); - // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'padding_in_base::Derived2' which does not have a unique object representation; consider comparing the members of the object manually + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'Derived2' which does not have a unique object representation; consider comparing the members of the object manually std::memcmp(&a, &b, sizeof(Derived2)); - // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'padding_in_base::Derived2' which does not have a unique object representation; consider comparing the members of the object manually + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'Derived2' which does not have a unique object representation; consider comparing the members of the object manually } } // namespace padding_in_base @@ -97,7 +97,7 @@ void test() { C a, b; std::memcmp(&a, &b, sizeof(C)); - // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of non-standard-layout type 'non_standard_layout::C'; consider using a comparison operator instead + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of non-standard-layout type 'C'; consider using a comparison operator instead } } // namespace non_standard_layout @@ -131,7 +131,7 @@ void test() { S a, b; std::memcmp(&a, &b, sizeof(S)); - // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'empty_struct::S' which does not have a unique object representation; consider comparing the members of the object manually + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'S' which does not have a unique object representation; consider comparing the members of the object manually } } // namespace empty_struct @@ -144,7 +144,7 @@ void test() { S a, b; std::memcmp(&a, &b, sizeof(S)); - // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'empty_field::S' which does not have a unique object representation; consider comparing the members of the object manually + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'S' which does not have a unique object representation; consider comparing the members of the object manually } } // namespace empty_field @@ -173,7 +173,7 @@ void test() { S a, b; std::memcmp(&a, &b, sizeof(S)); - // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'no_unique_address_attribute::multiple_empties_same_type::S' which does not have a unique object representation; consider comparing the members of the object manually + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'S' which does not have a unique object representation; consider comparing the members of the object manually } } // namespace multiple_empties_same_type @@ -203,7 +203,7 @@ void test() { S a, b; std::memcmp(&a, &b, sizeof(S)); - // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'alignment::S' which does not have a unique object representation; consider comparing the members of the object manually + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: comparing object representation of type 'S' which does not have a unique object representation; consider comparing the members of the object manually } } // namespace alignment diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability-const-return-type.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability-const-return-type.cpp --- a/clang-tools-extra/test/clang-tidy/checkers/readability-const-return-type.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/readability-const-return-type.cpp @@ -76,7 +76,7 @@ }; const Strukt p6() {} - // CHECK-MESSAGES: [[@LINE-1]]:3: warning: return type 'const Clazz::Strukt' i + // CHECK-MESSAGES: [[@LINE-1]]:3: warning: return type 'const Strukt' i // CHECK-FIXES: Strukt p6() {} // No warning is emitted here, because this is only the declaration. The @@ -90,7 +90,7 @@ // CHECK-FIXES: static int p8() {} static const Strukt p9() {} - // CHECK-MESSAGES: [[@LINE-1]]:3: warning: return type 'const Clazz::Strukt' i + // CHECK-MESSAGES: [[@LINE-1]]:3: warning: return type 'const Strukt' i // CHECK-FIXES: static Strukt p9() {} int n0() const { return 0; } diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability-static-accessed-through-instance-nesting-threshold.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability-static-accessed-through-instance-nesting-threshold.cpp --- a/clang-tools-extra/test/clang-tidy/checkers/readability-static-accessed-through-instance-nesting-threshold.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/readability-static-accessed-through-instance-nesting-threshold.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy %s readability-static-accessed-through-instance %t -- -config="{CheckOptions: [{key: readability-static-accessed-through-instance.NameSpecifierNestingThreshold, value: 4}]}" -- +// RUN: %check_clang_tidy %s readability-static-accessed-through-instance %t -- -config="{CheckOptions: [{key: readability-static-accessed-through-instance.NameSpecifierNestingThreshold, value: 3}]}" -- // Nested specifiers namespace M { @@ -26,7 +26,7 @@ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: static member // CHECK-FIXES: {{^}} M::N::V::T::t = 12;{{$}} - // u.u is not changed, because the nesting level is over 4 + // u.u is not changed, because the nesting level is over 3 u.u = 12; // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: static member // CHECK-FIXES: {{^}} u.u = 12;{{$}} diff --git a/clang-tools-extra/unittests/clang-change-namespace/ChangeNamespaceTests.cpp b/clang-tools-extra/unittests/clang-change-namespace/ChangeNamespaceTests.cpp --- a/clang-tools-extra/unittests/clang-change-namespace/ChangeNamespaceTests.cpp +++ b/clang-tools-extra/unittests/clang-change-namespace/ChangeNamespaceTests.cpp @@ -2229,7 +2229,7 @@ "namespace e {\n" "class D : public a::Base {\n" " private:\n" - " friend class Base;\n" + " friend class a::Base;\n" " void priv() {}\n" " a::Base b;\n" "};\n" diff --git a/clang/bindings/python/tests/cindex/test_type.py b/clang/bindings/python/tests/cindex/test_type.py --- a/clang/bindings/python/tests/cindex/test_type.py +++ b/clang/bindings/python/tests/cindex/test_type.py @@ -58,7 +58,7 @@ self.assertIsNotNone(fields[1].translation_unit) self.assertEqual(fields[1].spelling, 'b') self.assertFalse(fields[1].type.is_const_qualified()) - self.assertEqual(fields[1].type.kind, TypeKind.TYPEDEF) + self.assertEqual(fields[1].type.kind, TypeKind.ELABORATED) self.assertEqual(fields[1].type.get_canonical().kind, TypeKind.INT) self.assertEqual(fields[1].type.get_declaration().spelling, 'I') self.assertEqual(fields[1].type.get_typedef_name(), 'I') diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h --- a/clang/include/clang/AST/ASTContext.h +++ b/clang/include/clang/AST/ASTContext.h @@ -2764,14 +2764,20 @@ bool typesAreBlockPointerCompatible(QualType, QualType); bool isObjCIdType(QualType T) const { + if (const auto *ET = dyn_cast(T)) + T = ET->getNamedType(); return T == getObjCIdType(); } bool isObjCClassType(QualType T) const { + if (const auto *ET = dyn_cast(T)) + T = ET->getNamedType(); return T == getObjCClassType(); } bool isObjCSelType(QualType T) const { + if (const auto *ET = dyn_cast(T)) + T = ET->getNamedType(); return T == getObjCSelType(); } diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -5435,9 +5435,6 @@ ElaboratedTypeBits.HasOwnedTagDecl = true; *getTrailingObjects() = OwnedTagDecl; } - assert(!(Keyword == ETK_None && NNS == nullptr) && - "ElaboratedType cannot have elaborated type keyword " - "and name qualifier both null."); } public: diff --git a/clang/lib/ARCMigrate/ObjCMT.cpp b/clang/lib/ARCMigrate/ObjCMT.cpp --- a/clang/lib/ARCMigrate/ObjCMT.cpp +++ b/clang/lib/ARCMigrate/ObjCMT.cpp @@ -505,7 +505,7 @@ if (LParenAdded) PropertyString += ')'; QualType RT = Getter->getReturnType(); - if (!isa(RT)) { + if (!RT->getAs()) { // strip off any ARC lifetime qualifier. QualType CanResultTy = Context.getCanonicalType(RT); if (CanResultTy.getQualifiers().hasObjCLifetime()) { @@ -1053,7 +1053,7 @@ // Also, typedef-of-pointer-to-incomplete-struct is something that we assume // is not an innter pointer type. QualType OrigT = T; - while (const TypedefType *TD = dyn_cast(T.getTypePtr())) + while (const auto *TD = T->getAs()) T = TD->getDecl()->getUnderlyingType(); if (OrigT == T || !T->isPointerType()) return true; @@ -1356,9 +1356,6 @@ if (!Ty->isPointerType()) return false; - while (const TypedefType *TD = dyn_cast(Ty.getTypePtr())) - Ty = TD->getDecl()->getUnderlyingType(); - // Is the type void*? const PointerType* PT = Ty->castAs(); if (PT->getPointeeType().getUnqualifiedType()->isVoidType()) diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -7308,7 +7308,7 @@ /// 'l' or 'L' , but not always. For typedefs, we need to use /// 'i' or 'I' instead if encoding a struct field, or a pointer! void ASTContext::getLegacyIntegralTypeEncoding (QualType &PointeeTy) const { - if (isa(PointeeTy.getTypePtr())) { + if (PointeeTy->getAs()) { if (const auto *BT = PointeeTy->getAs()) { if (BT->getKind() == BuiltinType::ULong && getIntWidth(PointeeTy) == 32) PointeeTy = UnsignedIntTy; @@ -7596,7 +7596,7 @@ // pointee gets emitted _before_ the '^'. The read-only qualifier of // the pointer itself gets ignored, _unless_ we are looking at a typedef! // Also, do not emit the 'r' for anything but the outermost type! - if (isa(T.getTypePtr())) { + if (T->getAs()) { if (Options.IsOutermostType() && T.isConstQualified()) { isReadOnly = true; S += 'r'; diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -2544,7 +2544,7 @@ return getMemberLocation(); if (const auto *TSInfo = Initializee.get()) - return TSInfo->getTypeLoc().getLocalSourceRange().getBegin(); + return TSInfo->getTypeLoc().getBeginLoc(); return {}; } diff --git a/clang/lib/AST/ExprCXX.cpp b/clang/lib/AST/ExprCXX.cpp --- a/clang/lib/AST/ExprCXX.cpp +++ b/clang/lib/AST/ExprCXX.cpp @@ -314,7 +314,7 @@ // CXXPseudoDestructorExpr PseudoDestructorTypeStorage::PseudoDestructorTypeStorage(TypeSourceInfo *Info) : Type(Info) { - Location = Info->getTypeLoc().getLocalSourceRange().getBegin(); + Location = Info->getTypeLoc().getBeginLoc(); } CXXPseudoDestructorExpr::CXXPseudoDestructorExpr( @@ -341,7 +341,7 @@ SourceLocation CXXPseudoDestructorExpr::getEndLoc() const { SourceLocation End = DestroyedType.getLocation(); if (TypeSourceInfo *TInfo = DestroyedType.getTypeSourceInfo()) - End = TInfo->getTypeLoc().getLocalSourceRange().getEnd(); + End = TInfo->getTypeLoc().getSourceRange().getEnd(); return End; } diff --git a/clang/lib/AST/FormatString.cpp b/clang/lib/AST/FormatString.cpp --- a/clang/lib/AST/FormatString.cpp +++ b/clang/lib/AST/FormatString.cpp @@ -976,10 +976,12 @@ bool FormatSpecifier::namedTypeToLengthModifier(QualType QT, LengthModifier &LM) { - assert(isa(QT) && "Expected a TypedefType"); - const TypedefNameDecl *Typedef = cast(QT)->getDecl(); + for (const TypedefNameDecl *Typedef;; QT = Typedef->getUnderlyingType()) { + const auto *TT = QT->getAs(); + if (!TT) + return false; + Typedef = TT->getDecl(); - for (;;) { const IdentifierInfo *Identifier = Typedef->getIdentifier(); if (Identifier->getName() == "size_t") { LM.setKind(LengthModifier::AsSizeT); @@ -998,12 +1000,5 @@ LM.setKind(LengthModifier::AsPtrDiff); return true; } - - QualType T = Typedef->getUnderlyingType(); - if (!isa(T)) - break; - - Typedef = cast(T)->getDecl(); } - return false; } diff --git a/clang/lib/AST/PrintfFormatString.cpp b/clang/lib/AST/PrintfFormatString.cpp --- a/clang/lib/AST/PrintfFormatString.cpp +++ b/clang/lib/AST/PrintfFormatString.cpp @@ -844,7 +844,7 @@ } // Handle size_t, ptrdiff_t, etc. that have dedicated length modifiers in C99. - if (isa(QT) && (LangOpt.C99 || LangOpt.CPlusPlus11)) + if (LangOpt.C99 || LangOpt.CPlusPlus11) namedTypeToLengthModifier(QT, LM); // If fixing the length modifier was enough, we might be done. @@ -874,7 +874,7 @@ // Set conversion specifier and disable any flags which do not apply to it. // Let typedefs to char fall through to int, as %c is silly for uint8_t. - if (!isa(QT) && QT->isCharType()) { + if (!QT->getAs() && QT->isCharType()) { CS.setKind(ConversionSpecifier::cArg); LM.setKind(LengthModifier::None); Precision.setHowSpecified(OptionalAmount::NotSpecified); @@ -885,12 +885,10 @@ // Test for Floating type first as LongDouble can pass isUnsignedIntegerType else if (QT->isRealFloatingType()) { CS.setKind(ConversionSpecifier::fArg); - } - else if (QT->isSignedIntegerType()) { + } else if (QT->isSignedIntegerType()) { CS.setKind(ConversionSpecifier::dArg); HasAlternativeForm = 0; - } - else if (QT->isUnsignedIntegerType()) { + } else if (QT->isUnsignedIntegerType()) { CS.setKind(ConversionSpecifier::uArg); HasAlternativeForm = 0; HasPlusPrefix = 0; diff --git a/clang/lib/AST/ScanfFormatString.cpp b/clang/lib/AST/ScanfFormatString.cpp --- a/clang/lib/AST/ScanfFormatString.cpp +++ b/clang/lib/AST/ScanfFormatString.cpp @@ -500,7 +500,7 @@ } // Handle size_t, ptrdiff_t, etc. that have dedicated length modifiers in C99. - if (isa(PT) && (LangOpt.C99 || LangOpt.CPlusPlus11)) + if (LangOpt.C99 || LangOpt.CPlusPlus11) namedTypeToLengthModifier(PT, LM); // If fixing the length modifier was enough, we are done. diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -4263,20 +4263,13 @@ } bool Type::isObjCNSObjectType() const { - const Type *cur = this; - while (true) { - if (const auto *typedefType = dyn_cast(cur)) - return typedefType->getDecl()->hasAttr(); - - // Single-step desugar until we run out of sugar. - QualType next = cur->getLocallyUnqualifiedSingleStepDesugaredType(); - if (next.getTypePtr() == cur) return false; - cur = next.getTypePtr(); - } + if (const auto *typedefType = getAs()) + return typedefType->getDecl()->hasAttr(); + return false; } bool Type::isObjCIndependentClassType() const { - if (const auto *typedefType = dyn_cast(this)) + if (const auto *typedefType = getAs()) return typedefType->getDecl()->hasAttr(); return false; } diff --git a/clang/lib/AST/TypeLoc.cpp b/clang/lib/AST/TypeLoc.cpp --- a/clang/lib/AST/TypeLoc.cpp +++ b/clang/lib/AST/TypeLoc.cpp @@ -194,8 +194,14 @@ while (true) { switch (Cur.getTypeLocClass()) { case Elaborated: - LeftMost = Cur; - break; + if (Cur.getLocalSourceRange().getBegin().isValid()) { + LeftMost = Cur; + break; + } + Cur = Cur.getNextTypeLoc(); + if (Cur.isNull()) + break; + continue; case FunctionProto: if (Cur.castAs().getTypePtr() ->hasTrailingReturn()) { diff --git a/clang/lib/Analysis/RetainSummaryManager.cpp b/clang/lib/Analysis/RetainSummaryManager.cpp --- a/clang/lib/Analysis/RetainSummaryManager.cpp +++ b/clang/lib/Analysis/RetainSummaryManager.cpp @@ -892,7 +892,7 @@ /// has a typedef with a given name @c Name. static bool hasTypedefNamed(QualType QT, StringRef Name) { - while (auto *T = dyn_cast(QT)) { + while (auto *T = QT->getAs()) { const auto &Context = T->getDecl()->getASTContext(); if (T->getDecl()->getIdentifier() == &Context.Idents.get(Name)) return true; diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2793,7 +2793,7 @@ // Set `align` attribute if any. const auto *AVAttr = PVD->getAttr(); if (!AVAttr) - if (const auto *TOTy = dyn_cast(OTy)) + if (const auto *TOTy = OTy->getAs()) AVAttr = TOTy->getDecl()->getAttr(); if (AVAttr && !SanOpts.has(SanitizerKind::Alignment)) { // If alignment-assumption sanitizer is enabled, we do *not* add diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -259,7 +259,7 @@ if (VD->getType()->isReferenceType()) { if (const auto *TTy = - dyn_cast(VD->getType().getNonReferenceType())) + VD->getType().getNonReferenceType()->getAs()) AVAttr = TTy->getDecl()->getAttr(); } else { // Assumptions for function parameters are emitted at the start of the @@ -275,8 +275,7 @@ } if (!AVAttr) - if (const auto *TTy = - dyn_cast(E->getType())) + if (const auto *TTy = E->getType()->getAs()) AVAttr = TTy->getDecl()->getAttr(); if (!AVAttr) diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -2171,7 +2171,6 @@ case Type::ConstantMatrix: case Type::Record: case Type::Enum: - case Type::Elaborated: case Type::TemplateSpecialization: case Type::ObjCTypeParam: case Type::ObjCObject: @@ -2180,6 +2179,10 @@ case Type::ExtInt: llvm_unreachable("type class is never variably-modified!"); + case Type::Elaborated: + type = cast(ty)->getNamedType(); + break; + case Type::Adjusted: type = cast(ty)->getAdjustedType(); break; diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1608,7 +1608,7 @@ // Get image and pipe access qualifier: if (ty->isImageType() || ty->isPipeType()) { const Decl *PDecl = parm; - if (auto *TD = dyn_cast(ty)) + if (const auto *TD = ty->getAs()) PDecl = TD->getDecl(); const OpenCLAccessAttr *A = PDecl->getAttr(); if (A && A->isWriteOnly()) diff --git a/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp b/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp --- a/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp +++ b/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp @@ -852,7 +852,7 @@ if (D->isBitField()) IvarT = GetGroupRecordTypeForObjCIvarBitfield(D); - if (!isa(IvarT) && IvarT->isRecordType()) { + if (!IvarT->getAs() && IvarT->isRecordType()) { RecordDecl *RD = IvarT->castAs()->getDecl(); RD = RD->getDefinition(); if (RD && !RD->getDeclName().getAsIdentifierInfo()) { @@ -3628,7 +3628,7 @@ /// It handles elaborated types, as well as enum types in the process. bool RewriteModernObjC::RewriteObjCFieldDeclType(QualType &Type, std::string &Result) { - if (isa(Type)) { + if (Type->getAs()) { Result += "\t"; return false; } @@ -3723,7 +3723,7 @@ void RewriteModernObjC::RewriteLocallyDefinedNamedAggregates(FieldDecl *fieldDecl, std::string &Result) { QualType Type = fieldDecl->getType(); - if (isa(Type)) + if (Type->getAs()) return; if (Type->isArrayType()) Type = Context->getBaseElementType(Type); @@ -7496,7 +7496,7 @@ if (D->isBitField()) IvarT = GetGroupRecordTypeForObjCIvarBitfield(D); - if (!isa(IvarT) && IvarT->isRecordType()) { + if (!IvarT->getAs() && IvarT->isRecordType()) { RecordDecl *RD = IvarT->castAs()->getDecl(); RD = RD->getDefinition(); if (RD && !RD->getDeclName().getAsIdentifierInfo()) { diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -9350,7 +9350,7 @@ // We extract the name from the typedef because we don't want to show // the underlying type in the diagnostic. StringRef Name; - if (const TypedefType *TypedefTy = dyn_cast(ExprTy)) + if (const auto *TypedefTy = ExprTy->getAs()) Name = TypedefTy->getDecl()->getName(); else Name = CastTyName; diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -274,6 +274,41 @@ return S.CreateParsedType(T, Builder.getTypeSourceInfo(Context, T)); } +/// Build a ParsedType for a simple-type-specifier with a nested-name-specifier. +static ParsedType buildNamedType(Sema &S, const CXXScopeSpec *SS, QualType T, + SourceLocation NameLoc, + bool WantNontrivialTypeSourceInfo = true) { + switch (T->getTypeClass()) { + case Type::DeducedTemplateSpecialization: + case Type::Enum: + case Type::InjectedClassName: + case Type::Record: + case Type::Typedef: + case Type::UnresolvedUsing: + break; + case Type::ObjCTypeParam: + case Type::TemplateTypeParm: + return ParsedType::make(T); + default: + llvm_unreachable("Unexpected Type Class"); + } + + if (!SS || !SS->isNotEmpty()) + return ParsedType::make( + S.Context.getElaboratedType(ETK_None, nullptr, T, nullptr)); + + QualType ElTy = S.getElaboratedType(ETK_None, *SS, T); + if (!WantNontrivialTypeSourceInfo) + return ParsedType::make(ElTy); + + TypeLocBuilder Builder; + Builder.pushTypeSpec(T).setNameLoc(NameLoc); + ElaboratedTypeLoc ElabTL = Builder.push(ElTy); + ElabTL.setElaboratedKeywordLoc(SourceLocation()); + ElabTL.setQualifierLoc(SS->getWithLocInContext(S.Context)); + return S.CreateParsedType(ElTy, Builder.getTypeSourceInfo(S.Context, ElTy)); +} + /// If the identifier refers to a type name within this scope, /// return the declaration of that type. /// @@ -507,27 +542,9 @@ return nullptr; } - // NOTE: avoid constructing an ElaboratedType(Loc) if this is a - // constructor or destructor name (in such a case, the scope specifier - // will be attached to the enclosing Expr or Decl node). - if (SS && SS->isNotEmpty() && !IsCtorOrDtorName && - !isa(IIDecl)) { - if (WantNontrivialTypeSourceInfo) { - // Construct a type with type-source information. - TypeLocBuilder Builder; - Builder.pushTypeSpec(T).setNameLoc(NameLoc); - - T = getElaboratedType(ETK_None, *SS, T); - ElaboratedTypeLoc ElabTL = Builder.push(T); - ElabTL.setElaboratedKeywordLoc(SourceLocation()); - ElabTL.setQualifierLoc(SS->getWithLocInContext(Context)); - return CreateParsedType(T, Builder.getTypeSourceInfo(Context, T)); - } else { - T = getElaboratedType(ETK_None, *SS, T); - } - } - - return ParsedType::make(T); + if (isa(IIDecl)) + return ParsedType::make(T); + return buildNamedType(*this, SS, T, NameLoc, WantNontrivialTypeSourceInfo); } // Builds a fake NNS for the given decl context. @@ -843,21 +860,6 @@ return false; } -/// Build a ParsedType for a simple-type-specifier with a nested-name-specifier. -static ParsedType buildNestedType(Sema &S, CXXScopeSpec &SS, - QualType T, SourceLocation NameLoc) { - ASTContext &Context = S.Context; - - TypeLocBuilder Builder; - Builder.pushTypeSpec(T).setNameLoc(NameLoc); - - T = S.getElaboratedType(ETK_None, SS, T); - ElaboratedTypeLoc ElabTL = Builder.push(T); - ElabTL.setElaboratedKeywordLoc(SourceLocation()); - ElabTL.setQualifierLoc(SS.getWithLocInContext(Context)); - return S.CreateParsedType(T, Builder.getTypeSourceInfo(Context, T)); -} - Sema::NameClassification Sema::ClassifyName(Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc, @@ -1138,10 +1140,7 @@ if (TypeDecl *Type = dyn_cast(FirstDecl)) { DiagnoseUseOfDecl(Type, NameLoc); MarkAnyDeclReferenced(Type->getLocation(), Type, /*OdrUse=*/false); - QualType T = Context.getTypeDeclType(Type); - if (SS.isNotEmpty()) - return buildNestedType(*this, SS, T, NameLoc); - return ParsedType::make(T); + return buildNamedType(*this, &SS, Context.getTypeDeclType(Type), NameLoc); } ObjCInterfaceDecl *Class = dyn_cast(FirstDecl); @@ -1190,10 +1189,7 @@ isTagTypeWithMissingTag(*this, Result, S, SS, Name, NameLoc)) { TypeDecl *Type = Result.getAsSingle(); DiagnoseUseOfDecl(Type, NameLoc); - QualType T = Context.getTypeDeclType(Type); - if (SS.isNotEmpty()) - return buildNestedType(*this, SS, T, NameLoc); - return ParsedType::make(T); + return buildNamedType(*this, &SS, Context.getTypeDeclType(Type), NameLoc); } // If we already know which single declaration is referenced, just annotate 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 @@ -4307,17 +4307,13 @@ } if (BaseType.isNull()) { - BaseType = Context.getTypeDeclType(TyD); + BaseType = getElaboratedType(ETK_None, SS, Context.getTypeDeclType(TyD)); MarkAnyDeclReferenced(TyD->getLocation(), TyD, /*OdrUse=*/false); - if (SS.isSet()) { - BaseType = Context.getElaboratedType(ETK_None, SS.getScopeRep(), - BaseType); - TInfo = Context.CreateTypeSourceInfo(BaseType); - ElaboratedTypeLoc TL = TInfo->getTypeLoc().castAs(); - TL.getNamedTypeLoc().castAs().setNameLoc(IdLoc); - TL.setElaboratedKeywordLoc(SourceLocation()); - TL.setQualifierLoc(SS.getWithLocInContext(Context)); - } + TInfo = Context.CreateTypeSourceInfo(BaseType); + ElaboratedTypeLoc TL = TInfo->getTypeLoc().castAs(); + TL.getNamedTypeLoc().castAs().setNameLoc(IdLoc); + TL.setElaboratedKeywordLoc(SourceLocation()); + TL.setQualifierLoc(SS.getWithLocInContext(Context)); } } @@ -4477,12 +4473,11 @@ Sema::BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc) { - SourceLocation BaseLoc - = BaseTInfo->getTypeLoc().getLocalSourceRange().getBegin(); + SourceLocation BaseLoc = BaseTInfo->getTypeLoc().getBeginLoc(); if (!BaseType->isDependentType() && !BaseType->isRecordType()) return Diag(BaseLoc, diag::err_base_init_does_not_name_class) - << BaseType << BaseTInfo->getTypeLoc().getLocalSourceRange(); + << BaseType << BaseTInfo->getTypeLoc().getSourceRange(); // C++ [class.base.init]p2: // [...] Unless the mem-initializer-id names a nonstatic data @@ -4540,8 +4535,8 @@ Dependent = true; else return Diag(BaseLoc, diag::err_not_direct_base_or_virtual) - << BaseType << Context.getTypeDeclType(ClassDecl) - << BaseTInfo->getTypeLoc().getLocalSourceRange(); + << BaseType << Context.getTypeDeclType(ClassDecl) + << BaseTInfo->getTypeLoc().getSourceRange(); } } @@ -10913,8 +10908,11 @@ assert(TSI && "deduction guide has valid type but invalid return type?"); bool AcceptableReturnType = false; bool MightInstantiateToSpecialization = false; - if (auto RetTST = - TSI->getTypeLoc().getAs()) { + TypeLoc TL = TSI->getTypeLoc(); + if (auto ETL = TL.getAs()) + TL = ETL.getNamedTypeLoc(); + + if (auto RetTST = TL.getAs()) { TemplateName SpecifiedName = RetTST.getTypePtr()->getTemplateName(); bool TemplateMatches = Context.hasSameTemplateName(SpecifiedName, GuidedTemplate); diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -4376,7 +4376,6 @@ case Type::ConstantMatrix: case Type::Record: case Type::Enum: - case Type::Elaborated: case Type::TemplateSpecialization: case Type::ObjCObject: case Type::ObjCInterface: @@ -4385,6 +4384,9 @@ case Type::Pipe: case Type::ExtInt: llvm_unreachable("type class is never variably-modified!"); + case Type::Elaborated: + T = cast(Ty)->getNamedType(); + break; case Type::Adjusted: T = cast(Ty)->getOriginalType(); break; diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -238,7 +238,7 @@ if (IsAcceptableResult(Type)) { QualType T = Context.getTypeDeclType(Type); MarkAnyDeclReferenced(Type->getLocation(), Type, /*OdrUse=*/false); - return CreateParsedType(T, + return CreateParsedType(Context.getElaboratedType(ETK_None, nullptr, T), Context.getTrivialTypeSourceInfo(T, NameLoc)); } } @@ -7512,8 +7512,8 @@ // designated by the pseudo-destructor-name shall be the same type. if (DestructedTypeInfo) { QualType DestructedType = DestructedTypeInfo->getType(); - SourceLocation DestructedTypeStart - = DestructedTypeInfo->getTypeLoc().getLocalSourceRange().getBegin(); + SourceLocation DestructedTypeStart = + DestructedTypeInfo->getTypeLoc().getBeginLoc(); if (!DestructedType->isDependentType() && !ObjectType->isDependentType()) { if (!Context.hasSameUnqualifiedType(DestructedType, ObjectType)) { // Detect dot pseudo destructor calls on pointer objects, e.g.: @@ -7538,7 +7538,7 @@ } else { Diag(DestructedTypeStart, diag::err_pseudo_dtor_type_mismatch) << ObjectType << DestructedType << Base->getSourceRange() - << DestructedTypeInfo->getTypeLoc().getLocalSourceRange(); + << DestructedTypeInfo->getTypeLoc().getSourceRange(); // Recover by setting the destructed type to the object type. DestructedType = ObjectType; @@ -7554,8 +7554,8 @@ // type. } else { Diag(DestructedTypeStart, diag::err_arc_pseudo_dtor_inconstant_quals) - << ObjectType << DestructedType << Base->getSourceRange() - << DestructedTypeInfo->getTypeLoc().getLocalSourceRange(); + << ObjectType << DestructedType << Base->getSourceRange() + << DestructedTypeInfo->getTypeLoc().getSourceRange(); } // Recover by setting the destructed type to the object type. diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -3860,7 +3860,7 @@ static ObjCBridgeRelatedAttr *ObjCBridgeRelatedAttrFromType(QualType T, TypedefNameDecl *&TDNDecl) { - while (const TypedefType *TD = dyn_cast(T.getTypePtr())) { + while (const auto *TD = T->getAs()) { TDNDecl = TD->getDecl(); if (ObjCBridgeRelatedAttr *ObjCBAttr = getObjCBridgeAttr(TD)) @@ -4007,7 +4007,7 @@ bool &HadTheAttribute, bool warn) { QualType T = castExpr->getType(); HadTheAttribute = false; - while (const TypedefType *TD = dyn_cast(T.getTypePtr())) { + while (const auto *TD = T->getAs()) { TypedefNameDecl *TDNDecl = TD->getDecl(); if (TB *ObjCBAttr = getObjCBridgeAttr(TD)) { if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) { @@ -4070,7 +4070,7 @@ bool &HadTheAttribute, bool warn) { QualType T = castType; HadTheAttribute = false; - while (const TypedefType *TD = dyn_cast(T.getTypePtr())) { + while (const auto *TD = T->getAs()) { TypedefNameDecl *TDNDecl = TD->getDecl(); if (TB *ObjCBAttr = getObjCBridgeAttr(TD)) { if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) { diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -3963,14 +3963,14 @@ return CreateParsedType(T, TLB.getTypeSourceInfo(Context, T)); } - QualType Result = CheckTemplateIdType(Template, TemplateIILoc, TemplateArgs); - if (Result.isNull()) + QualType SpecTy = CheckTemplateIdType(Template, TemplateIILoc, TemplateArgs); + if (SpecTy.isNull()) return true; // Build type-source information. TypeLocBuilder TLB; - TemplateSpecializationTypeLoc SpecTL - = TLB.push(Result); + TemplateSpecializationTypeLoc SpecTL = + TLB.push(SpecTy); SpecTL.setTemplateKeywordLoc(TemplateKWLoc); SpecTL.setTemplateNameLoc(TemplateIILoc); SpecTL.setLAngleLoc(LAngleLoc); @@ -3978,18 +3978,12 @@ for (unsigned i = 0, e = SpecTL.getNumArgs(); i != e; ++i) SpecTL.setArgLocInfo(i, TemplateArgs[i].getLocInfo()); - // NOTE: avoid constructing an ElaboratedTypeLoc if this is a - // constructor or destructor name (in such a case, the scope specifier - // will be attached to the enclosing Decl or Expr node). - if (SS.isNotEmpty() && !IsCtorOrDtorName) { - // Create an elaborated-type-specifier containing the nested-name-specifier. - Result = Context.getElaboratedType(ETK_None, SS.getScopeRep(), Result); - ElaboratedTypeLoc ElabTL = TLB.push(Result); - ElabTL.setElaboratedKeywordLoc(SourceLocation()); - ElabTL.setQualifierLoc(SS.getWithLocInContext(Context)); - } - - return CreateParsedType(Result, TLB.getTypeSourceInfo(Context, Result)); + // Create an elaborated-type-specifier containing the nested-name-specifier. + QualType ElTy = getElaboratedType(ETK_None, SS, SpecTy); + ElaboratedTypeLoc ElabTL = TLB.push(ElTy); + ElabTL.setElaboratedKeywordLoc(SourceLocation()); + ElabTL.setQualifierLoc(SS.getWithLocInContext(Context)); + return CreateParsedType(ElTy, TLB.getTypeSourceInfo(Context, ElTy)); } TypeResult Sema::ActOnTagTemplateIdType(TagUseKind TUK, diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -5451,7 +5451,7 @@ // in ClsType; hence we wrap ClsType into an ElaboratedType. // NOTE: in particular, no wrap occurs if ClsType already is an // Elaborated, DependentName, or DependentTemplateSpecialization. - if (NNSPrefix && isa(NNS->getAsType())) + if (isa(NNS->getAsType())) ClsType = Context.getElaboratedType(ETK_None, NNSPrefix, ClsType); break; } @@ -5986,10 +5986,11 @@ if (DS.getTypeSpecType() == TST_typename) { TypeSourceInfo *TInfo = nullptr; Sema::GetTypeFromParser(DS.getRepAsType(), &TInfo); - if (TInfo) { - TL.copy(TInfo->getTypeLoc().castAs()); - return; - } + if (TInfo) + if (auto ETL = TInfo->getTypeLoc().getAs()) { + TL.copy(ETL); + return; + } } TL.setElaboratedKeywordLoc(Keyword != ETK_None ? DS.getTypeSpecTypeLoc() @@ -8878,15 +8879,8 @@ TagDecl *OwnedTagDecl) { if (T.isNull()) return T; - NestedNameSpecifier *NNS; - if (SS.isValid()) - NNS = SS.getScopeRep(); - else { - if (Keyword == ETK_None) - return T; - NNS = nullptr; - } - return Context.getElaboratedType(Keyword, NNS, T, OwnedTagDecl); + return Context.getElaboratedType( + Keyword, SS.isValid() ? SS.getScopeRep() : nullptr, T, OwnedTagDecl); } QualType Sema::BuildTypeofExprType(Expr *E) { diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -1064,15 +1064,11 @@ // Otherwise, make an elaborated type wrapping a non-dependent // specialization. QualType T = - getDerived().RebuildTemplateSpecializationType(InstName, NameLoc, Args); - if (T.isNull()) return QualType(); - - if (Keyword == ETK_None && QualifierLoc.getNestedNameSpecifier() == nullptr) - return T; - - return SemaRef.Context.getElaboratedType(Keyword, - QualifierLoc.getNestedNameSpecifier(), - T); + getDerived().RebuildTemplateSpecializationType(InstName, NameLoc, Args); + if (T.isNull()) + return QualType(); + return SemaRef.Context.getElaboratedType( + Keyword, QualifierLoc.getNestedNameSpecifier(), T); } /// Build a new typename type that refers to an identifier. diff --git a/clang/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp --- a/clang/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp @@ -109,17 +109,20 @@ // Look through the typedefs. while (const Type *T = Ty.getTypePtr()) { - if (const auto *TT = dyn_cast(T)) { + if (const auto *AT = dyn_cast(T)) { + if (AT->getAttrKind() == attr::TypeNonNull) + return true; + Ty = AT->getModifiedType(); + } else if (const auto *ET = dyn_cast(T)) { + const auto *TT = dyn_cast(ET->getNamedType()); + if (!TT) + return false; Ty = TT->getDecl()->getUnderlyingType(); // It is sufficient for any intermediate typedef // to be classified const. HasConst = HasConst || Ty.isConstQualified(); if (isNonnullType(Ty) && HasConst) return true; - } else if (const auto *AT = dyn_cast(T)) { - if (AT->getAttrKind() == attr::TypeNonNull) - return true; - Ty = AT->getModifiedType(); } else { return false; } @@ -136,7 +139,7 @@ if (auto *T = dyn_cast(Ty)) { return T->getInterfaceDecl() && T->getInterfaceDecl()->getIdentifier() == NSStringII; - } else if (auto *T = dyn_cast(Ty)) { + } else if (auto *T = Ty->getAs()) { IdentifierInfo* II = T->getDecl()->getIdentifier(); return II == CFStringRefII || II == CFBooleanRefII || II == CFNullRefII; } diff --git a/clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp --- a/clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp @@ -196,12 +196,10 @@ AnalysisManager &AM, BugReporter &BR) const { // Currently this matches CoreFoundation opaque pointer typedefs. - auto CSuspiciousNumberObjectExprM = - expr(ignoringParenImpCasts( - expr(hasType( - typedefType(hasDeclaration(anyOf( - typedefDecl(hasName("CFNumberRef")), - typedefDecl(hasName("CFBooleanRef"))))))) + auto CSuspiciousNumberObjectExprM = expr(ignoringParenImpCasts( + expr(hasType(elaboratedType(namesType(typedefType( + hasDeclaration(anyOf(typedefDecl(hasName("CFNumberRef")), + typedefDecl(hasName("CFBooleanRef"))))))))) .bind("c_object"))); // Currently this matches XNU kernel number-object pointers. @@ -240,8 +238,9 @@ // The .bind here is in order to compose the error message more accurately. auto ObjCSuspiciousScalarBooleanTypeM = - qualType(typedefType(hasDeclaration( - typedefDecl(hasName("BOOL"))))).bind("objc_bool_type"); + qualType(elaboratedType(namesType( + typedefType(hasDeclaration(typedefDecl(hasName("BOOL"))))))) + .bind("objc_bool_type"); // The .bind here is in order to compose the error message more accurately. auto SuspiciousScalarBooleanTypeM = @@ -253,9 +252,9 @@ // for storing pointers. auto SuspiciousScalarNumberTypeM = qualType(hasCanonicalType(isInteger()), - unless(typedefType(hasDeclaration( - typedefDecl(matchesName("^::u?intptr_t$")))))) - .bind("int_type"); + unless(elaboratedType(namesType(typedefType(hasDeclaration( + typedefDecl(matchesName("^::u?intptr_t$")))))))) + .bind("int_type"); auto SuspiciousScalarTypeM = qualType(anyOf(SuspiciousScalarBooleanTypeM, diff --git a/clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp b/clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp --- a/clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp +++ b/clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp @@ -161,7 +161,7 @@ optionally( isDerivedFrom(cxxRecordDecl(hasName("clang::TypeLoc")) .bind("typeLocBase"))))), - returns(asString(TypeString))) + returns(hasCanonicalType(asString(TypeString)))) .bind("classMethod")), *ASTClass, *Result.Context); diff --git a/clang/test/AST/ast-dump-APValue-anon-union.cpp b/clang/test/AST/ast-dump-APValue-anon-union.cpp --- a/clang/test/AST/ast-dump-APValue-anon-union.cpp +++ b/clang/test/AST/ast-dump-APValue-anon-union.cpp @@ -30,23 +30,23 @@ void Test() { constexpr S0 s0{}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} s0 'const S0' constexpr listinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} s0 'const S0':'const S0' constexpr listinit // CHECK-NEXT: | |-value: Struct // CHECK-NEXT: | | `-field: Union .i Int 42 constexpr U0 u0a{}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} u0a 'const U0' constexpr listinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} u0a 'const U0':'const U0' constexpr listinit // CHECK-NEXT: | |-value: Union None constexpr U0 u0b{3.1415f}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} u0b 'const U0' constexpr listinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} u0b 'const U0':'const U0' constexpr listinit // CHECK-NEXT: | |-value: Union . Union .f Float 3.141500e+00 constexpr U1 u1a{}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} u1a 'const U1' constexpr listinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} u1a 'const U1':'const U1' constexpr listinit // CHECK-NEXT: | |-value: Union . Union .f Float 0.000000e+00 constexpr U1 u1b{3.1415f}; - // CHECK: `-VarDecl {{.*}} col:{{.*}} u1b 'const U1' constexpr listinit + // CHECK: `-VarDecl {{.*}} col:{{.*}} u1b 'const U1':'const U1' constexpr listinit // CHECK-NEXT: |-value: Union . Union .f Float 3.141500e+00 } diff --git a/clang/test/AST/ast-dump-APValue-struct.cpp b/clang/test/AST/ast-dump-APValue-struct.cpp --- a/clang/test/AST/ast-dump-APValue-struct.cpp +++ b/clang/test/AST/ast-dump-APValue-struct.cpp @@ -60,12 +60,12 @@ void Test() { constexpr S0 s0{}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} s0 'const S0' constexpr listinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} s0 'const S0':'const S0' constexpr listinit // CHECK-NEXT: | |-value: Struct // CHECK-NEXT: | | `-fields: Int 0, Union .j Int 0 constexpr S1 s1{}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} s1 'const S1' constexpr listinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} s1 'const S1':'const S1' constexpr listinit // CHECK-NEXT: | |-value: Struct // CHECK-NEXT: | | |-field: Int 0 // CHECK-NEXT: | | `-field: Union .s @@ -73,12 +73,12 @@ // CHECK-NEXT: | | `-field: Int 0 constexpr S2 s2{}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} s2 'const S2' constexpr listinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} s2 'const S2':'const S2' constexpr listinit // CHECK-NEXT: | |-value: Struct // CHECK-NEXT: | | `-fields: Int 0, Union .u Union .j Int 0 constexpr S3 s3{}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} s3 'const S3' constexpr listinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} s3 'const S3':'const S3' constexpr listinit // CHECK-NEXT: | |-value: Struct // CHECK-NEXT: | | |-field: Int 0 // CHECK-NEXT: | | `-field: Union .u @@ -87,7 +87,7 @@ // CHECK-NEXT: | | `-field: Int 0 constexpr S4 s4{}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} s4 'const S4' constexpr listinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} s4 'const S4':'const S4' constexpr listinit // CHECK-NEXT: | |-value: Struct // CHECK-NEXT: | | |-base: Struct // CHECK-NEXT: | | | `-fields: Int 0, Union .j Int 0 @@ -96,7 +96,7 @@ // CHECK-NEXT: | | `-fields: Int 4, Int 5, Int 6 constexpr S5 s5{}; - // CHECK: `-VarDecl {{.*}} col:{{.*}} s5 'const S5' constexpr listinit + // CHECK: `-VarDecl {{.*}} col:{{.*}} s5 'const S5':'const S5' constexpr listinit // CHECK-NEXT: |-value: Struct // CHECK-NEXT: | |-base: Struct // CHECK-NEXT: | | |-base: Struct diff --git a/clang/test/AST/ast-dump-APValue-union.cpp b/clang/test/AST/ast-dump-APValue-union.cpp --- a/clang/test/AST/ast-dump-APValue-union.cpp +++ b/clang/test/AST/ast-dump-APValue-union.cpp @@ -39,25 +39,25 @@ void Test() { constexpr U0 u0{}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} u0 'const U0' constexpr listinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} u0 'const U0':'const U0' constexpr listinit // CHECK-NEXT: | |-value: Union .i Int 42 constexpr U1 u1{}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} u1 'const U1' constexpr listinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} u1 'const U1':'const U1' constexpr listinit // CHECK-NEXT: | |-value: Union .uinner Union .f Float 3.141500e+00 constexpr U2 u2{}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} u2 'const U2' constexpr listinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} u2 'const U2':'const U2' constexpr listinit // CHECK-NEXT: | |-value: Union .uinner // CHECK-NEXT: | | `-Union .arr // CHECK-NEXT: | | `-Array size=2 // CHECK-NEXT: | | `-elements: Int 1, Int 2 constexpr U3 u3a = {.f = 3.1415}; - // CHECK: | `-VarDecl {{.*}} col:{{.*}} u3a 'const U3' constexpr cinit + // CHECK: | `-VarDecl {{.*}} col:{{.*}} u3a 'const U3':'const U3' constexpr cinit // CHECK-NEXT: | |-value: Union .f Float 3.141500e+00 constexpr U3 u3b = {.uinner = {}}; - // CHECK: `-VarDecl {{.*}} col:{{.*}} u3b 'const U3' constexpr cinit + // CHECK: `-VarDecl {{.*}} col:{{.*}} u3b 'const U3':'const U3' constexpr cinit // CHECK-NEXT: |-value: Union .uinner Union .d Float 3.141500e+00 } 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 @@ -30,7 +30,7 @@ return TestVarDeclNRVO; } } -// CHECK: VarDecl{{.*}} TestVarDeclNRVO 'testVarDeclNRVO::A' nrvo +// CHECK: VarDecl{{.*}} TestVarDeclNRVO 'A':'testVarDeclNRVO::A' nrvo void testParmVarDeclInit(int TestParmVarDeclInit = 0); // CHECK: ParmVarDecl{{.*}} TestParmVarDeclInit 'int' @@ -107,8 +107,8 @@ // CHECK-NEXT: CopyAssignment simple non_trivial has_const_param // CHECK-NEXT: MoveAssignment exists simple non_trivial // CHECK-NEXT: Destructor simple irrelevant trivial -// CHECK-NEXT: virtual private 'testCXXRecordDecl::A' -// CHECK-NEXT: public 'testCXXRecordDecl::B' +// CHECK-NEXT: virtual private 'A':'testCXXRecordDecl::A' +// CHECK-NEXT: public 'B':'testCXXRecordDecl::B' // CHECK-NEXT: CXXRecordDecl{{.*}} class TestCXXRecordDecl // CHECK-NEXT: FieldDecl @@ -228,7 +228,7 @@ // CHECK-NEXT: | | `-CXXRecord 0x{{.+}} 'A' // CHECK-NEXT: | |-ParmVarDecl 0x{{.+}} col:51 'testFunctionTemplateDecl::A':'testFunctionTemplateDecl::A' // CHECK-NEXT: | `-CompoundStmt 0x{{.+}} - // CHECK-NEXT: |-Function 0x{{.+}} 'TestFunctionTemplate' 'void (testFunctionTemplateDecl::B)' + // CHECK-NEXT: |-Function 0x{{.+}} 'TestFunctionTemplate' 'void (B)' // CHECK-NEXT: |-FunctionDecl 0x{{.+}} col:29 TestFunctionTemplate 'void (testFunctionTemplateDecl::C)' // CHECK-NEXT: | |-TemplateArgument type 'testFunctionTemplateDecl::C' // CHECK-NEXT: | | `-RecordType 0{{.+}} 'testFunctionTemplateDecl::C' @@ -241,11 +241,11 @@ // CHECK-NEXT: |-ParmVarDecl 0x{{.+}} col:51 'testFunctionTemplateDecl::D':'testFunctionTemplateDecl::D' // CHECK-NEXT: `-CompoundStmt 0x{{.+}} - // CHECK: FunctionDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:[[@LINE-32]]:3, col:41> col:19 TestFunctionTemplate 'void (testFunctionTemplateDecl::B)' + // CHECK: FunctionDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:[[@LINE-32]]:3, col:41> col:19 TestFunctionTemplate 'void (B)' // CHECK-NEXT: |-TemplateArgument type 'testFunctionTemplateDecl::B' // CHECK-NEXT: | `-RecordType 0{{.+}} 'testFunctionTemplateDecl::B' // CHECK-NEXT: | `-CXXRecord 0x{{.+}} 'B' - // CHECK-NEXT: `-ParmVarDecl 0x{{.+}} col:41 'testFunctionTemplateDecl::B' + // CHECK-NEXT: `-ParmVarDecl 0x{{.+}} col:41 'B':'testFunctionTemplateDecl::B' namespace testClassTemplateDecl { 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 @@ -324,6 +324,7 @@ // CHECK-NEXT: "name": "obj1", // CHECK-NEXT: "mangledName": "_ZZ19TestPointerToMember1SPS_MS_iMS_FviEE4obj1", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: } // CHECK-NEXT: }, @@ -463,6 +464,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -471,6 +473,7 @@ // CHECK-NEXT: "kind": "ParmVarDecl", // CHECK-NEXT: "name": "obj1", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: } // CHECK-NEXT: } @@ -732,6 +735,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -740,6 +744,7 @@ // CHECK-NEXT: "kind": "ParmVarDecl", // CHECK-NEXT: "name": "obj1", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: } // CHECK-NEXT: } @@ -2536,6 +2541,7 @@ // CHECK-NEXT: "name": "a", // CHECK-NEXT: "mangledName": "_ZZ22TestPostfixExpressions1SPS_P1UIiEE1a", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: } // CHECK-NEXT: }, @@ -2670,6 +2676,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -2678,6 +2685,7 @@ // CHECK-NEXT: "kind": "ParmVarDecl", // CHECK-NEXT: "name": "a", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: } // CHECK-NEXT: } @@ -2988,6 +2996,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -2996,6 +3005,7 @@ // CHECK-NEXT: "kind": "ParmVarDecl", // CHECK-NEXT: "name": "a", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: } // CHECK-NEXT: } @@ -3163,6 +3173,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -3171,6 +3182,7 @@ // CHECK-NEXT: "kind": "ParmVarDecl", // CHECK-NEXT: "name": "a", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: } // CHECK-NEXT: } @@ -3239,6 +3251,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -3247,6 +3260,7 @@ // CHECK-NEXT: "kind": "ParmVarDecl", // CHECK-NEXT: "name": "a", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: } // CHECK-NEXT: } @@ -3490,6 +3504,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -3498,6 +3513,7 @@ // CHECK-NEXT: "kind": "ParmVarDecl", // CHECK-NEXT: "name": "a", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: } // CHECK-NEXT: } @@ -3525,6 +3541,7 @@ // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "typeArg": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: } // CHECK-NEXT: }, @@ -3549,9 +3566,11 @@ // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "typeArg": { +// CHECK-NEXT: "desugaredQualType": "const volatile S", // CHECK-NEXT: "qualType": "const volatile S" // CHECK-NEXT: }, // CHECK-NEXT: "adjustedTypeArg": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: } // CHECK-NEXT: } @@ -7919,7 +7938,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "void (*)(NS::X)" +// CHECK-NEXT: "qualType": "void (*)(X)" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "castKind": "FunctionToPointerDecay", @@ -7940,7 +7959,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "void (NS::X)" +// CHECK-NEXT: "qualType": "void (X)" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "referencedDecl": { @@ -7948,7 +7967,7 @@ // CHECK-NEXT: "kind": "FunctionDecl", // CHECK-NEXT: "name": "f", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "void (NS::X)" +// CHECK-NEXT: "qualType": "void (X)" // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: } @@ -7970,7 +7989,8 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "NS::X" +// CHECK-NEXT: "desugaredQualType": "NS::X", +// CHECK-NEXT: "qualType": "X" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "ctorType": { @@ -8356,7 +8376,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "void (*)(NS::X)" +// CHECK-NEXT: "qualType": "void (*)(X)" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "castKind": "FunctionToPointerDecay", @@ -8377,7 +8397,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "void (NS::X)" +// CHECK-NEXT: "qualType": "void (X)" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "referencedDecl": { @@ -8385,7 +8405,7 @@ // CHECK-NEXT: "kind": "FunctionDecl", // CHECK-NEXT: "name": "f", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "void (NS::X)" +// CHECK-NEXT: "qualType": "void (X)" // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: } @@ -8407,7 +8427,8 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "NS::X" +// CHECK-NEXT: "desugaredQualType": "NS::X", +// CHECK-NEXT: "qualType": "X" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "ctorType": { @@ -8678,7 +8699,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "void (*)(NS::X)" +// CHECK-NEXT: "qualType": "void (*)(X)" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "castKind": "FunctionToPointerDecay", @@ -8699,7 +8720,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "void (NS::X)" +// CHECK-NEXT: "qualType": "void (X)" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "referencedDecl": { @@ -8707,7 +8728,7 @@ // CHECK-NEXT: "kind": "FunctionDecl", // CHECK-NEXT: "name": "f", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "void (NS::X)" +// CHECK-NEXT: "qualType": "void (X)" // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "foundReferencedDecl": { @@ -8734,7 +8755,8 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "NS::X" +// CHECK-NEXT: "desugaredQualType": "NS::X", +// CHECK-NEXT: "qualType": "X" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "ctorType": { @@ -9048,7 +9070,8 @@ // CHECK-NEXT: "name": "x", // CHECK-NEXT: "mangledName": "_ZZN19test_adl_call_three15TestNonADLCall3EvE1x", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "NS::X" +// CHECK-NEXT: "desugaredQualType": "NS::X", +// CHECK-NEXT: "qualType": "X" // CHECK-NEXT: }, // CHECK-NEXT: "init": "call", // CHECK-NEXT: "inner": [ @@ -9068,7 +9091,8 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "NS::X" +// CHECK-NEXT: "desugaredQualType": "NS::X", +// CHECK-NEXT: "qualType": "X" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "ctorType": { @@ -9118,7 +9142,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "void (*)(NS::X)" +// CHECK-NEXT: "qualType": "void (*)(X)" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "castKind": "FunctionToPointerDecay", @@ -9139,7 +9163,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "void (NS::X)" +// CHECK-NEXT: "qualType": "void (X)" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "referencedDecl": { @@ -9147,7 +9171,7 @@ // CHECK-NEXT: "kind": "FunctionDecl", // CHECK-NEXT: "name": "f", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "void (NS::X)" +// CHECK-NEXT: "qualType": "void (X)" // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: } @@ -9169,7 +9193,8 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "NS::X" +// CHECK-NEXT: "desugaredQualType": "NS::X", +// CHECK-NEXT: "qualType": "X" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", // CHECK-NEXT: "ctorType": { @@ -9215,7 +9240,8 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "NS::X" +// CHECK-NEXT: "desugaredQualType": "NS::X", +// CHECK-NEXT: "qualType": "X" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", // CHECK-NEXT: "referencedDecl": { @@ -9223,7 +9249,8 @@ // CHECK-NEXT: "kind": "VarDecl", // CHECK-NEXT: "name": "x", // CHECK-NEXT: "type": { -// CHECK-NEXT: "qualType": "NS::X" +// CHECK-NEXT: "desugaredQualType": "NS::X", +// CHECK-NEXT: "qualType": "X" // CHECK-NEXT: } // CHECK-NEXT: } // CHECK-NEXT: } diff --git a/clang/test/AST/ast-dump-expr.cpp b/clang/test/AST/ast-dump-expr.cpp --- a/clang/test/AST/ast-dump-expr.cpp +++ b/clang/test/AST/ast-dump-expr.cpp @@ -59,7 +59,7 @@ void PointerToMember(S obj1, S *obj2, int S::* data, void (S::*call)(int)) { obj1.*data; // CHECK: BinaryOperator 0x{{[^ ]*}} 'int' lvalue '.*' - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'S' lvalue ParmVar 0x{{[^ ]*}} 'obj1' 'S' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'S':'S' lvalue ParmVar 0x{{[^ ]*}} 'obj1' 'S':'S' // CHECK-NEXT: ImplicitCastExpr // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'int S::*' lvalue ParmVar 0x{{[^ ]*}} 'data' 'int S::*' @@ -74,7 +74,7 @@ // CHECK: CXXMemberCallExpr 0x{{[^ ]*}} 'void' // CHECK-NEXT: ParenExpr 0x{{[^ ]*}} '' // CHECK-NEXT: BinaryOperator 0x{{[^ ]*}} '' '.*' - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'S' lvalue ParmVar 0x{{[^ ]*}} 'obj1' 'S' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'S':'S' lvalue ParmVar 0x{{[^ ]*}} 'obj1' 'S':'S' // CHECK-NEXT: ImplicitCastExpr // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'void (S::*)(int)' lvalue ParmVar 0x{{[^ ]*}} 'call' 'void (S::*)(int)' // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 12 @@ -91,20 +91,18 @@ } void Casting(const S *s) { - // FIXME: The cast expressions contain "struct S" instead of "S". - const_cast(s); - // CHECK: CXXConstCastExpr 0x{{[^ ]*}} 'S *' const_cast + // CHECK: CXXConstCastExpr 0x{{[^ ]*}} 'S *' const_cast // CHECK-NEXT: ImplicitCastExpr 0x{{[^ ]*}} 'const S *' part_of_explicit_cast // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'const S *' lvalue ParmVar 0x{{[^ ]*}} 's' 'const S *' static_cast(s); - // CHECK: CXXStaticCastExpr 0x{{[^ ]*}} 'const T *' static_cast + // CHECK: CXXStaticCastExpr 0x{{[^ ]*}} 'const T *' static_cast // CHECK-NEXT: ImplicitCastExpr 0x{{[^ ]*}} 'const S *' part_of_explicit_cast // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'const S *' lvalue ParmVar 0x{{[^ ]*}} 's' 'const S *' dynamic_cast(s); - // CHECK: CXXDynamicCastExpr 0x{{[^ ]*}} 'const T *' dynamic_cast + // CHECK: CXXDynamicCastExpr 0x{{[^ ]*}} 'const T *' dynamic_cast // CHECK-NEXT: ImplicitCastExpr 0x{{[^ ]*}} 'const S *' part_of_explicit_cast // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'const S *' lvalue ParmVar 0x{{[^ ]*}} 's' 'const S *' @@ -180,7 +178,7 @@ a.func(0); // CHECK: CXXMemberCallExpr 0x{{[^ ]*}} 'void' // CHECK-NEXT: MemberExpr 0x{{[^ ]*}} '' .func 0x{{[^ ]*}} - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'S' lvalue ParmVar 0x{{[^ ]*}} 'a' 'S' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'S':'S' lvalue ParmVar 0x{{[^ ]*}} 'a' 'S':'S' // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 0 p->func(0); @@ -201,7 +199,7 @@ a.template foo(); // CHECK: CXXMemberCallExpr 0x{{[^ ]*}} 'float':'float' // CHECK-NEXT: MemberExpr 0x{{[^ ]*}} '' .foo 0x{{[^ ]*}} - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'S' lvalue ParmVar 0x{{[^ ]*}} 'a' 'S' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'S':'S' lvalue ParmVar 0x{{[^ ]*}} 'a' 'S':'S' p->~S(); // CHECK: CXXMemberCallExpr 0x{{[^ ]*}} 'void' @@ -212,14 +210,14 @@ a.~S(); // CHECK: CXXMemberCallExpr 0x{{[^ ]*}} 'void' // CHECK-NEXT: MemberExpr 0x{{[^ ]*}} '' .~S 0x{{[^ ]*}} - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'S' lvalue ParmVar 0x{{[^ ]*}} 'a' 'S' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'S':'S' lvalue ParmVar 0x{{[^ ]*}} 'a' 'S':'S' // FIXME: there seems to be no way to distinguish the construct below from // the construct above. a.~decltype(a)(); // CHECK: CXXMemberCallExpr 0x{{[^ ]*}} 'void' // CHECK-NEXT: MemberExpr 0x{{[^ ]*}} '' .~S 0x{{[^ ]*}} - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'S' lvalue ParmVar 0x{{[^ ]*}} 'a' 'S' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'S':'S' lvalue ParmVar 0x{{[^ ]*}} 'a' 'S':'S' // FIXME: similarly, there is no way to distinguish the construct below from // the p->~S() case. @@ -238,7 +236,7 @@ typeid(a); // CHECK: CXXTypeidExpr 0x{{[^ ]*}} 'const std::type_info' lvalue - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'S' lvalue ParmVar 0x{{[^ ]*}} 'a' 'S' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'S':'S' lvalue ParmVar 0x{{[^ ]*}} 'a' 'S':'S' // FIXME: no type information is printed for the argument. typeid(S); diff --git a/clang/test/AST/ast-dump-funcs.cpp b/clang/test/AST/ast-dump-funcs.cpp --- a/clang/test/AST/ast-dump-funcs.cpp +++ b/clang/test/AST/ast-dump-funcs.cpp @@ -32,7 +32,7 @@ // CHECK-NEXT: CXXCtorInitializer Field 0x{{[^ ]*}} 'j' 'int' // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} 'int' 0 // CHECK-NEXT: CXXCtorInitializer Field 0x{{[^ ]*}} 'r' 'R' - // CHECK-NEXT: CXXConstructExpr 0x{{[^ ]*}} 'R' 'void () noexcept' + // CHECK-NEXT: CXXConstructExpr 0x{{[^ ]*}} 'R':'R' 'void () noexcept' // CHECK-NEXT: CompoundStmt 0x{{[^ ]*}} void a(); diff --git a/clang/test/AST/ast-dump-openmp-begin-declare-variant_template_3.cpp b/clang/test/AST/ast-dump-openmp-begin-declare-variant_template_3.cpp --- a/clang/test/AST/ast-dump-openmp-begin-declare-variant_template_3.cpp +++ b/clang/test/AST/ast-dump-openmp-begin-declare-variant_template_3.cpp @@ -114,7 +114,7 @@ // CHECK-NEXT: | | |-DeclStmt [[ADDR_44:0x[a-z0-9]*]] // CHECK-NEXT: | | | `-VarDecl [[ADDR_45:0x[a-z0-9]*]] col:10 referenced t 'double' // CHECK-NEXT: | | |-DeclStmt [[ADDR_46:0x[a-z0-9]*]] -// CHECK-NEXT: | | | `-VarDecl [[ADDR_47:0x[a-z0-9]*]] col:8 q 'S' callinit +// CHECK-NEXT: | | | `-VarDecl [[ADDR_47:0x[a-z0-9]*]] col:8 q 'S':'S' callinit // CHECK-NEXT: | | | `-ParenListExpr [[ADDR_48:0x[a-z0-9]*]] 'NULL TYPE' // CHECK-NEXT: | | | |-IntegerLiteral [[ADDR_49:0x[a-z0-9]*]] 'int' 1 // CHECK-NEXT: | | | `-UnaryOperator [[ADDR_50:0x[a-z0-9]*]] 'double *' prefix '&' cannot overflow @@ -149,7 +149,7 @@ // CHECK-NEXT: | | |-DeclStmt [[ADDR_72:0x[a-z0-9]*]] // CHECK-NEXT: | | | `-VarDecl [[ADDR_73:0x[a-z0-9]*]] col:5 referenced t 'T' // CHECK-NEXT: | | |-DeclStmt [[ADDR_74:0x[a-z0-9]*]] -// CHECK-NEXT: | | | `-VarDecl [[ADDR_75:0x[a-z0-9]*]] col:8 q 'S' callinit +// CHECK-NEXT: | | | `-VarDecl [[ADDR_75:0x[a-z0-9]*]] col:8 q 'S':'S' callinit // CHECK-NEXT: | | | `-ParenListExpr [[ADDR_76:0x[a-z0-9]*]] 'NULL TYPE' // CHECK-NEXT: | | | |-IntegerLiteral [[ADDR_77:0x[a-z0-9]*]] 'int' 0 // CHECK-NEXT: | | | `-UnaryOperator [[ADDR_78:0x[a-z0-9]*]] '' prefix '&' cannot overflow @@ -185,7 +185,7 @@ // CHECK-NEXT: | |-DeclStmt [[ADDR_101:0x[a-z0-9]*]] // CHECK-NEXT: | | `-VarDecl [[ADDR_102:0x[a-z0-9]*]] col:10 referenced t 'double' // CHECK-NEXT: | |-DeclStmt [[ADDR_103:0x[a-z0-9]*]] -// CHECK-NEXT: | | `-VarDecl [[ADDR_104:0x[a-z0-9]*]] col:8 q 'S' callinit +// CHECK-NEXT: | | `-VarDecl [[ADDR_104:0x[a-z0-9]*]] col:8 q 'S':'S' callinit // CHECK-NEXT: | | `-ParenListExpr [[ADDR_105:0x[a-z0-9]*]] 'NULL TYPE' // CHECK-NEXT: | | |-FloatingLiteral [[ADDR_106:0x[a-z0-9]*]] 'double' 2.000000e+00 // CHECK-NEXT: | | `-UnaryOperator [[ADDR_107:0x[a-z0-9]*]] 'double *' prefix '&' cannot overflow diff --git a/clang/test/AST/ast-dump-overloaded-operators.cpp b/clang/test/AST/ast-dump-overloaded-operators.cpp --- a/clang/test/AST/ast-dump-overloaded-operators.cpp +++ b/clang/test/AST/ast-dump-overloaded-operators.cpp @@ -31,14 +31,14 @@ // CHECK-NEXT: |-CXXOperatorCallExpr {{.*}} 'void' '+' // CHECK-NEXT: | |-ImplicitCastExpr {{.*}} 'void (*)(E, E)' // CHECK-NEXT: | | `-DeclRefExpr {{.*}} 'void (E, E)' lvalue Function {{.*}} 'operator+' 'void (E, E)' -// CHECK-NEXT: | |-ImplicitCastExpr {{.*}} 'E' -// CHECK-NEXT: | | `-DeclRefExpr {{.*}} 'E' lvalue Var {{.*}} 'e' 'E' -// CHECK-NEXT: | `-ImplicitCastExpr {{.*}} 'E' -// CHECK-NEXT: | `-DeclRefExpr {{.*}} 'E' lvalue Var {{.*}} 'e' 'E' +// CHECK-NEXT: | |-ImplicitCastExpr {{.*}} 'E':'E' +// CHECK-NEXT: | | `-DeclRefExpr {{.*}} 'E':'E' lvalue Var {{.*}} 'e' 'E':'E' +// CHECK-NEXT: | `-ImplicitCastExpr {{.*}} 'E':'E' +// CHECK-NEXT: | `-DeclRefExpr {{.*}} 'E':'E' lvalue Var {{.*}} 'e' 'E':'E' // CHECK-NEXT: `-CXXOperatorCallExpr {{.*}} 'void' ',' // CHECK-NEXT: |-ImplicitCastExpr {{.*}} 'void (*)(E, E)' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'void (E, E)' lvalue Function {{.*}} 'operator,' 'void (E, E)' -// CHECK-NEXT: |-ImplicitCastExpr {{.*}} 'E' -// CHECK-NEXT: | `-DeclRefExpr {{.*}} 'E' lvalue Var {{.*}} 'e' 'E' -// CHECK-NEXT: `-ImplicitCastExpr {{.*}} 'E' -// CHECK-NEXT: `-DeclRefExpr {{.*}} 'E' lvalue Var {{.*}} 'e' 'E' +// CHECK-NEXT: |-ImplicitCastExpr {{.*}} 'E':'E' +// CHECK-NEXT: | `-DeclRefExpr {{.*}} 'E':'E' lvalue Var {{.*}} 'e' 'E':'E' +// CHECK-NEXT: `-ImplicitCastExpr {{.*}} 'E':'E' +// CHECK-NEXT: `-DeclRefExpr {{.*}} 'E':'E' lvalue Var {{.*}} 'e' 'E':'E' diff --git a/clang/test/AST/ast-dump-records-json.cpp b/clang/test/AST/ast-dump-records-json.cpp --- a/clang/test/AST/ast-dump-records-json.cpp +++ b/clang/test/AST/ast-dump-records-json.cpp @@ -3266,6 +3266,7 @@ // CHECK-NEXT: { // CHECK-NEXT: "access": "public", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "Base1", // CHECK-NEXT: "qualType": "Base1" // CHECK-NEXT: }, // CHECK-NEXT: "writtenAccess": "none" @@ -3377,6 +3378,7 @@ // CHECK-NEXT: { // CHECK-NEXT: "access": "private", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "Base1", // CHECK-NEXT: "qualType": "Base1" // CHECK-NEXT: }, // CHECK-NEXT: "writtenAccess": "private" @@ -3477,6 +3479,7 @@ // CHECK-NEXT: "access": "public", // CHECK-NEXT: "isVirtual": true, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "Base1", // CHECK-NEXT: "qualType": "Base1" // CHECK-NEXT: }, // CHECK-NEXT: "writtenAccess": "none" @@ -3715,6 +3718,7 @@ // CHECK-NEXT: { // CHECK-NEXT: "access": "public", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "Base1", // CHECK-NEXT: "qualType": "Base1" // CHECK-NEXT: }, // CHECK-NEXT: "writtenAccess": "none" @@ -3723,6 +3727,7 @@ // CHECK-NEXT: "access": "public", // CHECK-NEXT: "isVirtual": true, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "Base2", // CHECK-NEXT: "qualType": "Base2" // CHECK-NEXT: }, // CHECK-NEXT: "writtenAccess": "none" @@ -3730,6 +3735,7 @@ // CHECK-NEXT: { // CHECK-NEXT: "access": "protected", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "Base3", // CHECK-NEXT: "qualType": "Base3" // CHECK-NEXT: }, // CHECK-NEXT: "writtenAccess": "protected" @@ -3969,6 +3975,7 @@ // CHECK-NEXT: "access": "protected", // CHECK-NEXT: "isVirtual": true, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "Base1", // CHECK-NEXT: "qualType": "Base1" // CHECK-NEXT: }, // CHECK-NEXT: "writtenAccess": "protected" diff --git a/clang/test/AST/ast-dump-recovery.cpp b/clang/test/AST/ast-dump-recovery.cpp --- a/clang/test/AST/ast-dump-recovery.cpp +++ b/clang/test/AST/ast-dump-recovery.cpp @@ -135,7 +135,7 @@ // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'f' // CHECK-NEXT: `-IntegerLiteral {{.*}} 'int' 1 f.func(1); - // CHECK: RecoveryExpr {{.*}} 'Foo2::ForwardClass' + // CHECK: RecoveryExpr {{.*}} 'ForwardClass':'Foo2::ForwardClass' // CHECK-NEXT: `-MemberExpr {{.*}} '' .createFwd // CHECK-NEXT: `-DeclRefExpr {{.*}} 'f' f.createFwd(); @@ -192,27 +192,27 @@ // CHECK-NEXT: `-InitListExpr Bar b2 = {1}; // CHECK: `-VarDecl {{.*}} b3 'Bar' - // CHECK-NEXT: `-RecoveryExpr {{.*}} 'Bar' contains-errors + // CHECK-NEXT: `-RecoveryExpr {{.*}} 'Bar':'Bar' contains-errors // CHECK-NEXT: `-DeclRefExpr {{.*}} 'x' 'int' Bar b3 = Bar(x); // CHECK: `-VarDecl {{.*}} b4 'Bar' - // CHECK-NEXT: `-RecoveryExpr {{.*}} 'Bar' contains-errors + // CHECK-NEXT: `-RecoveryExpr {{.*}} 'Bar':'Bar' contains-errors // CHECK-NEXT: `-InitListExpr {{.*}} 'void' // CHECK-NEXT: `-DeclRefExpr {{.*}} 'x' 'int' Bar b4 = Bar{x}; // CHECK: `-VarDecl {{.*}} b5 'Bar' - // CHECK-NEXT: `-CXXUnresolvedConstructExpr {{.*}} 'Bar' contains-errors 'Bar' + // CHECK-NEXT: `-CXXUnresolvedConstructExpr {{.*}} 'Bar':'Bar' contains-errors 'Bar' // CHECK-NEXT: `-RecoveryExpr {{.*}} contains-errors // CHECK-NEXT: `-UnresolvedLookupExpr {{.*}} 'invalid' Bar b5 = Bar(invalid()); // CHECK: `-VarDecl {{.*}} b6 'Bar' - // CHECK-NEXT: `-CXXUnresolvedConstructExpr {{.*}} 'Bar' contains-errors 'Bar' + // CHECK-NEXT: `-CXXUnresolvedConstructExpr {{.*}} 'Bar':'Bar' contains-errors 'Bar' // CHECK-NEXT: `-InitListExpr {{.*}} contains-errors // CHECK-NEXT: `-RecoveryExpr {{.*}} contains-errors // CHECK-NEXT: `-UnresolvedLookupExpr {{.*}} 'invalid' Bar b6 = Bar{invalid()}; - // CHECK: RecoveryExpr {{.*}} 'Bar' contains-errors + // CHECK: RecoveryExpr {{.*}} 'Bar':'Bar' contains-errors // CHECK-NEXT: `-IntegerLiteral {{.*}} 'int' 1 Bar(1); @@ -316,7 +316,7 @@ // CHECK-NEXT: | `-RecoveryExpr {{.*}} '' // CHECK-NEXT: | `-UnresolvedLookupExpr {{.*}} '' // CHECK-NEXT: |-CXXCtorInitializer Field {{.*}} 's' 'S' - // CHECK-NEXT: | `-RecoveryExpr {{.*}} 'S' contains-errors + // CHECK-NEXT: | `-RecoveryExpr {{.*}} 'S':'S' contains-errors // CHECK-NEXT: | |-IntegerLiteral {{.*}} 1 // CHECK-NEXT: | `-IntegerLiteral {{.*}} 2 }; diff --git a/clang/test/AST/ast-dump-stmt-json.cpp b/clang/test/AST/ast-dump-stmt-json.cpp --- a/clang/test/AST/ast-dump-stmt-json.cpp +++ b/clang/test/AST/ast-dump-stmt-json.cpp @@ -2243,6 +2243,7 @@ // CHECK-NEXT: "name": "obj", // CHECK-NEXT: "mangledName": "_ZZ28TestDependentScopeMemberExprvE3obj", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "DependentScopeMemberExprWrapper", // CHECK-NEXT: "qualType": "DependentScopeMemberExprWrapper" // CHECK-NEXT: } // CHECK-NEXT: } @@ -2308,6 +2309,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "DependentScopeMemberExprWrapper", // CHECK-NEXT: "qualType": "DependentScopeMemberExprWrapper" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -2316,6 +2318,7 @@ // CHECK-NEXT: "kind": "VarDecl", // CHECK-NEXT: "name": "obj", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "DependentScopeMemberExprWrapper", // CHECK-NEXT: "qualType": "DependentScopeMemberExprWrapper" // CHECK-NEXT: } // CHECK-NEXT: } @@ -2404,6 +2407,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "DependentScopeMemberExprWrapper", // CHECK-NEXT: "qualType": "DependentScopeMemberExprWrapper" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -2412,6 +2416,7 @@ // CHECK-NEXT: "kind": "VarDecl", // CHECK-NEXT: "name": "obj", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "DependentScopeMemberExprWrapper", // CHECK-NEXT: "qualType": "DependentScopeMemberExprWrapper" // CHECK-NEXT: } // CHECK-NEXT: } @@ -2566,6 +2571,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "DependentScopeMemberExprWrapper", // CHECK-NEXT: "qualType": "DependentScopeMemberExprWrapper" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -2574,6 +2580,7 @@ // CHECK-NEXT: "kind": "VarDecl", // CHECK-NEXT: "name": "obj", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "DependentScopeMemberExprWrapper", // CHECK-NEXT: "qualType": "DependentScopeMemberExprWrapper" // CHECK-NEXT: } // CHECK-NEXT: } @@ -2750,6 +2757,7 @@ // CHECK-NEXT: "name": "obj", // CHECK-NEXT: "mangledName": "_ZZ36TestDependentScopeTemplateMemberExprvE3obj", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "OtherDependentScopeMemberExprWrapper", // CHECK-NEXT: "qualType": "OtherDependentScopeMemberExprWrapper" // CHECK-NEXT: } // CHECK-NEXT: } @@ -2837,6 +2845,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "OtherDependentScopeMemberExprWrapper", // CHECK-NEXT: "qualType": "OtherDependentScopeMemberExprWrapper" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -2845,6 +2854,7 @@ // CHECK-NEXT: "kind": "VarDecl", // CHECK-NEXT: "name": "obj", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "OtherDependentScopeMemberExprWrapper", // CHECK-NEXT: "qualType": "OtherDependentScopeMemberExprWrapper" // CHECK-NEXT: } // CHECK-NEXT: } @@ -3005,6 +3015,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "U", // CHECK-NEXT: "qualType": "U" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", @@ -3033,6 +3044,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "U", // CHECK-NEXT: "qualType": "U" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", @@ -5135,6 +5147,7 @@ // CHECK-NEXT: "name": "C", // CHECK-NEXT: "mangledName": "_ZZ13TestIterationvE1C", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "Container", // CHECK-NEXT: "qualType": "Container" // CHECK-NEXT: }, // CHECK-NEXT: "init": "call", @@ -5155,6 +5168,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "Container", // CHECK-NEXT: "qualType": "Container" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", @@ -5249,6 +5263,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "Container", // CHECK-NEXT: "qualType": "Container" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -5257,6 +5272,7 @@ // CHECK-NEXT: "kind": "VarDecl", // CHECK-NEXT: "name": "C", // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "Container", // CHECK-NEXT: "qualType": "Container" // CHECK-NEXT: } // CHECK-NEXT: } @@ -5391,6 +5407,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "Container", // CHECK-NEXT: "qualType": "Container" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -5539,6 +5556,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "Container", // CHECK-NEXT: "qualType": "Container" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", diff --git a/clang/test/AST/ast-dump-stmt.cpp b/clang/test/AST/ast-dump-stmt.cpp --- a/clang/test/AST/ast-dump-stmt.cpp +++ b/clang/test/AST/ast-dump-stmt.cpp @@ -99,8 +99,8 @@ U us[3] = {1}; // CHECK: VarDecl {{.+}} col:5 us 'U[3]' cinit // CHECK-NEXT: `-InitListExpr {{.+}} 'U[3]' -// CHECK-NEXT: |-array_filler: InitListExpr {{.+}} 'U' field Field {{.+}} 'i' 'int' -// CHECK-NEXT: `-InitListExpr {{.+}} 'U' field Field {{.+}} 'i' 'int' +// CHECK-NEXT: |-array_filler: InitListExpr {{.+}} 'U':'U' field Field {{.+}} 'i' 'int' +// CHECK-NEXT: `-InitListExpr {{.+}} 'U':'U' field Field {{.+}} 'i' 'int' // CHECK-NEXT: `-IntegerLiteral {{.+}} 'int' 1 } @@ -229,19 +229,19 @@ // CHECK-NEXT: <<>> // CHECK-NEXT: DeclStmt // CHECK-NEXT: VarDecl 0x{{[^ ]*}} col:16 implicit used __range1 'Container &' cinit - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'Container' lvalue Var 0x{{[^ ]*}} 'C' 'Container' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'Container':'Container' lvalue Var 0x{{[^ ]*}} 'C' 'Container':'Container' // CHECK-NEXT: DeclStmt // CHECK-NEXT: VarDecl 0x{{[^ ]*}} col:14 implicit used __begin1 'int *':'int *' cinit // CHECK-NEXT: CXXMemberCallExpr 0x{{[^ ]*}} 'int *' // CHECK-NEXT: MemberExpr 0x{{[^ ]*}} '' .begin 0x{{[^ ]*}} // CHECK-NEXT: ImplicitCastExpr - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'Container' lvalue Var 0x{{[^ ]*}} '__range1' 'Container &' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'Container':'Container' lvalue Var 0x{{[^ ]*}} '__range1' 'Container &' // CHECK-NEXT: DeclStmt // CHECK-NEXT: VarDecl 0x{{[^ ]*}} col:14 implicit used __end1 'int *':'int *' cinit // CHECK-NEXT: CXXMemberCallExpr 0x{{[^ ]*}} 'int *' // CHECK-NEXT: MemberExpr 0x{{[^ ]*}} '' .end 0x{{[^ ]*}} // CHECK-NEXT: ImplicitCastExpr - // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'Container' lvalue Var 0x{{[^ ]*}} '__range1' 'Container &' + // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'Container':'Container' lvalue Var 0x{{[^ ]*}} '__range1' 'Container &' // CHECK-NEXT: BinaryOperator 0x{{[^ ]*}} 'bool' '!=' // CHECK-NEXT: ImplicitCastExpr // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} 'int *':'int *' lvalue Var 0x{{[^ ]*}} '__begin1' 'int *':'int *' diff --git a/clang/test/AST/ast-dump-template-decls-json.cpp b/clang/test/AST/ast-dump-template-decls-json.cpp --- a/clang/test/AST/ast-dump-template-decls-json.cpp +++ b/clang/test/AST/ast-dump-template-decls-json.cpp @@ -825,6 +825,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "Uy", // CHECK-NEXT: "qualType": "Uy" // CHECK-NEXT: } // CHECK-NEXT: } diff --git a/clang/test/AST/ast-dump-temporaries-json.cpp b/clang/test/AST/ast-dump-temporaries-json.cpp --- a/clang/test/AST/ast-dump-temporaries-json.cpp +++ b/clang/test/AST/ast-dump-temporaries-json.cpp @@ -36,6 +36,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "const S", // CHECK-NEXT: "qualType": "const S" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -57,6 +58,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "const S", // CHECK-NEXT: "qualType": "const S" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "lvalue", @@ -87,6 +89,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "const S", // CHECK-NEXT: "qualType": "const S" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", @@ -108,6 +111,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", @@ -137,6 +141,7 @@ // CHECK-NEXT: } // CHECK-NEXT: }, // CHECK-NEXT: "type": { +// CHECK-NEXT: "desugaredQualType": "S", // CHECK-NEXT: "qualType": "S" // CHECK-NEXT: }, // CHECK-NEXT: "valueCategory": "prvalue", diff --git a/clang/test/AST/coroutine-locals-cleanup.cpp b/clang/test/AST/coroutine-locals-cleanup.cpp --- a/clang/test/AST/coroutine-locals-cleanup.cpp +++ b/clang/test/AST/coroutine-locals-cleanup.cpp @@ -85,7 +85,7 @@ // CHECK: CaseStmt // CHECK: ExprWithCleanups {{.*}} 'void' // CHECK-NEXT: CoawaitExpr -// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'Task::Awaiter':'Task::Awaiter' +// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'Awaiter':'Task::Awaiter' // CHECK: ExprWithCleanups {{.*}} 'bool' // CHECK-NEXT: CXXMemberCallExpr {{.*}} 'bool' // CHECK-NEXT: MemberExpr {{.*}} .await_ready @@ -97,7 +97,7 @@ // CHECK: CaseStmt // CHECK: ExprWithCleanups {{.*}} 'void' // CHECK-NEXT: CoawaitExpr -// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'Task::Awaiter':'Task::Awaiter' +// CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'Awaiter':'Task::Awaiter' // CHECK: ExprWithCleanups {{.*}} 'bool' // CHECK-NEXT: CXXMemberCallExpr {{.*}} 'bool' // CHECK-NEXT: MemberExpr {{.*}} .await_ready diff --git a/clang/test/AST/float16.cpp b/clang/test/AST/float16.cpp --- a/clang/test/AST/float16.cpp +++ b/clang/test/AST/float16.cpp @@ -223,8 +223,8 @@ //CHECK-NEXT: | `-FloatingLiteral {{.*}} 'double' 1.000977e+00 C1 c1(f1l); -//CHECK: | `-VarDecl{{.*}} used c1 'C1' callinit -//CHECK-NEXT: | `-CXXConstructExpr {{.*}} 'C1' 'void (_Float16) +//CHECK: | `-VarDecl{{.*}} used c1 'C1':'C1' callinit +//CHECK-NEXT: | `-CXXConstructExpr {{.*}} 'C1':'C1' 'void (_Float16) //CHECK-NEXT: | `-ImplicitCastExpr {{.*}} '_Float16' //CHECK-NEXT: | `-DeclRefExpr {{.*}} '_Float16' lvalue Var 0x{{.*}} 'f1l' '_Float16' @@ -255,13 +255,13 @@ //CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f2l' '_Float16' //CHECK-NEXT: | | | | | | `-CXXMemberCallExpr {{.*}} '_Float16' //CHECK-NEXT: | | | | | | |-MemberExpr {{.*}} '' .func1c {{.*}} -//CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} 'C1' lvalue Var {{.*}} 'c1' 'C1' +//CHECK-NEXT: | | | | | | | `-DeclRefExpr {{.*}} 'C1':'C1' lvalue Var {{.*}} 'c1' 'C1':'C1' //CHECK-NEXT: | | | | | | `-ImplicitCastExpr {{.*}} '_Float16' //CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f3l' '_Float16' //CHECK-NEXT: | | | | | `-CallExpr {{.*}} '_Float16' //CHECK-NEXT: | | | | | |-ImplicitCastExpr {{.*}} '_Float16 (*)(_Float16)' //CHECK-NEXT: | | | | | | `-MemberExpr {{.*}} '_Float16 (_Float16)' lvalue .func2c {{.*}} -//CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} 'C1' lvalue Var {{.*}} 'c1' 'C1' +//CHECK-NEXT: | | | | | | `-DeclRefExpr {{.*}} 'C1':'C1' lvalue Var {{.*}} 'c1' 'C1':'C1' //CHECK-NEXT: | | | | | `-ImplicitCastExpr {{.*}} '_Float16' //CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f1l' '_Float16' //CHECK-NEXT: | | | | `-CallExpr {{.*}} '_Float16':'_Float16' diff --git a/clang/test/AST/sourceranges.cpp b/clang/test/AST/sourceranges.cpp --- a/clang/test/AST/sourceranges.cpp +++ b/clang/test/AST/sourceranges.cpp @@ -47,9 +47,9 @@ void construct() { using namespace foo; A a = A(12); - // CHECK: CXXConstructExpr {{0x[0-9a-fA-F]+}} 'foo::A' 'void (int){{( __attribute__\(\(thiscall\)\))?}}' + // CHECK: CXXConstructExpr {{0x[0-9a-fA-F]+}} 'A':'foo::A' 'void (int){{( __attribute__\(\(thiscall\)\))?}}' D d = D(12); - // CHECK: CXXConstructExpr {{0x[0-9a-fA-F]+}} 'D' 'void (int){{( __attribute__\(\(thiscall\)\))?}}' + // CHECK: CXXConstructExpr {{0x[0-9a-fA-F]+}} 'D':'D' 'void (int){{( __attribute__\(\(thiscall\)\))?}}' } namespace PR38987 { @@ -174,7 +174,7 @@ // CHECK-1Z: CXXRecordDecl {{.*}} struct B definition struct B { - // CHECK-1Z: FieldDecl {{.*}} a 'in_class_init::A' + // CHECK-1Z: FieldDecl {{.*}} a 'A':'in_class_init::A' // CHECK-1Z-NEXT: InitListExpr {{.*}} typeDouble free check_namecplusplus.NewDelete - issue_hash_content_of_line_in_context8bf1a5b9fdae9d86780aa6c4cdce2605 + issue_hash_content_of_line_in_contextf3139fe330e830526fe60a2e19266627 issue_context_kindfunction issue_contexttest issue_hash_function_offset3 diff --git a/clang/test/Analysis/Inputs/expected-plists/cxx-for-range.cpp.plist b/clang/test/Analysis/Inputs/expected-plists/cxx-for-range.cpp.plist --- a/clang/test/Analysis/Inputs/expected-plists/cxx-for-range.cpp.plist +++ b/clang/test/Analysis/Inputs/expected-plists/cxx-for-range.cpp.plist @@ -935,7 +935,7 @@ typeDereference of null pointer check_namecore.NullDereference - issue_hash_content_of_line_in_contextf53792d63dffe6176babc00ee455a3e0 + issue_hash_content_of_line_in_context988b3441112848444b50d572900b0c5f issue_context_kindfunction issue_contextget issue_hash_function_offset2 diff --git a/clang/test/Analysis/Inputs/expected-plists/method-call-path-notes.cpp.plist b/clang/test/Analysis/Inputs/expected-plists/method-call-path-notes.cpp.plist --- a/clang/test/Analysis/Inputs/expected-plists/method-call-path-notes.cpp.plist +++ b/clang/test/Analysis/Inputs/expected-plists/method-call-path-notes.cpp.plist @@ -538,7 +538,7 @@ typeCalled C++ object pointer is null check_namecore.CallAndMessage - issue_hash_content_of_line_in_contextc5bd8e35fb6da070914016804720ae4d + issue_hash_content_of_line_in_contextf15e85d881c87a35df8a4d30e1db5ed7 issue_context_kindfunction issue_contexttest_ic_null issue_hash_function_offset2 @@ -815,7 +815,7 @@ typeCalled C++ object pointer is null check_namecore.CallAndMessage - issue_hash_content_of_line_in_contexte23397f9f2eff1b08593c2b2db137494 + issue_hash_content_of_line_in_context8efb5c75089d50fcdc228e06741f4ab5 issue_context_kindfunction issue_contexttest_cast issue_hash_function_offset2 diff --git a/clang/test/Analysis/analyzer-display-progress.cpp b/clang/test/Analysis/analyzer-display-progress.cpp --- a/clang/test/Analysis/analyzer-display-progress.cpp +++ b/clang/test/Analysis/analyzer-display-progress.cpp @@ -27,4 +27,4 @@ // CHECK: analyzer-display-progress.cpp SomeOtherStruct::f() : {{[0-9]+}} // CHECK: analyzer-display-progress.cpp ns::SomeStruct::f(int) : {{[0-9]+}} // CHECK: analyzer-display-progress.cpp ns::SomeStruct::f(float, ::SomeStruct) : {{[0-9]+}} -// CHECK: analyzer-display-progress.cpp ns::SomeStruct::f(float, struct ns::SomeStruct) : {{[0-9]+}} +// CHECK: analyzer-display-progress.cpp ns::SomeStruct::f(float, SomeStruct) : {{[0-9]+}} 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 @@ -49,16 +49,16 @@ // CHECK: [B2 (ENTRY)] // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: 3: a -// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 5: const A &b = a; -// WARNINGS-NEXT: 6: A() (CXXConstructExpr, class A) -// ANALYZER-NEXT: 6: A() (CXXConstructExpr, [B1.9], class A) +// WARNINGS-NEXT: 6: A() (CXXConstructExpr, A) +// ANALYZER-NEXT: 6: A() (CXXConstructExpr, [B1.9], A) // CHECK-NEXT: 7: [B1.6] (BindTemporary) -// CHECK-NEXT: 8: [B1.7] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 8: [B1.7] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 9: [B1.8] // CHECK: 10: const A &c = A(); // CHECK: 11: [B1.10].~A() (Implicit destructor) @@ -76,9 +76,9 @@ // CHECK: [B2 (ENTRY)] // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] -// WARNINGS-NEXT: 1: A() (CXXConstructExpr, class A) -// CXX98-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.2], class A) -// CXX11-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.3], class A) +// WARNINGS-NEXT: 1: A() (CXXConstructExpr, A) +// CXX98-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.2], A) +// CXX11-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.3], A) // CHECK-NEXT: 2: [B1.1] (BindTemporary) // CXX98-NEXT: 3: [B1.2].x // CXX98-NEXT: 4: [B1.3] @@ -100,9 +100,9 @@ // CHECK: [B2 (ENTRY)] // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] -// WARNINGS-NEXT: 1: A() (CXXConstructExpr, class A) -// CXX98-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.2], class A) -// CXX11-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.3], class A) +// WARNINGS-NEXT: 1: A() (CXXConstructExpr, A) +// CXX98-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.2], A) +// CXX11-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.3], A) // CHECK-NEXT: 2: [B1.1] (BindTemporary) // CXX98-NEXT: 3: A::x // CXX98-NEXT: 4: &[B1.3] @@ -129,23 +129,23 @@ // CHECK: [B2 (ENTRY)] // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] -// WARNINGS-NEXT: 1: A() (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.4], class A) +// WARNINGS-NEXT: 1: A() (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.4], A) // CHECK-NEXT: 2: [B1.1] (BindTemporary) -// CHECK-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 4: [B1.3] // CHECK-NEXT: 5: {[B1.4]} // CHECK-NEXT: 6: B b = {A()}; -// WARNINGS-NEXT: 7: A() (CXXConstructExpr, class A) -// ANALYZER-NEXT: 7: A() (CXXConstructExpr, [B1.10], class A) +// WARNINGS-NEXT: 7: A() (CXXConstructExpr, A) +// ANALYZER-NEXT: 7: A() (CXXConstructExpr, [B1.10], A) // CHECK-NEXT: 8: [B1.7] (BindTemporary) -// CHECK-NEXT: 9: [B1.8] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 9: [B1.8] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 10: [B1.9] // CHECK-NEXT: 11: {[B1.10]} -// WARNINGS-NEXT: 12: A() (CXXConstructExpr, class A) -// ANALYZER-NEXT: 12: A() (CXXConstructExpr, [B1.15], class A) +// WARNINGS-NEXT: 12: A() (CXXConstructExpr, A) +// ANALYZER-NEXT: 12: A() (CXXConstructExpr, [B1.15], A) // CHECK-NEXT: 13: [B1.12] (BindTemporary) -// CHECK-NEXT: 14: [B1.13] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 14: [B1.13] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 15: [B1.14] // CHECK-NEXT: 16: {[B1.15]} // CHECK-NEXT: 17: {[B1.10], [B1.15]} @@ -169,18 +169,18 @@ // CXX11: [B2 (ENTRY)] // CXX11-NEXT: Succs (1): B1 // CXX11: [B1] -// CXX11-WARNINGS-NEXT: 1: A() (CXXConstructExpr, class A) -// CXX11-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.2], [B1.4], class A) +// CXX11-WARNINGS-NEXT: 1: A() (CXXConstructExpr, A) +// CXX11-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.2], [B1.4], A) // CXX11-NEXT: 2: [B1.1] (BindTemporary) -// CXX11-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const class A) +// CXX11-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const A) // CXX11-NEXT: 4: [B1.3] -// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, const class A) -// CXX11-WARNINGS-NEXT: 6: A() (CXXConstructExpr, class A) -// CXX11-ANALYZER-NEXT: 6: A() (CXXConstructExpr, [B1.7], [B1.9], class A) +// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, const A) +// CXX11-WARNINGS-NEXT: 6: A() (CXXConstructExpr, A) +// CXX11-ANALYZER-NEXT: 6: A() (CXXConstructExpr, [B1.7], [B1.9], A) // CXX11-NEXT: 7: [B1.6] (BindTemporary) -// CXX11-NEXT: 8: [B1.7] (ImplicitCastExpr, NoOp, const class A) +// CXX11-NEXT: 8: [B1.7] (ImplicitCastExpr, NoOp, const A) // CXX11-NEXT: 9: [B1.8] -// CXX11-NEXT: 10: [B1.9] (CXXConstructExpr, const class A) +// CXX11-NEXT: 10: [B1.9] (CXXConstructExpr, const A) // FIXME: Why does it look as if the initializer list consumes uncopied objects? // CXX11-NEXT: 11: {[B1.2], [B1.7]} // CXX11-NEXT: 12: [B1.11] (BindTemporary) @@ -190,35 +190,35 @@ // CXX11-NEXT: 15: C c = {{[{][{]}}A(), A(){{[}][}]}}; // CXX11-NEXT: 16: ~A() (Temporary object destructor) // CXX11-NEXT: 17: ~A() (Temporary object destructor) -// CXX11-WARNINGS-NEXT: 18: A() (CXXConstructExpr, class A) -// CXX11-ANALYZER-NEXT: 18: A() (CXXConstructExpr, [B1.19], [B1.21], class A) +// CXX11-WARNINGS-NEXT: 18: A() (CXXConstructExpr, A) +// CXX11-ANALYZER-NEXT: 18: A() (CXXConstructExpr, [B1.19], [B1.21], A) // CXX11-NEXT: 19: [B1.18] (BindTemporary) -// CXX11-NEXT: 20: [B1.19] (ImplicitCastExpr, NoOp, const class A) +// CXX11-NEXT: 20: [B1.19] (ImplicitCastExpr, NoOp, const A) // CXX11-NEXT: 21: [B1.20] -// CXX11-NEXT: 22: [B1.21] (CXXConstructExpr, const class A) -// CXX11-WARNINGS-NEXT: 23: A() (CXXConstructExpr, class A) -// CXX11-ANALYZER-NEXT: 23: A() (CXXConstructExpr, [B1.24], [B1.26], class A) +// CXX11-NEXT: 22: [B1.21] (CXXConstructExpr, const A) +// CXX11-WARNINGS-NEXT: 23: A() (CXXConstructExpr, A) +// CXX11-ANALYZER-NEXT: 23: A() (CXXConstructExpr, [B1.24], [B1.26], A) // CXX11-NEXT: 24: [B1.23] (BindTemporary) -// CXX11-NEXT: 25: [B1.24] (ImplicitCastExpr, NoOp, const class A) +// CXX11-NEXT: 25: [B1.24] (ImplicitCastExpr, NoOp, const A) // CXX11-NEXT: 26: [B1.25] -// CXX11-NEXT: 27: [B1.26] (CXXConstructExpr, const class A) +// CXX11-NEXT: 27: [B1.26] (CXXConstructExpr, const A) // FIXME: Why does it look as if the initializer list consumes uncopied objects? // CXX11-NEXT: 28: {[B1.19], [B1.24]} // CXX11-NEXT: 29: [B1.28] (BindTemporary) // CXX11-NEXT: 30: [B1.29] // CXX11-NEXT: 31: {[B1.30]} -// CXX11-WARNINGS-NEXT: 32: A() (CXXConstructExpr, class A) -// CXX11-ANALYZER-NEXT: 32: A() (CXXConstructExpr, [B1.33], [B1.35], class A) +// CXX11-WARNINGS-NEXT: 32: A() (CXXConstructExpr, A) +// CXX11-ANALYZER-NEXT: 32: A() (CXXConstructExpr, [B1.33], [B1.35], A) // CXX11-NEXT: 33: [B1.32] (BindTemporary) -// CXX11-NEXT: 34: [B1.33] (ImplicitCastExpr, NoOp, const class A) +// CXX11-NEXT: 34: [B1.33] (ImplicitCastExpr, NoOp, const A) // CXX11-NEXT: 35: [B1.34] -// CXX11-NEXT: 36: [B1.35] (CXXConstructExpr, const class A) -// CXX11-WARNINGS-NEXT: 37: A() (CXXConstructExpr, class A) -// CXX11-ANALYZER-NEXT: 37: A() (CXXConstructExpr, [B1.38], [B1.40], class A) +// CXX11-NEXT: 36: [B1.35] (CXXConstructExpr, const A) +// CXX11-WARNINGS-NEXT: 37: A() (CXXConstructExpr, A) +// CXX11-ANALYZER-NEXT: 37: A() (CXXConstructExpr, [B1.38], [B1.40], A) // CXX11-NEXT: 38: [B1.37] (BindTemporary) -// CXX11-NEXT: 39: [B1.38] (ImplicitCastExpr, NoOp, const class A) +// CXX11-NEXT: 39: [B1.38] (ImplicitCastExpr, NoOp, const A) // CXX11-NEXT: 40: [B1.39] -// CXX11-NEXT: 41: [B1.40] (CXXConstructExpr, const class A) +// CXX11-NEXT: 41: [B1.40] (CXXConstructExpr, const A) // FIXME: Why does it look as if the initializer list consumes uncopied objects? // CXX11-NEXT: 42: {[B1.33], [B1.38]} // CXX11-NEXT: 43: [B1.42] (BindTemporary) @@ -254,24 +254,24 @@ // CHECK: [B2 (ENTRY)] // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] -// WARNINGS-NEXT: 1: A() (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.2], [B1.4], class A) +// WARNINGS-NEXT: 1: A() (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.2], [B1.4], A) // CHECK-NEXT: 2: [B1.1] (BindTemporary) -// CHECK-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 4: [B1.3] -// CHECK-NEXT: 5: [B1.4] (CXXConstructExpr, class A) -// WARNINGS-NEXT: 6: A() (CXXConstructExpr, class A) -// ANALYZER-NEXT: 6: A() (CXXConstructExpr, [B1.7], [B1.9], class A) +// CHECK-NEXT: 5: [B1.4] (CXXConstructExpr, A) +// WARNINGS-NEXT: 6: A() (CXXConstructExpr, A) +// ANALYZER-NEXT: 6: A() (CXXConstructExpr, [B1.7], [B1.9], A) // CHECK-NEXT: 7: [B1.6] (BindTemporary) -// CHECK-NEXT: 8: [B1.7] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 8: [B1.7] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 9: [B1.8] -// CHECK-NEXT: 10: [B1.9] (CXXConstructExpr, class A) -// WARNINGS-NEXT: 11: A() (CXXConstructExpr, class A) -// ANALYZER-NEXT: 11: A() (CXXConstructExpr, [B1.12], [B1.14], class A) +// CHECK-NEXT: 10: [B1.9] (CXXConstructExpr, A) +// WARNINGS-NEXT: 11: A() (CXXConstructExpr, A) +// ANALYZER-NEXT: 11: A() (CXXConstructExpr, [B1.12], [B1.14], A) // CHECK-NEXT: 12: [B1.11] (BindTemporary) -// CHECK-NEXT: 13: [B1.12] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 13: [B1.12] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 14: [B1.13] -// CHECK-NEXT: 15: [B1.14] (CXXConstructExpr, class A) +// CHECK-NEXT: 15: [B1.14] (CXXConstructExpr, A) // FIXME: Why does it look as if the initializer list consumes uncopied objects? // CHECK-NEXT: 16: {[B1.7], [B1.12]} // FIXME: Why does it look as if the initializer list consumes uncopied objects? @@ -280,46 +280,46 @@ // CHECK-NEXT: 19: ~A() (Temporary object destructor) // CHECK-NEXT: 20: ~A() (Temporary object destructor) // CHECK-NEXT: 21: ~A() (Temporary object destructor) -// WARNINGS-NEXT: 22: A() (CXXConstructExpr, class A) -// ANALYZER-NEXT: 22: A() (CXXConstructExpr, [B1.23], [B1.25], class A) +// WARNINGS-NEXT: 22: A() (CXXConstructExpr, A) +// ANALYZER-NEXT: 22: A() (CXXConstructExpr, [B1.23], [B1.25], A) // CHECK-NEXT: 23: [B1.22] (BindTemporary) -// CHECK-NEXT: 24: [B1.23] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 24: [B1.23] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 25: [B1.24] -// CHECK-NEXT: 26: [B1.25] (CXXConstructExpr, class A) -// WARNINGS-NEXT: 27: A() (CXXConstructExpr, class A) -// ANALYZER-NEXT: 27: A() (CXXConstructExpr, [B1.28], [B1.30], class A) +// CHECK-NEXT: 26: [B1.25] (CXXConstructExpr, A) +// WARNINGS-NEXT: 27: A() (CXXConstructExpr, A) +// ANALYZER-NEXT: 27: A() (CXXConstructExpr, [B1.28], [B1.30], A) // CHECK-NEXT: 28: [B1.27] (BindTemporary) -// CHECK-NEXT: 29: [B1.28] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 29: [B1.28] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 30: [B1.29] -// CHECK-NEXT: 31: [B1.30] (CXXConstructExpr, class A) -// WARNINGS-NEXT: 32: A() (CXXConstructExpr, class A) -// ANALYZER-NEXT: 32: A() (CXXConstructExpr, [B1.33], [B1.35], class A) +// CHECK-NEXT: 31: [B1.30] (CXXConstructExpr, A) +// WARNINGS-NEXT: 32: A() (CXXConstructExpr, A) +// ANALYZER-NEXT: 32: A() (CXXConstructExpr, [B1.33], [B1.35], A) // CHECK-NEXT: 33: [B1.32] (BindTemporary) -// CHECK-NEXT: 34: [B1.33] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 34: [B1.33] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 35: [B1.34] -// CHECK-NEXT: 36: [B1.35] (CXXConstructExpr, class A) +// CHECK-NEXT: 36: [B1.35] (CXXConstructExpr, A) // FIXME: Why does it look as if the initializer list consumes uncopied objects? // CHECK-NEXT: 37: {[B1.28], [B1.33]} // FIXME: Why does it look as if the initializer list consumes uncopied objects? // CHECK-NEXT: 38: {[B1.23], {[B1.28], [B1.33]}} -// WARNINGS-NEXT: 39: A() (CXXConstructExpr, class A) -// ANALYZER-NEXT: 39: A() (CXXConstructExpr, [B1.40], [B1.42], class A) +// WARNINGS-NEXT: 39: A() (CXXConstructExpr, A) +// ANALYZER-NEXT: 39: A() (CXXConstructExpr, [B1.40], [B1.42], A) // CHECK-NEXT: 40: [B1.39] (BindTemporary) -// CHECK-NEXT: 41: [B1.40] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 41: [B1.40] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 42: [B1.41] -// CHECK-NEXT: 43: [B1.42] (CXXConstructExpr, class A) -// WARNINGS-NEXT: 44: A() (CXXConstructExpr, class A) -// ANALYZER-NEXT: 44: A() (CXXConstructExpr, [B1.45], [B1.47], class A) +// CHECK-NEXT: 43: [B1.42] (CXXConstructExpr, A) +// WARNINGS-NEXT: 44: A() (CXXConstructExpr, A) +// ANALYZER-NEXT: 44: A() (CXXConstructExpr, [B1.45], [B1.47], A) // CHECK-NEXT: 45: [B1.44] (BindTemporary) -// CHECK-NEXT: 46: [B1.45] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 46: [B1.45] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 47: [B1.46] -// CHECK-NEXT: 48: [B1.47] (CXXConstructExpr, class A) -// WARNINGS-NEXT: 49: A() (CXXConstructExpr, class A) -// ANALYZER-NEXT: 49: A() (CXXConstructExpr, [B1.50], [B1.52], class A) +// CHECK-NEXT: 48: [B1.47] (CXXConstructExpr, A) +// WARNINGS-NEXT: 49: A() (CXXConstructExpr, A) +// ANALYZER-NEXT: 49: A() (CXXConstructExpr, [B1.50], [B1.52], A) // CHECK-NEXT: 50: [B1.49] (BindTemporary) -// CHECK-NEXT: 51: [B1.50] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 51: [B1.50] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 52: [B1.51] -// CHECK-NEXT: 53: [B1.52] (CXXConstructExpr, class A) +// CHECK-NEXT: 53: [B1.52] (CXXConstructExpr, A) // FIXME: Why does it look as if the initializer list consumes uncopied objects? // CHECK-NEXT: 54: {[B1.45], [B1.50]} // FIXME: Why does it look as if the initializer list consumes uncopied objects? @@ -357,11 +357,11 @@ // CHECK: [B2 (ENTRY)] // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A[2]) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], class A[2]) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A[2]) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], A[2]) // CHECK-NEXT: 2: A a[2]; -// WARNINGS-NEXT: 3: (CXXConstructExpr, class A[0]) -// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], class A[0]) +// WARNINGS-NEXT: 3: (CXXConstructExpr, A[0]) +// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], A[0]) // CHECK-NEXT: 4: A b[0]; // CHECK-NEXT: 5: [B1.2].~A[2]() (Implicit destructor) // CHECK-NEXT: Preds (1): B2 @@ -376,19 +376,19 @@ // CHECK: [B2 (ENTRY)] // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], A) // CHECK-NEXT: 2: A a; -// WARNINGS-NEXT: 3: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], class A) +// WARNINGS-NEXT: 3: (CXXConstructExpr, A) +// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], A) // CHECK-NEXT: 4: A c; -// WARNINGS-NEXT: 5: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 5: (CXXConstructExpr, [B1.6], class A) +// WARNINGS-NEXT: 5: (CXXConstructExpr, A) +// ANALYZER-NEXT: 5: (CXXConstructExpr, [B1.6], A) // CHECK-NEXT: 6: A d; // CHECK-NEXT: 7: [B1.6].~A() (Implicit destructor) // CHECK-NEXT: 8: [B1.4].~A() (Implicit destructor) -// WARNINGS-NEXT: 9: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 9: (CXXConstructExpr, [B1.10], class A) +// WARNINGS-NEXT: 9: (CXXConstructExpr, A) +// ANALYZER-NEXT: 9: (CXXConstructExpr, [B1.10], A) // CHECK: 10: A b; // CHECK: 11: [B1.10].~A() (Implicit destructor) // CHECK: 12: [B1.2].~A() (Implicit destructor) @@ -407,8 +407,8 @@ // CHECK: [B4 (ENTRY)] // CHECK-NEXT: Succs (1): B3 // CHECK: [B1] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B1.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B3.4].~A() (Implicit destructor) @@ -422,11 +422,11 @@ // CHECK-NEXT: Preds (1): B3 // CHECK-NEXT: Succs (1): B0 // CHECK: [B3] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], A) // CHECK-NEXT: 2: A a; -// WARNINGS-NEXT: 3: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 3: (CXXConstructExpr, [B3.4], class A) +// WARNINGS-NEXT: 3: (CXXConstructExpr, A) +// ANALYZER-NEXT: 3: (CXXConstructExpr, [B3.4], A) // CHECK-NEXT: 4: A b; // CHECK-NEXT: 5: UV // CHECK-NEXT: 6: [B3.5] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -446,8 +446,8 @@ // CHECK-NEXT: Succs (1): B7 // CHECK: [B1] // CHECK: l1: -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B1.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B6.2].~A() (Implicit destructor) @@ -455,8 +455,8 @@ // CHECK-NEXT: Preds (2): B2 B3 // CHECK-NEXT: Succs (1): B0 // CHECK: [B2] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B2.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B2.2], A) // CHECK-NEXT: 2: A b; // CHECK-NEXT: 3: [B2.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B6.4].~A() (Implicit destructor) @@ -481,11 +481,11 @@ // CHECK-NEXT: Succs (1): B6 // CHECK: [B6] // CHECK: l0: -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B6.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B6.2], A) // CHECK-NEXT: 2: A b; -// WARNINGS-NEXT: 3: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 3: (CXXConstructExpr, [B6.4], class A) +// WARNINGS-NEXT: 3: (CXXConstructExpr, A) +// ANALYZER-NEXT: 3: (CXXConstructExpr, [B6.4], A) // CHECK-NEXT: 4: A a; // CHECK-NEXT: 5: UV // CHECK-NEXT: 6: [B6.5] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -493,8 +493,8 @@ // CHECK-NEXT: Preds (2): B7 B5 // CHECK-NEXT: Succs (2): B5 B4 // CHECK: [B7] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B7.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B7.2], A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: Preds (1): B8 // CHECK-NEXT: Succs (1): B6 @@ -521,27 +521,27 @@ // CHECK-NEXT: Preds (2): B2 B3 // CHECK-NEXT: Succs (1): B0 // CHECK: [B2] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B2.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B2.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B2.2].~A() (Implicit destructor) // CHECK-NEXT: Preds (1): B4 // CHECK-NEXT: Succs (1): B1 // CHECK: [B3] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B3.2].~A() (Implicit destructor) // CHECK-NEXT: Preds (1): B4 // CHECK-NEXT: Succs (1): B1 // CHECK: [B4] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B4.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// 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) -// WARNINGS-NEXT: 5: [B4.4] (CXXConstructExpr, class A) -// ANALYZER-NEXT: 5: [B4.4] (CXXConstructExpr, [B4.6], class A) +// WARNINGS-NEXT: 5: [B4.4] (CXXConstructExpr, A) +// ANALYZER-NEXT: 5: [B4.4] (CXXConstructExpr, [B4.6], A) // CHECK-NEXT: 6: A b = a; // CHECK-NEXT: 7: b // CHECK-NEXT: 8: [B4.7] (ImplicitCastExpr, NoOp, const class A) @@ -565,16 +565,16 @@ // CHECK-NEXT: Succs (1): B8 // CHECK: [B1] // CHECK-NEXT: 1: [B8.6].~A() (Implicit destructor) -// WARNINGS-NEXT: 2: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 2: (CXXConstructExpr, [B1.3], class A) +// WARNINGS-NEXT: 2: (CXXConstructExpr, A) +// ANALYZER-NEXT: 2: (CXXConstructExpr, [B1.3], A) // CHECK-NEXT: 3: A e; // CHECK-NEXT: 4: [B1.3].~A() (Implicit destructor) // CHECK-NEXT: 5: [B8.2].~A() (Implicit destructor) // CHECK-NEXT: Preds (2): B2 B5 // CHECK-NEXT: Succs (1): B0 // CHECK: [B2] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B2.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B2.2], A) // CHECK-NEXT: 2: A d; // CHECK-NEXT: 3: [B2.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B4.2].~A() (Implicit destructor) @@ -588,8 +588,8 @@ // CHECK-NEXT: Preds (1): B4 // CHECK-NEXT: Succs (1): B0 // CHECK: [B4] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B4.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B4.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: UV // CHECK-NEXT: 4: [B4.3] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -597,8 +597,8 @@ // CHECK-NEXT: Preds (1): B8 // CHECK-NEXT: Succs (2): B3 B2 // CHECK: [B5] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B5.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B5.2], A) // CHECK-NEXT: 2: A d; // CHECK-NEXT: 3: [B5.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B7.2].~A() (Implicit destructor) @@ -612,8 +612,8 @@ // CHECK-NEXT: Preds (1): B7 // CHECK-NEXT: Succs (1): B0 // CHECK: [B7] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B7.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B7.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: UV // CHECK-NEXT: 4: [B7.3] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -621,13 +621,13 @@ // CHECK-NEXT: Preds (1): B8 // CHECK-NEXT: Succs (2): B6 B5 // CHECK: [B8] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B8.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// 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) -// WARNINGS-NEXT: 5: [B8.4] (CXXConstructExpr, class A) -// ANALYZER-NEXT: 5: [B8.4] (CXXConstructExpr, [B8.6], class A) +// WARNINGS-NEXT: 5: [B8.4] (CXXConstructExpr, A) +// ANALYZER-NEXT: 5: [B8.4] (CXXConstructExpr, [B8.6], A) // CHECK-NEXT: 6: A b = a; // CHECK-NEXT: 7: b // CHECK-NEXT: 8: [B8.7] (ImplicitCastExpr, NoOp, const class A) @@ -665,8 +665,8 @@ // CHECK-NEXT: Preds (1): B3 // CHECK-NEXT: Succs (1): B4 // CHECK: [B3] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B3.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B4.4].~A() (Implicit destructor) @@ -675,8 +675,8 @@ // CHECK: [B4] // CHECK-NEXT: 1: a // CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A) -// WARNINGS-NEXT: 3: [B4.2] (CXXConstructExpr, class A) -// ANALYZER-NEXT: 3: [B4.2] (CXXConstructExpr, [B4.4], class A) +// WARNINGS-NEXT: 3: [B4.2] (CXXConstructExpr, A) +// ANALYZER-NEXT: 3: [B4.2] (CXXConstructExpr, [B4.4], A) // CHECK-NEXT: 4: A b = a; // CHECK-NEXT: 5: b // CHECK-NEXT: 6: [B4.5] (ImplicitCastExpr, NoOp, const class A) @@ -688,8 +688,8 @@ // CHECK-NEXT: Preds (2): B2 B5 // CHECK-NEXT: Succs (2): B3 B1 // CHECK: [B5] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B5.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B5.2], A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: Preds (1): B6 // CHECK-NEXT: Succs (1): B4 @@ -705,8 +705,8 @@ // CHECK-NEXT: Succs (1): B11 // CHECK: [B1] // CHECK-NEXT: 1: [B10.4].~A() (Implicit destructor) -// WARNINGS-NEXT: 2: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 2: (CXXConstructExpr, [B1.3], class A) +// WARNINGS-NEXT: 2: (CXXConstructExpr, A) +// ANALYZER-NEXT: 2: (CXXConstructExpr, [B1.3], A) // CHECK-NEXT: 3: A e; // CHECK-NEXT: 4: [B1.3].~A() (Implicit destructor) // CHECK-NEXT: 5: [B11.2].~A() (Implicit destructor) @@ -716,8 +716,8 @@ // CHECK-NEXT: Preds (2): B3 B6 // CHECK-NEXT: Succs (1): B10 // CHECK: [B3] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], A) // CHECK-NEXT: 2: A d; // CHECK-NEXT: 3: [B3.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B9.2].~A() (Implicit destructor) @@ -755,8 +755,8 @@ // CHECK: Preds (1): B9 // CHECK-NEXT: Succs (1): B1 // CHECK: [B9] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B9.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B9.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: UV // CHECK-NEXT: 4: [B9.3] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -766,8 +766,8 @@ // CHECK: [B10] // CHECK-NEXT: 1: a // CHECK-NEXT: 2: [B10.1] (ImplicitCastExpr, NoOp, const class A) -// WARNINGS-NEXT: 3: [B10.2] (CXXConstructExpr, class A) -// ANALYZER-NEXT: 3: [B10.2] (CXXConstructExpr, [B10.4], class A) +// WARNINGS-NEXT: 3: [B10.2] (CXXConstructExpr, A) +// ANALYZER-NEXT: 3: [B10.2] (CXXConstructExpr, [B10.4], A) // CHECK-NEXT: 4: A b = a; // CHECK-NEXT: 5: b // CHECK-NEXT: 6: [B10.5] (ImplicitCastExpr, NoOp, const class A) @@ -779,8 +779,8 @@ // CHECK-NEXT: Preds (2): B2 B11 // CHECK-NEXT: Succs (2): B9 B1 // CHECK: [B11] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B11.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B11.2], A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: Preds (1): B12 // CHECK-NEXT: Succs (1): B10 @@ -807,8 +807,8 @@ // CHECK-NEXT: Preds (1): B2 // CHECK-NEXT: Succs (2): B3 B0 // CHECK: [B2] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B2.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B2.2], A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: 3: [B2.2].~A() (Implicit destructor) // CHECK-NEXT: Preds (2): B3 B4 @@ -826,8 +826,8 @@ // CHECK: [B12 (ENTRY)] // CHECK-NEXT: Succs (1): B11 // CHECK: [B1] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], A) // CHECK-NEXT: 2: A d; // CHECK-NEXT: 3: [B1.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B11.2].~A() (Implicit destructor) @@ -840,8 +840,8 @@ // CHECK-NEXT: Preds (2): B3 B6 // CHECK-NEXT: Succs (2): B10 B1 // CHECK: [B3] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B3.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B9.2].~A() (Implicit destructor) @@ -876,8 +876,8 @@ // CHECK: Preds (1): B9 // CHECK-NEXT: Succs (1): B1 // CHECK: [B9] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B9.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B9.2], A) // CHECK-NEXT: 2: A b; // CHECK-NEXT: 3: UV // CHECK-NEXT: 4: [B9.3] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -888,8 +888,8 @@ // CHECK-NEXT: Preds (1): B2 // CHECK-NEXT: Succs (1): B9 // CHECK: [B11] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B11.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B11.2], A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: Preds (1): B12 // CHECK-NEXT: Succs (1): B9 @@ -915,12 +915,12 @@ // CHECK-NEXT: Preds (2): B3 B2 // CHECK-NEXT: Succs (1): B0 // CHECK: [B2] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B2.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// 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: 5: [B2.4] (CXXConstructExpr, class A) +// CHECK-NEXT: 5: [B2.4] (CXXConstructExpr, A) // CHECK-NEXT: 6: A b = a; // CHECK-NEXT: 7: b // CHECK-NEXT: 8: [B2.7] (ImplicitCastExpr, NoOp, const class A) @@ -931,8 +931,8 @@ // CHECK-NEXT: Preds (1): B4 // CHECK-NEXT: Succs (1): B1 // CHECK: [B3] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B3.2].~A() (Implicit destructor) // CHECK-NEXT: Succs (1): B1 @@ -948,20 +948,20 @@ // CHECK-NEXT: Succs (1): B2 // CHECK: [B1] // CHECK-NEXT: 1: [B2.6].~A() (Implicit destructor) -// WARNINGS-NEXT: 2: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 2: (CXXConstructExpr, [B1.3], class A) +// WARNINGS-NEXT: 2: (CXXConstructExpr, A) +// ANALYZER-NEXT: 2: (CXXConstructExpr, [B1.3], A) // CHECK-NEXT: 3: A g; // CHECK-NEXT: 4: [B1.3].~A() (Implicit destructor) // CHECK-NEXT: 5: [B2.2].~A() (Implicit destructor) // CHECK-NEXT: Preds (3): B3 B7 B2 // CHECK-NEXT: Succs (1): B0 // CHECK: [B2] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B2.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// 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: 5: [B2.4] (CXXConstructExpr, class A) +// CHECK-NEXT: 5: [B2.4] (CXXConstructExpr, A) // CHECK-NEXT: 6: A b = a; // CHECK-NEXT: 7: b // CHECK-NEXT: 8: [B2.7] (ImplicitCastExpr, NoOp, const class A) @@ -977,8 +977,8 @@ // CHECK: Preds (2): B2 B4 // CHECK-NEXT: Succs (1): B1 // CHECK: [B4] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B4.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B4.2], A) // CHECK-NEXT: 2: A f; // CHECK-NEXT: 3: [B4.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B8.2].~A() (Implicit destructor) @@ -1004,8 +1004,8 @@ // CHECK-NEXT: Succs (1): B1 // CHECK: [B8] // CHECK: case 0: -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B8.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B8.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: UV // CHECK-NEXT: 4: [B8.3] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -1040,8 +1040,8 @@ // CHECK-NEXT: Preds (1): B3 // CHECK-NEXT: Succs (1): B4 // CHECK: [B3] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B3.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B4.4].~A() (Implicit destructor) @@ -1050,8 +1050,8 @@ // CHECK: [B4] // CHECK-NEXT: 1: a // CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A) -// WARNINGS-NEXT: 3: [B4.2] (CXXConstructExpr, class A) -// ANALYZER-NEXT: 3: [B4.2] (CXXConstructExpr, [B4.4], class A) +// WARNINGS-NEXT: 3: [B4.2] (CXXConstructExpr, A) +// ANALYZER-NEXT: 3: [B4.2] (CXXConstructExpr, [B4.4], A) // CHECK-NEXT: 4: A b = a; // CHECK-NEXT: 5: b // CHECK-NEXT: 6: [B4.5] (ImplicitCastExpr, NoOp, const class A) @@ -1063,8 +1063,8 @@ // CHECK-NEXT: Preds (2): B2 B5 // CHECK-NEXT: Succs (2): B3 B1 // CHECK: [B5] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B5.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B5.2], A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: Preds (1): B6 // CHECK-NEXT: Succs (1): B4 @@ -1099,8 +1099,8 @@ // CHECK-NEXT: 3: *[B3.2] // CHECK-NEXT: 4: [B3.3] (ImplicitCastExpr, LValueToRValue, int) // CHECK-NEXT: 5: int n = *__begin1; -// WARNINGS-NEXT: 6: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 6: (CXXConstructExpr, [B3.7], class A) +// WARNINGS-NEXT: 6: (CXXConstructExpr, A) +// ANALYZER-NEXT: 6: (CXXConstructExpr, [B3.7], A) // CHECK-NEXT: 7: A c; // CHECK-NEXT: 8: [B3.7].~A() (Implicit destructor) // CHECK-NEXT: Preds (1): B1 @@ -1133,8 +1133,8 @@ // CHECK: [B1] // CHECK-NEXT: 1: [B10.4].~A() (Implicit destructor) // CHECK-NEXT: 2: [B11.4].~A() (Implicit destructor) -// WARNINGS-NEXT: 3: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], class A) +// WARNINGS-NEXT: 3: (CXXConstructExpr, A) +// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], A) // CHECK-NEXT: 4: A f; // CHECK-NEXT: 5: [B1.4].~A() (Implicit destructor) // CHECK-NEXT: 6: [B11.2].~A() (Implicit destructor) @@ -1144,8 +1144,8 @@ // CHECK-NEXT: Preds (2): B3 B6 // CHECK-NEXT: Succs (1): B10 // CHECK: [B3] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B3.2], A) // CHECK-NEXT: 2: A e; // CHECK-NEXT: 3: [B3.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B9.2].~A() (Implicit destructor) @@ -1183,8 +1183,8 @@ // CHECK: Preds (1): B9 // CHECK-NEXT: Succs (1): B1 // CHECK: [B9] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B9.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B9.2], A) // CHECK-NEXT: 2: A d; // CHECK-NEXT: 3: UV // CHECK-NEXT: 4: [B9.3] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -1194,8 +1194,8 @@ // CHECK: [B10] // CHECK-NEXT: 1: b // CHECK-NEXT: 2: [B10.1] (ImplicitCastExpr, NoOp, const class A) -// WARNINGS-NEXT: 3: [B10.2] (CXXConstructExpr, class A) -// ANALYZER-NEXT: 3: [B10.2] (CXXConstructExpr, [B10.4], class A) +// WARNINGS-NEXT: 3: [B10.2] (CXXConstructExpr, A) +// ANALYZER-NEXT: 3: [B10.2] (CXXConstructExpr, [B10.4], A) // CHECK-NEXT: 4: A c = b; // CHECK-NEXT: 5: c // CHECK-NEXT: 6: [B10.5] (ImplicitCastExpr, NoOp, const class A) @@ -1207,11 +1207,11 @@ // CHECK-NEXT: Preds (2): B2 B11 // CHECK-NEXT: Succs (2): B9 B1 // CHECK: [B11] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B11.2], class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B11.2], A) // CHECK-NEXT: 2: A a; -// WARNINGS-NEXT: 3: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 3: (CXXConstructExpr, [B11.4], class A) +// WARNINGS-NEXT: 3: (CXXConstructExpr, A) +// ANALYZER-NEXT: 3: (CXXConstructExpr, [B11.4], A) // CHECK-NEXT: 4: A b; // CHECK-NEXT: Preds (1): B12 // CHECK-NEXT: Succs (1): B10 diff --git a/clang/test/Analysis/blocks.mm b/clang/test/Analysis/blocks.mm --- a/clang/test/Analysis/blocks.mm +++ b/clang/test/Analysis/blocks.mm @@ -52,8 +52,8 @@ // CHECK: [B1] // CHECK-NEXT: 1: s -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const struct StructWithCopyConstructor) -// CHECK-NEXT: 3: [B1.2] (CXXConstructExpr, const struct StructWithCopyConstructor) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const StructWithCopyConstructor) +// CHECK-NEXT: 3: [B1.2] (CXXConstructExpr, const StructWithCopyConstructor) // CHECK-NEXT: 4: ^{ } // CHECK-NEXT: 5: (void)([B1.4]) (CStyleCastExpr, ToVoid, void) // CHECK-NEXT: Preds (1): B2 @@ -76,8 +76,8 @@ // CHECK: [B1] // CHECK-NEXT: 1: 5 -// WARNINGS-NEXT: 2: [B1.1] (CXXConstructExpr, struct StructWithCopyConstructor) -// ANALYZER-NEXT: 2: [B1.1] (CXXConstructExpr, [B1.3], struct StructWithCopyConstructor) +// WARNINGS-NEXT: 2: [B1.1] (CXXConstructExpr, StructWithCopyConstructor) +// ANALYZER-NEXT: 2: [B1.1] (CXXConstructExpr, [B1.3], StructWithCopyConstructor) // CHECK-NEXT: 3: StructWithCopyConstructor s(5) __attribute__((blocks("byref"))); // CHECK-NEXT: 4: ^{ } // CHECK-NEXT: 5: (void)([B1.4]) (CStyleCastExpr, ToVoid, void) diff --git a/clang/test/Analysis/bug_hash_test.cpp b/clang/test/Analysis/bug_hash_test.cpp --- a/clang/test/Analysis/bug_hash_test.cpp +++ b/clang/test/Analysis/bug_hash_test.cpp @@ -43,7 +43,7 @@ void OutOfLine(); X &operator=(int) { - clang_analyzer_hashDump(5); // expected-warning {{debug.ExprInspection$class AA::X & AA::X::operator=(int)$29$clang_analyzer_hashDump(5);$Category}} + clang_analyzer_hashDump(5); // expected-warning {{debug.ExprInspection$X & AA::X::operator=(int)$29$clang_analyzer_hashDump(5);$Category}} return *this; } diff --git a/clang/test/Analysis/cast-value-state-dump.cpp b/clang/test/Analysis/cast-value-state-dump.cpp --- a/clang/test/Analysis/cast-value-state-dump.cpp +++ b/clang/test/Analysis/cast-value-state-dump.cpp @@ -31,10 +31,10 @@ clang_analyzer_printState(); // CHECK: "dynamic_types": [ - // CHECK-NEXT: { "region": "SymRegion{reg_$0}", "dyn_type": "const class clang::Circle", "sub_classable": true } + // CHECK-NEXT: { "region": "SymRegion{reg_$0}", "dyn_type": "const class clang::Circle", "sub_classable": true } // CHECK-NEXT: ], // CHECK-NEXT: "dynamic_casts": [ - // CHECK: { "region": "SymRegion{reg_$0}", "casts": [ + // CHECK: { "region": "SymRegion{reg_$0}", "casts": [ // CHECK-NEXT: { "from": "struct clang::Shape", "to": "class clang::Circle", "kind": "success" }, // CHECK-NEXT: { "from": "struct clang::Shape", "to": "class clang::Square", "kind": "fail" } // CHECK-NEXT: ] } diff --git a/clang/test/Analysis/cfg-rich-constructors.cpp b/clang/test/Analysis/cfg-rich-constructors.cpp --- a/clang/test/Analysis/cfg-rich-constructors.cpp +++ b/clang/test/Analysis/cfg-rich-constructors.cpp @@ -24,7 +24,7 @@ // CHECK: void operatorNewWithConstructor() // CHECK: 1: CFGNewAllocator(C *) -// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], class C) +// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], C) // CHECK-NEXT: 3: new C([B1.2]) void operatorNewWithConstructor() { new C(); @@ -33,9 +33,9 @@ // CHECK: void operatorNewWithConstructorWithOperatorNewWithContstructor() // CHECK: 1: CFGNewAllocator(C *) // CHECK-NEXT: 2: CFGNewAllocator(C *) -// CHECK-NEXT: 3: (CXXConstructExpr, [B1.4], class C) +// CHECK-NEXT: 3: (CXXConstructExpr, [B1.4], C) // CHECK-NEXT: 4: new C([B1.3]) -// CHECK-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.6], class C) +// CHECK-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.6], C) // CHECK-NEXT: 6: new C([B1.5]) void operatorNewWithConstructorWithOperatorNewWithContstructor() { new C(new C()); @@ -43,11 +43,11 @@ // CHECK: void operatorPlacementNewWithConstructorWithinPlacementArgument() // CHECK: 1: CFGNewAllocator(C *) -// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], class C) +// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], C) // CHECK-NEXT: 3: new C([B1.2]) // CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, BitCast, void *) // CHECK-NEXT: 5: CFGNewAllocator(C *) -// CHECK-NEXT: 6: (CXXConstructExpr, [B1.7], class C) +// CHECK-NEXT: 6: (CXXConstructExpr, [B1.7], C) // CHECK-NEXT: 7: new ([B1.4]) C([B1.6]) void operatorPlacementNewWithConstructorWithinPlacementArgument() { new (new C()) C(); @@ -58,14 +58,14 @@ namespace decl_stmt { // CHECK: void simpleVariable() -// CHECK: 1: (CXXConstructExpr, [B1.2], class C) +// CHECK: 1: (CXXConstructExpr, [B1.2], C) // CHECK-NEXT: 2: C c; void simpleVariable() { C c; } // CHECK: void simpleVariableWithBraces() -// CHECK: 1: {} (CXXConstructExpr, [B1.2], class C) +// CHECK: 1: {} (CXXConstructExpr, [B1.2], C) // CHECK-NEXT: 2: C c{}; void simpleVariableWithBraces() { C c{}; @@ -73,8 +73,8 @@ // CHECK: void simpleVariableWithConstructorArgument() // CHECK: 1: 0 -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NullToPointer, class C *) -// CHECK-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.4], class C) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NullToPointer, C *) +// CHECK-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.4], C) // CHECK-NEXT: 4: C c(0); void simpleVariableWithConstructorArgument() { C c(0); @@ -82,9 +82,9 @@ // CHECK: void simpleVariableWithOperatorNewInConstructorArgument() // CHECK: 1: CFGNewAllocator(C *) -// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], class C) +// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], C) // CHECK-NEXT: 3: new C([B1.2]) -// CHECK-NEXT: 4: [B1.3] (CXXConstructExpr, [B1.5], class C) +// CHECK-NEXT: 4: [B1.3] (CXXConstructExpr, [B1.5], C) // CHECK-NEXT: 5: C c(new C()); void simpleVariableWithOperatorNewInConstructorArgument() { C c(new C()); @@ -92,9 +92,9 @@ // CHECK: void simpleVariableWithOperatorNewInBraces() // CHECK: 1: CFGNewAllocator(C *) -// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], class C) +// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], C) // CHECK-NEXT: 3: new C([B1.2]) -// CHECK-NEXT: 4: {[B1.3]} (CXXConstructExpr, [B1.5], class C) +// CHECK-NEXT: 4: {[B1.3]} (CXXConstructExpr, [B1.5], C) // CHECK-NEXT: 5: C c{new C()}; void simpleVariableWithOperatorNewInBraces() { C c{new C()}; @@ -102,11 +102,11 @@ // CHECK: void simpleVariableInitializedByValue() // CHECK: 1: C::get -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class C (*)(void)) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, C (*)(void)) // CXX11-ELIDE-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4], [B1.5]) // CXX11-NOELIDE-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4]) // CXX11-NEXT: 4: [B1.3] -// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.6], class C) +// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.6], C) // CXX11-NEXT: 6: C c = C::get(); // CXX17-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4]) // CXX17-NEXT: 4: C c = C::get(); @@ -121,30 +121,30 @@ // CHECK: [B1] // CXX11-NEXT: 1: [B4.2] ? [B2.5] : [B3.6] // CXX11-NEXT: 2: [B1.1] -// CXX11-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.4], class C) +// CXX11-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.4], C) // CXX11-NEXT: 4: C c = coin ? C::get() : C(0); // CXX17-NEXT: 1: [B4.2] ? [B2.3] : [B3.4] // CXX17-NEXT: 2: C c = coin ? C::get() : C(0); // CHECK: [B2] // CHECK-NEXT: 1: C::get -// CHECK-NEXT: 2: [B2.1] (ImplicitCastExpr, FunctionToPointerDecay, class C (*)(void)) +// CHECK-NEXT: 2: [B2.1] (ImplicitCastExpr, FunctionToPointerDecay, C (*)(void)) // CXX11-ELIDE-NEXT: 3: [B2.2]() (CXXRecordTypedCall, [B2.4], [B2.5]) // CXX11-NOELIDE-NEXT: 3: [B2.2]() (CXXRecordTypedCall, [B2.4]) // CXX11-NEXT: 4: [B2.3] -// CXX11-ELIDE-NEXT: 5: [B2.4] (CXXConstructExpr, [B1.2], [B1.3], class C) -// CXX11-NOELIDE-NEXT: 5: [B2.4] (CXXConstructExpr, [B1.2], class C) +// CXX11-ELIDE-NEXT: 5: [B2.4] (CXXConstructExpr, [B1.2], [B1.3], C) +// CXX11-NOELIDE-NEXT: 5: [B2.4] (CXXConstructExpr, [B1.2], C) // CXX17-NEXT: 3: [B2.2]() // CHECK: [B3] // CHECK-NEXT: 1: 0 -// CHECK-NEXT: 2: [B3.1] (ImplicitCastExpr, NullToPointer, class C *) -// CXX11-ELIDE-NEXT: 3: [B3.2] (CXXConstructExpr, [B3.5], [B3.6], class C) -// CXX11-NOELIDE-NEXT: 3: [B3.2] (CXXConstructExpr, [B3.5], class C) -// CXX11-NEXT: 4: C([B3.3]) (CXXFunctionalCastExpr, ConstructorConversion, class C) +// CHECK-NEXT: 2: [B3.1] (ImplicitCastExpr, NullToPointer, C *) +// CXX11-ELIDE-NEXT: 3: [B3.2] (CXXConstructExpr, [B3.5], [B3.6], C) +// CXX11-NOELIDE-NEXT: 3: [B3.2] (CXXConstructExpr, [B3.5], C) +// CXX11-NEXT: 4: C([B3.3]) (CXXFunctionalCastExpr, ConstructorConversion, C) // CXX11-NEXT: 5: [B3.4] -// CXX11-ELIDE-NEXT: 6: [B3.5] (CXXConstructExpr, [B1.2], [B1.3], class C) -// CXX11-NOELIDE-NEXT: 6: [B3.5] (CXXConstructExpr, [B1.2], class C) -// CXX17-NEXT: 3: [B3.2] (CXXConstructExpr, class C) -// CXX17-NEXT: 4: C([B3.3]) (CXXFunctionalCastExpr, ConstructorConversion, class C) +// CXX11-ELIDE-NEXT: 6: [B3.5] (CXXConstructExpr, [B1.2], [B1.3], C) +// CXX11-NOELIDE-NEXT: 6: [B3.5] (CXXConstructExpr, [B1.2], C) +// CXX17-NEXT: 3: [B3.2] (CXXConstructExpr, C) +// CXX17-NEXT: 4: C([B3.3]) (CXXFunctionalCastExpr, ConstructorConversion, C) // CHECK: [B4] // CHECK-NEXT: 1: coin // CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -155,13 +155,13 @@ // CHECK: void simpleVariableWithElidableCopy() // CHECK: 1: 0 -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NullToPointer, class C *) -// CXX11-ELIDE-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.5], [B1.6], class C) -// CXX11-NOELIDE-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.5], class C) -// CXX17-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.5], class C) -// CHECK-NEXT: 4: C([B1.3]) (CXXFunctionalCastExpr, ConstructorConversion, class C) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NullToPointer, C *) +// CXX11-ELIDE-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.5], [B1.6], C) +// CXX11-NOELIDE-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.5], C) +// CXX17-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.5], C) +// CHECK-NEXT: 4: C([B1.3]) (CXXFunctionalCastExpr, ConstructorConversion, C) // CXX11-NEXT: 5: [B1.4] -// CXX11-NEXT: 6: [B1.5] (CXXConstructExpr, [B1.7], class C) +// CXX11-NEXT: 6: [B1.5] (CXXConstructExpr, [B1.7], C) // CXX11-NEXT: 7: C c = C(0); // CXX17-NEXT: 5: C c = C(0); void simpleVariableWithElidableCopy() { @@ -170,8 +170,8 @@ // CHECK: void referenceVariableWithConstructor() // CHECK: 1: 0 -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NullToPointer, class C *) -// CHECK-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.4], const class C) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NullToPointer, C *) +// CHECK-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.4], const C) // CHECK-NEXT: 4: [B1.3] // CHECK-NEXT: 5: const C &c(0); void referenceVariableWithConstructor() { @@ -179,8 +179,8 @@ } // CHECK: void referenceVariableWithInitializer() -// CHECK: 1: C() (CXXConstructExpr, [B1.3], class C) -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const class C) +// CHECK: 1: C() (CXXConstructExpr, [B1.3], C) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const C) // CHECK-NEXT: 3: [B1.2] // CHECK-NEXT: 4: const C &c = C(); void referenceVariableWithInitializer() { @@ -191,27 +191,27 @@ // CHECK: [B1] // CXX11-NEXT: 1: [B4.2] ? [B2.5] : [B3.6] // CXX17-NEXT: 1: [B4.2] ? [B2.3] : [B3.4] -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const class C) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const C) // CHECK-NEXT: 3: [B1.2] // CHECK-NEXT: 4: const C &c = coin ? C::get() : C(0); // CHECK: [B2] // CHECK-NEXT: 1: C::get -// CHECK-NEXT: 2: [B2.1] (ImplicitCastExpr, FunctionToPointerDecay, class C (*)(void)) +// CHECK-NEXT: 2: [B2.1] (ImplicitCastExpr, FunctionToPointerDecay, C (*)(void)) // CXX11-ELIDE-NEXT: 3: [B2.2]() (CXXRecordTypedCall, [B2.4], [B2.5]) // CXX11-NOELIDE-NEXT: 3: [B2.2]() (CXXRecordTypedCall, [B2.4]) // CXX11-NEXT: 4: [B2.3] -// CXX11-NEXT: 5: [B2.4] (CXXConstructExpr, [B1.3], class C) +// CXX11-NEXT: 5: [B2.4] (CXXConstructExpr, [B1.3], C) // CXX17-NEXT: 3: [B2.2]() (CXXRecordTypedCall, [B1.3]) // CHECK: [B3] // CHECK-NEXT: 1: 0 -// CHECK-NEXT: 2: [B3.1] (ImplicitCastExpr, NullToPointer, class C *) -// CXX11-ELIDE-NEXT: 3: [B3.2] (CXXConstructExpr, [B3.5], [B3.6], class C) -// CXX11-NOELIDE-NEXT: 3: [B3.2] (CXXConstructExpr, [B3.5], class C) -// CXX11-NEXT: 4: C([B3.3]) (CXXFunctionalCastExpr, ConstructorConversion, class C) +// CHECK-NEXT: 2: [B3.1] (ImplicitCastExpr, NullToPointer, C *) +// CXX11-ELIDE-NEXT: 3: [B3.2] (CXXConstructExpr, [B3.5], [B3.6], C) +// CXX11-NOELIDE-NEXT: 3: [B3.2] (CXXConstructExpr, [B3.5], C) +// CXX11-NEXT: 4: C([B3.3]) (CXXFunctionalCastExpr, ConstructorConversion, C) // CXX11-NEXT: 5: [B3.4] -// CXX11-NEXT: 6: [B3.5] (CXXConstructExpr, [B1.3], class C) -// CXX17-NEXT: 3: [B3.2] (CXXConstructExpr, [B1.3], class C) -// CXX17-NEXT: 4: C([B3.3]) (CXXFunctionalCastExpr, ConstructorConversion, class C) +// CXX11-NEXT: 6: [B3.5] (CXXConstructExpr, [B1.3], C) +// CXX17-NEXT: 3: [B3.2] (CXXConstructExpr, [B1.3], C) +// CXX17-NEXT: 4: C([B3.3]) (CXXFunctionalCastExpr, ConstructorConversion, C) // CHECK: [B4] // CHECK-NEXT: 1: coin // CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -230,12 +230,12 @@ public: // CHECK: D() -// CHECK: 1: (CXXConstructExpr, C() (Base initializer), class C) +// CHECK: 1: (CXXConstructExpr, C() (Base initializer), C) // CHECK-NEXT: 2: C([B1.1]) (Base initializer) // CHECK-NEXT: 3: CFGNewAllocator(C *) -// CHECK-NEXT: 4: (CXXConstructExpr, [B1.5], class C) +// CHECK-NEXT: 4: (CXXConstructExpr, [B1.5], C) // CHECK-NEXT: 5: new C([B1.4]) -// CHECK-NEXT: 6: [B1.5] (CXXConstructExpr, c1([B1.5]) (Member initializer), class C) +// CHECK-NEXT: 6: [B1.5] (CXXConstructExpr, c1([B1.5]) (Member initializer), C) // CHECK-NEXT: 7: c1([B1.6]) (Member initializer) D(): C(), c1(new C()) {} @@ -248,24 +248,24 @@ // detected the test would not fail, because FileCheck allows partial matches. // CHECK: D(double) // CHECK: 1: C::get -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class C (*)(void)) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, C (*)(void)) // CHECK-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4]) // CHECK-NEXT: 4: [B1.3] -// CHECK-NEXT: 5: [B1.4] (CXXConstructExpr, C([B1.4]) (Base initializer), class C) +// CHECK-NEXT: 5: [B1.4] (CXXConstructExpr, C([B1.4]) (Base initializer), C) // CHECK-NEXT: 6: C([B1.5]) (Base initializer) // CHECK-NEXT: 7: CFGNewAllocator(C *) // CHECK-NEXT: 8: C::get -// CHECK-NEXT: 9: [B1.8] (ImplicitCastExpr, FunctionToPointerDecay, class C (*)(void)) +// CHECK-NEXT: 9: [B1.8] (ImplicitCastExpr, FunctionToPointerDecay, C (*)(void)) // CXX11-ELIDE-NEXT: 10: [B1.9]() (CXXRecordTypedCall, [B1.11], [B1.12]) // CXX11-NOELIDE-NEXT: 10: [B1.9]() (CXXRecordTypedCall, [B1.11]) // CXX11-NEXT: 11: [B1.10] -// CXX11-NEXT: 12: [B1.11] (CXXConstructExpr, [B1.13], class C) +// CXX11-NEXT: 12: [B1.11] (CXXConstructExpr, [B1.13], C) // CXX11-NEXT: 13: new C([B1.12]) -// CXX11-NEXT: 14: [B1.13] (CXXConstructExpr, c1([B1.13]) (Member initializer), class C) +// CXX11-NEXT: 14: [B1.13] (CXXConstructExpr, c1([B1.13]) (Member initializer), C) // CXX11-NEXT: 15: c1([B1.14]) (Member initializer) // CXX17-NEXT: 10: [B1.9]() // CXX17-NEXT: 11: new C([B1.10]) -// CXX17-NEXT: 12: [B1.11] (CXXConstructExpr, c1([B1.11]) (Member initializer), class C) +// CXX17-NEXT: 12: [B1.11] (CXXConstructExpr, c1([B1.11]) (Member initializer), C) // CXX17-NEXT: 13: c1([B1.12]) (Member initializer) D(double): C(C::get()), c1(new C(C::get())) {} }; @@ -284,19 +284,19 @@ // FIXME: There should be no temporary destructor in C++17. // CHECK: F() // CHECK: 1: E::get -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class ctor_initializers::E (*)( +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, E (*)( // CXX11-ELIDE-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4], [B1.6], [B1.7]) // CXX11-NOELIDE-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4], [B1.6]) // CXX11-NEXT: 4: [B1.3] (BindTemporary) -// CXX11-NEXT: 5: [B1.4] (ImplicitCastExpr, NoOp, const class ctor_initializers::E) +// CXX11-NEXT: 5: [B1.4] (ImplicitCastExpr, NoOp, const E) // CXX11-NEXT: 6: [B1.5] -// CXX11-NEXT: 7: [B1.6] (CXXConstructExpr, e([B1.6]) (Member initializer), class ctor_initializers +// CXX11-NEXT: 7: [B1.6] (CXXConstructExpr, e([B1.6]) (Member initializer), E) // CXX11-NEXT: 8: e([B1.7]) (Member initializer) -// CXX11-NEXT: 9: ~ctor_initializers::E() (Temporary object destructor) +// CXX11-NEXT: 9: ~E() (Temporary object destructor) // CXX17-NEXT: 3: [B1.2]() (CXXRecordTypedCall, e([B1.4]) (Member initializer), [B1.4]) // CXX17-NEXT: 4: [B1.3] (BindTemporary) // CXX17-NEXT: 5: e([B1.4]) (Member initializer) -// CXX17-NEXT: 6: ~ctor_initializers::E() (Temporary object destructor) +// CXX17-NEXT: 6: ~E() (Temporary object destructor) F(): e(E::get()) {} }; } // end namespace ctor_initializers @@ -304,11 +304,11 @@ namespace return_stmt_without_dtor { // CHECK: C returnVariable() -// CHECK: 1: (CXXConstructExpr, [B1.2], class C) +// CHECK: 1: (CXXConstructExpr, [B1.2], C) // CHECK-NEXT: 2: C c; // CHECK-NEXT: 3: c -// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, NoOp, class C) -// CHECK-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.6], class C) +// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, NoOp, C) +// CHECK-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.6], C) // CHECK-NEXT: 6: return [B1.5]; C returnVariable() { C c; @@ -316,7 +316,7 @@ } // CHECK: C returnEmptyBraces() -// CHECK: 1: {} (CXXConstructExpr, [B1.2], class C) +// CHECK: 1: {} (CXXConstructExpr, [B1.2], C) // CHECK-NEXT: 2: return [B1.1]; C returnEmptyBraces() { return {}; @@ -324,9 +324,9 @@ // CHECK: C returnBracesWithOperatorNew() // CHECK: 1: CFGNewAllocator(C *) -// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], class C) +// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], C) // CHECK-NEXT: 3: new C([B1.2]) -// CHECK-NEXT: 4: {[B1.3]} (CXXConstructExpr, [B1.5], class C) +// CHECK-NEXT: 4: {[B1.3]} (CXXConstructExpr, [B1.5], C) // CHECK-NEXT: 5: return [B1.4]; C returnBracesWithOperatorNew() { return {new C()}; @@ -335,19 +335,19 @@ // CHECK: C returnBracesWithMultipleItems() // CHECK: 1: 123 // CHECK-NEXT: 2: 456 -// CHECK-NEXT: 3: {[B1.1], [B1.2]} (CXXConstructExpr, [B1.4], class C) +// CHECK-NEXT: 3: {[B1.1], [B1.2]} (CXXConstructExpr, [B1.4], C) // CHECK-NEXT: 4: return [B1.3]; C returnBracesWithMultipleItems() { return {123, 456}; } // CHECK: C returnTemporary() -// CXX11-ELIDE: 1: C() (CXXConstructExpr, [B1.2], [B1.3], class C) -// CXX11-NOELIDE: 1: C() (CXXConstructExpr, [B1.2], class C) +// CXX11-ELIDE: 1: C() (CXXConstructExpr, [B1.2], [B1.3], C) +// CXX11-NOELIDE: 1: C() (CXXConstructExpr, [B1.2], C) // CXX11-NEXT: 2: [B1.1] -// CXX11-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.4], class C) +// CXX11-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.4], C) // CXX11-NEXT: 4: return [B1.3]; -// CXX17: 1: C() (CXXConstructExpr, [B1.2], class C) +// CXX17: 1: C() (CXXConstructExpr, [B1.2], C) // CXX17-NEXT: 2: return [B1.1]; C returnTemporary() { return C(); @@ -355,13 +355,13 @@ // CHECK: C returnTemporaryWithArgument() // CHECK: 1: nullptr -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NullToPointer, class C *) -// CXX11-ELIDE-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.5], [B1.6], class C) -// CXX11-NOELIDE-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.5], class C) -// CXX17-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.5], class C) -// CHECK-NEXT: 4: C([B1.3]) (CXXFunctionalCastExpr, ConstructorConversion, class C) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NullToPointer, C *) +// CXX11-ELIDE-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.5], [B1.6], C) +// CXX11-NOELIDE-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.5], C) +// CXX17-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.5], C) +// CHECK-NEXT: 4: C([B1.3]) (CXXFunctionalCastExpr, ConstructorConversion, C) // CXX11-NEXT: 5: [B1.4] -// CXX11-NEXT: 6: [B1.5] (CXXConstructExpr, [B1.7], class C) +// CXX11-NEXT: 6: [B1.5] (CXXConstructExpr, [B1.7], C) // CXX11-NEXT: 7: return [B1.6]; // CXX17-NEXT: 5: return [B1.4]; @@ -371,11 +371,11 @@ // CHECK: C returnTemporaryConstructedByFunction() // CHECK: 1: C::get -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class C (*)(void)) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, C (*)(void)) // CXX11-ELIDE-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4], [B1.5]) // CXX11-NOELIDE-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4]) // CXX11-NEXT: 4: [B1.3] -// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.6], class C) +// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.6], C) // CXX11-NEXT: 6: return [B1.5]; // CXX17-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4]) // CXX17-NEXT: 4: return [B1.3]; @@ -385,18 +385,18 @@ // CHECK: C returnChainOfCopies() // CHECK: 1: C::get -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class C (*)(void)) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, C (*)(void)) // CXX11-ELIDE-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4], [B1.5]) // CXX11-NOELIDE-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4]) // CXX11-NEXT: 4: [B1.3] -// CXX11-ELIDE-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.7], [B1.8], class C) -// CXX11-NOELIDE-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.7], class C) -// CXX11-NEXT: 6: C([B1.5]) (CXXFunctionalCastExpr, ConstructorConversion, class C) +// CXX11-ELIDE-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.7], [B1.8], C) +// CXX11-NOELIDE-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.7], C) +// CXX11-NEXT: 6: C([B1.5]) (CXXFunctionalCastExpr, ConstructorConversion, C) // CXX11-NEXT: 7: [B1.6] -// CXX11-NEXT: 8: [B1.7] (CXXConstructExpr, [B1.9], class C) +// CXX11-NEXT: 8: [B1.7] (CXXConstructExpr, [B1.9], C) // CXX11-NEXT: 9: return [B1.8]; // CXX17-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.5]) -// CXX17-NEXT: 4: C([B1.3]) (CXXFunctionalCastExpr, NoOp, class C) +// CXX17-NEXT: 4: C([B1.3]) (CXXFunctionalCastExpr, NoOp, C) // CXX17-NEXT: 5: return [B1.4]; C returnChainOfCopies() { return C(C::get()); @@ -412,16 +412,16 @@ ~D(); }; -// CHECK: return_stmt_with_dtor::D returnTemporary() -// CXX11-ELIDE: 1: return_stmt_with_dtor::D() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], class return_stmt_with_dtor::D) -// CXX11-NOELIDE: 1: return_stmt_with_dtor::D() (CXXConstructExpr, [B1.2], [B1.4], class return_stmt_with_dtor::D) +// CHECK: D returnTemporary() +// CXX11-ELIDE: 1: D() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], D) +// CXX11-NOELIDE: 1: D() (CXXConstructExpr, [B1.2], [B1.4], D) // CXX11-NEXT: 2: [B1.1] (BindTemporary) -// CXX11-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const class return_stmt_with_dtor::D) +// CXX11-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const D) // CXX11-NEXT: 4: [B1.3] -// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.7], class return_stmt_with_dtor::D) -// CXX11-NEXT: 6: ~return_stmt_with_dtor::D() (Temporary object destructor) +// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.7], D) +// CXX11-NEXT: 6: ~D() (Temporary object destructor) // CXX11-NEXT: 7: return [B1.5]; -// CXX17: 1: return_stmt_with_dtor::D() (CXXConstructExpr, [B1.3], [B1.2], class return_stmt_w +// CXX17: 1: D() (CXXConstructExpr, [B1.3], [B1.2], D) // CXX17-NEXT: 2: [B1.1] (BindTemporary) // CXX17-NEXT: 3: return [B1.2]; D returnTemporary() { @@ -430,19 +430,19 @@ // CHECK: void returnByValueIntoVariable() // CHECK: 1: returnTemporary -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class return_stmt_with_dtor::D (*)(void)) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, D (*)(void)) // CXX11-ELIDE-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4], [B1.6], [B1.7]) // CXX11-NOELIDE-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4], [B1.6]) // CXX11-NEXT: 4: [B1.3] (BindTemporary) -// CXX11-NEXT: 5: [B1.4] (ImplicitCastExpr, NoOp, const class return_stmt_with_dtor::D) +// CXX11-NEXT: 5: [B1.4] (ImplicitCastExpr, NoOp, const D) // CXX11-NEXT: 6: [B1.5] -// CXX11-NEXT: 7: [B1.6] (CXXConstructExpr, [B1.8], class return_stmt_with_dtor::D) -// CXX11-NEXT: 8: return_stmt_with_dtor::D d = returnTemporary(); -// CXX11-NEXT: 9: ~return_stmt_with_dtor::D() (Temporary object destructor) -// CXX11-NEXT: 10: [B1.8].~return_stmt_with_dtor::D() (Implicit destructor) +// CXX11-NEXT: 7: [B1.6] (CXXConstructExpr, [B1.8], D) +// CXX11-NEXT: 8: D d = returnTemporary(); +// CXX11-NEXT: 9: ~D() (Temporary object destructor) +// CXX11-NEXT: 10: [B1.8].~D() (Implicit destructor) // CXX17-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.5], [B1.4]) // CXX17-NEXT: 4: [B1.3] (BindTemporary) -// CXX17-NEXT: 5: return_stmt_with_dtor::D d = returnTemporary(); +// CXX17-NEXT: 5: D d = returnTemporary(); void returnByValueIntoVariable() { D d = returnTemporary(); } @@ -454,13 +454,13 @@ // TODO: Should provide construction context for the constructor, // even if there is no specific trigger statement here. // CHECK: void simpleTemporary() -// CHECK: 1: C() (CXXConstructExpr, class C) +// CHECK: 1: C() (CXXConstructExpr, C) void simpleTemporary() { C(); } // CHECK: void temporaryInCondition() -// CHECK: 1: C() (CXXConstructExpr, [B2.2], class C) +// CHECK: 1: C() (CXXConstructExpr, [B2.2], C) // CHECK-NEXT: 2: [B2.1] // CHECK-NEXT: 3: [B2.2] (ImplicitCastExpr, NoOp, const class C) // CHECK-NEXT: 4: [B2.3].operator bool @@ -472,10 +472,10 @@ } // CHECK: void temporaryInConditionVariable() -// CXX11-ELIDE: 1: C() (CXXConstructExpr, [B2.2], [B2.3], class C) -// CXX11-NOELIDE: 1: C() (CXXConstructExpr, [B2.2], class C) +// CXX11-ELIDE: 1: C() (CXXConstructExpr, [B2.2], [B2.3], C) +// CXX11-NOELIDE: 1: C() (CXXConstructExpr, [B2.2], C) // CXX11-NEXT: 2: [B2.1] -// CXX11-NEXT: 3: [B2.2] (CXXConstructExpr, [B2.4], class C) +// CXX11-NEXT: 3: [B2.2] (CXXConstructExpr, [B2.4], C) // CXX11-NEXT: 4: C c = C(); // CXX11-NEXT: 5: c // CXX11-NEXT: 6: [B2.5] (ImplicitCastExpr, NoOp, const class C) @@ -483,7 +483,7 @@ // CXX11-NEXT: 8: [B2.6] // CXX11-NEXT: 9: [B2.8] (ImplicitCastExpr, UserDefinedConversion, _Bool) // CXX11-NEXT: T: if [B2.9] -// CXX17: 1: C() (CXXConstructExpr, [B2.2], class C) +// CXX17: 1: C() (CXXConstructExpr, [B2.2], C) // CXX17-NEXT: 2: C c = C(); // CXX17-NEXT: 3: c // CXX17-NEXT: 4: [B2.3] (ImplicitCastExpr, NoOp, const class C) @@ -498,10 +498,10 @@ // CHECK: void temporaryInForLoopConditionVariable() // CHECK: [B2] -// CXX11-ELIDE-NEXT: 1: C() (CXXConstructExpr, [B2.2], [B2.3], class C) -// CXX11-NOELIDE-NEXT: 1: C() (CXXConstructExpr, [B2.2], class C) +// CXX11-ELIDE-NEXT: 1: C() (CXXConstructExpr, [B2.2], [B2.3], C) +// CXX11-NOELIDE-NEXT: 1: C() (CXXConstructExpr, [B2.2], C) // CXX11-NEXT: 2: [B2.1] -// CXX11-NEXT: 3: [B2.2] (CXXConstructExpr, [B2.4], class C) +// CXX11-NEXT: 3: [B2.2] (CXXConstructExpr, [B2.4], C) // CXX11-NEXT: 4: C c2 = C(); // CXX11-NEXT: 5: c2 // CXX11-NEXT: 6: [B2.5] (ImplicitCastExpr, NoOp, const class C) @@ -509,7 +509,7 @@ // CXX11-NEXT: 8: [B2.6] // CXX11-NEXT: 9: [B2.8] (ImplicitCastExpr, UserDefinedConversion, _Bool) // CXX11-NEXT: T: for (...; [B2.9]; ) -// CXX17-NEXT: 1: C() (CXXConstructExpr, [B2.2], class C) +// CXX17-NEXT: 1: C() (CXXConstructExpr, [B2.2], C) // CXX17-NEXT: 2: C c2 = C(); // CXX17-NEXT: 3: c2 // CXX17-NEXT: 4: [B2.3] (ImplicitCastExpr, NoOp, const class C) @@ -518,12 +518,12 @@ // CXX17-NEXT: 7: [B2.6] (ImplicitCastExpr, UserDefinedConversion, _Bool) // CXX17-NEXT: T: for (...; [B2.7]; ) // CHECK: [B3] -// CXX11-ELIDE-NEXT: 1: C() (CXXConstructExpr, [B3.2], [B3.3], class C) -// CXX11-NOELIDE-NEXT: 1: C() (CXXConstructExpr, [B3.2], class C) +// CXX11-ELIDE-NEXT: 1: C() (CXXConstructExpr, [B3.2], [B3.3], C) +// CXX11-NOELIDE-NEXT: 1: C() (CXXConstructExpr, [B3.2], C) // CXX11-NEXT: 2: [B3.1] -// CXX11-NEXT: 3: [B3.2] (CXXConstructExpr, [B3.4], class C) +// CXX11-NEXT: 3: [B3.2] (CXXConstructExpr, [B3.4], C) // CXX11-NEXT: 4: C c1 = C(); -// CXX17-NEXT: 1: C() (CXXConstructExpr, [B3.2], class C) +// CXX17-NEXT: 1: C() (CXXConstructExpr, [B3.2], C) // CXX17-NEXT: 2: C c1 = C(); void temporaryInForLoopConditionVariable() { for (C c1 = C(); C c2 = C(); ); @@ -531,10 +531,10 @@ // CHECK: void temporaryInWhileLoopConditionVariable() -// CXX11-ELIDE: 1: C() (CXXConstructExpr, [B2.2], [B2.3], class C) -// CXX11-NOELIDE: 1: C() (CXXConstructExpr, [B2.2], class C) +// CXX11-ELIDE: 1: C() (CXXConstructExpr, [B2.2], [B2.3], C) +// CXX11-NOELIDE: 1: C() (CXXConstructExpr, [B2.2], C) // CXX11-NEXT: 2: [B2.1] -// CXX11-NEXT: 3: [B2.2] (CXXConstructExpr, [B2.4], class C) +// CXX11-NEXT: 3: [B2.2] (CXXConstructExpr, [B2.4], C) // CXX11-NEXT: 4: C c = C(); // CXX11-NEXT: 5: c // CXX11-NEXT: 6: [B2.5] (ImplicitCastExpr, NoOp, const class C) @@ -542,7 +542,7 @@ // CXX11-NEXT: 8: [B2.6] // CXX11-NEXT: 9: [B2.8] (ImplicitCastExpr, UserDefinedConversion, _Bool) // CXX11-NEXT: T: while [B2.9] -// CXX17: 1: C() (CXXConstructExpr, [B2.2], class C) +// CXX17: 1: C() (CXXConstructExpr, [B2.2], C) // CXX17-NEXT: 2: C c = C(); // CXX17-NEXT: 3: c // CXX17-NEXT: 4: [B2.3] (ImplicitCastExpr, NoOp, const class C) @@ -570,22 +570,22 @@ }; // CHECK: void simpleTemporary() -// CHECK: 1: temporary_object_expr_with_dtors::D() (CXXConstructExpr, [B1.2], class temporary_object_expr_with_dtors::D) +// CHECK: 1: D() (CXXConstructExpr, [B1.2], D) // CHECK-NEXT: 2: [B1.1] (BindTemporary) -// CHECK-NEXT: 3: ~temporary_object_expr_with_dtors::D() (Temporary object destructor) +// CHECK-NEXT: 3: ~D() (Temporary object destructor) void simpleTemporary() { D(); } // CHECK: void temporaryInCondition() -// CHECK: 1: temporary_object_expr_with_dtors::D() (CXXConstructExpr, [B2.2], [B2.3], class temporary_object_expr_with_dtors::D) +// CHECK: 1: D() (CXXConstructExpr, [B2.2], [B2.3], D) // CHECK-NEXT: 2: [B2.1] (BindTemporary) // CHECK-NEXT: 3: [B2.2] // CHECK-NEXT: 4: [B2.3] (ImplicitCastExpr, NoOp, const class temporary_object_expr_with_dtors::D) // CHECK-NEXT: 5: [B2.4].operator bool // CHECK-NEXT: 6: [B2.4] // CHECK-NEXT: 7: [B2.6] (ImplicitCastExpr, UserDefinedConversion, _Bool) -// CHECK-NEXT: 8: ~temporary_object_expr_with_dtors::D() (Temporary object destructor) +// CHECK-NEXT: 8: ~D() (Temporary object destructor) // CHECK-NEXT: T: if [B2.7] void temporaryInCondition() { if (D()); @@ -593,58 +593,58 @@ // CHECK: void referenceVariableWithConstructor() // CHECK: 1: 0 -// CHECK-NEXT: 2: [B1.1] (CXXConstructExpr, [B1.4], const class temporary_object_expr_with_dtors::D) +// CHECK-NEXT: 2: [B1.1] (CXXConstructExpr, [B1.4], const D) // CHECK-NEXT: 3: [B1.2] (BindTemporary) // CHECK-NEXT: 4: [B1.3] -// CHECK-NEXT: 5: const temporary_object_expr_with_dtors::D &d(0); -// CHECK-NEXT: 6: [B1.5].~temporary_object_expr_with_dtors::D() (Implicit destructor) +// CHECK-NEXT: 5: const D &d(0); +// CHECK-NEXT: 6: [B1.5].~D() (Implicit destructor) void referenceVariableWithConstructor() { const D &d(0); } // CHECK: void referenceVariableWithInitializer() -// CHECK: 1: temporary_object_expr_with_dtors::D() (CXXConstructExpr, [B1.4], class temporary_object_expr_with_dtors::D) +// CHECK: 1: D() (CXXConstructExpr, [B1.4], D) // CHECK-NEXT: 2: [B1.1] (BindTemporary) -// CHECK-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const class temporary_object_expr_with_dtors::D) +// CHECK-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const D) // CHECK-NEXT: 4: [B1.3] -// CHECK-NEXT: 5: const temporary_object_expr_with_dtors::D &d = temporary_object_expr_with_dtors::D(); -// CHECK-NEXT: 6: [B1.5].~temporary_object_expr_with_dtors::D() (Implicit destructor) +// CHECK-NEXT: 5: const D &d = D(); +// CHECK-NEXT: 6: [B1.5].~D() (Implicit destructor) void referenceVariableWithInitializer() { const D &d = D(); } // CHECK: void referenceVariableWithTernaryOperator(bool coin) // CXX11: [B1] -// CXX11-NEXT: 1: [B4.4].~temporary_object_expr_with_dtors::D() (Implicit destructor) +// CXX11-NEXT: 1: [B4.4].~D() (Implicit destructor) // CXX11: [B2] -// CXX11-NEXT: 1: ~temporary_object_expr_with_dtors::D() (Temporary object destructor) +// CXX11-NEXT: 1: ~D() (Temporary object destructor) // CXX11: [B3] -// CXX11-NEXT: 1: ~temporary_object_expr_with_dtors::D() (Temporary object destructor) +// CXX11-NEXT: 1: ~D() (Temporary object destructor) // CXX11: [B4] // CXX11-NEXT: 1: [B7.2] ? [B5.8] : [B6.8] -// CXX11-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const class temporary_object_expr_with_dtors::D) +// CXX11-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const D) // CXX11-NEXT: 3: [B4.2] -// CXX11-NEXT: 4: const temporary_object_expr_with_dtors::D &d = coin ? D::get() : temporary_object_expr_with_dtors::D(0); +// CXX11-NEXT: 4: const D &d = coin ? D::get() : D(0); // CXX11-NEXT: T: (Temp Dtor) [B6.3] // CXX11: [B5] // CXX11-NEXT: 1: D::get -// CXX11-NEXT: 2: [B5.1] (ImplicitCastExpr, FunctionToPointerDecay, class temporary_object_expr_with_dtors::D (*)(void)) +// CXX11-NEXT: 2: [B5.1] (ImplicitCastExpr, FunctionToPointerDecay, D (*)(void)) // CXX11-ELIDE-NEXT: 3: [B5.2]() (CXXRecordTypedCall, [B5.4], [B5.6], [B5.7]) // CXX11-NOELIDE-NEXT: 3: [B5.2]() (CXXRecordTypedCall, [B5.4], [B5.6]) // CXX11-NEXT: 4: [B5.3] (BindTemporary) -// CXX11-NEXT: 5: [B5.4] (ImplicitCastExpr, NoOp, const class temporary_object_expr_with_dtors::D) +// CXX11-NEXT: 5: [B5.4] (ImplicitCastExpr, NoOp, const D) // CXX11-NEXT: 6: [B5.5] -// CXX11-NEXT: 7: [B5.6] (CXXConstructExpr, [B4.3], class temporary_object_expr_with_dtors::D) +// CXX11-NEXT: 7: [B5.6] (CXXConstructExpr, [B4.3], D) // CXX11-NEXT: 8: [B5.7] (BindTemporary) // CXX11: [B6] // CXX11-NEXT: 1: 0 -// CXX11-ELIDE-NEXT: 2: [B6.1] (CXXConstructExpr, [B6.3], [B6.6], [B6.7], class temporary_object_expr_with_dtors::D) -// CXX11-NOELIDE-NEXT: 2: [B6.1] (CXXConstructExpr, [B6.3], [B6.6], class temporary_object_expr_with_dtors::D) +// CXX11-ELIDE-NEXT: 2: [B6.1] (CXXConstructExpr, [B6.3], [B6.6], [B6.7], D) +// CXX11-NOELIDE-NEXT: 2: [B6.1] (CXXConstructExpr, [B6.3], [B6.6], D) // CXX11-NEXT: 3: [B6.2] (BindTemporary) -// CXX11-NEXT: 4: temporary_object_expr_with_dtors::D([B6.3]) (CXXFunctionalCastExpr, ConstructorConversion, class temporary_object_expr_with_dtors::D) -// CXX11-NEXT: 5: [B6.4] (ImplicitCastExpr, NoOp, const class temporary_object_expr_with_dtors::D) +// CXX11-NEXT: 4: D([B6.3]) (CXXFunctionalCastExpr, ConstructorConversion, D) +// CXX11-NEXT: 5: [B6.4] (ImplicitCastExpr, NoOp, const D) // CXX11-NEXT: 6: [B6.5] -// CXX11-NEXT: 7: [B6.6] (CXXConstructExpr, [B4.3], class temporary_object_expr_with_dtors::D) +// CXX11-NEXT: 7: [B6.6] (CXXConstructExpr, [B4.3], D) // CXX11-NEXT: 8: [B6.7] (BindTemporary) // CXX11: [B7] // CXX11-NEXT: 1: coin @@ -652,20 +652,20 @@ // CXX11-NEXT: T: [B7.2] ? ... : ... // CXX17: [B1] // CXX17-NEXT: 1: [B4.2] ? [B2.4] : [B3.4] -// CXX17-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const class temporary_object_expr_with_dtors::D) +// CXX17-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const D) // CXX17-NEXT: 3: [B1.2] -// CXX17-NEXT: 4: const temporary_object_expr_with_dtors::D &d = coin ? D::get() : temporary_object_expr_with_dtors::D(0); -// CXX17-NEXT: 5: [B1.4].~temporary_object_expr_with_dtors::D() (Implicit destructor) +// CXX17-NEXT: 4: const D &d = coin ? D::get() : D(0); +// CXX17-NEXT: 5: [B1.4].~D() (Implicit destructor) // CXX17: [B2] // CXX17-NEXT: 1: D::get -// CXX17-NEXT: 2: [B2.1] (ImplicitCastExpr, FunctionToPointerDecay, class temporary_object_expr_with_dtors::D (*)(void)) +// CXX17-NEXT: 2: [B2.1] (ImplicitCastExpr, FunctionToPointerDecay, D (*)(void)) // CXX17-NEXT: 3: [B2.2]() (CXXRecordTypedCall, [B1.3]) // CXX17-NEXT: 4: [B2.3] (BindTemporary) // CXX17: [B3] // CXX17-NEXT: 1: 0 -// CXX17-NEXT: 2: [B3.1] (CXXConstructExpr, [B1.3], class temporary_object_expr_with_dtors::D) +// CXX17-NEXT: 2: [B3.1] (CXXConstructExpr, [B1.3], D) // CXX17-NEXT: 3: [B3.2] (BindTemporary) -// CXX17-NEXT: 4: temporary_object_expr_with_dtors::D([B3.3]) (CXXFunctionalCastExpr, ConstructorConversion, class temporary_object_expr_with_dtors::D) +// CXX17-NEXT: 4: D([B3.3]) (CXXFunctionalCastExpr, ConstructorConversion, D) // CXX17: [B4] // CXX17-NEXT: 1: coin // CXX17-NEXT: 2: [B4.1] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -676,12 +676,12 @@ // CHECK: void referenceWithFunctionalCast() // CHECK: 1: 1 -// CHECK-NEXT: 2: [B1.1] (CXXConstructExpr, [B1.5], class temporary_object_expr_with_dtors::D) +// CHECK-NEXT: 2: [B1.1] (CXXConstructExpr, [B1.5], D) // CHECK-NEXT: 3: [B1.2] (BindTemporary) -// CHECK-NEXT: 4: temporary_object_expr_with_dtors::D([B1.3]) (CXXFunctionalCastExpr, ConstructorCon +// CHECK-NEXT: 4: D([B1.3]) (CXXFunctionalCastExpr, ConstructorCon // CHECK-NEXT: 5: [B1.4] -// CHECK-NEXT: 6: temporary_object_expr_with_dtors::D &&d = temporary_object_expr_with_dtors::D(1); -// CHECK-NEXT: 7: [B1.6].~temporary_object_expr_with_dtors::D() (Implicit destructor) +// CHECK-NEXT: 6: D &&d = D(1); +// CHECK-NEXT: 7: [B1.6].~D() (Implicit destructor) void referenceWithFunctionalCast() { D &&d = D(1); } @@ -689,9 +689,9 @@ // Test the condition constructor, we don't care about branch constructors here. // CHECK: void constructorInTernaryCondition() // CXX11: 1: 1 -// CXX11-NEXT: 2: [B7.1] (CXXConstructExpr, [B7.3], [B7.5], class temporary_object_expr_with_dtors::D) +// CXX11-NEXT: 2: [B7.1] (CXXConstructExpr, [B7.3], [B7.5], D) // CXX11-NEXT: 3: [B7.2] (BindTemporary) -// CXX11-NEXT: 4: temporary_object_expr_with_dtors::D([B7.3]) (CXXFunctionalCastExpr, ConstructorConversion, class temporary_object_expr_with_dtors::D) +// CXX11-NEXT: 4: D([B7.3]) (CXXFunctionalCastExpr, ConstructorConversion, D) // CXX11-NEXT: 5: [B7.4] // CXX11-NEXT: 6: [B7.5] (ImplicitCastExpr, NoOp, const class temporary_object_expr_with_dtors::D) // CXX11-NEXT: 7: [B7.6].operator bool @@ -699,9 +699,9 @@ // CXX11-NEXT: 9: [B7.8] (ImplicitCastExpr, UserDefinedConversion, _Bool) // CXX11-NEXT: T: [B7.9] ? ... : ... // CXX17: 1: 1 -// CXX17-NEXT: 2: [B4.1] (CXXConstructExpr, [B4.3], [B4.5], class temporary_object_expr_with_dtors::D) +// CXX17-NEXT: 2: [B4.1] (CXXConstructExpr, [B4.3], [B4.5], D) // CXX17-NEXT: 3: [B4.2] (BindTemporary) -// CXX17-NEXT: 4: temporary_object_expr_with_dtors::D([B4.3]) (CXXFunctionalCastExpr, ConstructorConversion, class temporary_object_expr_with_dtors::D) +// CXX17-NEXT: 4: D([B4.3]) (CXXFunctionalCastExpr, ConstructorConversion, D) // CXX17-NEXT: 5: [B4.4] // CXX17-NEXT: 6: [B4.5] (ImplicitCastExpr, NoOp, const class temporary_object_expr_with_dtors::D) // CXX17-NEXT: 7: [B4.6].operator bool @@ -726,79 +726,79 @@ }; // CHECK: void implicitConstructionConversionFromTemporary() -// CHECK: 1: implicit_constructor_conversion::A() (CXXConstructExpr, [B1.3], class implicit_constructor_conversion::A) -// CXX11-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const class implicit_constructor_conversion::A) +// CHECK: 1: A() (CXXConstructExpr, [B1.3], A) +// CXX11-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const A) // CXX11-NEXT: 3: [B1.2] -// CXX11-ELIDE-NEXT: 4: [B1.3] (CXXConstructExpr, [B1.6], [B1.8], [B1.9], class implicit_constructor_conversion::B) -// CXX11-NOELIDE-NEXT: 4: [B1.3] (CXXConstructExpr, [B1.6], [B1.8], class implicit_constructor_conversion::B) -// CXX11-NEXT: 5: [B1.4] (ImplicitCastExpr, ConstructorConversion, class implicit_constructor_conversion::B) +// CXX11-ELIDE-NEXT: 4: [B1.3] (CXXConstructExpr, [B1.6], [B1.8], [B1.9], B) +// CXX11-NOELIDE-NEXT: 4: [B1.3] (CXXConstructExpr, [B1.6], [B1.8], B) +// CXX11-NEXT: 5: [B1.4] (ImplicitCastExpr, ConstructorConversion, B) // CXX11-NEXT: 6: [B1.5] (BindTemporary) -// CXX11-NEXT: 7: [B1.6] (ImplicitCastExpr, NoOp, const class implicit_constructor_conversion::B) +// CXX11-NEXT: 7: [B1.6] (ImplicitCastExpr, NoOp, const B) // CXX11-NEXT: 8: [B1.7] -// CXX11-NEXT: 9: [B1.8] (CXXConstructExpr, [B1.10], class implicit_constructor_conversion::B) -// CXX11-NEXT: 10: implicit_constructor_conversion::B b = implicit_constructor_conversion::A(); -// CXX11-NEXT: 11: ~implicit_constructor_conversion::B() (Temporary object destructor) -// CXX11-NEXT: 12: [B1.10].~implicit_constructor_conversion::B() (Implicit destructor) -// CXX17-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const class implicit_constructor_conversion::A) +// CXX11-NEXT: 9: [B1.8] (CXXConstructExpr, [B1.10], B) +// CXX11-NEXT: 10: B b = A(); +// CXX11-NEXT: 11: ~B() (Temporary object destructor) +// CXX11-NEXT: 12: [B1.10].~B() (Implicit destructor) +// CXX17-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const A) // CXX17-NEXT: 3: [B1.2] -// CXX17-NEXT: 4: [B1.3] (CXXConstructExpr, [B1.6], class implicit_constructor_conversion::B) -// CXX17-NEXT: 5: [B1.4] (ImplicitCastExpr, ConstructorConversion, class implicit_constructor_conversion::B) -// CXX17-NEXT: 6: implicit_constructor_conversion::B b = implicit_constructor_conversion::A(); -// CXX17-NEXT: 7: [B1.6].~implicit_constructor_conversion::B() (Implicit destructor) +// CXX17-NEXT: 4: [B1.3] (CXXConstructExpr, [B1.6], B) +// CXX17-NEXT: 5: [B1.4] (ImplicitCastExpr, ConstructorConversion, B) +// CXX17-NEXT: 6: B b = A(); +// CXX17-NEXT: 7: [B1.6].~B() (Implicit destructor) void implicitConstructionConversionFromTemporary() { B b = A(); } // CHECK: void implicitConstructionConversionFromFunctionValue() // CHECK: 1: get -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class implicit_constructor_conversion::A (*)(void)) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, A (*)(void)) // CHECK-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.5]) -// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, NoOp, const class implicit_constructor_conversion::A) +// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 5: [B1.4] -// CXX11-ELIDE-NEXT: 6: [B1.5] (CXXConstructExpr, [B1.8], [B1.10], [B1.11], class implicit_constructor_conversion::B) -// CXX11-NOELIDE-NEXT: 6: [B1.5] (CXXConstructExpr, [B1.8], [B1.10], class implicit_constructor_conversion::B) -// CXX11-NEXT: 7: [B1.6] (ImplicitCastExpr, ConstructorConversion, class implicit_constructor_conversion::B) +// CXX11-ELIDE-NEXT: 6: [B1.5] (CXXConstructExpr, [B1.8], [B1.10], [B1.11], B) +// CXX11-NOELIDE-NEXT: 6: [B1.5] (CXXConstructExpr, [B1.8], [B1.10], B) +// CXX11-NEXT: 7: [B1.6] (ImplicitCastExpr, ConstructorConversion, B) // CXX11-NEXT: 8: [B1.7] (BindTemporary) -// CXX11-NEXT: 9: [B1.8] (ImplicitCastExpr, NoOp, const class implicit_constructor_conversion::B) +// CXX11-NEXT: 9: [B1.8] (ImplicitCastExpr, NoOp, const B) // CXX11-NEXT: 10: [B1.9] -// CXX11-NEXT: 11: [B1.10] (CXXConstructExpr, [B1.12], class implicit_constructor_conversion::B) -// CXX11-NEXT: 12: implicit_constructor_conversion::B b = get(); -// CXX11-NEXT: 13: ~implicit_constructor_conversion::B() (Temporary object destructor) -// CXX11-NEXT: 14: [B1.12].~implicit_constructor_conversion::B() (Implicit destructor) -// CXX17-NEXT: 6: [B1.5] (CXXConstructExpr, [B1.8], class implicit_constructor_conversion::B) -// CXX17-NEXT: 7: [B1.6] (ImplicitCastExpr, ConstructorConversion, class implicit_constructor_conversion::B) -// CXX17-NEXT: 8: implicit_constructor_conversion::B b = get(); -// CXX17-NEXT: 9: [B1.8].~implicit_constructor_conversion::B() (Implicit destructor) +// CXX11-NEXT: 11: [B1.10] (CXXConstructExpr, [B1.12], B) +// CXX11-NEXT: 12: B b = get(); +// CXX11-NEXT: 13: ~B() (Temporary object destructor) +// CXX11-NEXT: 14: [B1.12].~B() (Implicit destructor) +// CXX17-NEXT: 6: [B1.5] (CXXConstructExpr, [B1.8], B) +// CXX17-NEXT: 7: [B1.6] (ImplicitCastExpr, ConstructorConversion, B) +// CXX17-NEXT: 8: B b = get(); +// CXX17-NEXT: 9: [B1.8].~B() (Implicit destructor) void implicitConstructionConversionFromFunctionValue() { B b = get(); } // CHECK: void implicitConstructionConversionFromTemporaryWithLifetimeExtension() -// CHECK: 1: implicit_constructor_conversion::A() (CXXConstructExpr, [B1.3], class implicit_constructor_conversion::A) -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const class implicit_constructor_conversion::A) +// CHECK: 1: A() (CXXConstructExpr, [B1.3], A) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 3: [B1.2] -// CHECK-NEXT: 4: [B1.3] (CXXConstructExpr, [B1.7], class implicit_constructor_conversion::B) -// CHECK-NEXT: 5: [B1.4] (ImplicitCastExpr, ConstructorConversion, class implicit_constructor_conversion::B) -// CHECK-NEXT: 6: [B1.5] (ImplicitCastExpr, NoOp, const class implicit_constructor_conversion::B) +// CHECK-NEXT: 4: [B1.3] (CXXConstructExpr, [B1.7], B) +// CHECK-NEXT: 5: [B1.4] (ImplicitCastExpr, ConstructorConversion, B) +// CHECK-NEXT: 6: [B1.5] (ImplicitCastExpr, NoOp, const B) // CHECK-NEXT: 7: [B1.6] -// CHECK-NEXT: 8: const implicit_constructor_conversion::B &b = implicit_constructor_conversion::A(); -// CHECK-NEXT: 9: [B1.8].~implicit_constructor_conversion::B() (Implicit destructor) +// CHECK-NEXT: 8: const B &b = A(); +// CHECK-NEXT: 9: [B1.8].~B() (Implicit destructor) void implicitConstructionConversionFromTemporaryWithLifetimeExtension() { const B &b = A(); } // CHECK: void implicitConstructionConversionFromFunctionValueWithLifetimeExtension() // CHECK: 1: get -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class implicit_constructor_conver +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, A (*)(void)) // CHECK-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.5]) -// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, NoOp, const class implicit_constructor_conversion::A) +// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 5: [B1.4] -// CHECK-NEXT: 6: [B1.5] (CXXConstructExpr, [B1.9], class implicit_constructor_conversion::B) -// CHECK-NEXT: 7: [B1.6] (ImplicitCastExpr, ConstructorConversion, class implicit_constructor_convers -// CHECK-NEXT: 8: [B1.7] (ImplicitCastExpr, NoOp, const class implicit_constructor_conversion::B) +// CHECK-NEXT: 6: [B1.5] (CXXConstructExpr, [B1.9], B) +// CHECK-NEXT: 7: [B1.6] (ImplicitCastExpr, ConstructorConversion, B) +// CHECK-NEXT: 8: [B1.7] (ImplicitCastExpr, NoOp, const B) // CHECK-NEXT: 9: [B1.8] -// CHECK-NEXT: 10: const implicit_constructor_conversion::B &b = get(); -// CHECK-NEXT: 11: [B1.10].~implicit_constructor_conversion::B() (Implicit destructor) +// CHECK-NEXT: 10: const B &b = get(); +// CHECK-NEXT: 11: [B1.10].~B() (Implicit destructor) void implicitConstructionConversionFromFunctionValueWithLifetimeExtension() { const B &b = get(); // no-crash } @@ -826,13 +826,13 @@ // CHECK: void passArgument() // CHECK: 1: useC -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(class C)) -// CXX11-ELIDE-NEXT: 3: C() (CXXConstructExpr, [B1.4], [B1.5], class C) -// CXX11-NOELIDE-NEXT: 3: C() (CXXConstructExpr, [B1.4], class C) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(C)) +// CXX11-ELIDE-NEXT: 3: C() (CXXConstructExpr, [B1.4], [B1.5], C) +// CXX11-NOELIDE-NEXT: 3: C() (CXXConstructExpr, [B1.4], C) // CXX11-NEXT: 4: [B1.3] -// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.6]+0, class C) +// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.6]+0, C) // CXX11-NEXT: 6: [B1.2]([B1.5]) -// CXX17-NEXT: 3: C() (CXXConstructExpr, [B1.4]+0, class C) +// CXX17-NEXT: 3: C() (CXXConstructExpr, [B1.4]+0, C) // CXX17-NEXT: 4: [B1.2]([B1.3]) void passArgument() { useC(C()); @@ -841,35 +841,35 @@ // CHECK: void passTwoArguments() // CHECK: [B1] // CHECK-NEXT: 1: useCAndD -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(class C, class argument_constructors::D)) -// CXX11-ELIDE-NEXT: 3: C() (CXXConstructExpr, [B1.4], [B1.5], class C) -// CXX11-NOELIDE-NEXT: 3: C() (CXXConstructExpr, [B1.4], class C) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(C, D)) +// CXX11-ELIDE-NEXT: 3: C() (CXXConstructExpr, [B1.4], [B1.5], C) +// CXX11-NOELIDE-NEXT: 3: C() (CXXConstructExpr, [B1.4], C) // CXX11-NEXT: 4: [B1.3] -// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.12]+0, class C) -// CXX11-ELIDE-NEXT: 6: argument_constructors::D() (CXXConstructExpr, [B1.7], [B1.9], [B1.10], class argument_constructors::D) -// CXX11-NOELIDE-NEXT: 6: argument_constructors::D() (CXXConstructExpr, [B1.7], [B1.9], class argument_constructors::D) +// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.12]+0, C) +// CXX11-ELIDE-NEXT: 6: D() (CXXConstructExpr, [B1.7], [B1.9], [B1.10], D) +// CXX11-NOELIDE-NEXT: 6: D() (CXXConstructExpr, [B1.7], [B1.9], D) // CXX11-NEXT: 7: [B1.6] (BindTemporary) -// CXX11-NEXT: 8: [B1.7] (ImplicitCastExpr, NoOp, const class argument_constructors::D) +// CXX11-NEXT: 8: [B1.7] (ImplicitCastExpr, NoOp, const D) // CXX11-NEXT: 9: [B1.8] -// CXX11-NEXT: 10: [B1.9] (CXXConstructExpr, [B1.11], [B1.12]+1, class argument_constructors::D) +// CXX11-NEXT: 10: [B1.9] (CXXConstructExpr, [B1.11], [B1.12]+1, D) // CXX11-NEXT: 11: [B1.10] (BindTemporary) // CXX11-NEXT: 12: [B1.2]([B1.5], [B1.11]) -// CXX11-NEXT: 13: ~argument_constructors::D() (Temporary object destructor) -// CXX11-NEXT: 14: ~argument_constructors::D() (Temporary object destructor) -// CXX17-NEXT: 3: C() (CXXConstructExpr, [B1.6]+0, class C) -// CXX17-NEXT: 4: argument_constructors::D() (CXXConstructExpr, [B1.5], [B1.6]+1, class argument_co +// CXX11-NEXT: 13: ~D() (Temporary object destructor) +// CXX11-NEXT: 14: ~D() (Temporary object destructor) +// CXX17-NEXT: 3: C() (CXXConstructExpr, [B1.6]+0, C) +// CXX17-NEXT: 4: D() (CXXConstructExpr, [B1.5], [B1.6]+1, D) // CXX17-NEXT: 5: [B1.4] (BindTemporary) // CXX17-NEXT: 6: [B1.2]([B1.3], [B1.5]) -// CXX17-NEXT: 7: ~argument_constructors::D() (Temporary object destructor) +// CXX17-NEXT: 7: ~D() (Temporary object destructor) void passTwoArguments() { useCAndD(C(), D()); } // CHECK: void passArgumentByReference() // CHECK: 1: useCByReference -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const class C &)) -// CHECK-NEXT: 3: C() (CXXConstructExpr, [B1.5], class C) -// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, NoOp, const class C) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const C &)) +// CHECK-NEXT: 3: C() (CXXConstructExpr, [B1.5], C) +// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, NoOp, const C) // CHECK-NEXT: 5: [B1.4] // CHECK-NEXT: 6: [B1.2]([B1.5]) void passArgumentByReference() { @@ -878,92 +878,92 @@ // CHECK: void passArgumentWithDestructor() // CHECK: 1: useD -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(class argument_constructors::D)) -// CXX11-ELIDE-NEXT: 3: argument_constructors::D() (CXXConstructExpr, [B1.4], [B1.6], [B1.7], class argument_constructors::D) -// CXX11-NOELIDE-NEXT: 3: argument_constructors::D() (CXXConstructExpr, [B1.4], [B1.6], class argument_constructors::D) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(D)) +// CXX11-ELIDE-NEXT: 3: D() (CXXConstructExpr, [B1.4], [B1.6], [B1.7], D) +// CXX11-NOELIDE-NEXT: 3: D() (CXXConstructExpr, [B1.4], [B1.6], D) // CXX11-NEXT: 4: [B1.3] (BindTemporary) -// CXX11-NEXT: 5: [B1.4] (ImplicitCastExpr, NoOp, const class argument_constructors::D) +// CXX11-NEXT: 5: [B1.4] (ImplicitCastExpr, NoOp, const D) // CXX11-NEXT: 6: [B1.5] -// CXX11-NEXT: 7: [B1.6] (CXXConstructExpr, [B1.8], [B1.9]+0, class argument_constructors::D) +// CXX11-NEXT: 7: [B1.6] (CXXConstructExpr, [B1.8], [B1.9]+0, D) // CXX11-NEXT: 8: [B1.7] (BindTemporary) // CXX11-NEXT: 9: [B1.2]([B1.8]) -// CXX11-NEXT: 10: ~argument_constructors::D() (Temporary object destructor) -// CXX11-NEXT: 11: ~argument_constructors::D() (Temporary object destructor) -// CXX17-NEXT: 3: argument_constructors::D() (CXXConstructExpr, [B1.4], [B1.5]+0, class argument_constructors::D) +// CXX11-NEXT: 10: ~D() (Temporary object destructor) +// CXX11-NEXT: 11: ~D() (Temporary object destructor) +// CXX17-NEXT: 3: D() (CXXConstructExpr, [B1.4], [B1.5]+0, D) // CXX17-NEXT: 4: [B1.3] (BindTemporary) // CXX17-NEXT: 5: [B1.2]([B1.4]) -// CXX17-NEXT: 6: ~argument_constructors::D() (Temporary object destructor) +// CXX17-NEXT: 6: ~D() (Temporary object destructor) void passArgumentWithDestructor() { useD(D()); } // CHECK: void passArgumentWithDestructorByReference() // CHECK: 1: useDByReference -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const class argumen -// CHECK-NEXT: 3: argument_constructors::D() (CXXConstructExpr, [B1.4], [B1.6], class argument_c +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const D &)) +// CHECK-NEXT: 3: D() (CXXConstructExpr, [B1.4], [B1.6], D) // CHECK-NEXT: 4: [B1.3] (BindTemporary) -// CHECK-NEXT: 5: [B1.4] (ImplicitCastExpr, NoOp, const class argument_constructors::D) +// CHECK-NEXT: 5: [B1.4] (ImplicitCastExpr, NoOp, const D) // CHECK-NEXT: 6: [B1.5] // CHECK-NEXT: 7: [B1.2]([B1.6]) -// CHECK-NEXT: 8: ~argument_constructors::D() (Temporary object destructor) +// CHECK-NEXT: 8: ~D() (Temporary object destructor) void passArgumentWithDestructorByReference() { useDByReference(D()); } // CHECK: void passArgumentIntoAnotherConstructor() -// CXX11-ELIDE: 1: argument_constructors::D() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], class argument_constructors::D) -// CXX11-NOELIDE: 1: argument_constructors::D() (CXXConstructExpr, [B1.2], [B1.4], class argument_constructors::D) +// CXX11-ELIDE: 1: D() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], D) +// CXX11-NOELIDE: 1: D() (CXXConstructExpr, [B1.2], [B1.4], D) // CXX11-NEXT: 2: [B1.1] (BindTemporary) -// CXX11-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const class argument_constructors::D) +// CXX11-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const D) // CXX11-NEXT: 4: [B1.3] -// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.6], [B1.7]+0, class argument_constructors::D) +// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.6], [B1.7]+0, D) // CXX11-NEXT: 6: [B1.5] (BindTemporary) -// CXX11-ELIDE-NEXT: 7: [B1.6] (CXXConstructExpr, [B1.9], [B1.10], class argument_constructors::E) -// CXX11-NOELIDE-NEXT: 7: [B1.6] (CXXConstructExpr, [B1.9], class argument_constructors::E) -// CXX11-NEXT: 8: argument_constructors::E([B1.7]) (CXXFunctionalCastExpr, ConstructorConversion, class argument_constructors::E) +// CXX11-ELIDE-NEXT: 7: [B1.6] (CXXConstructExpr, [B1.9], [B1.10], E) +// CXX11-NOELIDE-NEXT: 7: [B1.6] (CXXConstructExpr, [B1.9], E) +// CXX11-NEXT: 8: E([B1.7]) (CXXFunctionalCastExpr, ConstructorConversion, E) // CXX11-NEXT: 9: [B1.8] -// CXX11-NEXT: 10: [B1.9] (CXXConstructExpr, [B1.11], class argument_constructors::E) -// CXX11-NEXT: 11: argument_constructors::E e = argument_constructors::E(argument_constructors::D()); -// CXX11-NEXT: 12: ~argument_constructors::D() (Temporary object destructor) -// CXX11-NEXT: 13: ~argument_constructors::D() (Temporary object destructor) -// CXX17: 1: argument_constructors::D() (CXXConstructExpr, [B1.2], [B1.3]+0, class argument_constructors::D) +// CXX11-NEXT: 10: [B1.9] (CXXConstructExpr, [B1.11], E) +// CXX11-NEXT: 11: E e = E(D()); +// CXX11-NEXT: 12: ~D() (Temporary object destructor) +// CXX11-NEXT: 13: ~D() (Temporary object destructor) +// CXX17: 1: D() (CXXConstructExpr, [B1.2], [B1.3]+0, D) // CXX17-NEXT: 2: [B1.1] (BindTemporary) -// CXX17-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.5], class argument_constructors::E) -// CXX17-NEXT: 4: argument_constructors::E([B1.3]) (CXXFunctionalCastExpr, ConstructorConversion, class argument_constructors::E) -// CXX17-NEXT: 5: argument_constructors::E e = argument_constructors::E(argument_constructors::D()); -// CXX17-NEXT: 6: ~argument_constructors::D() (Temporary object destructor) +// CXX17-NEXT: 3: [B1.2] (CXXConstructExpr, [B1.5], E) +// CXX17-NEXT: 4: E([B1.3]) (CXXFunctionalCastExpr, ConstructorConversion, E) +// CXX17-NEXT: 5: E e = E(D()); +// CXX17-NEXT: 6: ~D() (Temporary object destructor) void passArgumentIntoAnotherConstructor() { E e = E(D()); } // CHECK: void passTwoArgumentsIntoAnotherConstructor() -// CXX11-ELIDE: 1: argument_constructors::D() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], class argument_constructors::D) -// CXX11-NOELIDE: 1: argument_constructors::D() (CXXConstructExpr, [B1.2], [B1.4], class argument_constructors::D) +// CXX11-ELIDE: 1: D() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], D) +// CXX11-NOELIDE: 1: D() (CXXConstructExpr, [B1.2], [B1.4], D) // CXX11-NEXT: 2: [B1.1] (BindTemporary) -// CXX11-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const class argument_constructors::D) +// CXX11-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const D) // CXX11-NEXT: 4: [B1.3] -// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.6], [B1.13]+0, class argument_constructors::D) +// CXX11-NEXT: 5: [B1.4] (CXXConstructExpr, [B1.6], [B1.13]+0, D) // CXX11-NEXT: 6: [B1.5] (BindTemporary) -// CXX11-ELIDE-NEXT: 7: argument_constructors::D() (CXXConstructExpr, [B1.8], [B1.10], [B1.11], class argument_constructors::D) -// CXX11-NOELIDE-NEXT: 7: argument_constructors::D() (CXXConstructExpr, [B1.8], [B1.10], class argument_constructors::D) +// CXX11-ELIDE-NEXT: 7: D() (CXXConstructExpr, [B1.8], [B1.10], [B1.11], D) +// CXX11-NOELIDE-NEXT: 7: D() (CXXConstructExpr, [B1.8], [B1.10], D) // CXX11-NEXT: 8: [B1.7] (BindTemporary) -// CXX11-NEXT: 9: [B1.8] (ImplicitCastExpr, NoOp, const class argument_constructors::D) +// CXX11-NEXT: 9: [B1.8] (ImplicitCastExpr, NoOp, const D) // CXX11-NEXT: 10: [B1.9] -// CXX11-NEXT: 11: [B1.10] (CXXConstructExpr, [B1.12], [B1.13]+1, class argument_constructors::D) +// CXX11-NEXT: 11: [B1.10] (CXXConstructExpr, [B1.12], [B1.13]+1, D) // CXX11-NEXT: 12: [B1.11] (BindTemporary) -// CXX11-NEXT: 13: argument_constructors::E([B1.6], [B1.12]) (CXXConstructExpr, class argument_constructors::E) -// CXX11-NEXT: 14: ~argument_constructors::D() (Temporary object destructor) -// CXX11-NEXT: 15: ~argument_constructors::D() (Temporary object destructor) -// CXX11-NEXT: 16: ~argument_constructors::D() (Temporary object destructor) -// CXX11-NEXT: 17: ~argument_constructors::D() (Temporary object destructor) -// CXX17: 1: argument_constructors::D() (CXXConstructExpr, [B1.2], [B1.5]+0, class argument_constructors::D) +// CXX11-NEXT: 13: E([B1.6], [B1.12]) (CXXConstructExpr, E) +// CXX11-NEXT: 14: ~D() (Temporary object destructor) +// CXX11-NEXT: 15: ~D() (Temporary object destructor) +// CXX11-NEXT: 16: ~D() (Temporary object destructor) +// CXX11-NEXT: 17: ~D() (Temporary object destructor) +// CXX17: 1: D() (CXXConstructExpr, [B1.2], [B1.5]+0, D) // CXX17-NEXT: 2: [B1.1] (BindTemporary) -// CXX17-NEXT: 3: argument_constructors::D() (CXXConstructExpr, [B1.4], [B1.5]+1, class argument_constructors::D) +// CXX17-NEXT: 3: D() (CXXConstructExpr, [B1.4], [B1.5]+1, D) // CXX17-NEXT: 4: [B1.3] (BindTemporary) -// CXX17-NEXT: 5: argument_constructors::E([B1.2], [B1.4]) (CXXConstructExpr, class argument_constructors::E) -// CXX17-NEXT: 6: ~argument_constructors::D() (Temporary object destructor) -// CXX17-NEXT: 7: ~argument_constructors::D() (Temporary object destructor) +// CXX17-NEXT: 5: E([B1.2], [B1.4]) (CXXConstructExpr, E) +// CXX17-NEXT: 6: ~D() (Temporary object destructor) +// CXX17-NEXT: 7: ~D() (Temporary object destructor) void passTwoArgumentsIntoAnotherConstructor() { E(D(), D()); } @@ -978,15 +978,15 @@ // CHECK: void testCopyElisionWhenCopyConstructorHasExtraArguments() // CHECK: [B1] -// CXX11-ELIDE-NEXT: 1: copy_elision_with_extra_arguments::C() (CXXConstructExpr, [B1.3], [B1.5], class copy_elision_with_extra_arguments::C) -// CXX11-NOELIDE-NEXT: 1: copy_elision_with_extra_arguments::C() (CXXConstructExpr, [B1.3], class copy_elision_with_extra_arguments::C) -// CXX11-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const class copy_elision_with_extra_arguments::C) +// CXX11-ELIDE-NEXT: 1: C() (CXXConstructExpr, [B1.3], [B1.5], C) +// CXX11-NOELIDE-NEXT: 1: C() (CXXConstructExpr, [B1.3], C) +// CXX11-NEXT: 2: [B1.1] (ImplicitCastExpr, NoOp, const C) // CXX11-NEXT: 3: [B1.2] // CXX11-NEXT: 4: -// CXX11-NEXT: 5: [B1.3] (CXXConstructExpr, [B1.6], class copy_elision_with_extra_arguments::C) -// CXX11-NEXT: 6: copy_elision_with_extra_arguments::C c = copy_elision_with_extra_arguments::C(); -// CXX17-NEXT: 1: copy_elision_with_extra_arguments::C() (CXXConstructExpr, [B1.2], class copy_elision_with_extra_arguments::C) -// CXX17-NEXT: 2: copy_elision_with_extra_arguments::C c = copy_elision_with_extra_arguments::C(); +// CXX11-NEXT: 5: [B1.3] (CXXConstructExpr, [B1.6], C) +// CXX11-NEXT: 6: C c = C(); +// CXX17-NEXT: 1: C() (CXXConstructExpr, [B1.2], C) +// CXX17-NEXT: 2: C c = C(); void testCopyElisionWhenCopyConstructorHasExtraArguments() { C c = C(); } @@ -1004,20 +1004,20 @@ // CHECK: void testOperators() // CHECK: [B1] // CHECK-NEXT: 1: operator+ -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class operators::C &(*)(class o +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, C &(*)(C)) // CHECK-NEXT: 3: 1 -// CHECK-NEXT: 4: [B1.3] (CXXConstructExpr, [B1.6], class operators::C) -// CHECK-NEXT: 5: operators::C([B1.4]) (CXXFunctionalCastExpr, ConstructorConversion, class operato +// CHECK-NEXT: 4: [B1.3] (CXXConstructExpr, [B1.6], C) +// CHECK-NEXT: 5: C([B1.4]) (CXXFunctionalCastExpr, ConstructorConversion, C) // CHECK-NEXT: 6: [B1.5] // CHECK-NEXT: 7: 2 -// CXX11-ELIDE-NEXT: 8: [B1.7] (CXXConstructExpr, [B1.10], [B1.11], class operators::C) -// CXX11-NOELIDE-NEXT: 8: [B1.7] (CXXConstructExpr, [B1.10], class operators::C) -// CXX11-NEXT: 9: operators::C([B1.8]) (CXXFunctionalCastExpr, ConstructorConversion, class operato +// CXX11-ELIDE-NEXT: 8: [B1.7] (CXXConstructExpr, [B1.10], [B1.11], C) +// CXX11-NOELIDE-NEXT: 8: [B1.7] (CXXConstructExpr, [B1.10], C) +// CXX11-NEXT: 9: C([B1.8]) (CXXFunctionalCastExpr, ConstructorConversion, C) // CXX11-NEXT: 10: [B1.9] -// CXX11-NEXT: 11: [B1.10] (CXXConstructExpr, [B1.12]+1, class operators::C) +// CXX11-NEXT: 11: [B1.10] (CXXConstructExpr, [B1.12]+1, C) // CXX11-NEXT: 12: [B1.6] + [B1.11] (OperatorCall) -// CXX17-NEXT: 8: [B1.7] (CXXConstructExpr, [B1.10]+1, class operators::C) -// CXX17-NEXT: 9: operators::C([B1.8]) (CXXFunctionalCastExpr, ConstructorConversion, class operato +// CXX17-NEXT: 8: [B1.7] (CXXConstructExpr, [B1.10]+1, C) +// CXX17-NEXT: 9: C([B1.8]) (CXXFunctionalCastExpr, ConstructorConversion, C) // CXX17-NEXT: 10: [B1.6] + [B1.9] (OperatorCall) void testOperators() { C(1) + C(2); @@ -1042,15 +1042,15 @@ // CHECK: void testTransparentInitListExprs() // CHECK: [B1] // CHECK-NEXT: 1: getC -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class transparent_init_list_exprs::C (*)(void)) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, C (*)(void)) // CXX11-ELIDE-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4], [B1.5]) // CXX11-NOELIDE-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.4]) // CXX11-NEXT: 4: [B1.3] -// CXX11-NEXT: 5: {[B1.4]} (CXXConstructExpr, [B1.6], class transparent_init_list_exprs::C) -// CXX11-NEXT: 6: transparent_init_list_exprs::C c{getC()}; +// CXX11-NEXT: 5: {[B1.4]} (CXXConstructExpr, [B1.6], C) +// CXX11-NEXT: 6: C c{getC()}; // CXX17-NEXT: 3: [B1.2]() (CXXRecordTypedCall, [B1.5]) // CXX17-NEXT: 4: {[B1.3]} -// CXX17-NEXT: 5: transparent_init_list_exprs::C c{getC()}; +// CXX17-NEXT: 5: C c{getC()}; namespace transparent_init_list_exprs { class C {}; C getC(); diff --git a/clang/test/Analysis/cfg-rich-constructors.mm b/clang/test/Analysis/cfg-rich-constructors.mm --- a/clang/test/Analysis/cfg-rich-constructors.mm +++ b/clang/test/Analysis/cfg-rich-constructors.mm @@ -21,18 +21,18 @@ // CHECK: void passArgumentIntoMessage(E *e) // CHECK: 1: e // CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, LValueToRValue, E *) -// CXX11-ELIDE-NEXT: 3: D() (CXXConstructExpr, [B1.4], [B1.6], [B1.7], class D) -// CXX11-NOELIDE-NEXT: 3: D() (CXXConstructExpr, [B1.4], [B1.6], class D) +// CXX11-ELIDE-NEXT: 3: D() (CXXConstructExpr, [B1.4], [B1.6], [B1.7], D) +// CXX11-NOELIDE-NEXT: 3: D() (CXXConstructExpr, [B1.4], [B1.6], D) // CXX11-NEXT: 4: [B1.3] (BindTemporary) -// CXX11-NEXT: 5: [B1.4] (ImplicitCastExpr, NoOp, const class D) +// CXX11-NEXT: 5: [B1.4] (ImplicitCastExpr, NoOp, const D) // CXX11-NEXT: 6: [B1.5] -// CXX11-NEXT: 7: [B1.6] (CXXConstructExpr, [B1.8], [B1.9]+0, class D) +// CXX11-NEXT: 7: [B1.6] (CXXConstructExpr, [B1.8], [B1.9]+0, D) // CXX11-NEXT: 8: [B1.7] (BindTemporary) // Double brackets trigger FileCheck variables, escape. // CXX11-NEXT: 9: {{\[}}[B1.2] foo:[B1.8]] // CXX11-NEXT: 10: ~D() (Temporary object destructor) // CXX11-NEXT: 11: ~D() (Temporary object destructor) -// CXX17-NEXT: 3: D() (CXXConstructExpr, [B1.4], [B1.5]+0, class D) +// CXX17-NEXT: 3: D() (CXXConstructExpr, [B1.4], [B1.5]+0, D) // CXX17-NEXT: 4: [B1.3] (BindTemporary) // Double brackets trigger FileCheck variables, escape. // CXX17-NEXT: 5: {{\[}}[B1.2] foo:[B1.4]] @@ -49,9 +49,9 @@ // CXX11-ELIDE-NEXT: 3: {{\[}}[B1.2] bar] (CXXRecordTypedCall, [B1.4], [B1.6], [B1.7]) // CXX11-NOELIDE-NEXT: 3: {{\[}}[B1.2] bar] (CXXRecordTypedCall, [B1.4], [B1.6]) // CXX11-NEXT: 4: [B1.3] (BindTemporary) -// CXX11-NEXT: 5: [B1.4] (ImplicitCastExpr, NoOp, const class D) +// CXX11-NEXT: 5: [B1.4] (ImplicitCastExpr, NoOp, const D) // CXX11-NEXT: 6: [B1.5] -// CXX11-NEXT: 7: [B1.6] (CXXConstructExpr, [B1.8], class D) +// CXX11-NEXT: 7: [B1.6] (CXXConstructExpr, [B1.8], D) // CXX11-NEXT: 8: D d = [e bar]; // CXX11-NEXT: 9: ~D() (Temporary object destructor) // CXX11-NEXT: 10: [B1.8].~D() (Implicit destructor) diff --git a/clang/test/Analysis/cfg.cpp b/clang/test/Analysis/cfg.cpp --- a/clang/test/Analysis/cfg.cpp +++ b/clang/test/Analysis/cfg.cpp @@ -53,7 +53,7 @@ // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] // CHECK-NEXT: 1: e -// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, LValueToRValue, enum EmptyE) +// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, LValueToRValue, EmptyE) // CHECK-NEXT: 3: [B1.2] (ImplicitCastExpr, IntegralCast, int) // CHECK-NEXT: T: switch [B1.3] // CHECK-NEXT: Preds (1): B2 @@ -93,12 +93,12 @@ // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] // CHECK-NEXT: 1: CFGNewAllocator(A *) -// WARNINGS-NEXT: 2: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 2: (CXXConstructExpr, [B1.3], class A) +// WARNINGS-NEXT: 2: (CXXConstructExpr, A) +// ANALYZER-NEXT: 2: (CXXConstructExpr, [B1.3], A) // CHECK-NEXT: 3: new A([B1.2]) // CHECK-NEXT: 4: A *a = new A(); // CHECK-NEXT: 5: a -// CHECK-NEXT: 6: [B1.5] (ImplicitCastExpr, LValueToRValue, class A *) +// CHECK-NEXT: 6: [B1.5] (ImplicitCastExpr, LValueToRValue, A *) // CHECK-NEXT: 7: [B1.6]->~A() (Implicit destructor) // CHECK-NEXT: 8: delete [B1.6] // CHECK-NEXT: Preds (1): B2 @@ -116,12 +116,12 @@ // CHECK: [B1] // CHECK-NEXT: 1: 5 // CHECK-NEXT: 2: CFGNewAllocator(A *) -// WARNINGS-NEXT: 3: (CXXConstructExpr, class A[5]) -// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], class A[5]) +// WARNINGS-NEXT: 3: (CXXConstructExpr, A[5]) +// ANALYZER-NEXT: 3: (CXXConstructExpr, [B1.4], A[5]) // CHECK-NEXT: 4: new A {{\[\[}}B1.1]] // CHECK-NEXT: 5: A *a = new A [5]; // CHECK-NEXT: 6: a -// CHECK-NEXT: 7: [B1.6] (ImplicitCastExpr, LValueToRValue, class A *) +// CHECK-NEXT: 7: [B1.6] (ImplicitCastExpr, LValueToRValue, A *) // CHECK-NEXT: 8: [B1.7]->~A() (Implicit destructor) // CHECK-NEXT: 9: delete [] [B1.7] // CHECK-NEXT: Preds (1): B2 @@ -148,7 +148,7 @@ // CHECK-LABEL: int test1(int *x) // CHECK: 1: 1 // CHECK-NEXT: 2: return -// CHECK-NEXT: ~NoReturnSingleSuccessor::B() (Implicit destructor) +// CHECK-NEXT: ~B() (Implicit destructor) // CHECK-NEXT: Preds (1) // CHECK-NEXT: Succs (1): B0 int test1(int *x) { @@ -309,8 +309,8 @@ // CHECK-NEXT: 3: [B1.2] (ImplicitCastExpr, ArrayToPointerDecay, int *) // CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, BitCast, void *) // CHECK-NEXT: 5: CFGNewAllocator(MyClass *) -// WARNINGS-NEXT: 6: (CXXConstructExpr, class MyClass) -// ANALYZER-NEXT: 6: (CXXConstructExpr, [B1.7], class MyClass) +// WARNINGS-NEXT: 6: (CXXConstructExpr, MyClass) +// ANALYZER-NEXT: 6: (CXXConstructExpr, [B1.7], MyClass) // CHECK-NEXT: 7: new ([B1.4]) MyClass([B1.6]) // CHECK-NEXT: 8: MyClass *obj = new (buffer) MyClass(); // CHECK-NEXT: Preds (1): B2 @@ -342,8 +342,8 @@ // CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, BitCast, void *) // CHECK-NEXT: 5: 5 // CHECK-NEXT: 6: CFGNewAllocator(MyClass *) -// WARNINGS-NEXT: 7: (CXXConstructExpr, class MyClass[5]) -// ANALYZER-NEXT: 7: (CXXConstructExpr, [B1.8], class MyClass[5]) +// WARNINGS-NEXT: 7: (CXXConstructExpr, MyClass[5]) +// ANALYZER-NEXT: 7: (CXXConstructExpr, [B1.8], MyClass[5]) // CHECK-NEXT: 8: new ([B1.4]) MyClass {{\[\[}}B1.5]] // CHECK-NEXT: 9: MyClass *obj = new (buffer) MyClass [5]; // CHECK-NEXT: Preds (1): B2 @@ -418,10 +418,10 @@ // CHECK: [B2 (ENTRY)] // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] -// WARNINGS-NEXT: 1: (CXXConstructExpr, struct pr37688_deleted_union_destructor::A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], struct pr37688_deleted_union_destructor::A) -// CHECK-NEXT: 2: pr37688_deleted_union_destructor::A a; -// CHECK-NEXT: 3: [B1.2].~pr37688_deleted_union_destructor::A() (Implicit destructor) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, [B1.2], A) +// CHECK-NEXT: 2: A a; +// CHECK-NEXT: 3: [B1.2].~A() (Implicit destructor) // CHECK-NEXT: Preds (1): B2 // CHECK-NEXT: Succs (1): B0 // CHECK: [B0 (EXIT)] @@ -577,13 +577,13 @@ // CHECK-LABEL: void CommaTemp::f() // CHECK: [B1] -// CHECK-NEXT: 1: CommaTemp::A() (CXXConstructExpr, +// CHECK-NEXT: 1: A() (CXXConstructExpr, // CHECK-NEXT: 2: [B1.1] (BindTemporary) -// CHECK-NEXT: 3: CommaTemp::B() (CXXConstructExpr, +// CHECK-NEXT: 3: B() (CXXConstructExpr, // CHECK-NEXT: 4: [B1.3] (BindTemporary) // CHECK-NEXT: 5: ... , [B1.4] -// CHECK-NEXT: 6: ~CommaTemp::B() (Temporary object destructor) -// CHECK-NEXT: 7: ~CommaTemp::A() (Temporary object destructor) +// CHECK-NEXT: 6: ~B() (Temporary object destructor) +// CHECK-NEXT: 7: ~A() (Temporary object destructor) namespace CommaTemp { struct A { ~A(); }; struct B { ~B(); }; diff --git a/clang/test/Analysis/copy-elision.cpp b/clang/test/Analysis/copy-elision.cpp --- a/clang/test/Analysis/copy-elision.cpp +++ b/clang/test/Analysis/copy-elision.cpp @@ -156,19 +156,19 @@ ClassWithoutDestructor make1(AddressVector &v) { return ClassWithoutDestructor(v); // no-elide-warning@-1 {{Address of stack memory associated with temporary \ -object of type 'address_vector_tests::ClassWithoutDestructor' is still \ +object of type 'ClassWithoutDestructor' is still \ referred to by the stack variable 'v' upon returning to the caller}} } ClassWithoutDestructor make2(AddressVector &v) { return make1(v); // no-elide-warning@-1 {{Address of stack memory associated with temporary \ -object of type 'address_vector_tests::ClassWithoutDestructor' is still \ +object of type 'ClassWithoutDestructor' is still \ referred to by the stack variable 'v' upon returning to the caller}} } ClassWithoutDestructor make3(AddressVector &v) { return make2(v); // no-elide-warning@-1 {{Address of stack memory associated with temporary \ -object of type 'address_vector_tests::ClassWithoutDestructor' is still \ +object of type 'ClassWithoutDestructor' is still \ referred to by the stack variable 'v' upon returning to the caller}} } @@ -265,7 +265,7 @@ TestCtorInitializer(AddressVector &v) : c(ClassWithDestructor(v)) {} // no-elide-warning@-1 {{Address of stack memory associated with temporary \ -object of type 'address_vector_tests::ClassWithDestructor' is still referred \ +object of type 'ClassWithDestructor' is still referred \ to by the stack variable 'v' upon returning to the caller}} }; @@ -301,19 +301,19 @@ ClassWithDestructor make1(AddressVector &v) { return ClassWithDestructor(v); // no-elide-warning@-1 {{Address of stack memory associated with temporary \ -object of type 'address_vector_tests::ClassWithDestructor' is still referred \ +object of type 'ClassWithDestructor' is still referred \ to by the stack variable 'v' upon returning to the caller}} } ClassWithDestructor make2(AddressVector &v) { return make1(v); // no-elide-warning@-1 {{Address of stack memory associated with temporary \ -object of type 'address_vector_tests::ClassWithDestructor' is still referred \ +object of type 'ClassWithDestructor' is still referred \ to by the stack variable 'v' upon returning to the caller}} } ClassWithDestructor make3(AddressVector &v) { return make2(v); // no-elide-warning@-1 {{Address of stack memory associated with temporary \ -object of type 'address_vector_tests::ClassWithDestructor' is still referred \ +object of type 'ClassWithDestructor' is still referred \ to by the stack variable 'v' upon returning to the caller}} } @@ -406,7 +406,7 @@ Foo make1(Foo **r) { return Foo(r); // no-elide-warning@-1 {{Address of stack memory associated with temporary \ -object of type 'address_vector_tests::Foo' is still referred to by the stack \ +object of type 'Foo' is still referred to by the stack \ variable 'z' upon returning to the caller}} } diff --git a/clang/test/Analysis/cxx-uninitialized-object-inheritance.cpp b/clang/test/Analysis/cxx-uninitialized-object-inheritance.cpp --- a/clang/test/Analysis/cxx-uninitialized-object-inheritance.cpp +++ b/clang/test/Analysis/cxx-uninitialized-object-inheritance.cpp @@ -783,7 +783,7 @@ struct DynTBase1 {}; struct DynTDerived1 : DynTBase1 { - int y; // expected-note{{uninitialized field 'static_cast(this->bptr)->y'}} + int y; // expected-note{{uninitialized field 'static_cast(this->bptr)->y'}} }; struct DynamicTypeTest1 { @@ -799,10 +799,10 @@ }; struct DynTBase2 { - int x; // expected-note{{uninitialized field 'static_cast(this->bptr)->DynTBase2::x'}} + int x; // expected-note{{uninitialized field 'static_cast(this->bptr)->DynTBase2::x'}} }; struct DynTDerived2 : DynTBase2 { - int y; // expected-note{{uninitialized field 'static_cast(this->bptr)->y'}} + int y; // expected-note{{uninitialized field 'static_cast(this->bptr)->y'}} }; struct DynamicTypeTest2 { diff --git a/clang/test/Analysis/dump_egraph.cpp b/clang/test/Analysis/dump_egraph.cpp --- a/clang/test/Analysis/dump_egraph.cpp +++ b/clang/test/Analysis/dump_egraph.cpp @@ -24,5 +24,5 @@ // CHECK: \"cluster\": \"t\", \"pointer\": \"{{0x[0-9a-f]+}}\", \"items\": [\l        \{ \"kind\": \"Default\", \"offset\": 0, \"value\": \"conj_$2\{int, LC5, no stmt, #1\}\" -// CHECK: \"dynamic_types\": [\l      \{ \"region\": \"HeapSymRegion\{conj_$1\{struct S *, LC1, S{{[0-9]+}}, #1\}\}\", \"dyn_type\": \"struct S\", \"sub_classable\": false \}\l +// CHECK: \"dynamic_types\": [\l      \{ \"region\": \"HeapSymRegion\{conj_$1\{S *, LC1, S{{[0-9]+}}, #1\}\}\", \"dyn_type\": \"S\", \"sub_classable\": false \}\l diff --git a/clang/test/Analysis/exploded-graph-rewriter/dynamic_types.cpp b/clang/test/Analysis/exploded-graph-rewriter/dynamic_types.cpp --- a/clang/test/Analysis/exploded-graph-rewriter/dynamic_types.cpp +++ b/clang/test/Analysis/exploded-graph-rewriter/dynamic_types.cpp @@ -10,9 +10,9 @@ void test() { // CHECK: Dynamic Types: // CHECK-SAME: - // CHECK-SAME: - // CHECK-SAME: + // CHECK-SAME: // CHECK-SAME:
HeapSymRegion\{conj_$1\{struct S *, LC1, + // CHECK-SAME: HeapSymRegion\{conj_$1\{S *, LC1, // CHECK-SAME: S{{[0-9]*}}, #1\}\}struct SS
new S; } diff --git a/clang/test/Analysis/initializers-cfg-output.cpp b/clang/test/Analysis/initializers-cfg-output.cpp --- a/clang/test/Analysis/initializers-cfg-output.cpp +++ b/clang/test/Analysis/initializers-cfg-output.cpp @@ -33,8 +33,8 @@ // CHECK: [B3 (ENTRY)] // CHECK-NEXT: Succs (1): B2 // CHECK: [B1] - // WARNINGS-NEXT: 1: (CXXConstructExpr, class A) - // ANALYZER-NEXT: 1: (CXXConstructExpr, A() (Base initializer), class A) + // WARNINGS-NEXT: 1: (CXXConstructExpr, A) + // ANALYZER-NEXT: 1: (CXXConstructExpr, A() (Base initializer), A) // CHECK-NEXT: 2: A([B1.1]) (Base initializer) // CHECK-NEXT: Preds (1): B2 // CHECK-NEXT: Succs (1): B0 @@ -52,8 +52,8 @@ // CHECK: [B1] // CHECK-NEXT: 1: i // CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, LValueToRValue, int) - // WARNINGS-NEXT: 3: [B1.2] (CXXConstructExpr, class A) - // ANALYZER-NEXT: 3: [B1.2] (CXXConstructExpr, A([B1.2]) (Base initializer), class A) + // WARNINGS-NEXT: 3: [B1.2] (CXXConstructExpr, A) + // ANALYZER-NEXT: 3: [B1.2] (CXXConstructExpr, A([B1.2]) (Base initializer), A) // CHECK-NEXT: 4: A([B1.3]) (Base initializer) // CHECK-NEXT: Preds (1): B2 // CHECK-NEXT: Succs (1): B0 @@ -72,8 +72,8 @@ // CHECK: [B3 (ENTRY)] // CHECK-NEXT: Succs (1): B2 // CHECK: [B1] - // WARNINGS-NEXT: 1: (CXXConstructExpr, class A) - // ANALYZER-NEXT: 1: (CXXConstructExpr, A() (Base initializer), class A) + // WARNINGS-NEXT: 1: (CXXConstructExpr, A) + // ANALYZER-NEXT: 1: (CXXConstructExpr, A() (Base initializer), A) // CHECK-NEXT: 2: A([B1.1]) (Base initializer) // CHECK-NEXT: Preds (1): B2 // CHECK-NEXT: Succs (1): B0 @@ -91,8 +91,8 @@ // CHECK: [B1] // CHECK-NEXT: 1: i // CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, LValueToRValue, int) - // WARNINGS-NEXT: 3: [B1.2] (CXXConstructExpr, class A) - // ANALYZER-NEXT: 3: [B1.2] (CXXConstructExpr, A([B1.2]) (Base initializer), class A) + // WARNINGS-NEXT: 3: [B1.2] (CXXConstructExpr, A) + // ANALYZER-NEXT: 3: [B1.2] (CXXConstructExpr, A([B1.2]) (Base initializer), A) // CHECK-NEXT: 4: A([B1.3]) (Base initializer) // CHECK-NEXT: Preds (1): B2 // CHECK-NEXT: Succs (1): B0 @@ -117,27 +117,27 @@ // CHECK: [B4 (ENTRY)] // CHECK-NEXT: Succs (1): B3 // CHECK: [B1] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class C) -// ANALYZER-NEXT: 1: (CXXConstructExpr, C() (Base initializer), class C) +// WARNINGS-NEXT: 1: (CXXConstructExpr, C) +// ANALYZER-NEXT: 1: (CXXConstructExpr, C() (Base initializer), C) // CHECK-NEXT: 2: C([B1.1]) (Base initializer) -// WARNINGS-NEXT: 3: (CXXConstructExpr, class B) -// ANALYZER-NEXT: 3: (CXXConstructExpr, B() (Base initializer), class B) +// WARNINGS-NEXT: 3: (CXXConstructExpr, B) +// ANALYZER-NEXT: 3: (CXXConstructExpr, B() (Base initializer), B) // CHECK-NEXT: 4: B([B1.3]) (Base initializer) -// WARNINGS-NEXT: 5: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 5: (CXXConstructExpr, A() (Base initializer), class A) +// WARNINGS-NEXT: 5: (CXXConstructExpr, A) +// ANALYZER-NEXT: 5: (CXXConstructExpr, A() (Base initializer), A) // CHECK-NEXT: 6: A([B1.5]) (Base initializer) // CHECK-NEXT: 7: i(/*implicit*/(int)0) (Member initializer) // CHECK-NEXT: 8: this // CHECK-NEXT: 9: [B1.8]->i // CHECK-NEXT: 10: r([B1.9]) (Member initializer) -// WARNINGS-NEXT: 11: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 11: (CXXConstructExpr, [B1.12], class A) +// WARNINGS-NEXT: 11: (CXXConstructExpr, A) +// ANALYZER-NEXT: 11: (CXXConstructExpr, [B1.12], A) // CHECK-NEXT: 12: A a; // CHECK-NEXT: Preds (2): B2 B3 // CHECK-NEXT: Succs (1): B0 // CHECK: [B2] -// WARNINGS-NEXT: 1: (CXXConstructExpr, class A) -// ANALYZER-NEXT: 1: (CXXConstructExpr, A() (Base initializer), class A) +// WARNINGS-NEXT: 1: (CXXConstructExpr, A) +// ANALYZER-NEXT: 1: (CXXConstructExpr, A() (Base initializer), A) // CHECK-NEXT: 2: A([B2.1]) (Base initializer) // CHECK-NEXT: Preds (1): B3 // CHECK-NEXT: Succs (1): B1 @@ -244,8 +244,8 @@ // CHECK-NEXT: Succs (1): B9 // CHECK: [B1] // CHECK-NEXT: 1: [B4.2] ? [B2.1] : [B3.1] -// WARNINGS-NEXT: 2: [B1.1] (CXXConstructExpr, class A) -// ANALYZER-NEXT: 2: [B1.1] (CXXConstructExpr, a([B1.1]) (Member initializer), class A) +// WARNINGS-NEXT: 2: [B1.1] (CXXConstructExpr, A) +// ANALYZER-NEXT: 2: [B1.1] (CXXConstructExpr, a([B1.1]) (Member initializer), A) // CHECK-NEXT: 3: a([B1.2]) (Member initializer) // CHECK-NEXT: Preds (2): B2 B3 // CHECK-NEXT: Succs (1): B0 @@ -265,8 +265,8 @@ // CHECK-NEXT: Succs (2): B2 B3 // CHECK: [B5] // CHECK-NEXT: 1: [B8.2] ? [B6.1] : [B7.1] -// WARNINGS-NEXT: 2: [B5.1] (CXXConstructExpr, class A) -// ANALYZER-NEXT: 2: [B5.1] (CXXConstructExpr, A([B5.1]) (Base initializer), class A) +// WARNINGS-NEXT: 2: [B5.1] (CXXConstructExpr, A) +// ANALYZER-NEXT: 2: [B5.1] (CXXConstructExpr, A([B5.1]) (Base initializer), A) // CHECK-NEXT: 3: A([B5.2]) (Base initializer) // CHECK-NEXT: Preds (2): B6 B7 // CHECK-NEXT: Succs (1): B4 diff --git a/clang/test/Analysis/inlining/Inputs/expected-plists/path-notes.cpp.plist b/clang/test/Analysis/inlining/Inputs/expected-plists/path-notes.cpp.plist --- a/clang/test/Analysis/inlining/Inputs/expected-plists/path-notes.cpp.plist +++ b/clang/test/Analysis/inlining/Inputs/expected-plists/path-notes.cpp.plist @@ -1384,7 +1384,7 @@ typeDereference of null pointer check_namecore.NullDereference - issue_hash_content_of_line_in_context675157873c1414a885eb1f429b26f389 + issue_hash_content_of_line_in_context9261b182b35fa6b6f1d0c750c41f4933 issue_hash_function_offset1 location @@ -1714,7 +1714,7 @@ typeDereference of null pointer check_namecore.NullDereference - issue_hash_content_of_line_in_contextaff5e83726a1ce1144580e4c80bde47c + issue_hash_content_of_line_in_contexta073d3adfe741b2e3d871c7442446e3b issue_hash_function_offset1 location @@ -2046,7 +2046,7 @@ typeDereference of null pointer check_namecore.NullDereference - issue_hash_content_of_line_in_context9484c73e190dfe4b8c6c5bdfad9700c1 + issue_hash_content_of_line_in_context37a2ac98868b90fdc54ac673daab004f issue_context_kindC++ method issue_contextoperator= issue_hash_function_offset1 @@ -2381,7 +2381,7 @@ typeDereference of null pointer check_namecore.NullDereference - issue_hash_content_of_line_in_contexta0f0ac76cf282b61236bfac7eb2eca62 + issue_hash_content_of_line_in_context350efb59f475dca2427e8ac4c72f33f1 issue_context_kindC++ method issue_contextoperator= issue_hash_function_offset1 @@ -4188,7 +4188,7 @@ typeDereference of null pointer check_namecore.NullDereference - issue_hash_content_of_line_in_context749bda64658e48896477213e90176f5e + issue_hash_content_of_line_in_context59af00b5ddf4849d000d583bb5722c8a issue_context_kindfunction issue_contexttest issue_hash_function_offset2 @@ -4750,7 +4750,7 @@ typeCalled C++ object pointer is null check_namecore.CallAndMessage - issue_hash_content_of_line_in_context8b577b362ffa5a7290d00d03635c1fca + issue_hash_content_of_line_in_contextf5a1486363a2814a8268d71daf54a2f8 issue_context_kindfunction issue_contexttestDeclRefExprToReferenceInGetDerefExpr issue_hash_function_offset8 diff --git a/clang/test/Analysis/lambdas.cpp b/clang/test/Analysis/lambdas.cpp --- a/clang/test/Analysis/lambdas.cpp +++ b/clang/test/Analysis/lambdas.cpp @@ -399,8 +399,8 @@ // CHECK: Succs (1): B1 // CHECK: [B1] // CHECK: 1: x -// CHECK: 2: [B1.1] (ImplicitCastExpr, NoOp, const struct X) -// CHECK: 3: [B1.2] (CXXConstructExpr, struct X) +// CHECK: 2: [B1.1] (ImplicitCastExpr, NoOp, const X) +// CHECK: 3: [B1.2] (CXXConstructExpr, X) // CHECK: 4: [x] { // CHECK: } // CHECK: 5: (void)[B1.4] (CStyleCastExpr, ToVoid, void) 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 @@ -58,14 +58,14 @@ // CHECK: [B2 (ENTRY)] // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: 3: a -// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 5: const A &b = a; -// CHECK-NEXT: 6: A() (CXXConstructExpr, class A) +// CHECK-NEXT: 6: A() (CXXConstructExpr, A) // CHECK-NEXT: 7: [B1.6] (BindTemporary) -// CHECK-NEXT: 8: [B1.7] (ImplicitCastExpr, NoOp, const class A) +// CHECK-NEXT: 8: [B1.7] (ImplicitCastExpr, NoOp, const A) // CHECK-NEXT: 9: [B1.8] // CHECK-NEXT: 10: const A &c = A(); // CHECK-NEXT: 11: [B1.10] (Lifetime ends) @@ -84,9 +84,9 @@ // CHECK: [B2 (ENTRY)] // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] -// CHECK-NEXT: 1: (CXXConstructExpr, class A[2]) +// CHECK-NEXT: 1: (CXXConstructExpr, A[2]) // CHECK-NEXT: 2: A a[2]; -// CHECK-NEXT: 3: (CXXConstructExpr, class A[0]) +// CHECK-NEXT: 3: (CXXConstructExpr, A[0]) // CHECK-NEXT: 4: A b[0]; // lifetime of a ends when its destructors are run // CHECK-NEXT: 5: [B1.2] (Lifetime ends) @@ -104,15 +104,15 @@ // CHECK: [B2 (ENTRY)] // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A a; -// CHECK-NEXT: 3: (CXXConstructExpr, class A) +// CHECK-NEXT: 3: (CXXConstructExpr, A) // CHECK-NEXT: 4: A c; -// CHECK-NEXT: 5: (CXXConstructExpr, class A) +// CHECK-NEXT: 5: (CXXConstructExpr, A) // CHECK-NEXT: 6: A d; // CHECK-NEXT: 7: [B1.6] (Lifetime ends) // CHECK-NEXT: 8: [B1.4] (Lifetime ends) -// CHECK-NEXT: 9: (CXXConstructExpr, class A) +// CHECK-NEXT: 9: (CXXConstructExpr, A) // CHECK-NEXT: 10: A b; // CHECK-NEXT: 11: [B1.10] (Lifetime ends) // CHECK-NEXT: 12: [B1.2] (Lifetime ends) @@ -132,7 +132,7 @@ // CHECK: [B4 (ENTRY)] // CHECK-NEXT: Succs (1): B3 // CHECK: [B1] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B1.2] (Lifetime ends) // CHECK-NEXT: 4: [B3.4] (Lifetime ends) @@ -146,9 +146,9 @@ // CHECK-NEXT: Preds (1): B3 // CHECK-NEXT: Succs (1): B0 // CHECK: [B3] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A a; -// CHECK-NEXT: 3: (CXXConstructExpr, class A) +// CHECK-NEXT: 3: (CXXConstructExpr, A) // CHECK-NEXT: 4: A b; // CHECK-NEXT: 5: UV // CHECK-NEXT: 6: [B3.5] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -174,23 +174,23 @@ // CHECK-NEXT: Preds (2): B2 B3 // CHECK-NEXT: Succs (1): B0 // CHECK: [B2] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B2.2] (Lifetime ends) // CHECK-NEXT: Preds (1): B4 // CHECK-NEXT: Succs (1): B1 // CHECK: [B3] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B3.2] (Lifetime ends) // CHECK-NEXT: Preds (1): B4 // CHECK-NEXT: Succs (1): B1 // CHECK: [B4] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// 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: 5: [B4.4] (CXXConstructExpr, class A) +// CHECK-NEXT: 5: [B4.4] (CXXConstructExpr, A) // CHECK-NEXT: 6: A b = a; // CHECK-NEXT: 7: b // CHECK-NEXT: 8: [B4.7] (ImplicitCastExpr, NoOp, const class A) @@ -215,14 +215,14 @@ // CHECK-NEXT: Succs (1): B8 // CHECK: [B1] // CHECK-NEXT: 1: [B8.6] (Lifetime ends) -// CHECK-NEXT: 2: (CXXConstructExpr, class A) +// CHECK-NEXT: 2: (CXXConstructExpr, A) // CHECK-NEXT: 3: A e; // CHECK-NEXT: 4: [B1.3] (Lifetime ends) // CHECK-NEXT: 5: [B8.2] (Lifetime ends) // CHECK-NEXT: Preds (2): B2 B5 // CHECK-NEXT: Succs (1): B0 // CHECK: [B2] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A d; // CHECK-NEXT: 3: [B2.2] (Lifetime ends) // CHECK-NEXT: 4: [B4.2] (Lifetime ends) @@ -236,7 +236,7 @@ // CHECK-NEXT: Preds (1): B4 // CHECK-NEXT: Succs (1): B0 // CHECK: [B4] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: UV // CHECK-NEXT: 4: [B4.3] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -244,7 +244,7 @@ // CHECK-NEXT: Preds (1): B8 // CHECK-NEXT: Succs (2): B3 B2 // CHECK: [B5] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A d; // CHECK-NEXT: 3: [B5.2] (Lifetime ends) // CHECK-NEXT: 4: [B7.2] (Lifetime ends) @@ -258,7 +258,7 @@ // CHECK-NEXT: Preds (1): B7 // CHECK-NEXT: Succs (1): B0 // CHECK: [B7] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: UV // CHECK-NEXT: 4: [B7.3] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -266,11 +266,11 @@ // CHECK-NEXT: Preds (1): B8 // CHECK-NEXT: Succs (2): B6 B5 // CHECK: [B8] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// 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: 5: [B8.4] (CXXConstructExpr, class A) +// CHECK-NEXT: 5: [B8.4] (CXXConstructExpr, A) // CHECK-NEXT: 6: A b = a; // CHECK-NEXT: 7: b // CHECK-NEXT: 8: [B8.7] (ImplicitCastExpr, NoOp, const class A) @@ -310,7 +310,7 @@ // CHECK-NEXT: Preds (1): B3 // CHECK-NEXT: Succs (1): B4 // CHECK: [B3] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B3.2] (Lifetime ends) // CHECK-NEXT: 4: [B4.4] (Lifetime ends) @@ -319,7 +319,7 @@ // CHECK: [B4] // CHECK-NEXT: 1: a // CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A) -// CHECK-NEXT: 3: [B4.2] (CXXConstructExpr, class A) +// CHECK-NEXT: 3: [B4.2] (CXXConstructExpr, A) // CHECK-NEXT: 4: A b = a; // CHECK-NEXT: 5: b // CHECK-NEXT: 6: [B4.5] (ImplicitCastExpr, NoOp, const class A) @@ -331,7 +331,7 @@ // CHECK-NEXT: Preds (2): B2 B5 // CHECK-NEXT: Succs (2): B3 B1 // CHECK: [B5] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: Preds (1): B6 // CHECK-NEXT: Succs (1): B4 @@ -347,7 +347,7 @@ // CHECK-NEXT: Succs (1): B11 // CHECK: [B1] // CHECK-NEXT: 1: [B10.4] (Lifetime ends) -// CHECK-NEXT: 2: (CXXConstructExpr, class A) +// CHECK-NEXT: 2: (CXXConstructExpr, A) // CHECK-NEXT: 3: A e; // CHECK-NEXT: 4: [B1.3] (Lifetime ends) // CHECK-NEXT: 5: [B11.2] (Lifetime ends) @@ -357,7 +357,7 @@ // CHECK-NEXT: Preds (2): B3 B6 // CHECK-NEXT: Succs (1): B10 // CHECK: [B3] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A d; // CHECK-NEXT: 3: [B3.2] (Lifetime ends) // CHECK-NEXT: 4: [B9.2] (Lifetime ends) @@ -395,7 +395,7 @@ // CHECK-NEXT: Preds (1): B9 // CHECK-NEXT: Succs (1): B1 // CHECK: [B9] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: UV // CHECK-NEXT: 4: [B9.3] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -405,7 +405,7 @@ // CHECK: [B10] // CHECK-NEXT: 1: a // CHECK-NEXT: 2: [B10.1] (ImplicitCastExpr, NoOp, const class A) -// CHECK-NEXT: 3: [B10.2] (CXXConstructExpr, class A) +// CHECK-NEXT: 3: [B10.2] (CXXConstructExpr, A) // CHECK-NEXT: 4: A b = a; // CHECK-NEXT: 5: b // CHECK-NEXT: 6: [B10.5] (ImplicitCastExpr, NoOp, const class A) @@ -417,7 +417,7 @@ // CHECK-NEXT: Preds (2): B2 B11 // CHECK-NEXT: Succs (2): B9 B1 // CHECK: [B11] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: Preds (1): B12 // CHECK-NEXT: Succs (1): B10 @@ -441,7 +441,7 @@ // CHECK: [B12 (ENTRY)] // CHECK-NEXT: Succs (1): B11 // CHECK: [B1] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A d; // CHECK-NEXT: 3: [B1.2] (Lifetime ends) // CHECK-NEXT: 4: [B11.2] (Lifetime ends) @@ -454,7 +454,7 @@ // CHECK-NEXT: Preds (2): B3 B6 // CHECK-NEXT: Succs (2): B10 B1 // CHECK: [B3] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B3.2] (Lifetime ends) // CHECK-NEXT: 4: [B9.2] (Lifetime ends) @@ -489,7 +489,7 @@ // CHECK-NEXT: Preds (1): B9 // CHECK-NEXT: Succs (1): B1 // CHECK: [B9] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A b; // CHECK-NEXT: 3: UV // CHECK-NEXT: 4: [B9.3] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -500,7 +500,7 @@ // CHECK-NEXT: Preds (1): B2 // CHECK-NEXT: Succs (1): B9 // CHECK: [B11] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: Preds (1): B12 // CHECK-NEXT: Succs (1): B9 @@ -532,7 +532,7 @@ // CHECK-NEXT: Preds (1): B3 // CHECK-NEXT: Succs (1): B4 // CHECK: [B3] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B3.2] (Lifetime ends) // CHECK-NEXT: 4: [B4.4] (Lifetime ends) @@ -541,7 +541,7 @@ // CHECK: [B4] // CHECK-NEXT: 1: a // CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A) -// CHECK-NEXT: 3: [B4.2] (CXXConstructExpr, class A) +// CHECK-NEXT: 3: [B4.2] (CXXConstructExpr, A) // CHECK-NEXT: 4: A b = a; // CHECK-NEXT: 5: b // CHECK-NEXT: 6: [B4.5] (ImplicitCastExpr, NoOp, const class A) @@ -553,7 +553,7 @@ // CHECK-NEXT: Preds (2): B2 B5 // CHECK-NEXT: Succs (2): B3 B1 // CHECK: [B5] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: Preds (1): B6 // CHECK-NEXT: Succs (1): B4 @@ -569,7 +569,7 @@ // CHECK: [B1] // CHECK-NEXT: 1: [B10.4] (Lifetime ends) // CHECK-NEXT: 2: [B11.4] (Lifetime ends) -// CHECK-NEXT: 3: (CXXConstructExpr, class A) +// CHECK-NEXT: 3: (CXXConstructExpr, A) // CHECK-NEXT: 4: A f; // CHECK-NEXT: 5: [B1.4] (Lifetime ends) // CHECK-NEXT: 6: [B11.2] (Lifetime ends) @@ -579,7 +579,7 @@ // CHECK-NEXT: Preds (2): B3 B6 // CHECK-NEXT: Succs (1): B10 // CHECK: [B3] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A e; // CHECK-NEXT: 3: [B3.2] (Lifetime ends) // CHECK-NEXT: 4: [B9.2] (Lifetime ends) @@ -617,7 +617,7 @@ // CHECK-NEXT: Preds (1): B9 // CHECK-NEXT: Succs (1): B1 // CHECK: [B9] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A d; // CHECK-NEXT: 3: UV // CHECK-NEXT: 4: [B9.3] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -627,7 +627,7 @@ // CHECK: [B10] // CHECK-NEXT: 1: b // CHECK-NEXT: 2: [B10.1] (ImplicitCastExpr, NoOp, const class A) -// CHECK-NEXT: 3: [B10.2] (CXXConstructExpr, class A) +// CHECK-NEXT: 3: [B10.2] (CXXConstructExpr, A) // CHECK-NEXT: 4: A c = b; // CHECK-NEXT: 5: c // CHECK-NEXT: 6: [B10.5] (ImplicitCastExpr, NoOp, const class A) @@ -639,9 +639,9 @@ // CHECK-NEXT: Preds (2): B2 B11 // CHECK-NEXT: Succs (2): B9 B1 // CHECK: [B11] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A a; -// CHECK-NEXT: 3: (CXXConstructExpr, class A) +// CHECK-NEXT: 3: (CXXConstructExpr, A) // CHECK-NEXT: 4: A b; // CHECK-NEXT: Preds (1): B12 // CHECK-NEXT: Succs (1): B10 @@ -665,7 +665,7 @@ // CHECK: [B2 (ENTRY)] // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] -// CHECK-NEXT: 1: (CXXConstructExpr, class A) +// CHECK-NEXT: 1: (CXXConstructExpr, A) // CHECK-NEXT: 2: A a; // CHECK-NEXT: 3: int n; // CHECK-NEXT: 4: n @@ -762,7 +762,7 @@ // CHECK-NEXT: Succs (1): B0 // CHECK: [B2] // CHECK-NEXT: label: -// CHECK-NEXT: 1: (CXXConstructExpr, struct B) +// CHECK-NEXT: 1: (CXXConstructExpr, B) // CHECK-NEXT: 2: B b; // CHECK-NEXT: 3: [B2.2] (Lifetime ends) // CHECK-NEXT: T: goto label; diff --git a/clang/test/Analysis/malloc-sizeof.cpp b/clang/test/Analysis/malloc-sizeof.cpp --- a/clang/test/Analysis/malloc-sizeof.cpp +++ b/clang/test/Analysis/malloc-sizeof.cpp @@ -12,12 +12,12 @@ void foo(unsigned int unsignedInt, unsigned int readSize) { // Sanity check the checker is working as expected. - A* a = static_cast(malloc(sizeof(int))); // expected-warning {{Result of 'malloc' is converted to a pointer of type 'struct A', which is incompatible with sizeof operand type 'int'}} + A* a = static_cast(malloc(sizeof(int))); // expected-warning {{Result of 'malloc' is converted to a pointer of type 'A', which is incompatible with sizeof operand type 'int'}} free(a); } void bar() { - A *x = static_cast(calloc(10, sizeof(void*))); // expected-warning {{Result of 'calloc' is converted to a pointer of type 'struct A', which is incompatible with sizeof operand type 'void *'}} + A *x = static_cast(calloc(10, sizeof(void*))); // expected-warning {{Result of 'calloc' is converted to a pointer of type 'A', which is incompatible with sizeof operand type 'void *'}} // sizeof(void*) is compatible with any pointer. A **y = static_cast(calloc(10, sizeof(void*))); // no-warning free(x); diff --git a/clang/test/Analysis/memory-model.cpp b/clang/test/Analysis/memory-model.cpp --- a/clang/test/Analysis/memory-model.cpp +++ b/clang/test/Analysis/memory-model.cpp @@ -53,9 +53,9 @@ } void struct_simple_ptr(S *a) { - clang_analyzer_dump(a); // expected-warning {{SymRegion{reg_$0}}} - clang_analyzer_dumpExtent(a); // expected-warning {{extent_$1{SymRegion{reg_$0}}}} - clang_analyzer_dumpElementCount(a); // expected-warning {{(extent_$1{SymRegion{reg_$0}}) / 4}} + clang_analyzer_dump(a); // expected-warning {{SymRegion{reg_$0}}} + clang_analyzer_dumpExtent(a); // expected-warning {{extent_$1{SymRegion{reg_$0}}}} + clang_analyzer_dumpElementCount(a); // expected-warning {{(extent_$1{SymRegion{reg_$0}}) / 4}} } void field_ref(S a) { @@ -65,7 +65,7 @@ } void field_ptr(S *a) { - clang_analyzer_dump(&a->f); // expected-warning {{SymRegion{reg_$0}.f}} + clang_analyzer_dump(&a->f); // expected-warning {{SymRegion{reg_$0}.f}} clang_analyzer_dumpExtent(&a->f); // expected-warning {{4 S64b}} clang_analyzer_dumpElementCount(&a->f); // expected-warning {{1 S64b}} } 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 @@ -21,8 +21,8 @@ // CHECK: void foo(int) // CHECK: [B1] -// CHECK-NEXT: 1: (CXXConstructExpr, [B1.2], class variant_0::B) -// CHECK-NEXT: 2: variant_0::B i; +// 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: 5: i @@ -31,7 +31,7 @@ // CHECK-NEXT: 8: [B1.7] // CHECK-NEXT: 9: [B1.5] = [B1.8] (OperatorCall) // CHECK-NEXT: 10: ~variant_0::B() (Temporary object destructor) -// CHECK-NEXT: 11: [B1.2].~variant_0::B() (Implicit destructor) +// CHECK-NEXT: 11: [B1.2].~B() (Implicit destructor) void foo(int) { B i; i = {}; @@ -63,15 +63,15 @@ // destructor. // CHECK: template<> void foo(int) // CHECK: [B1] -// CHECK-NEXT: 1: (CXXConstructExpr, [B1.2], class variant_1::B) -// CHECK-NEXT: 2: variant_1::B i; +// 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: 5: i // CHECK-NEXT: 6: {} (CXXConstructExpr, class variant_1::B) // CHECK-NEXT: 7: [B1.6] // CHECK-NEXT: 8: [B1.5] = [B1.7] (OperatorCall) -// CHECK-NEXT: 9: [B1.2].~variant_1::B() (Implicit destructor) +// CHECK-NEXT: 9: [B1.2].~B() (Implicit destructor) template void foo(T) { B i; i = {}; @@ -103,8 +103,8 @@ // CHECK: template<> void foo(int) // CHECK: [B1] -// CHECK-NEXT: 1: (CXXConstructExpr, [B1.2], class variant_2::B) -// CHECK-NEXT: 2: variant_2::B i; +// 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: 5: i @@ -114,7 +114,7 @@ // CHECK-NEXT: 9: [B1.8] // CHECK-NEXT: 10: [B1.5] = [B1.9] (OperatorCall) // CHECK-NEXT: 11: ~variant_2::B() (Temporary object destructor) -// CHECK-NEXT: 12: [B1.2].~variant_2::B() (Implicit destructor) +// CHECK-NEXT: 12: [B1.2].~B() (Implicit destructor) template void foo(T) { B i; i = {}; diff --git a/clang/test/Analysis/more-dtors-cfg-output.cpp b/clang/test/Analysis/more-dtors-cfg-output.cpp --- a/clang/test/Analysis/more-dtors-cfg-output.cpp +++ b/clang/test/Analysis/more-dtors-cfg-output.cpp @@ -46,7 +46,7 @@ Foo x = get_foo(); } // CHECK: void elided_assign() -// CXX14: (CXXConstructExpr{{.*}}, struct Foo) +// CXX14: (CXXConstructExpr{{.*}}, Foo) // CXX14: ~Foo() (Temporary object destructor) // CHECK: ~Foo() (Implicit destructor) @@ -54,7 +54,7 @@ Bar x = (const Bar &)get_bar(); } // CHECK: void nonelided_assign() -// CHECK: (CXXConstructExpr{{.*}}, struct Bar) +// CHECK: (CXXConstructExpr{{.*}}, Bar) // CHECK: ~Bar() (Temporary object destructor) // CHECK: ~Bar() (Implicit destructor) @@ -62,7 +62,7 @@ Foo x(get_foo()); } // CHECK: void elided_paren_init() -// CXX14: (CXXConstructExpr{{.*}}, struct Foo) +// CXX14: (CXXConstructExpr{{.*}}, Foo) // CXX14: ~Foo() (Temporary object destructor) // CHECK: ~Foo() (Implicit destructor) @@ -70,7 +70,7 @@ Bar x((const Bar &)get_bar()); } // CHECK: void nonelided_paren_init() -// CHECK: (CXXConstructExpr{{.*}}, struct Bar) +// CHECK: (CXXConstructExpr{{.*}}, Bar) // CHECK: ~Bar() (Temporary object destructor) // CHECK: ~Bar() (Implicit destructor) @@ -78,7 +78,7 @@ Foo x{get_foo()}; } // CHECK: void elided_brace_init() -// CXX14: (CXXConstructExpr{{.*}}, struct Foo) +// CXX14: (CXXConstructExpr{{.*}}, Foo) // CXX14: ~Foo() (Temporary object destructor) // CHECK: ~Foo() (Implicit destructor) @@ -86,7 +86,7 @@ Bar x{(const Bar &)get_bar()}; } // CHECK: void nonelided_brace_init() -// CHECK: (CXXConstructExpr{{.*}}, struct Bar) +// CHECK: (CXXConstructExpr{{.*}}, Bar) // CHECK: ~Bar() (Temporary object destructor) // CHECK: ~Bar() (Implicit destructor) @@ -97,7 +97,7 @@ auto z = [x=get_foo()]() {}; } // CHECK: void elided_lambda_capture_init() -// CXX14: (CXXConstructExpr{{.*}}, struct Foo) +// CXX14: (CXXConstructExpr{{.*}}, Foo) // CXX14: ~(lambda at {{.*}})() (Temporary object destructor) // CXX14: ~Foo() (Temporary object destructor) // CHECK: ~(lambda at {{.*}})() (Implicit destructor) @@ -107,7 +107,7 @@ auto z = [x((const Bar &)get_bar())]() {}; } // CHECK: void nonelided_lambda_capture_init() -// CHECK: (CXXConstructExpr{{.*}}, struct Bar) +// CHECK: (CXXConstructExpr{{.*}}, Bar) // CXX14: ~(lambda at {{.*}})() (Temporary object destructor) // CHECK: ~Bar() (Temporary object destructor) // CHECK: ~(lambda at {{.*}})() (Implicit destructor) @@ -117,9 +117,9 @@ return ({ get_foo(); }); } // CHECK: Foo elided_return_stmt_expr() -// CXX14: (CXXConstructExpr{{.*}}, struct Foo) +// CXX14: (CXXConstructExpr{{.*}}, Foo) // CXX14: ~Foo() (Temporary object destructor) -// CXX14: (CXXConstructExpr{{.*}}, struct Foo) +// CXX14: (CXXConstructExpr{{.*}}, Foo) // CXX14: ~Foo() (Temporary object destructor) void elided_stmt_expr() { @@ -127,7 +127,7 @@ ({ get_foo(); }); } // CHECK: void elided_stmt_expr() -// CXX14: (CXXConstructExpr{{.*}}, struct Foo) +// CXX14: (CXXConstructExpr{{.*}}, Foo) // CXX14: ~Foo() (Temporary object destructor) // CHECK: ~Foo() (Temporary object destructor) @@ -139,7 +139,7 @@ } // CHECK: void elided_stmt_expr_multiple_stmts() // CHECK: ~Bar() (Temporary object destructor) -// CXX14: (CXXConstructExpr{{.*}}, struct Foo) +// CXX14: (CXXConstructExpr{{.*}}, Foo) // CXX14: ~Foo() (Temporary object destructor) // CHECK: ~Foo() (Temporary object destructor) @@ -148,7 +148,7 @@ ({ (const Bar &)get_bar(); }); } // CHECK: void unelided_stmt_expr() -// CHECK: (CXXConstructExpr{{.*}}, struct Bar) +// CHECK: (CXXConstructExpr{{.*}}, Bar) // CHECK: ~Bar() (Temporary object destructor) // CHECK: ~Bar() (Temporary object destructor) @@ -156,8 +156,8 @@ TwoFoos x{get_foo(), get_foo()}; } // CHECK: void elided_aggregate_init() -// CXX14: (CXXConstructExpr{{.*}}, struct Foo) -// CXX14: (CXXConstructExpr{{.*}}, struct Foo) +// CXX14: (CXXConstructExpr{{.*}}, Foo) +// CXX14: (CXXConstructExpr{{.*}}, Foo) // CXX14: ~Foo() (Temporary object destructor) // CXX14: ~Foo() (Temporary object destructor) // CHECK: ~TwoFoos() (Implicit destructor) @@ -166,8 +166,8 @@ TwoBars x{(const Bar &)get_bar(), (const Bar &)get_bar()}; } // CHECK: void nonelided_aggregate_init() -// CHECK: (CXXConstructExpr{{.*}}, struct Bar) -// CHECK: (CXXConstructExpr{{.*}}, struct Bar) +// CHECK: (CXXConstructExpr{{.*}}, Bar) +// CHECK: (CXXConstructExpr{{.*}}, Bar) // CHECK: ~Bar() (Temporary object destructor) // CHECK: ~Bar() (Temporary object destructor) // CHECK: ~TwoBars() (Implicit destructor) @@ -176,8 +176,8 @@ return TwoFoos{get_foo(), get_foo()}; } // CHECK: TwoFoos return_aggregate_init() -// CXX14: (CXXConstructExpr{{.*}}, struct Foo) -// CXX14: (CXXConstructExpr{{.*}}, struct Foo) +// CXX14: (CXXConstructExpr{{.*}}, Foo) +// CXX14: (CXXConstructExpr{{.*}}, Foo) // CXX14: ~TwoFoos() (Temporary object destructor) // CXX14: ~Foo() (Temporary object destructor) // CXX14: ~Foo() (Temporary object destructor) @@ -196,7 +196,7 @@ puts("one destroyed before, one destroyed after"); } // CHECK: void not_lifetime_extended() -// CXX14: (CXXConstructExpr{{.*}}, struct Foo) +// CXX14: (CXXConstructExpr{{.*}}, Foo) // CHECK: ~Foo() (Temporary object destructor) // CXX14: ~Foo() (Temporary object destructor) // CHECK: one destroyed before, one destroyed after @@ -206,15 +206,15 @@ (void)(Bar[]){{}, {}}; } // CHECK: void compound_literal() -// CHECK: (CXXConstructExpr, struct Bar) -// CHECK: (CXXConstructExpr, struct Bar) +// CHECK: (CXXConstructExpr, Bar) +// CHECK: (CXXConstructExpr, Bar) // CHECK: ~Bar[2]() (Temporary object destructor) Foo elided_return() { return get_foo(); } // CHECK: Foo elided_return() -// CXX14: (CXXConstructExpr{{.*}}, struct Foo) +// CXX14: (CXXConstructExpr{{.*}}, Foo) // CXX14: ~Foo() (Temporary object destructor) auto elided_return_lambda() { @@ -258,7 +258,7 @@ DefaultArgInCtor qux[3]; } // CHECK: void default_ctor_with_default_arg() -// CHECK: CXXConstructExpr, {{.*}}, struct DefaultArgInCtor[3] +// CHECK: CXXConstructExpr, {{.*}}, DefaultArgInCtor[3] // CXX14: ~Foo() (Temporary object destructor) // CHECK: ~Foo() (Temporary object destructor) // CHECK: .~DefaultArgInCtor[3]() (Implicit destructor) @@ -268,7 +268,7 @@ new DefaultArgInCtor[count]; } // CHECK: void new_default_ctor_with_default_arg(long count) -// CHECK: CXXConstructExpr, {{.*}}, struct DefaultArgInCtor[] +// CHECK: CXXConstructExpr, {{.*}}, DefaultArgInCtor[] // CXX14: ~Foo() (Temporary object destructor) // CHECK: ~Foo() (Temporary object destructor) 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 @@ -34,9 +34,9 @@ // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] // CHECK-NEXT: 1: CFGScopeBegin(a) -// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], class A[2]) +// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], A[2]) // CHECK-NEXT: 3: A a[2]; -// CHECK-NEXT: 4: (CXXConstructExpr, [B1.5], class A[0]) +// CHECK-NEXT: 4: (CXXConstructExpr, [B1.5], A[0]) // CHECK-NEXT: 5: A b[0]; // CHECK-NEXT: 6: [B1.3].~A[2]() (Implicit destructor) // CHECK-NEXT: 7: CFGScopeEnd(a) @@ -53,17 +53,17 @@ // CHECK-NEXT: Succs (1): B1 // CHECK: [B1] // CHECK-NEXT: 1: CFGScopeBegin(a) -// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B1.3], A) // CHECK-NEXT: 3: A a; // CHECK-NEXT: 4: CFGScopeBegin(c) -// CHECK-NEXT: 5: (CXXConstructExpr, [B1.6], class A) +// CHECK-NEXT: 5: (CXXConstructExpr, [B1.6], A) // CHECK-NEXT: 6: A c; -// CHECK-NEXT: 7: (CXXConstructExpr, [B1.8], class A) +// CHECK-NEXT: 7: (CXXConstructExpr, [B1.8], A) // CHECK-NEXT: 8: A d; // CHECK-NEXT: 9: [B1.8].~A() (Implicit destructor) // CHECK-NEXT: 10: [B1.6].~A() (Implicit destructor) // CHECK-NEXT: 11: CFGScopeEnd(c) -// CHECK-NEXT: 12: (CXXConstructExpr, [B1.13], class A) +// CHECK-NEXT: 12: (CXXConstructExpr, [B1.13], A) // CHECK-NEXT: 13: A b; // CHECK-NEXT: 14: [B1.13].~A() (Implicit destructor) // CHECK-NEXT: 15: [B1.3].~A() (Implicit destructor) @@ -83,7 +83,7 @@ // CHECK: [B4 (ENTRY)] // CHECK-NEXT: Succs (1): B3 // CHECK: [B1] -// CHECK-NEXT: 1: (CXXConstructExpr, [B1.2], class A) +// CHECK-NEXT: 1: (CXXConstructExpr, [B1.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B1.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B3.5].~A() (Implicit destructor) @@ -100,9 +100,9 @@ // CHECK-NEXT: Succs (1): B0 // CHECK: [B3] // CHECK-NEXT: 1: CFGScopeBegin(a) -// CHECK-NEXT: 2: (CXXConstructExpr, [B3.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B3.3], A) // CHECK-NEXT: 3: A a; -// CHECK-NEXT: 4: (CXXConstructExpr, [B3.5], class A) +// CHECK-NEXT: 4: (CXXConstructExpr, [B3.5], A) // CHECK-NEXT: 5: A b; // CHECK-NEXT: 6: UV // CHECK-NEXT: 7: [B3.6] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -129,7 +129,7 @@ // CHECK-NEXT: Succs (1): B0 // CHECK: [B2] // CHECK-NEXT: 1: CFGScopeBegin(c) -// CHECK-NEXT: 2: (CXXConstructExpr, [B2.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B2.3], A) // CHECK-NEXT: 3: A c; // CHECK-NEXT: 4: [B2.3].~A() (Implicit destructor) // CHECK-NEXT: 5: CFGScopeEnd(c) @@ -137,7 +137,7 @@ // CHECK-NEXT: Succs (1): B1 // CHECK: [B3] // CHECK-NEXT: 1: CFGScopeBegin(c) -// CHECK-NEXT: 2: (CXXConstructExpr, [B3.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B3.3], A) // CHECK-NEXT: 3: A c; // CHECK-NEXT: 4: [B3.3].~A() (Implicit destructor) // CHECK-NEXT: 5: CFGScopeEnd(c) @@ -145,12 +145,12 @@ // CHECK-NEXT: Succs (1): B1 // CHECK: [B4] // CHECK-NEXT: 1: CFGScopeBegin(a) -// CHECK-NEXT: 2: (CXXConstructExpr, [B4.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B4.3], A) // 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: 7: [B4.6] (CXXConstructExpr, [B4.8], class A) +// CHECK-NEXT: 7: [B4.6] (CXXConstructExpr, [B4.8], A) // CHECK-NEXT: 8: A b = a; // CHECK-NEXT: 9: b // CHECK-NEXT: 10: [B4.9] (ImplicitCastExpr, NoOp, const class A) @@ -175,7 +175,7 @@ // CHECK: [B1] // CHECK-NEXT: 1: [B8.8].~A() (Implicit destructor) // CHECK-NEXT: 2: CFGScopeEnd(b) -// CHECK-NEXT: 3: (CXXConstructExpr, [B1.4], class A) +// CHECK-NEXT: 3: (CXXConstructExpr, [B1.4], A) // CHECK-NEXT: 4: A e; // CHECK-NEXT: 5: [B1.4].~A() (Implicit destructor) // CHECK-NEXT: 6: [B8.3].~A() (Implicit destructor) @@ -183,7 +183,7 @@ // CHECK-NEXT: Preds (2): B2 B5 // CHECK-NEXT: Succs (1): B0 // CHECK: [B2] -// CHECK-NEXT: 1: (CXXConstructExpr, [B2.2], class A) +// CHECK-NEXT: 1: (CXXConstructExpr, [B2.2], A) // CHECK-NEXT: 2: A d; // CHECK-NEXT: 3: [B2.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B4.3].~A() (Implicit destructor) @@ -202,7 +202,7 @@ // CHECK-NEXT: Succs (1): B0 // CHECK: [B4] // CHECK-NEXT: 1: CFGScopeBegin(c) -// CHECK-NEXT: 2: (CXXConstructExpr, [B4.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B4.3], A) // CHECK-NEXT: 3: A c; // CHECK-NEXT: 4: UV // CHECK-NEXT: 5: [B4.4] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -210,7 +210,7 @@ // CHECK-NEXT: Preds (1): B8 // CHECK-NEXT: Succs (2): B3 B2 // CHECK: [B5] -// CHECK-NEXT: 1: (CXXConstructExpr, [B5.2], class A) +// CHECK-NEXT: 1: (CXXConstructExpr, [B5.2], A) // CHECK-NEXT: 2: A d; // CHECK-NEXT: 3: [B5.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B7.3].~A() (Implicit destructor) @@ -229,7 +229,7 @@ // CHECK-NEXT: Succs (1): B0 // CHECK: [B7] // CHECK-NEXT: 1: CFGScopeBegin(c) -// CHECK-NEXT: 2: (CXXConstructExpr, [B7.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B7.3], A) // CHECK-NEXT: 3: A c; // CHECK-NEXT: 4: UV // CHECK-NEXT: 5: [B7.4] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -238,12 +238,12 @@ // CHECK-NEXT: Succs (2): B6 B5 // CHECK: [B8] // CHECK-NEXT: 1: CFGScopeBegin(a) -// CHECK-NEXT: 2: (CXXConstructExpr, [B8.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B8.3], A) // 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: 7: [B8.6] (CXXConstructExpr, [B8.8], class A) +// CHECK-NEXT: 7: [B8.6] (CXXConstructExpr, [B8.8], A) // CHECK-NEXT: 8: A b = a; // CHECK-NEXT: 9: b // CHECK-NEXT: 10: [B8.9] (ImplicitCastExpr, NoOp, const class A) @@ -284,7 +284,7 @@ // CHECK-NEXT: Succs (1): B4 // CHECK: [B3] // CHECK-NEXT: 1: CFGScopeBegin(c) -// CHECK-NEXT: 2: (CXXConstructExpr, [B3.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B3.3], A) // CHECK-NEXT: 3: A c; // CHECK-NEXT: 4: [B3.3].~A() (Implicit destructor) // CHECK-NEXT: 5: CFGScopeEnd(c) @@ -296,7 +296,7 @@ // CHECK-NEXT: 1: CFGScopeBegin(b) // CHECK-NEXT: 2: a // CHECK-NEXT: 3: [B4.2] (ImplicitCastExpr, NoOp, const class A) -// CHECK-NEXT: 4: [B4.3] (CXXConstructExpr, [B4.5], class A) +// CHECK-NEXT: 4: [B4.3] (CXXConstructExpr, [B4.5], A) // CHECK-NEXT: 5: A b = a; // CHECK-NEXT: 6: b // CHECK-NEXT: 7: [B4.6] (ImplicitCastExpr, NoOp, const class A) @@ -309,7 +309,7 @@ // CHECK-NEXT: Succs (2): B3 B1 // CHECK: [B5] // CHECK-NEXT: 1: CFGScopeBegin(a) -// CHECK-NEXT: 2: (CXXConstructExpr, [B5.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B5.3], A) // CHECK-NEXT: 3: A a; // CHECK-NEXT: Preds (1): B6 // CHECK-NEXT: Succs (1): B4 @@ -326,7 +326,7 @@ // CHECK: [B1] // CHECK-NEXT: 1: [B10.5].~A() (Implicit destructor) // CHECK-NEXT: 2: CFGScopeEnd(b) -// CHECK-NEXT: 3: (CXXConstructExpr, [B1.4], class A) +// CHECK-NEXT: 3: (CXXConstructExpr, [B1.4], A) // CHECK-NEXT: 4: A e; // CHECK-NEXT: 5: [B1.4].~A() (Implicit destructor) // CHECK-NEXT: 6: [B11.3].~A() (Implicit destructor) @@ -337,7 +337,7 @@ // CHECK-NEXT: Preds (2): B3 B6 // CHECK-NEXT: Succs (1): B10 // CHECK: [B3] -// CHECK-NEXT: 1: (CXXConstructExpr, [B3.2], class A) +// CHECK-NEXT: 1: (CXXConstructExpr, [B3.2], A) // CHECK-NEXT: 2: A d; // CHECK-NEXT: 3: [B3.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B9.3].~A() (Implicit destructor) @@ -384,7 +384,7 @@ // CHECK-NEXT: Succs (1): B1 // CHECK: [B9] // CHECK-NEXT: 1: CFGScopeBegin(c) -// CHECK-NEXT: 2: (CXXConstructExpr, [B9.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B9.3], A) // CHECK-NEXT: 3: A c; // CHECK-NEXT: 4: UV // CHECK-NEXT: 5: [B9.4] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -395,7 +395,7 @@ // CHECK-NEXT: 1: CFGScopeBegin(b) // CHECK-NEXT: 2: a // CHECK-NEXT: 3: [B10.2] (ImplicitCastExpr, NoOp, const class A) -// CHECK-NEXT: 4: [B10.3] (CXXConstructExpr, [B10.5], class A) +// CHECK-NEXT: 4: [B10.3] (CXXConstructExpr, [B10.5], A) // CHECK-NEXT: 5: A b = a; // CHECK-NEXT: 6: b // CHECK-NEXT: 7: [B10.6] (ImplicitCastExpr, NoOp, const class A) @@ -408,7 +408,7 @@ // CHECK-NEXT: Succs (2): B9 B1 // CHECK: [B11] // CHECK-NEXT: 1: CFGScopeBegin(a) -// CHECK-NEXT: 2: (CXXConstructExpr, [B11.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B11.3], A) // CHECK-NEXT: 3: A a; // CHECK-NEXT: Preds (1): B12 // CHECK-NEXT: Succs (1): B10 @@ -429,7 +429,7 @@ // CHECK: [B12 (ENTRY)] // CHECK-NEXT: Succs (1): B11 // CHECK: [B1] -// CHECK-NEXT: 1: (CXXConstructExpr, [B1.2], class A) +// CHECK-NEXT: 1: (CXXConstructExpr, [B1.2], A) // CHECK-NEXT: 2: A d; // CHECK-NEXT: 3: [B1.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B11.3].~A() (Implicit destructor) @@ -443,7 +443,7 @@ // CHECK-NEXT: Preds (2): B3 B6 // CHECK-NEXT: Succs (2): B10 B1 // CHECK: [B3] -// CHECK-NEXT: 1: (CXXConstructExpr, [B3.2], class A) +// CHECK-NEXT: 1: (CXXConstructExpr, [B3.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B3.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B9.3].~A() (Implicit destructor) @@ -484,7 +484,7 @@ // CHECK-NEXT: Succs (1): B1 // CHECK: [B9] // CHECK-NEXT: 1: CFGScopeBegin(b) -// CHECK-NEXT: 2: (CXXConstructExpr, [B9.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B9.3], A) // CHECK-NEXT: 3: A b; // CHECK-NEXT: 4: UV // CHECK-NEXT: 5: [B9.4] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -496,7 +496,7 @@ // CHECK-NEXT: Succs (1): B9 // CHECK: [B11] // CHECK-NEXT: 1: CFGScopeBegin(a) -// CHECK-NEXT: 2: (CXXConstructExpr, [B11.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B11.3], A) // CHECK-NEXT: 3: A a; // CHECK-NEXT: Preds (1): B12 // CHECK-NEXT: Succs (1): B9 @@ -528,7 +528,7 @@ // CHECK-NEXT: Succs (1): B4 // CHECK: [B3] // CHECK-NEXT: 1: CFGScopeBegin(c) -// CHECK-NEXT: 2: (CXXConstructExpr, [B3.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B3.3], A) // CHECK-NEXT: 3: A c; // CHECK-NEXT: 4: [B3.3].~A() (Implicit destructor) // CHECK-NEXT: 5: CFGScopeEnd(c) @@ -540,7 +540,7 @@ // CHECK-NEXT: 1: CFGScopeBegin(b) // CHECK-NEXT: 2: a // CHECK-NEXT: 3: [B4.2] (ImplicitCastExpr, NoOp, const class A) -// CHECK-NEXT: 4: [B4.3] (CXXConstructExpr, [B4.5], class A) +// CHECK-NEXT: 4: [B4.3] (CXXConstructExpr, [B4.5], A) // CHECK-NEXT: 5: A b = a; // CHECK-NEXT: 6: b // CHECK-NEXT: 7: [B4.6] (ImplicitCastExpr, NoOp, const class A) @@ -553,7 +553,7 @@ // CHECK-NEXT: Succs (2): B3 B1 // CHECK: [B5] // CHECK-NEXT: 1: CFGScopeBegin(a) -// CHECK-NEXT: 2: (CXXConstructExpr, [B5.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B5.3], A) // CHECK-NEXT: 3: A a; // CHECK-NEXT: Preds (1): B6 // CHECK-NEXT: Succs (1): B4 @@ -571,7 +571,7 @@ // CHECK-NEXT: 2: CFGScopeEnd(c) // CHECK-NEXT: 3: [B11.6].~A() (Implicit destructor) // CHECK-NEXT: 4: CFGScopeEnd(b) -// CHECK-NEXT: 5: (CXXConstructExpr, [B1.6], class A) +// CHECK-NEXT: 5: (CXXConstructExpr, [B1.6], A) // CHECK-NEXT: 6: A f; // CHECK-NEXT: 7: [B1.6].~A() (Implicit destructor) // CHECK-NEXT: 8: [B11.3].~A() (Implicit destructor) @@ -582,7 +582,7 @@ // CHECK-NEXT: Preds (2): B3 B6 // CHECK-NEXT: Succs (1): B10 // CHECK: [B3] -// CHECK-NEXT: 1: (CXXConstructExpr, [B3.2], class A) +// CHECK-NEXT: 1: (CXXConstructExpr, [B3.2], A) // CHECK-NEXT: 2: A e; // CHECK-NEXT: 3: [B3.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B9.3].~A() (Implicit destructor) @@ -629,7 +629,7 @@ // CHECK-NEXT: Succs (1): B1 // CHECK: [B9] // CHECK-NEXT: 1: CFGScopeBegin(d) -// CHECK-NEXT: 2: (CXXConstructExpr, [B9.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B9.3], A) // CHECK-NEXT: 3: A d; // CHECK-NEXT: 4: UV // CHECK-NEXT: 5: [B9.4] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -640,7 +640,7 @@ // CHECK-NEXT: 1: CFGScopeBegin(c) // CHECK-NEXT: 2: b // CHECK-NEXT: 3: [B10.2] (ImplicitCastExpr, NoOp, const class A) -// CHECK-NEXT: 4: [B10.3] (CXXConstructExpr, [B10.5], class A) +// CHECK-NEXT: 4: [B10.3] (CXXConstructExpr, [B10.5], A) // CHECK-NEXT: 5: A c = b; // CHECK-NEXT: 6: c // CHECK-NEXT: 7: [B10.6] (ImplicitCastExpr, NoOp, const class A) @@ -653,10 +653,10 @@ // CHECK-NEXT: Succs (2): B9 B1 // CHECK: [B11] // CHECK-NEXT: 1: CFGScopeBegin(a) -// CHECK-NEXT: 2: (CXXConstructExpr, [B11.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B11.3], A) // CHECK-NEXT: 3: A a; // CHECK-NEXT: 4: CFGScopeBegin(b) -// CHECK-NEXT: 5: (CXXConstructExpr, [B11.6], class A) +// CHECK-NEXT: 5: (CXXConstructExpr, [B11.6], A) // CHECK-NEXT: 6: A b; // CHECK-NEXT: Preds (1): B12 // CHECK-NEXT: Succs (1): B10 @@ -678,7 +678,7 @@ // CHECK-NEXT: Succs (1): B7 // CHECK: [B1] // CHECK-NEXT: l1: -// CHECK-NEXT: 1: (CXXConstructExpr, [B1.2], class A) +// CHECK-NEXT: 1: (CXXConstructExpr, [B1.2], A) // CHECK-NEXT: 2: A c; // CHECK-NEXT: 3: [B1.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B6.5].~A() (Implicit destructor) @@ -688,7 +688,7 @@ // CHECK-NEXT: Preds (2): B2 B3 // CHECK-NEXT: Succs (1): B0 // CHECK: [B2] -// CHECK-NEXT: 1: (CXXConstructExpr, [B2.2], class A) +// CHECK-NEXT: 1: (CXXConstructExpr, [B2.2], A) // CHECK-NEXT: 2: A b; // CHECK-NEXT: 3: [B2.2].~A() (Implicit destructor) // CHECK-NEXT: 4: [B6.8].~A() (Implicit destructor) @@ -718,12 +718,12 @@ // CHECK: [B6] // CHECK-NEXT: l0: // CHECK-NEXT: 1: CFGScopeBegin(cb) -// CHECK-NEXT: 2: (CXXConstructExpr, [B6.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B6.3], A) // CHECK-NEXT: 3: A cb; -// CHECK-NEXT: 4: (CXXConstructExpr, [B6.5], class A) +// CHECK-NEXT: 4: (CXXConstructExpr, [B6.5], A) // CHECK-NEXT: 5: A b; // CHECK-NEXT: 6: CFGScopeBegin(a) -// CHECK-NEXT: 7: (CXXConstructExpr, [B6.8], class A) +// CHECK-NEXT: 7: (CXXConstructExpr, [B6.8], A) // CHECK-NEXT: 8: A a; // CHECK-NEXT: 9: UV // CHECK-NEXT: 10: [B6.9] (ImplicitCastExpr, LValueToRValue, _Bool) @@ -732,7 +732,7 @@ // CHECK-NEXT: Succs (2): B5 B4 // CHECK: [B7] // CHECK-NEXT: 1: CFGScopeBegin(a) -// CHECK-NEXT: 2: (CXXConstructExpr, [B7.3], class A) +// CHECK-NEXT: 2: (CXXConstructExpr, [B7.3], A) // CHECK-NEXT: 3: A a; // CHECK-NEXT: Preds (1): B8 // CHECK-NEXT: Succs (1): B6 @@ -816,9 +816,9 @@ // CHECK-NEXT: Succs (1): B0 // CHECK: [B2] // CHECK-NEXT: 1: __begin1 -// CHECK-NEXT: 2: [B2.1] (ImplicitCastExpr, LValueToRValue, class A *) +// CHECK-NEXT: 2: [B2.1] (ImplicitCastExpr, LValueToRValue, A *) // CHECK-NEXT: 3: __end1 -// CHECK-NEXT: 4: [B2.3] (ImplicitCastExpr, LValueToRValue, class A *) +// CHECK-NEXT: 4: [B2.3] (ImplicitCastExpr, LValueToRValue, A *) // CHECK-NEXT: 5: [B2.2] != [B2.4] // CHECK-NEXT: T: for (auto &i : [B5.4]) // CHECK: [B4.11]; @@ -832,7 +832,7 @@ // CHECK: [B4] // CHECK-NEXT: 1: CFGScopeBegin(i) // CHECK-NEXT: 2: __begin1 -// CHECK-NEXT: 3: [B4.2] (ImplicitCastExpr, LValueToRValue, class A *) +// CHECK-NEXT: 3: [B4.2] (ImplicitCastExpr, LValueToRValue, A *) // CHECK-NEXT: 4: *[B4.3] // CHECK-NEXT: 5: auto &i = *__begin1; // CHECK-NEXT: 6: operator= @@ -846,18 +846,18 @@ // CHECK-NEXT: Succs (1): B3 // CHECK: [B5] // CHECK-NEXT: 1: CFGScopeBegin(a) -// CHECK-NEXT: 2: (CXXConstructExpr, [B5.3], class A[10]) +// CHECK-NEXT: 2: (CXXConstructExpr, [B5.3], A[10]) // CHECK-NEXT: 3: A a[10]; // CHECK-NEXT: 4: a // CHECK-NEXT: 5: auto &&__range1 = a; // CHECK-NEXT: 6: CFGScopeBegin(__end1) // CHECK-NEXT: 7: __range1 -// CHECK-NEXT: 8: [B5.7] (ImplicitCastExpr, ArrayToPointerDecay, class A *) +// CHECK-NEXT: 8: [B5.7] (ImplicitCastExpr, ArrayToPointerDecay, A *) // CHECK-NEXT: 9: 10 // CHECK-NEXT: 10: [B5.8] + [B5.9] // CHECK-NEXT: 11: auto __end1 = __range1 + 10 // CHECK-NEXT: 12: __range1 -// CHECK-NEXT: 13: [B5.12] (ImplicitCastExpr, ArrayToPointerDecay, class A *) +// CHECK-NEXT: 13: [B5.12] (ImplicitCastExpr, ArrayToPointerDecay, A *) // CHECK-NEXT: 14: auto __begin1 = __range1; // CHECK-NEXT: Preds (1): B6 // CHECK-NEXT: Succs (1): B2 diff --git a/clang/test/Analysis/temp-obj-dtors-cfg-output.cpp b/clang/test/Analysis/temp-obj-dtors-cfg-output.cpp --- a/clang/test/Analysis/temp-obj-dtors-cfg-output.cpp +++ b/clang/test/Analysis/temp-obj-dtors-cfg-output.cpp @@ -234,13 +234,13 @@ // CHECK: [B2 (ENTRY)] // CHECK: Succs (1): B1 // CHECK: [B1] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER: 1: A() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER: 1: A() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], A) // CHECK: 2: [B1.1] (BindTemporary) -// CHECK: 3: [B1.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 3: [B1.2] (ImplicitCastExpr, NoOp, const A) // CHECK: 4: [B1.3] -// WARNINGS: 5: [B1.4] (CXXConstructExpr, class A) -// ANALYZER: 5: [B1.4] (CXXConstructExpr, [B1.7], class A) +// WARNINGS: 5: [B1.4] (CXXConstructExpr, A) +// ANALYZER: 5: [B1.4] (CXXConstructExpr, [B1.7], A) // CHECK: 6: ~A() (Temporary object destructor) // CHECK: 7: return [B1.5]; // CHECK: Preds (1): B2 @@ -294,13 +294,13 @@ // CHECK: [B2 (ENTRY)] // CHECK: Succs (1): B1 // CHECK: [B1] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER: 1: A() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER: 1: A() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], A) // CHECK: 2: [B1.1] (BindTemporary) -// CHECK: 3: [B1.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 3: [B1.2] (ImplicitCastExpr, NoOp, const A) // CHECK: 4: [B1.3] -// WARNINGS: 5: [B1.4] (CXXConstructExpr, class A) -// ANALYZER: 5: [B1.4] (CXXConstructExpr, [B1.7], class A) +// WARNINGS: 5: [B1.4] (CXXConstructExpr, A) +// ANALYZER: 5: [B1.4] (CXXConstructExpr, [B1.7], A) // CHECK: 6: ~A() (Temporary object destructor) // CHECK: 7: return [B1.5]; // CHECK: Preds (1): B2 @@ -310,16 +310,16 @@ // CHECK: [B2 (ENTRY)] // CHECK: Succs (1): B1 // CHECK: [B1] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER: 1: A() (CXXConstructExpr, [B1.2], [B1.3], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER: 1: A() (CXXConstructExpr, [B1.2], [B1.3], A) // CHECK: 2: [B1.1] (BindTemporary) // CHECK: 3: [B1.2] // CHECK: 4: [B1.3].operator int // CHECK: 5: [B1.3] // CHECK: 6: [B1.5] (ImplicitCastExpr, UserDefinedConversion, int) // CHECK: 7: int([B1.6]) (CXXFunctionalCastExpr, NoOp, int) -// WARNINGS: 8: B() (CXXConstructExpr, class B) -// ANALYZER: 8: B() (CXXConstructExpr, [B1.9], [B1.10], class B) +// WARNINGS: 8: B() (CXXConstructExpr, B) +// ANALYZER: 8: B() (CXXConstructExpr, [B1.9], [B1.10], B) // CHECK: 9: [B1.8] (BindTemporary) // CHECK: 10: [B1.9] // CHECK: 11: [B1.10].operator int @@ -332,16 +332,16 @@ // CHECK: 18: ~A() (Temporary object destructor) // CHECK: 19: foo // CHECK: 20: [B1.19] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(int)) -// WARNINGS: 21: A() (CXXConstructExpr, class A) -// ANALYZER: 21: A() (CXXConstructExpr, [B1.22], [B1.23], class A) +// WARNINGS: 21: A() (CXXConstructExpr, A) +// ANALYZER: 21: A() (CXXConstructExpr, [B1.22], [B1.23], A) // CHECK: 22: [B1.21] (BindTemporary) // CHECK: 23: [B1.22] // CHECK: 24: [B1.23].operator int // CHECK: 25: [B1.23] // CHECK: 26: [B1.25] (ImplicitCastExpr, UserDefinedConversion, int) // CHECK: 27: int([B1.26]) (CXXFunctionalCastExpr, NoOp, int) -// WARNINGS: 28: B() (CXXConstructExpr, class B) -// ANALYZER: 28: B() (CXXConstructExpr, [B1.29], [B1.30], class B) +// WARNINGS: 28: B() (CXXConstructExpr, B) +// ANALYZER: 28: B() (CXXConstructExpr, [B1.29], [B1.30], B) // CHECK: 29: [B1.28] (BindTemporary) // CHECK: 30: [B1.29] // CHECK: 31: [B1.30].operator int @@ -375,8 +375,8 @@ // CHECK: Preds (2): B4 B5 // CHECK: Succs (2): B2 B1 // CHECK: [B4] -// WARNINGS: 1: B() (CXXConstructExpr, class B) -// ANALYZER: 1: B() (CXXConstructExpr, [B4.2], [B4.3], class B) +// WARNINGS: 1: B() (CXXConstructExpr, B) +// ANALYZER: 1: B() (CXXConstructExpr, [B4.2], [B4.3], B) // CHECK: 2: [B4.1] (BindTemporary) // CHECK: 3: [B4.2] // CHECK: 4: [B4.3].operator bool @@ -388,8 +388,8 @@ // CHECK: 1: ~A() (Temporary object destructor) // CHECK: 2: foo // CHECK: 3: [B5.2] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(_Bool)) -// WARNINGS: 4: A() (CXXConstructExpr, class A) -// ANALYZER: 4: A() (CXXConstructExpr, [B5.5], [B5.6], class A) +// WARNINGS: 4: A() (CXXConstructExpr, A) +// ANALYZER: 4: A() (CXXConstructExpr, [B5.5], [B5.6], A) // CHECK: 5: [B5.4] (BindTemporary) // CHECK: 6: [B5.5] // CHECK: 7: [B5.6].operator bool @@ -409,8 +409,8 @@ // CHECK: Preds (2): B8 B9 // CHECK: Succs (2): B6 B5 // CHECK: [B8] -// WARNINGS: 1: B() (CXXConstructExpr, class B) -// ANALYZER: 1: B() (CXXConstructExpr, [B8.2], [B8.3], class B) +// WARNINGS: 1: B() (CXXConstructExpr, B) +// ANALYZER: 1: B() (CXXConstructExpr, [B8.2], [B8.3], B) // CHECK: 2: [B8.1] (BindTemporary) // CHECK: 3: [B8.2] // CHECK: 4: [B8.3].operator bool @@ -419,8 +419,8 @@ // CHECK: Preds (1): B9 // CHECK: Succs (1): B7 // CHECK: [B9] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER: 1: A() (CXXConstructExpr, [B9.2], [B9.3], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER: 1: A() (CXXConstructExpr, [B9.2], [B9.3], A) // CHECK: 2: [B9.1] (BindTemporary) // CHECK: 3: [B9.2] // CHECK: 4: [B9.3].operator bool @@ -449,8 +449,8 @@ // CHECK: Preds (2): B4 B5 // CHECK: Succs (2): B2 B1 // CHECK: [B4] -// WARNINGS: 1: B() (CXXConstructExpr, class B) -// ANALYZER: 1: B() (CXXConstructExpr, [B4.2], [B4.3], class B) +// WARNINGS: 1: B() (CXXConstructExpr, B) +// ANALYZER: 1: B() (CXXConstructExpr, [B4.2], [B4.3], B) // CHECK: 2: [B4.1] (BindTemporary) // CHECK: 3: [B4.2] // CHECK: 4: [B4.3].operator bool @@ -462,8 +462,8 @@ // CHECK: 1: ~A() (Temporary object destructor) // CHECK: 2: foo // CHECK: 3: [B5.2] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(_Bool)) -// WARNINGS: 4: A() (CXXConstructExpr, class A) -// ANALYZER: 4: A() (CXXConstructExpr, [B5.5], [B5.6], class A) +// WARNINGS: 4: A() (CXXConstructExpr, A) +// ANALYZER: 4: A() (CXXConstructExpr, [B5.5], [B5.6], A) // CHECK: 5: [B5.4] (BindTemporary) // CHECK: 6: [B5.5] // CHECK: 7: [B5.6].operator bool @@ -483,8 +483,8 @@ // CHECK: Preds (2): B8 B9 // CHECK: Succs (2): B6 B5 // CHECK: [B8] -// WARNINGS: 1: B() (CXXConstructExpr, class B) -// ANALYZER: 1: B() (CXXConstructExpr, [B8.2], [B8.3], class B) +// WARNINGS: 1: B() (CXXConstructExpr, B) +// ANALYZER: 1: B() (CXXConstructExpr, [B8.2], [B8.3], B) // CHECK: 2: [B8.1] (BindTemporary) // CHECK: 3: [B8.2] // CHECK: 4: [B8.3].operator bool @@ -493,8 +493,8 @@ // CHECK: Preds (1): B9 // CHECK: Succs (1): B7 // CHECK: [B9] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER: 1: A() (CXXConstructExpr, [B9.2], [B9.3], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER: 1: A() (CXXConstructExpr, [B9.2], [B9.3], A) // CHECK: 2: [B9.1] (BindTemporary) // CHECK: 3: [B9.2] // CHECK: 4: [B9.3].operator bool @@ -528,8 +528,8 @@ // CHECK: Succs (1): B1 // CHECK: [B4] // CHECK: 1: ~B() (Temporary object destructor) -// WARNINGS: 2: B() (CXXConstructExpr, class B) -// ANALYZER: 2: B() (CXXConstructExpr, [B4.3], [B4.4], class B) +// WARNINGS: 2: B() (CXXConstructExpr, B) +// ANALYZER: 2: B() (CXXConstructExpr, [B4.3], [B4.4], B) // CHECK: 3: [B4.2] (BindTemporary) // CHECK: 4: [B4.3] // CHECK: 5: [B4.4].operator bool @@ -553,50 +553,50 @@ // CHECK: Succs (1): B4 // CHECK: [B7] // CHECK: 1: [B10.6] ? [B8.6] : [B9.16] -// CHECK: 2: [B7.1] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 2: [B7.1] (ImplicitCastExpr, NoOp, const A) // CHECK: 3: [B7.2] -// WARNINGS: 4: [B7.3] (CXXConstructExpr, class A) -// ANALYZER: 4: [B7.3] (CXXConstructExpr, [B7.5], class A) +// WARNINGS: 4: [B7.3] (CXXConstructExpr, A) +// ANALYZER: 4: [B7.3] (CXXConstructExpr, [B7.5], A) // CHECK: 5: A a = B() ? A() : A(B()); // CHECK: T: (Temp Dtor) [B9.2] // CHECK: Preds (2): B8 B9 // CHECK: Succs (2): B6 B5 // CHECK: [B8] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER: 1: A() (CXXConstructExpr, [B8.2], [B8.4], [B8.5], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER: 1: A() (CXXConstructExpr, [B8.2], [B8.4], [B8.5], A) // CHECK: 2: [B8.1] (BindTemporary) -// CHECK: 3: [B8.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 3: [B8.2] (ImplicitCastExpr, NoOp, const A) // CHECK: 4: [B8.3] -// WARNINGS: 5: [B8.4] (CXXConstructExpr, class A) -// ANALYZER: 5: [B8.4] (CXXConstructExpr, [B8.6], [B7.3], [B7.4], class A) +// WARNINGS: 5: [B8.4] (CXXConstructExpr, A) +// ANALYZER: 5: [B8.4] (CXXConstructExpr, [B8.6], [B7.3], [B7.4], A) // CHECK: 6: [B8.5] (BindTemporary) // CHECK: Preds (1): B10 // CHECK: Succs (1): B7 // CHECK: [B9] -// WARNINGS: 1: B() (CXXConstructExpr, class B) -// ANALYZER: 1: B() (CXXConstructExpr, [B9.2], [B9.3], class B) +// WARNINGS: 1: B() (CXXConstructExpr, B) +// ANALYZER: 1: B() (CXXConstructExpr, [B9.2], [B9.3], B) // CHECK: 2: [B9.1] (BindTemporary) // CHECK: 3: [B9.2] // CHECK: 4: [B9.3].operator A // CHECK: 5: [B9.3] -// CHECK: 6: [B9.5] (ImplicitCastExpr, UserDefinedConversion, class A) +// CHECK: 6: [B9.5] (ImplicitCastExpr, UserDefinedConversion, A) // CHECK: 7: [B9.6] (BindTemporary) -// CHECK: 8: [B9.7] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 8: [B9.7] (ImplicitCastExpr, NoOp, const A) // CHECK: 9: [B9.8] -// WARNINGS: 10: [B9.9] (CXXConstructExpr, class A) -// ANALYZER: 10: [B9.9] (CXXConstructExpr, [B9.11], [B9.14], [B9.15], class A) +// WARNINGS: 10: [B9.9] (CXXConstructExpr, A) +// ANALYZER: 10: [B9.9] (CXXConstructExpr, [B9.11], [B9.14], [B9.15], A) // CHECK: 11: [B9.10] (BindTemporary) -// CHECK: 12: A([B9.11]) (CXXFunctionalCastExpr, ConstructorConversion, class A) -// CHECK: 13: [B9.12] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 12: A([B9.11]) (CXXFunctionalCastExpr, ConstructorConversion, A) +// CHECK: 13: [B9.12] (ImplicitCastExpr, NoOp, const A) // CHECK: 14: [B9.13] -// WARNINGS: 15: [B9.14] (CXXConstructExpr, class A) -// ANALYZER: 15: [B9.14] (CXXConstructExpr, [B9.16], [B7.3], [B7.4], class A) +// WARNINGS: 15: [B9.14] (CXXConstructExpr, A) +// ANALYZER: 15: [B9.14] (CXXConstructExpr, [B9.16], [B7.3], [B7.4], A) // CHECK: 16: [B9.15] (BindTemporary) // CHECK: Preds (1): B10 // CHECK: Succs (1): B7 // CHECK: [B10] -// WARNINGS: 1: B() (CXXConstructExpr, class B) -// ANALYZER: 1: B() (CXXConstructExpr, [B10.2], [B10.3], class B) +// WARNINGS: 1: B() (CXXConstructExpr, B) +// ANALYZER: 1: B() (CXXConstructExpr, [B10.2], [B10.3], B) // CHECK: 2: [B10.1] (BindTemporary) // CHECK: 3: [B10.2] // CHECK: 4: [B10.3].operator bool @@ -664,8 +664,8 @@ // CHECK: Preds (1): B3 // CHECK: Succs (1): B0 // CHECK: [B3] -// WARNINGS: 1: C() (CXXConstructExpr, struct C) -// ANALYZER: 1: C() (CXXConstructExpr, [B3.2], [B3.3], struct C) +// WARNINGS: 1: C() (CXXConstructExpr, C) +// ANALYZER: 1: C() (CXXConstructExpr, [B3.2], [B3.3], C) // CHECK: 2: [B3.1] (BindTemporary) // CHECK: 3: [B3.2] // CHECK: 4: [B3.3].operator bool @@ -695,13 +695,13 @@ // CHECK: Preds (1): B4 // CHECK: Succs (1): B0 // CHECK: [B4] -// WARNINGS: 1: C() (CXXConstructExpr, struct C) -// ANALYZER: 1: C() (CXXConstructExpr, [B4.2], [B4.4], [B4.5], struct C) +// WARNINGS: 1: C() (CXXConstructExpr, C) +// ANALYZER: 1: C() (CXXConstructExpr, [B4.2], [B4.4], [B4.5], C) // CHECK: 2: [B4.1] (BindTemporary) -// CHECK: 3: [B4.2] (ImplicitCastExpr, NoOp, const struct C) +// CHECK: 3: [B4.2] (ImplicitCastExpr, NoOp, const C) // CHECK: 4: [B4.3] -// WARNINGS: 5: [B4.4] (CXXConstructExpr, struct C) -// ANALYZER: 5: [B4.4] (CXXConstructExpr, [B4.6], struct C) +// WARNINGS: 5: [B4.4] (CXXConstructExpr, C) +// ANALYZER: 5: [B4.4] (CXXConstructExpr, [B4.6], C) // CHECK: 6: C c = C(); // CHECK: 7: ~C() (Temporary object destructor) // CHECK: 8: c @@ -726,8 +726,8 @@ // CHECK: Preds (1): B3 // CHECK: Succs (1): B0 // CHECK: [B3] -// WARNINGS: 1: D() (CXXConstructExpr, struct D) -// ANALYZER: 1: D() (CXXConstructExpr, [B3.2], struct D) +// WARNINGS: 1: D() (CXXConstructExpr, D) +// ANALYZER: 1: D() (CXXConstructExpr, [B3.2], D) // CHECK: 2: [B3.1] // CHECK: 3: [B3.2].operator bool // CHECK: 4: [B3.2] @@ -750,23 +750,23 @@ // CHECK: Preds (1): B3 // CHECK: Succs (1): B0 // CHECK: [B3] -// CXX98-WARNINGS: 1: D() (CXXConstructExpr, struct D) -// CXX98-ANALYZER: 1: D() (CXXConstructExpr, [B3.3], [B3.4], struct D) -// CXX98: 2: [B3.1] (ImplicitCastExpr, NoOp, const struct D) +// CXX98-WARNINGS: 1: D() (CXXConstructExpr, D) +// CXX98-ANALYZER: 1: D() (CXXConstructExpr, [B3.3], [B3.4], D) +// CXX98: 2: [B3.1] (ImplicitCastExpr, NoOp, const D) // CXX98: 3: [B3.2] -// CXX98-WARNINGS: 4: [B3.3] (CXXConstructExpr, struct D) -// CXX98-ANALYZER: 4: [B3.3] (CXXConstructExpr, [B3.5], struct D) +// CXX98-WARNINGS: 4: [B3.3] (CXXConstructExpr, D) +// CXX98-ANALYZER: 4: [B3.3] (CXXConstructExpr, [B3.5], D) // CXX98: 5: D d = D(); // CXX98: 6: d // CXX98: 7: [B3.6].operator bool // CXX98: 8: [B3.6] // CXX98: 9: [B3.8] (ImplicitCastExpr, UserDefinedConversion, _Bool) // CXX98: T: if [B3.9] -// CXX11-WARNINGS: 1: D() (CXXConstructExpr, struct D) -// CXX11-ANALYZER: 1: D() (CXXConstructExpr, [B3.2], [B3.3], struct D) +// CXX11-WARNINGS: 1: D() (CXXConstructExpr, D) +// CXX11-ANALYZER: 1: D() (CXXConstructExpr, [B3.2], [B3.3], D) // CXX11: 2: [B3.1] -// CXX11-WARNINGS: 3: [B3.2] (CXXConstructExpr, struct D) -// CXX11-ANALYZER: 3: [B3.2] (CXXConstructExpr, [B3.4], struct D) +// CXX11-WARNINGS: 3: [B3.2] (CXXConstructExpr, D) +// CXX11-ANALYZER: 3: [B3.2] (CXXConstructExpr, [B3.4], D) // CXX11: 4: D d = D(); // CXX11: 5: d // CXX11: 6: [B3.5].operator bool @@ -799,51 +799,51 @@ // CHECK: Succs (1): B1 // CHECK: [B4] // CHECK: 1: [B7.9] ? [B5.6] : [B6.16] -// CHECK: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 2: [B4.1] (ImplicitCastExpr, NoOp, const A) // CHECK: 3: [B4.2] // CHECK: 4: [B7.3]([B4.3]) // CHECK: T: (Temp Dtor) [B6.2] // CHECK: Preds (2): B5 B6 // CHECK: Succs (2): B3 B2 // CHECK: [B5] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER: 1: A() (CXXConstructExpr, [B5.2], [B5.4], [B5.5], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER: 1: A() (CXXConstructExpr, [B5.2], [B5.4], [B5.5], A) // CHECK: 2: [B5.1] (BindTemporary) -// CHECK: 3: [B5.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 3: [B5.2] (ImplicitCastExpr, NoOp, const A) // CHECK: 4: [B5.3] -// WARNINGS: 5: [B5.4] (CXXConstructExpr, class A) -// ANALYZER: 5: [B5.4] (CXXConstructExpr, [B5.6], [B4.3], class A) +// WARNINGS: 5: [B5.4] (CXXConstructExpr, A) +// ANALYZER: 5: [B5.4] (CXXConstructExpr, [B5.6], [B4.3], A) // CHECK: 6: [B5.5] (BindTemporary) // CHECK: Preds (1): B7 // CHECK: Succs (1): B4 // CHECK: [B6] -// WARNINGS: 1: B() (CXXConstructExpr, class B) -// ANALYZER: 1: B() (CXXConstructExpr, [B6.2], [B6.3], class B) +// WARNINGS: 1: B() (CXXConstructExpr, B) +// ANALYZER: 1: B() (CXXConstructExpr, [B6.2], [B6.3], B) // CHECK: 2: [B6.1] (BindTemporary) // CHECK: 3: [B6.2] // CHECK: 4: [B6.3].operator A // CHECK: 5: [B6.3] -// CHECK: 6: [B6.5] (ImplicitCastExpr, UserDefinedConversion, class A) +// CHECK: 6: [B6.5] (ImplicitCastExpr, UserDefinedConversion, A) // CHECK: 7: [B6.6] (BindTemporary) -// CHECK: 8: [B6.7] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 8: [B6.7] (ImplicitCastExpr, NoOp, const A) // CHECK: 9: [B6.8] -// WARNINGS: 10: [B6.9] (CXXConstructExpr, class A) -// ANALYZER: 10: [B6.9] (CXXConstructExpr, [B6.11], [B6.14], [B6.15], class A) +// WARNINGS: 10: [B6.9] (CXXConstructExpr, A) +// ANALYZER: 10: [B6.9] (CXXConstructExpr, [B6.11], [B6.14], [B6.15], A) // CHECK: 11: [B6.10] (BindTemporary) -// CHECK: 12: A([B6.11]) (CXXFunctionalCastExpr, ConstructorConversion, class A) -// CHECK: 13: [B6.12] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 12: A([B6.11]) (CXXFunctionalCastExpr, ConstructorConversion, A) +// CHECK: 13: [B6.12] (ImplicitCastExpr, NoOp, const A) // CHECK: 14: [B6.13] -// WARNINGS: 15: [B6.14] (CXXConstructExpr, class A) -// ANALYZER: 15: [B6.14] (CXXConstructExpr, [B6.16], [B4.3], class A) +// WARNINGS: 15: [B6.14] (CXXConstructExpr, A) +// ANALYZER: 15: [B6.14] (CXXConstructExpr, [B6.16], [B4.3], A) // CHECK: 16: [B6.15] (BindTemporary) // CHECK: Preds (1): B7 // CHECK: Succs (1): B4 // CHECK: [B7] // CHECK: 1: ~B() (Temporary object destructor) // CHECK: 2: foo -// CHECK: 3: [B7.2] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const class A &)) -// WARNINGS: 4: B() (CXXConstructExpr, class B) -// ANALYZER: 4: B() (CXXConstructExpr, [B7.5], [B7.6], class B) +// CHECK: 3: [B7.2] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const A &)) +// WARNINGS: 4: B() (CXXConstructExpr, B) +// ANALYZER: 4: B() (CXXConstructExpr, [B7.5], [B7.6], B) // CHECK: 5: [B7.4] (BindTemporary) // CHECK: 6: [B7.5] // CHECK: 7: [B7.6].operator bool @@ -864,48 +864,48 @@ // CHECK: Succs (1): B7 // CHECK: [B10] // CHECK: 1: [B13.6] ? [B11.6] : [B12.16] -// CHECK: 2: [B10.1] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 2: [B10.1] (ImplicitCastExpr, NoOp, const A) // CHECK: 3: [B10.2] // CHECK: 4: const A &a = B() ? A() : A(B()); // CHECK: T: (Temp Dtor) [B12.2] // CHECK: Preds (2): B11 B12 // CHECK: Succs (2): B9 B8 // CHECK: [B11] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER: 1: A() (CXXConstructExpr, [B11.2], [B11.4], [B11.5], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER: 1: A() (CXXConstructExpr, [B11.2], [B11.4], [B11.5], A) // CHECK: 2: [B11.1] (BindTemporary) -// CHECK: 3: [B11.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 3: [B11.2] (ImplicitCastExpr, NoOp, const A) // CHECK: 4: [B11.3] -// WARNINGS: 5: [B11.4] (CXXConstructExpr, class A) -// ANALYZER: 5: [B11.4] (CXXConstructExpr, [B10.3], class A) +// WARNINGS: 5: [B11.4] (CXXConstructExpr, A) +// ANALYZER: 5: [B11.4] (CXXConstructExpr, [B10.3], A) // CHECK: 6: [B11.5] (BindTemporary) // CHECK: Preds (1): B13 // CHECK: Succs (1): B10 // CHECK: [B12] -// WARNINGS: 1: B() (CXXConstructExpr, class B) -// ANALYZER: 1: B() (CXXConstructExpr, [B12.2], [B12.3], class B) +// WARNINGS: 1: B() (CXXConstructExpr, B) +// ANALYZER: 1: B() (CXXConstructExpr, [B12.2], [B12.3], B) // CHECK: 2: [B12.1] (BindTemporary) // CHECK: 3: [B12.2] // CHECK: 4: [B12.3].operator A // CHECK: 5: [B12.3] -// CHECK: 6: [B12.5] (ImplicitCastExpr, UserDefinedConversion, class A) +// CHECK: 6: [B12.5] (ImplicitCastExpr, UserDefinedConversion, A) // CHECK: 7: [B12.6] (BindTemporary) -// CHECK: 8: [B12.7] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 8: [B12.7] (ImplicitCastExpr, NoOp, const A) // CHECK: 9: [B12.8] -// WARNINGS: 10: [B12.9] (CXXConstructExpr, class A) -// ANALYZER: 10: [B12.9] (CXXConstructExpr, [B12.11], [B12.14], [B12.15], class A) +// WARNINGS: 10: [B12.9] (CXXConstructExpr, A) +// ANALYZER: 10: [B12.9] (CXXConstructExpr, [B12.11], [B12.14], [B12.15], A) // CHECK: 11: [B12.10] (BindTemporary) -// CHECK: 12: A([B12.11]) (CXXFunctionalCastExpr, ConstructorConversion, class A) -// CHECK: 13: [B12.12] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 12: A([B12.11]) (CXXFunctionalCastExpr, ConstructorConversion, A) +// CHECK: 13: [B12.12] (ImplicitCastExpr, NoOp, const A) // CHECK: 14: [B12.13] -// WARNINGS: 15: [B12.14] (CXXConstructExpr, class A) -// ANALYZER: 15: [B12.14] (CXXConstructExpr, [B10.3], class A) +// WARNINGS: 15: [B12.14] (CXXConstructExpr, A) +// ANALYZER: 15: [B12.14] (CXXConstructExpr, [B10.3], A) // CHECK: 16: [B12.15] (BindTemporary) // CHECK: Preds (1): B13 // CHECK: Succs (1): B10 // CHECK: [B13] -// WARNINGS: 1: B() (CXXConstructExpr, class B) -// ANALYZER: 1: B() (CXXConstructExpr, [B13.2], [B13.3], class B) +// WARNINGS: 1: B() (CXXConstructExpr, B) +// ANALYZER: 1: B() (CXXConstructExpr, [B13.2], [B13.3], B) // CHECK: 2: [B13.1] (BindTemporary) // CHECK: 3: [B13.2] // CHECK: 4: [B13.3].operator bool @@ -935,41 +935,41 @@ // CHECK: [B4] // CXX98: 1: [B7.2] ?: [B6.6] // CXX11: 1: [B7.3] ?: [B6.6] -// CHECK: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 2: [B4.1] (ImplicitCastExpr, NoOp, const A) // CHECK: 3: [B4.2] -// WARNINGS: 4: [B4.3] (CXXConstructExpr, class A) -// ANALYZER: 4: [B4.3] (CXXConstructExpr, [B4.5], class A) +// WARNINGS: 4: [B4.3] (CXXConstructExpr, A) +// ANALYZER: 4: [B4.3] (CXXConstructExpr, [B4.5], A) // CHECK: 5: A a = A() ?: A(); // CHECK: T: (Temp Dtor) [B6.2] // CHECK: Preds (2): B5 B6 // CHECK: Succs (2): B3 B2 // CHECK: [B5] -// CXX98: 1: [B7.2] (ImplicitCastExpr, NoOp, const class A) +// CXX98: 1: [B7.2] (ImplicitCastExpr, NoOp, const A) // CXX98: 2: [B5.1] -// WARNINGS-CXX98: 3: [B5.2] (CXXConstructExpr, class A) -// ANALYZER-CXX98: 3: [B5.2] (CXXConstructExpr, [B5.4], class A) +// WARNINGS-CXX98: 3: [B5.2] (CXXConstructExpr, A) +// ANALYZER-CXX98: 3: [B5.2] (CXXConstructExpr, [B5.4], A) // CXX98: 4: [B5.3] (BindTemporary) -// CXX11: 1: [B7.3] (ImplicitCastExpr, NoOp, const class A) -// WARNINGS-CXX11: 2: [B5.1] (CXXConstructExpr, class A) -// ANALYZER-CXX11: 2: [B5.1] (CXXConstructExpr, [B5.3], class A) +// CXX11: 1: [B7.3] (ImplicitCastExpr, NoOp, const A) +// WARNINGS-CXX11: 2: [B5.1] (CXXConstructExpr, A) +// ANALYZER-CXX11: 2: [B5.1] (CXXConstructExpr, [B5.3], A) // CXX11: 3: [B5.2] (BindTemporary) // CHECK: Preds (1): B7 // CHECK: Succs (1): B4 // CHECK: [B6] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER: 1: A() (CXXConstructExpr, [B6.2], [B6.4], [B6.5], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER: 1: A() (CXXConstructExpr, [B6.2], [B6.4], [B6.5], A) // CHECK: 2: [B6.1] (BindTemporary) -// CHECK: 3: [B6.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 3: [B6.2] (ImplicitCastExpr, NoOp, const A) // CHECK: 4: [B6.3] -// WARNINGS: 5: [B6.4] (CXXConstructExpr, class A) -// ANALYZER: 5: [B6.4] (CXXConstructExpr, [B6.6], class A) +// WARNINGS: 5: [B6.4] (CXXConstructExpr, A) +// ANALYZER: 5: [B6.4] (CXXConstructExpr, [B6.6], A) // CHECK: 6: [B6.5] (BindTemporary) // CHECK: Preds (1): B7 // CHECK: Succs (1): B4 // CHECK: [B7] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER-CXX98: 1: A() (CXXConstructExpr, [B7.2], [B7.3], class A) -// ANALYZER-CXX11: 1: A() (CXXConstructExpr, [B7.2], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER-CXX98: 1: A() (CXXConstructExpr, [B7.2], [B7.3], A) +// ANALYZER-CXX11: 1: A() (CXXConstructExpr, [B7.2], A) // CHECK: 2: [B7.1] (BindTemporary) // CHECK: 3: [B7.2] // CHECK: 4: [B7.3].operator bool @@ -999,41 +999,41 @@ // CHECK: [B4] // CXX98: 1: [B7.4] ?: [B6.6] // CXX11: 1: [B7.5] ?: [B6.6] -// CHECK: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 2: [B4.1] (ImplicitCastExpr, NoOp, const A) // CHECK: 3: [B4.2] // CHECK: 4: [B7.2]([B4.3]) // CHECK: T: (Temp Dtor) [B6.2] // CHECK: Preds (2): B5 B6 // CHECK: Succs (2): B3 B2 // CHECK: [B5] -// CXX98: 1: [B7.4] (ImplicitCastExpr, NoOp, const class A) +// CXX98: 1: [B7.4] (ImplicitCastExpr, NoOp, const A) // CXX98: 2: [B5.1] -// WARNINGS-CXX98: 3: [B5.2] (CXXConstructExpr, class A) -// ANALYZER-CXX98: 3: [B5.2] (CXXConstructExpr, [B5.4], class A) +// WARNINGS-CXX98: 3: [B5.2] (CXXConstructExpr, A) +// ANALYZER-CXX98: 3: [B5.2] (CXXConstructExpr, [B5.4], A) // CXX98: 4: [B5.3] (BindTemporary) -// CXX11: 1: [B7.5] (ImplicitCastExpr, NoOp, const class A) -// WARNINGS-CXX11: 2: [B5.1] (CXXConstructExpr, class A) -// ANALYZER-CXX11: 2: [B5.1] (CXXConstructExpr, [B5.3], class A) +// CXX11: 1: [B7.5] (ImplicitCastExpr, NoOp, const A) +// WARNINGS-CXX11: 2: [B5.1] (CXXConstructExpr, A) +// ANALYZER-CXX11: 2: [B5.1] (CXXConstructExpr, [B5.3], A) // CXX11: 3: [B5.2] (BindTemporary) // CHECK: Preds (1): B7 // CHECK: Succs (1): B4 // CHECK: [B6] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER: 1: A() (CXXConstructExpr, [B6.2], [B6.4], [B6.5], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER: 1: A() (CXXConstructExpr, [B6.2], [B6.4], [B6.5], A) // CHECK: 2: [B6.1] (BindTemporary) -// CHECK: 3: [B6.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 3: [B6.2] (ImplicitCastExpr, NoOp, const A) // CHECK: 4: [B6.3] -// WARNINGS: 5: [B6.4] (CXXConstructExpr, class A) -// ANALYZER: 5: [B6.4] (CXXConstructExpr, [B6.6], class A) +// WARNINGS: 5: [B6.4] (CXXConstructExpr, A) +// ANALYZER: 5: [B6.4] (CXXConstructExpr, [B6.6], A) // CHECK: 6: [B6.5] (BindTemporary) // CHECK: Preds (1): B7 // CHECK: Succs (1): B4 // CHECK: [B7] // CHECK: 1: foo -// CHECK: 2: [B7.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const class A &)) -// WARNINGS: 3: A() (CXXConstructExpr, class A) -// ANALYZER-CXX98: 3: A() (CXXConstructExpr, [B7.4], class A) -// ANALYZER-CXX11: 3: A() (CXXConstructExpr, class A) +// CHECK: 2: [B7.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const A &)) +// WARNINGS: 3: A() (CXXConstructExpr, A) +// ANALYZER-CXX98: 3: A() (CXXConstructExpr, [B7.4], A) +// ANALYZER-CXX11: 3: A() (CXXConstructExpr, A) // CHECK: 4: [B7.3] (BindTemporary) // CHECK: 5: [B7.4] // CHECK: 6: [B7.5].operator bool @@ -1049,39 +1049,39 @@ // CHECK: [B9] // CXX98: 1: [B12.2] ?: [B11.6] // CXX11: 1: [B12.3] ?: [B11.6] -// CHECK: 2: [B9.1] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 2: [B9.1] (ImplicitCastExpr, NoOp, const A) // CHECK: 3: [B9.2] // CHECK: 4: const A &a = A() ?: A(); // CHECK: T: (Temp Dtor) [B11.2] // CHECK: Preds (2): B10 B11 // CHECK: Succs (2): B8 B7 // CHECK: [B10] -// CXX98: 1: [B12.2] (ImplicitCastExpr, NoOp, const class A) +// CXX98: 1: [B12.2] (ImplicitCastExpr, NoOp, const A) // CXX98: 2: [B10.1] -// WARNINGS-CXX98: 3: [B10.2] (CXXConstructExpr, class A) -// ANALYZER-CXX98: 3: [B10.2] (CXXConstructExpr, [B10.4], class A) +// WARNINGS-CXX98: 3: [B10.2] (CXXConstructExpr, A) +// ANALYZER-CXX98: 3: [B10.2] (CXXConstructExpr, [B10.4], A) // CXX98: 4: [B10.3] (BindTemporary) -// CXX11: 1: [B12.3] (ImplicitCastExpr, NoOp, const class A) -// WARNINGS-CXX11: 2: [B10.1] (CXXConstructExpr, class A) -// ANALYZER-CXX11: 2: [B10.1] (CXXConstructExpr, [B10.3], class A) +// CXX11: 1: [B12.3] (ImplicitCastExpr, NoOp, const A) +// WARNINGS-CXX11: 2: [B10.1] (CXXConstructExpr, A) +// ANALYZER-CXX11: 2: [B10.1] (CXXConstructExpr, [B10.3], A) // CXX11: 3: [B10.2] (BindTemporary) // CHECK: Preds (1): B12 // CHECK: Succs (1): B9 // CHECK: [B11] -// WARNINGS-CHECK: 1: A() (CXXConstructExpr, class A) -// ANALYZER-CHECK: 1: A() (CXXConstructExpr, [B11.2], class A) +// WARNINGS-CHECK: 1: A() (CXXConstructExpr, A) +// ANALYZER-CHECK: 1: A() (CXXConstructExpr, [B11.2], A) // CHECK: 2: [B11.1] (BindTemporary) -// CHECK: 3: [B11.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 3: [B11.2] (ImplicitCastExpr, NoOp, const A) // CHECK: 4: [B11.3] -// WARNINGS: 5: [B11.4] (CXXConstructExpr, class A) -// ANALYZER: 5: [B11.4] (CXXConstructExpr, [B11.6], class A) +// WARNINGS: 5: [B11.4] (CXXConstructExpr, A) +// ANALYZER: 5: [B11.4] (CXXConstructExpr, [B11.6], A) // CHECK: 6: [B11.5] (BindTemporary) // CHECK: Preds (1): B12 // CHECK: Succs (1): B9 // CHECK: [B12] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER-CXX98: 1: A() (CXXConstructExpr, [B12.2], [B12.3], class A) -// ANALYZER-CXX11: 1: A() (CXXConstructExpr, [B12.2], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER-CXX98: 1: A() (CXXConstructExpr, [B12.2], [B12.3], A) +// ANALYZER-CXX11: 1: A() (CXXConstructExpr, [B12.2], A) // CHECK: 2: [B12.1] (BindTemporary) // CHECK: 3: [B12.2] // CHECK: 4: [B12.3].operator bool @@ -1095,13 +1095,13 @@ // CHECK: [B2 (ENTRY)] // CHECK: Succs (1): B1 // CHECK: [B1] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER: 1: A() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER: 1: A() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], A) // CHECK: 2: [B1.1] (BindTemporary) -// CHECK: 3: [B1.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 3: [B1.2] (ImplicitCastExpr, NoOp, const A) // CHECK: 4: [B1.3] -// WARNINGS: 5: [B1.4] (CXXConstructExpr, class A) -// ANALYZER: 5: [B1.4] (CXXConstructExpr, [B1.6], class A) +// WARNINGS: 5: [B1.4] (CXXConstructExpr, A) +// ANALYZER: 5: [B1.4] (CXXConstructExpr, [B1.6], A) // CHECK: 6: A a = A(); // CHECK: 7: ~A() (Temporary object destructor) // CHECK: 8: int b; @@ -1113,18 +1113,18 @@ // CHECK: [B2 (ENTRY)] // CHECK: Succs (1): B1 // CHECK: [B1] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER: 1: A() (CXXConstructExpr, [B1.4], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER: 1: A() (CXXConstructExpr, [B1.4], A) // CHECK: 2: [B1.1] (BindTemporary) -// CHECK: 3: [B1.2] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 3: [B1.2] (ImplicitCastExpr, NoOp, const A) // CHECK: 4: [B1.3] // CHECK: 5: const A &a = A(); // CHECK: 6: foo -// CHECK: 7: [B1.6] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const class A &)) -// WARNINGS: 8: A() (CXXConstructExpr, class A) -// ANALYZER: 8: A() (CXXConstructExpr, [B1.9], [B1.11], class A) +// CHECK: 7: [B1.6] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const A &)) +// WARNINGS: 8: A() (CXXConstructExpr, A) +// ANALYZER: 8: A() (CXXConstructExpr, [B1.9], [B1.11], A) // CHECK: 9: [B1.8] (BindTemporary) -// CHECK: 10: [B1.9] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 10: [B1.9] (ImplicitCastExpr, NoOp, const A) // CHECK: 11: [B1.10] // CHECK: 12: [B1.7]([B1.11]) // CHECK: 13: ~A() (Temporary object destructor) @@ -1138,14 +1138,14 @@ // CHECK: Succs (1): B1 // CHECK: [B1] // CHECK: 1: A::make -// CHECK: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class A (*)(void)) +// CHECK: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, A (*)(void)) // WARNINGS: 3: [B1.2]() // ANALYZER: 3: [B1.2]() (CXXRecordTypedCall, [B1.4], [B1.6], [B1.7]) // CHECK: 4: [B1.3] (BindTemporary) -// CHECK: 5: [B1.4] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 5: [B1.4] (ImplicitCastExpr, NoOp, const A) // CHECK: 6: [B1.5] -// WARNINGS: 7: [B1.6] (CXXConstructExpr, class A) -// ANALYZER: 7: [B1.6] (CXXConstructExpr, [B1.8], class A) +// WARNINGS: 7: [B1.6] (CXXConstructExpr, A) +// ANALYZER: 7: [B1.6] (CXXConstructExpr, [B1.8], A) // CHECK: 8: A a = A::make(); // CHECK: 9: ~A() (Temporary object destructor) // CHECK: 10: int b; @@ -1158,21 +1158,21 @@ // CHECK: Succs (1): B1 // CHECK: [B1] // CHECK: 1: A::make -// CHECK: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class A (*)(void)) +// CHECK: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, A (*)(void)) // WARNINGS: 3: [B1.2]() // ANALYZER: 3: [B1.2]() (CXXRecordTypedCall, [B1.6]) // CHECK: 4: [B1.3] (BindTemporary) -// CHECK: 5: [B1.4] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 5: [B1.4] (ImplicitCastExpr, NoOp, const A) // CHECK: 6: [B1.5] // CHECK: 7: const A &a = A::make(); // CHECK: 8: foo -// CHECK: 9: [B1.8] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const class A &)) +// CHECK: 9: [B1.8] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const A &)) // CHECK: 10: A::make -// CHECK: 11: [B1.10] (ImplicitCastExpr, FunctionToPointerDecay, class A (*)(void)) +// CHECK: 11: [B1.10] (ImplicitCastExpr, FunctionToPointerDecay, A (*)(void)) // WARNINGS: 12: [B1.11]() // ANALYZER: 12: [B1.11]() (CXXRecordTypedCall, [B1.13], [B1.15]) // CHECK: 13: [B1.12] (BindTemporary) -// CHECK: 14: [B1.13] (ImplicitCastExpr, NoOp, const class A) +// CHECK: 14: [B1.13] (ImplicitCastExpr, NoOp, const A) // CHECK: 15: [B1.14] // CHECK: 16: [B1.9]([B1.15]) // CHECK: 17: ~A() (Temporary object destructor) @@ -1186,8 +1186,8 @@ // CHECK: Succs (1): B1 // CHECK: [B1] // CHECK: 1: int a; -// WARNINGS: 2: A() (CXXConstructExpr, class A) -// ANALYZER: 2: A() (CXXConstructExpr, [B1.3], [B1.4], class A) +// WARNINGS: 2: A() (CXXConstructExpr, A) +// ANALYZER: 2: A() (CXXConstructExpr, [B1.3], [B1.4], A) // CHECK: 3: [B1.2] (BindTemporary) // CHECK: 4: [B1.3] // CHECK: 5: [B1.4].operator int @@ -1204,16 +1204,16 @@ // CHECK: [B2 (ENTRY)] // CHECK: Succs (1): B1 // CHECK: [B1] -// WARNINGS: 1: A() (CXXConstructExpr, class A) -// ANALYZER: 1: A() (CXXConstructExpr, [B1.2], [B1.3], class A) +// WARNINGS: 1: A() (CXXConstructExpr, A) +// ANALYZER: 1: A() (CXXConstructExpr, [B1.2], [B1.3], A) // CHECK: 2: [B1.1] (BindTemporary) // CHECK: 3: [B1.2] // CHECK: 4: [B1.3].operator int // CHECK: 5: [B1.3] // CHECK: 6: [B1.5] (ImplicitCastExpr, UserDefinedConversion, int) // CHECK: 7: int([B1.6]) (CXXFunctionalCastExpr, NoOp, int) -// WARNINGS: 8: B() (CXXConstructExpr, class B) -// ANALYZER: 8: B() (CXXConstructExpr, [B1.9], [B1.10], class B) +// WARNINGS: 8: B() (CXXConstructExpr, B) +// ANALYZER: 8: B() (CXXConstructExpr, [B1.9], [B1.10], B) // CHECK: 9: [B1.8] (BindTemporary) // CHECK: 10: [B1.9] // CHECK: 11: [B1.10].operator int @@ -1237,9 +1237,9 @@ // CHECK: Succs (1): B0 // CHECK: [B2 (NORETURN)] // CHECK: 1: int a; -// WARNINGS: 2: NoReturn() (CXXConstructExpr, class NoReturn) -// ANALYZER-CXX98: 2: NoReturn() (CXXConstructExpr, [B2.3], [B2.4], class NoReturn) -// ANALYZER-CXX11: 2: NoReturn() (CXXConstructExpr, [B2.3], class NoReturn) +// WARNINGS: 2: NoReturn() (CXXConstructExpr, NoReturn) +// ANALYZER-CXX98: 2: NoReturn() (CXXConstructExpr, [B2.3], [B2.4], NoReturn) +// ANALYZER-CXX11: 2: NoReturn() (CXXConstructExpr, [B2.3], NoReturn) // CHECK: 3: [B2.2] (BindTemporary) // CHECK: [[MEMBER:[45]]]: [B2.{{[34]}}].f // CHECK: {{[56]}}: [B2.[[MEMBER]]]() @@ -1256,8 +1256,8 @@ // CHECK: Succs (1): B0 // CHECK: [B2 (NORETURN)] // CHECK: 1: int a; -// WARNINGS: 2: NoReturn() (CXXConstructExpr, class NoReturn) -// ANALYZER: 2: NoReturn() (CXXConstructExpr, [B2.3], class NoReturn) +// WARNINGS: 2: NoReturn() (CXXConstructExpr, NoReturn) +// ANALYZER: 2: NoReturn() (CXXConstructExpr, [B2.3], NoReturn) // CHECK: 3: [B2.2] (BindTemporary) // CHECK: 4: 47 // CHECK: 5: ... , [B2.4] @@ -1293,11 +1293,11 @@ // CHECK: Succs (2): B4 B3 // CHECK: [B6] // CHECK: 1: check -// CHECK: 2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const class NoReturn &)) -// WARNINGS: 3: NoReturn() (CXXConstructExpr, class NoReturn) -// ANALYZER: 3: NoReturn() (CXXConstructExpr, [B6.4], [B6.6], class NoReturn) +// CHECK: 2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const NoReturn &)) +// WARNINGS: 3: NoReturn() (CXXConstructExpr, NoReturn) +// ANALYZER: 3: NoReturn() (CXXConstructExpr, [B6.4], [B6.6], NoReturn) // CHECK: 4: [B6.3] (BindTemporary) -// CHECK: 5: [B6.4] (ImplicitCastExpr, NoOp, const class NoReturn) +// CHECK: 5: [B6.4] (ImplicitCastExpr, NoOp, const NoReturn) // CHECK: 6: [B6.5] // CHECK: 7: [B6.2]([B6.6]) // CHECK: Preds (1): B7 @@ -1344,11 +1344,11 @@ // CHECK: Succs (2): B4 B3 // CHECK: [B6] // CHECK: 1: check -// CHECK: 2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const class NoReturn &)) -// WARNINGS: 3: NoReturn() (CXXConstructExpr, class NoReturn) -// ANALYZER: 3: NoReturn() (CXXConstructExpr, [B6.4], [B6.6], class NoReturn) +// CHECK: 2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const NoReturn &)) +// WARNINGS: 3: NoReturn() (CXXConstructExpr, NoReturn) +// ANALYZER: 3: NoReturn() (CXXConstructExpr, [B6.4], [B6.6], NoReturn) // CHECK: 4: [B6.3] (BindTemporary) -// CHECK: 5: [B6.4] (ImplicitCastExpr, NoOp, const class NoReturn) +// CHECK: 5: [B6.4] (ImplicitCastExpr, NoOp, const NoReturn) // CHECK: 6: [B6.5] // CHECK: 7: [B6.2]([B6.6]) // CHECK: Preds (1): B7 @@ -1402,11 +1402,11 @@ // CHECK: Succs (2): B4 B3 // CHECK: [B6] // CHECK: 1: check -// CHECK: 2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const class NoReturn &)) -// WARNINGS: 3: NoReturn() (CXXConstructExpr, class NoReturn) -// ANALYZER: 3: NoReturn() (CXXConstructExpr, [B6.4], [B6.6], class NoReturn) +// CHECK: 2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const NoReturn &)) +// WARNINGS: 3: NoReturn() (CXXConstructExpr, NoReturn) +// ANALYZER: 3: NoReturn() (CXXConstructExpr, [B6.4], [B6.6], NoReturn) // CHECK: 4: [B6.3] (BindTemporary) -// CHECK: 5: [B6.4] (ImplicitCastExpr, NoOp, const class NoReturn) +// CHECK: 5: [B6.4] (ImplicitCastExpr, NoOp, const NoReturn) // CHECK: 6: [B6.5] // CHECK: 7: [B6.2]([B6.6]) // CHECK: Preds (1): B7 @@ -1440,7 +1440,7 @@ // CHECK: Succs (1): B1 // CHECK: [B1] // CHECK: 1: foo1 -// CHECK: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, const class pass_references_through::C &(*)(void)) +// CHECK: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, const C &(*)(void)) // CHECK: 3: [B1.2]() // CHECK: 4: return [B1.3]; // CHECK: Preds (1): B2 @@ -1451,7 +1451,7 @@ // CHECK: Succs (1): B1 // CHECK: [B1] // CHECK: 1: foo2 -// CHECK: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class pass_references_through::C &&(*)(void)) +// CHECK: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, C &&(*)(void)) // CHECK: 3: [B1.2]() // CHECK: 4: return [B1.3]; // CHECK: 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 @@ -44,7 +44,7 @@ // avoid accepting and printing out a typo correction that proves to be // incorrect once argument-dependent lookup resolution has occurred. func(B::B()); // expected-error {{use of undeclared identifier 'func'; did you mean 'C::func'?}} \ - // expected-error {{no viable conversion from 'B::B' to 'C::C'}} + // expected-error {{no viable conversion from 'B::B' to 'C'}} func(C::C()); A::A() + A::A(); B::B() + B::B(); diff --git a/clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp b/clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp --- a/clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp +++ b/clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp @@ -63,11 +63,11 @@ int i = Ints::zero; Numbers2::f(i); - Numbers2::g(i); // expected-error {{no viable conversion from 'int' to 'Numbers::Number'}} + Numbers2::g(i); // expected-error {{no viable conversion from 'int' to 'Number'}} float f = Floats::zero; Numbers2::f(f); - Numbers2::g(f); // expected-error {{no viable conversion from 'float' to 'Numbers::Number'}} + Numbers2::g(f); // expected-error {{no viable conversion from 'float' to 'Number'}} } namespace inline_ns { diff --git a/clang/test/CXX/class.access/p4.cpp b/clang/test/CXX/class.access/p4.cpp --- a/clang/test/CXX/class.access/p4.cpp +++ b/clang/test/CXX/class.access/p4.cpp @@ -102,7 +102,7 @@ A A::foo; // okay #if __cplusplus < 201103L - class B : A { }; // expected-error {{base class 'test2::A' has private default constructor}} + class B : A { }; // expected-error {{base class 'A' has private default constructor}} B b; // expected-note{{implicit default constructor}} class C : virtual A { @@ -110,14 +110,14 @@ C(); }; - class D : C { }; // expected-error {{inherited virtual base class 'test2::A' has private default constructor}} + class D : C { }; // expected-error {{inherited virtual base class 'A' has private default constructor}} D d; // expected-note{{implicit default constructor}} #else - class B : A { }; // expected-note {{base class 'test2::A' has an inaccessible default constructor}} + class B : A { }; // expected-note {{base class 'A' has an inaccessible default constructor}} B b; // expected-error {{call to implicitly-deleted default constructor}} // FIXME: Do a better job of explaining how we get here from class D. - class C : virtual A { // expected-note {{default constructor of 'D' is implicitly deleted because base class 'test2::A' has an inaccessible default constructor}} + class C : virtual A { // expected-note {{default constructor of 'D' is implicitly deleted because base class 'A' has an inaccessible default constructor}} public: C(); }; @@ -135,11 +135,11 @@ static A foo; }; - A a; // expected-error {{variable of type 'test3::A' has private destructor}} + A a; // expected-error {{variable of type 'A' has private destructor}} A A::foo; void foo(A param) { // okay - A local; // expected-error {{variable of type 'test3::A' has private destructor}} + A local; // expected-error {{variable of type 'A' has private destructor}} } #if __cplusplus < 201103L && !defined(_MSC_VER) @@ -156,7 +156,7 @@ // expected-error {{inherited virtual base class 'Base<3>' has private destructor}} Base<0>, // expected-error {{base class 'Base<0>' has private destructor}} virtual Base<1>, // expected-error {{base class 'Base<1>' has private destructor}} - Base2, // expected-error {{base class 'test3::Base2' has private destructor}} + Base2, // expected-error {{base class 'Base2' has private destructor}} virtual Base3 { ~Derived2() {} @@ -167,7 +167,7 @@ // expected-note 2{{implicit default constructor}} Base<0>, // expected-error 2 {{base class 'Base<0>' has private destructor}} virtual Base<1>, // expected-error 2 {{base class 'Base<1>' has private destructor}} - Base2, // expected-error 2 {{base class 'test3::Base2' has private destructor}} + Base2, // expected-error 2 {{base class 'Base2' has private destructor}} virtual Base3 {}; Derived3 d3; // expected-note{{implicit destructor}}} \ @@ -186,7 +186,7 @@ // expected-error {{inherited virtual base class 'Base<3>' has private destructor}} Base<0>, // expected-error {{base class 'Base<0>' has private destructor}} virtual Base<1>, // expected-error {{base class 'Base<1>' has private destructor}} - Base2, // expected-error {{base class 'test3::Base2' has private destructor}} + Base2, // expected-error {{base class 'Base2' has private destructor}} virtual Base3 { ~Derived2() {} // expected-note 2{{in implicit destructor}} @@ -196,7 +196,7 @@ // expected-error 2 {{inherited virtual base class 'Base<3>' has private destructor}} Base<0>, // expected-error 2 {{base class 'Base<0>' has private destructor}} virtual Base<1>, // expected-error 2 {{base class 'Base<1>' has private destructor}} - Base2, // expected-error 2 {{base class 'test3::Base2' has private destructor}} + Base2, // expected-error 2 {{base class 'Base2' has private destructor}} virtual Base3 {}; Derived3 d3; // expected-note{{implicit destructor}}} expected-note {{implicit default constructor}} @@ -213,7 +213,7 @@ // expected-error {{inherited virtual base class 'Base<3>' has private destructor}} Base<0>, // expected-error {{base class 'Base<0>' has private destructor}} virtual Base<1>, // expected-error {{base class 'Base<1>' has private destructor}} - Base2, // expected-error {{base class 'test3::Base2' has private destructor}} + Base2, // expected-error {{base class 'Base2' has private destructor}} virtual Base3 { ~Derived2() {} @@ -241,7 +241,7 @@ // expected-error {{inherited virtual base class 'Base<3>' has private destructor}} Base<0>, // expected-error {{base class 'Base<0>' has private destructor}} virtual Base<1>, // expected-error {{base class 'Base<1>' has private destructor}} - Base2, // expected-error {{base class 'test3::Base2' has private destructor}} + Base2, // expected-error {{base class 'Base2' has private destructor}} virtual Base3 { // expected-note@+2 {{in implicit destructor for 'test3::Base2' first required here}} @@ -328,7 +328,7 @@ a = Test1(); // expected-error {{copy assignment operator is implicitly deleted}} } - class Test2 : A {}; // expected-note {{because base class 'test5::A' has an inaccessible copy assignment operator}} + class Test2 : A {}; // expected-note {{because base class 'A' has an inaccessible copy assignment operator}} void test2() { Test2 a; a = Test2(); // expected-error {{copy assignment operator is implicitly deleted}} @@ -347,12 +347,12 @@ }; #if __cplusplus < 201103L - class Test1 { A a; }; // expected-error {{field of type 'test6::A' has private copy constructor}} + class Test1 { A a; }; // expected-error {{field of type 'A' has private copy constructor}} void test1(const Test1 &t) { Test1 a = t; // expected-note{{implicit copy}} } - class Test2 : A {}; // expected-error {{base class 'test6::A' has private copy constructor}} + class Test2 : A {}; // expected-error {{base class 'A' has private copy constructor}} void test2(const Test2 &t) { Test2 a = t; // expected-note{{implicit copy}} } @@ -362,7 +362,7 @@ Test1 a = t; // expected-error{{implicitly-deleted}} } - class Test2 : A {}; // expected-note {{base class 'test6::A' has an inaccessible copy constructor}} + class Test2 : A {}; // expected-note {{base class 'A' has an inaccessible copy constructor}} void test2(const Test2 &t) { Test2 a = t; // expected-error{{implicitly-deleted}} } @@ -483,7 +483,7 @@ A foo(); void test() { - foo(); // expected-error {{temporary of type 'test14::A' has private destructor}} + foo(); // expected-error {{temporary of type 'A' has private destructor}} } class X { @@ -495,7 +495,7 @@ }; void g() { - const X &xr = Y1(); // expected-error{{temporary of type 'test14::X' has private destructor}} + const X &xr = Y1(); // expected-error{{temporary of type 'X' has private destructor}} } } @@ -558,8 +558,8 @@ // PR7281 namespace test16 { class A { ~A(); }; // expected-note 2{{declared private here}} - void b() { throw A(); } // expected-error{{temporary of type 'test16::A' has private destructor}} \ - // expected-error{{exception object of type 'test16::A' has private destructor}} + void b() { throw A(); } // expected-error{{temporary of type 'A' has private destructor}} \ + // expected-error{{exception object of type 'A' has private destructor}} } // rdar://problem/8146294 diff --git a/clang/test/CXX/class/class.compare/class.compare.default/p1.cpp b/clang/test/CXX/class/class.compare/class.compare.default/p1.cpp --- a/clang/test/CXX/class/class.compare/class.compare.default/p1.cpp +++ b/clang/test/CXX/class/class.compare/class.compare.default/p1.cpp @@ -36,8 +36,8 @@ template struct Dependent { using U = typename T::type; - bool operator==(U) const = default; // expected-error {{found 'Dependent::U'}} - friend bool operator==(U, U) = default; // expected-error {{found 'Dependent::U'}} + bool operator==(U) const = default; // expected-error {{found 'U'}} + friend bool operator==(U, U) = default; // expected-error {{found 'U'}} }; struct Good { using type = const Dependent&; }; diff --git a/clang/test/CXX/class/class.compare/class.eq/p2.cpp b/clang/test/CXX/class/class.compare/class.eq/p2.cpp --- a/clang/test/CXX/class/class.compare/class.eq/p2.cpp +++ b/clang/test/CXX/class/class.compare/class.eq/p2.cpp @@ -127,7 +127,7 @@ // Note: this function is not deleted. The selected operator== is // accessible. But the derived-to-base conversion involves an inaccessible // base class, which we don't check for until we define the function. - bool operator==(const Z&) const = default; // expected-error {{cannot cast 'const Access::Y' to its private base class 'const Access::X'}} expected-warning {{ambiguous}} + bool operator==(const Z&) const = default; // expected-error {{cannot cast 'const Y' to its private base class 'const X'}} expected-warning {{ambiguous}} }; bool z = Z() == Z(); // expected-note {{first required here}} } diff --git a/clang/test/CXX/class/class.compare/class.spaceship/p1.cpp b/clang/test/CXX/class/class.compare/class.spaceship/p1.cpp --- a/clang/test/CXX/class/class.compare/class.spaceship/p1.cpp +++ b/clang/test/CXX/class/class.compare/class.spaceship/p1.cpp @@ -225,7 +225,7 @@ struct B { B(); A a; - std::strong_ordering operator<=>(const B&) const = default; // expected-error {{call to deleted constructor of 'Preference::A'}} + std::strong_ordering operator<=>(const B&) const = default; // expected-error {{call to deleted constructor of 'A'}} }; bool x = B() < B(); // expected-note {{in defaulted three-way comparison operator for 'Preference::B' first required here}} } diff --git a/clang/test/CXX/class/class.compare/class.spaceship/p2.cpp b/clang/test/CXX/class/class.compare/class.spaceship/p2.cpp --- a/clang/test/CXX/class/class.compare/class.spaceship/p2.cpp +++ b/clang/test/CXX/class/class.compare/class.spaceship/p2.cpp @@ -41,7 +41,7 @@ A operator<=>(const A&) const; // expected-note {{selected 'operator<=>' for member 'a' declared here}} }; struct B { - A a; // expected-note {{return type 'DeducedNotCat::A' of three-way comparison for member 'a' is not a standard comparison category type}} + A a; // expected-note {{return type 'A' of three-way comparison for member 'a' is not a standard comparison category type}} auto operator<=>(const B&) const = default; // expected-warning {{implicitly deleted}} }; } diff --git a/clang/test/CXX/class/class.init/class.copy.elision/p3.cpp b/clang/test/CXX/class/class.init/class.copy.elision/p3.cpp --- a/clang/test/CXX/class/class.init/class.copy.elision/p3.cpp +++ b/clang/test/CXX/class/class.init/class.copy.elision/p3.cpp @@ -11,7 +11,7 @@ }; A1 test1() { A1 a; - return a; // expected-error {{call to deleted constructor of 'test_delete_function::A1'}} + return a; // expected-error {{call to deleted constructor of 'A1'}} } struct A2 { @@ -34,7 +34,7 @@ }; B1 test3() { C c; - return c; // expected-error {{conversion function from 'test_delete_function::C' to 'test_delete_function::B1' invokes a deleted function}} + return c; // expected-error {{conversion function from 'C' to 'B1' invokes a deleted function}} } struct B2 { @@ -75,7 +75,7 @@ B1(B1 &&) = delete; // expected-note {{'B1' has been explicitly marked deleted here}} }; B1 test3(B1 &&b) { - return b; // expected-error {{call to deleted constructor of 'test_implicitly_movable_rvalue_ref::B1'}} + return b; // expected-error {{call to deleted constructor of 'B1'}} } struct B2 { @@ -102,7 +102,7 @@ try { func(); } catch (A1 a) { - throw a; // expected-error {{call to deleted constructor of 'test_throw_parameter::A1'}} + throw a; // expected-error {{call to deleted constructor of 'A1'}} } } @@ -123,7 +123,7 @@ void test3(A1 a) try { func(); } catch (...) { - throw a; // expected-error {{call to deleted constructor of 'test_throw_parameter::A1'}} + throw a; // expected-error {{call to deleted constructor of 'A1'}} } } // namespace test_throw_parameter @@ -158,7 +158,7 @@ }; C test3() { B1 b; - return b; // expected-error {{conversion function from 'test_non_ctor_conversion::B1' to 'test_non_ctor_conversion::C' invokes a deleted function}} + return b; // expected-error {{conversion function from 'B1' to 'C' invokes a deleted function}} } struct B2 { @@ -256,20 +256,20 @@ // not rvalue reference // same type B1 b; - return b; // cxx11_2b-error {{call to deleted constructor of 'test_ctor_param_rvalue_ref::B1'}} + return b; // cxx11_2b-error {{call to deleted constructor of 'B1'}} } class DerivedB1 : public B1 {}; B1 test_3_2() { // rvalue reference // not same type DerivedB1 b; - return b; // expected-error {{call to deleted constructor of 'test_ctor_param_rvalue_ref::B1'}} + return b; // expected-error {{call to deleted constructor of 'B1'}} } NeedValue test_3_3() { // not rvalue reference // not same type DerivedB1 b; - return b; // cxx11_2b-error {{call to deleted constructor of 'test_ctor_param_rvalue_ref::B1'}} + return b; // cxx11_2b-error {{call to deleted constructor of 'B1'}} } struct B2 { diff --git a/clang/test/CXX/class/class.mem/p2.cpp b/clang/test/CXX/class/class.mem/p2.cpp --- a/clang/test/CXX/class/class.mem/p2.cpp +++ b/clang/test/CXX/class/class.mem/p2.cpp @@ -12,7 +12,7 @@ namespace test0 { struct A { // expected-note {{definition of 'test0::A' is not complete until the closing '}'}} - A x; // expected-error {{field has incomplete type 'test0::A'}} + A x; // expected-error {{field has incomplete type 'A'}} }; } diff --git a/clang/test/CXX/conv/conv.fctptr/p1.cpp b/clang/test/CXX/conv/conv.fctptr/p1.cpp --- a/clang/test/CXX/conv/conv.fctptr/p1.cpp +++ b/clang/test/CXX/conv/conv.fctptr/p1.cpp @@ -39,5 +39,5 @@ void (**pp)() noexcept = &p; // expected-error {{cannot initialize a variable of type 'void (**)() noexcept' with an rvalue of type 'void (**)()'}} struct S { typedef void (*p)(); operator p(); }; // expected-note {{candidate}} - void (*q)() noexcept = S(); // expected-error {{no viable conversion from 'std_example::S' to 'void (*)() noexcept'}} + void (*q)() noexcept = S(); // expected-error {{no viable conversion from 'S' to 'void (*)() noexcept'}} } diff --git a/clang/test/CXX/conv/conv.mem/p4.cpp b/clang/test/CXX/conv/conv.mem/p4.cpp --- a/clang/test/CXX/conv/conv.mem/p4.cpp +++ b/clang/test/CXX/conv/conv.mem/p4.cpp @@ -47,7 +47,7 @@ // Can't be virtual even if there's a non-virtual path. namespace test4 { struct A : Base {}; - struct Derived : Base, virtual A {}; // expected-warning {{direct base 'Base' is inaccessible due to ambiguity:\n struct test4::Derived -> struct Base\n struct test4::Derived -> struct test4::A -> struct Base}} + struct Derived : Base, virtual A {}; // expected-warning {{direct base 'Base' is inaccessible due to ambiguity:\n struct test4::Derived -> Base\n struct test4::Derived -> A -> Base}} void test() { int (Derived::*d) = data_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'Base' to pointer to member of derived class 'test4::Derived':}} int (Derived::*m)() = method_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'Base' to pointer to member of derived class 'test4::Derived':}} diff --git a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp --- a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp +++ b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp @@ -55,7 +55,7 @@ ~A(); }; struct B : A { // expected-note {{here}} - constexpr ~B() {} // expected-error {{destructor cannot be declared constexpr because base class 'subobject::A' does not have a constexpr destructor}} + constexpr ~B() {} // expected-error {{destructor cannot be declared constexpr because base class 'A' does not have a constexpr destructor}} }; struct C { A a; // expected-note {{here}} diff --git a/clang/test/CXX/dcl.decl/dcl.decomp/p4.cpp b/clang/test/CXX/dcl.decl/dcl.decomp/p4.cpp --- a/clang/test/CXX/dcl.decl/dcl.decomp/p4.cpp +++ b/clang/test/CXX/dcl.decl/dcl.decomp/p4.cpp @@ -46,8 +46,8 @@ }; void test() { - auto [a1] = Struct(); // expected-error {{cannot decompose class type 'AnonymousMember::Struct' because it has an anonymous struct member}} - auto [a2] = Union(); // expected-error {{cannot decompose class type 'AnonymousMember::Union' because it has an anonymous union member}} + auto [a1] = Struct(); // expected-error {{cannot decompose class type 'Struct' because it has an anonymous struct member}} + auto [a2] = Union(); // expected-error {{cannot decompose class type 'Union' because it has an anonymous union member}} } } @@ -67,18 +67,18 @@ struct I { int i; }; struct J : I {}; - struct K : I, virtual J {}; // expected-warning {{direct base 'MultipleClasses::I' is inaccessible due to ambiguity}} + struct K : I, virtual J {}; // expected-warning {{direct base 'I' is inaccessible due to ambiguity}} struct L : virtual J {}; struct M : virtual J, L {}; void test() { auto [b] = B(); // expected-error {{cannot decompose class type 'B': both it and its base class 'A' have non-static data members}} - auto [d] = D(); // expected-error {{cannot decompose class type 'D': its base classes 'A' and 'MultipleClasses::C' have non-static data members}} + auto [d] = D(); // expected-error {{cannot decompose class type 'D': its base classes 'A' and 'C' have non-static data members}} auto [e] = E(); - auto [f] = F(); // expected-error-re {{cannot decompose members of ambiguous base class 'A' of 'F':{{.*}}struct MultipleClasses::F -> struct A{{.*}}struct MultipleClasses::F -> struct MultipleClasses::E -> struct A}} + auto [f] = F(); // expected-error-re {{cannot decompose members of ambiguous base class 'A' of 'F':{{.*}}struct MultipleClasses::F -> A{{.*}}struct MultipleClasses::F -> E -> A}} auto [h] = H(); // ok, only one (virtual) base subobject even though there are two paths to it - auto [k] = K(); // expected-error {{cannot decompose members of ambiguous base class 'MultipleClasses::I'}} + auto [k] = K(); // expected-error {{cannot decompose members of ambiguous base class 'I'}} auto [m] = M(); // ok, all paths to I are through the same virtual base subobject J same(); @@ -214,7 +214,7 @@ auto &[x, y] = b; } void test_external(B b) { - auto &[x, y] = b; // expected-error {{cannot decompose members of inaccessible base class 'p0969r0::A' of 'p0969r0::B'}} + auto &[x, y] = b; // expected-error {{cannot decompose members of inaccessible base class 'A' of 'p0969r0::B'}} } struct C { diff --git a/clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p2.cpp b/clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p2.cpp --- a/clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p2.cpp +++ b/clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p2.cpp @@ -131,6 +131,6 @@ }; void f() { - const B b; // expected-error {{default initialization of an object of const type 'const PR13492::B' without a user-provided default constructor}} + const B b; // expected-error {{default initialization of an object of const type 'const B' without a user-provided default constructor}} } } diff --git a/clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp b/clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp --- a/clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp +++ b/clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp @@ -81,7 +81,7 @@ const S& r1 = { 1, 2, 3.0 }; const S& r2 = { "Spinach" }; - S& r3 = { 1, 2, 3 }; // expected-error {{non-const lvalue reference to type 'bullet6::S' cannot bind to an initializer list temporary}} + S& r3 = { 1, 2, 3 }; // expected-error {{non-const lvalue reference to type 'S' cannot bind to an initializer list temporary}} const int& i1 = { 1 }; const int& i2 = { 1.1 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{silence}} expected-warning {{implicit conversion}} const int (&iar)[2] = { 1, 2 }; @@ -134,11 +134,11 @@ void test(MoveOnly mo) { auto &&list1 = {mo}; // expected-error {{call to implicitly-deleted copy constructor}} expected-note {{in initialization of temporary of type 'std::initializer_list}} - MoveOnly (&&list2)[1] = {mo}; // expected-error {{call to implicitly-deleted copy constructor}} expected-note {{in initialization of temporary of type 'rdar13395022::MoveOnly[1]'}} + MoveOnly (&&list2)[1] = {mo}; // expected-error {{call to implicitly-deleted copy constructor}} expected-note {{in initialization of temporary of type 'MoveOnly[1]'}} std::initializer_list &&list3 = {}; MoveOnly (&&list4)[1] = {}; // expected-error {{no matching constructor}} // expected-note@-1 {{in implicit initialization of array element 0 with omitted initializer}} - // expected-note@-2 {{in initialization of temporary of type 'rdar13395022::MoveOnly[1]' created to list-initialize this reference}} + // expected-note@-2 {{in initialization of temporary of type 'MoveOnly[1]' created to list-initialize this reference}} } } diff --git a/clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-0x.cpp b/clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-0x.cpp --- a/clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-0x.cpp +++ b/clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-0x.cpp @@ -118,7 +118,7 @@ const A& r = x; int&& rri = static_cast(i); B&& rrb = x; - int&& rri2 = X(); // expected-error{{no viable conversion from 'std_example_2::X' to 'int'}} + int&& rri2 = X(); // expected-error{{no viable conversion from 'X' to 'int'}} const double& rcd2 = 2; double&& rrd = 2; @@ -196,9 +196,9 @@ namespace rdar13278115 { struct X { }; struct Y : X { }; - X &&f0(X &x) { return x; } // expected-error{{rvalue reference to type 'rdar13278115::X' cannot bind to lvalue of type 'rdar13278115::X'}} - X &&f1(Y &y) { return y; } // expected-error{{rvalue reference to type 'rdar13278115::X' cannot bind to lvalue of type 'rdar13278115::Y'}} - const X &&f2(Y &y) { return y; } // expected-error{{rvalue reference to type 'const rdar13278115::X' cannot bind to lvalue of type 'rdar13278115::Y'}} + X &&f0(X &x) { return x; } // expected-error{{rvalue reference to type 'X' cannot bind to lvalue of type 'X'}} + X &&f1(Y &y) { return y; } // expected-error{{rvalue reference to type 'X' cannot bind to lvalue of type 'Y'}} + const X &&f2(Y &y) { return y; } // expected-error{{rvalue reference to type 'const X' cannot bind to lvalue of type 'Y'}} } namespace bitfields { diff --git a/clang/test/CXX/drs/dr0xx.cpp b/clang/test/CXX/drs/dr0xx.cpp --- a/clang/test/CXX/drs/dr0xx.cpp +++ b/clang/test/CXX/drs/dr0xx.cpp @@ -79,7 +79,7 @@ namespace dr7 { // dr7: yes class A { public: ~A(); }; class B : virtual private A {}; // expected-note 2 {{declared private here}} - class C : public B {} c; // expected-error 2 {{inherited virtual base class 'dr7::A' has private destructor}} \ + class C : public B {} c; // expected-error 2 {{inherited virtual base class 'A' has private destructor}} \ // expected-note {{implicit default constructor for 'dr7::C' first required here}} \ // expected-note {{implicit destructor for 'dr7::C' first required here}} class VeryDerivedC : public B, virtual public A {} vdc; @@ -482,7 +482,7 @@ using V::z; float &z(float); }; - struct C : A, B, virtual V {} c; // expected-warning {{direct base 'dr39::example2::A' is inaccessible due to ambiguity:\n struct dr39::example2::C -> struct dr39::example2::A\n struct dr39::example2::C -> struct dr39::example2::B -> struct dr39::example2::A}} + struct C : A, B, virtual V {} c; // expected-warning {{direct base 'A' is inaccessible due to ambiguity:\n struct dr39::example2::C -> A\n struct dr39::example2::C -> B -> A}} int &x = c.x(0); // expected-error {{found in multiple base classes}} // FIXME: This is valid, because we find the same static data member either way. int &y = c.y(0); // expected-error {{found in multiple base classes}} @@ -965,7 +965,7 @@ struct C {}; struct B { B(B&); // expected-note 0-1{{candidate}} - B(C); // expected-note 0-1{{no known conversion from 'dr84::B' to 'dr84::C'}} + B(C); // expected-note 0-1{{no known conversion from 'B' to 'C'}} operator C() const; }; A a; diff --git a/clang/test/CXX/drs/dr16xx.cpp b/clang/test/CXX/drs/dr16xx.cpp --- a/clang/test/CXX/drs/dr16xx.cpp +++ b/clang/test/CXX/drs/dr16xx.cpp @@ -292,7 +292,7 @@ #if __cplusplus > 201703L enum E1 {}; enum E2 {}; - auto c = To() <=> To(); // expected-error {{invalid operands to binary expression ('To' and 'To')}} + auto c = To() <=> To(); // expected-error {{invalid operands to binary expression ('To' and 'To')}} #endif } diff --git a/clang/test/CXX/drs/dr17xx.cpp b/clang/test/CXX/drs/dr17xx.cpp --- a/clang/test/CXX/drs/dr17xx.cpp +++ b/clang/test/CXX/drs/dr17xx.cpp @@ -55,7 +55,7 @@ n.dr1753::~T(); // expected-error {{'dr1753' does not refer to a type name in pseudo-destructor}} n.dr1753::T::~T(); - n.A::~T(); // expected-error {{the type of object expression ('dr1753::T' (aka 'int')) does not match the type being destroyed ('dr1753::A') in pseudo-destructor expression}} + n.A::~T(); // expected-error {{the type of object expression ('T' (aka 'int')) does not match the type being destroyed ('A') in pseudo-destructor expression}} n.A::T::~T(); n.B::~T(); // expected-error {{'B' does not refer to a type name in pseudo-destructor expression}} diff --git a/clang/test/CXX/drs/dr1xx.cpp b/clang/test/CXX/drs/dr1xx.cpp --- a/clang/test/CXX/drs/dr1xx.cpp +++ b/clang/test/CXX/drs/dr1xx.cpp @@ -866,7 +866,7 @@ struct B {}; struct A { A(A &); // expected-note 0-1{{not viable: expects an lvalue}} - A(const B &); // expected-note 0-1{{not viable: no known conversion from 'dr177::A' to}} + A(const B &); // expected-note 0-1{{not viable: no known conversion from 'A' to}} }; B b; A a = b; @@ -878,7 +878,7 @@ struct D : C {}; struct E { operator D(); }; E e; - C c = e; // expected-error {{no viable constructor copying variable of type 'dr177::D'}} + C c = e; // expected-error {{no viable constructor copying variable of type 'D'}} } namespace dr178 { // dr178: yes diff --git a/clang/test/CXX/drs/dr2xx.cpp b/clang/test/CXX/drs/dr2xx.cpp --- a/clang/test/CXX/drs/dr2xx.cpp +++ b/clang/test/CXX/drs/dr2xx.cpp @@ -483,7 +483,7 @@ B* B_ptr = &D_object; void f() { - D_object.~B(); // expected-error {{does not match the type 'dr244::D' of the object being destroyed}} + D_object.~B(); // expected-error {{does not match the type 'D' of the object being destroyed}} D_object.B::~B(); D_object.D::~B(); // FIXME: Missing diagnostic for this. B_ptr->~B(); @@ -680,7 +680,7 @@ C() {} }; struct D : B { - D() {} // expected-error {{must explicitly initialize the base class 'dr257::A'}} + D() {} // expected-error {{must explicitly initialize the base class 'A'}} void f(); }; } @@ -1057,7 +1057,7 @@ namespace dr295 { // dr295: 3.7 typedef int f(); - const f g; // expected-warning {{'const' qualifier on function type 'dr295::f' (aka 'int ()') has no effect}} + const f g; // expected-warning {{'const' qualifier on function type 'f' (aka 'int ()') has no effect}} f &r = g; template struct X { const T &f; @@ -1065,10 +1065,10 @@ X x = {g}; typedef int U(); - typedef const U U; // expected-warning {{'const' qualifier on function type 'dr295::U' (aka 'int ()') has no effect}} + typedef const U U; // expected-warning {{'const' qualifier on function type 'U' (aka 'int ()') has no effect}} typedef int (*V)(); - typedef volatile U *V; // expected-warning {{'volatile' qualifier on function type 'dr295::U' (aka 'int ()') has no effect}} + typedef volatile U *V; // expected-warning {{'volatile' qualifier on function type 'U' (aka 'int ()') has no effect}} } namespace dr296 { // dr296: yes @@ -1096,7 +1096,7 @@ B::B() {} // expected-error {{requires a type specifier}} B::A() {} // ok - C::~C() {} // expected-error {{destructor cannot be declared using a typedef 'dr298::C' (aka 'const dr298::A') of the class name}} + C::~C() {} // expected-error {{destructor cannot be declared using a typedef 'C' (aka 'const dr298::A') of the class name}} typedef struct D E; // expected-note {{here}} struct E {}; // expected-error {{conflicts with typedef}} diff --git a/clang/test/CXX/drs/dr3xx.cpp b/clang/test/CXX/drs/dr3xx.cpp --- a/clang/test/CXX/drs/dr3xx.cpp +++ b/clang/test/CXX/drs/dr3xx.cpp @@ -163,9 +163,9 @@ void f() { try { throw D(); - } catch (const A&) { // expected-note {{for type 'const dr308::A &'}} + } catch (const A&) { // expected-note {{for type 'const A &'}} // unreachable - } catch (const B&) { // expected-warning {{exception of type 'const dr308::B &' will be caught by earlier handler}} + } catch (const B&) { // expected-warning {{exception of type 'const B &' will be caught by earlier handler}} // get here instead } } diff --git a/clang/test/CXX/drs/dr4xx.cpp b/clang/test/CXX/drs/dr4xx.cpp --- a/clang/test/CXX/drs/dr4xx.cpp +++ b/clang/test/CXX/drs/dr4xx.cpp @@ -885,8 +885,8 @@ }; void f() { throw S(); - // expected-error@-1 {{temporary of type 'dr479::S' has private destructor}} - // expected-error@-2 {{exception object of type 'dr479::S' has private destructor}} + // expected-error@-1 {{temporary of type 'S' has private destructor}} + // expected-error@-2 {{exception object of type 'S' has private destructor}} #if __cplusplus < 201103L // expected-error@-4 {{C++98 requires an accessible copy constructor}} #endif @@ -898,7 +898,7 @@ S s; // expected-error {{private destructor}}} throw s; // expected-error@-1 {{calling a private constructor}} - // expected-error@-2 {{exception object of type 'dr479::S' has private destructor}} + // expected-error@-2 {{exception object of type 'S' has private destructor}} } void h() { try { @@ -906,7 +906,7 @@ g(); } catch (S s) { // expected-error@-1 {{calling a private constructor}} - // expected-error@-2 {{variable of type 'dr479::S' has private destructor}} + // expected-error@-2 {{variable of type 'S' has private destructor}} } } } diff --git a/clang/test/CXX/drs/dr5xx.cpp b/clang/test/CXX/drs/dr5xx.cpp --- a/clang/test/CXX/drs/dr5xx.cpp +++ b/clang/test/CXX/drs/dr5xx.cpp @@ -954,7 +954,7 @@ template struct A::B::C : A { // FIXME: Should find member of non-dependent base class A. - M m; // expected-error {{incomplete type 'dr591::A::B::M' (aka 'void'}} + M m; // expected-error {{incomplete type 'M' (aka 'void'}} }; } diff --git a/clang/test/CXX/drs/dr9xx.cpp b/clang/test/CXX/drs/dr9xx.cpp --- a/clang/test/CXX/drs/dr9xx.cpp +++ b/clang/test/CXX/drs/dr9xx.cpp @@ -25,7 +25,7 @@ A a; }; B b1 { }; - B b2 { 1 }; // expected-error {{no viable conversion from 'int' to 'dr990::A'}} + B b2 { 1 }; // expected-error {{no viable conversion from 'int' to 'A'}} B b3 { { 1 } }; struct C { diff --git a/clang/test/CXX/except/except.spec/p1.cpp b/clang/test/CXX/except/except.spec/p1.cpp --- a/clang/test/CXX/except/except.spec/p1.cpp +++ b/clang/test/CXX/except/except.spec/p1.cpp @@ -54,7 +54,7 @@ struct A {}; - void g1() noexcept(A()); // expected-error {{value of type 'noex::A' is not implicitly convertible to 'bool'}} + void g1() noexcept(A()); // expected-error {{value of type 'A' is not implicitly convertible to 'bool'}} void g2(bool b) noexcept(b); // expected-error {{noexcept specifier argument is not a constant expression}} expected-note {{function parameter 'b' with unknown value}} expected-note {{here}} } diff --git a/clang/test/CXX/expr/expr.const/p2-0x.cpp b/clang/test/CXX/expr/expr.const/p2-0x.cpp --- a/clang/test/CXX/expr/expr.const/p2-0x.cpp +++ b/clang/test/CXX/expr/expr.const/p2-0x.cpp @@ -474,7 +474,7 @@ namespace TypeId { struct S { virtual void f(); }; constexpr S *p = 0; - constexpr const std::type_info &ti1 = typeid(*p); // expected-error {{must be initialized by a constant expression}} cxx11-note {{typeid applied to expression of polymorphic type 'TypeId::S'}} cxx20-note {{dereferenced null pointer}} + constexpr const std::type_info &ti1 = typeid(*p); // expected-error {{must be initialized by a constant expression}} cxx11-note {{typeid applied to expression of polymorphic type 'S'}} cxx20-note {{dereferenced null pointer}} struct T {} t; constexpr const std::type_info &ti2 = typeid(t); diff --git a/clang/test/CXX/expr/expr.const/p5-0x.cpp b/clang/test/CXX/expr/expr.const/p5-0x.cpp --- a/clang/test/CXX/expr/expr.const/p5-0x.cpp +++ b/clang/test/CXX/expr/expr.const/p5-0x.cpp @@ -15,7 +15,7 @@ template struct X { }; constexpr A a = 42; X x; // ok, unique conversion to int -int ary[a]; // expected-error {{ambiguous conversion from type 'const std_example::A' to an integral or unscoped enumeration type}} +int ary[a]; // expected-error {{ambiguous conversion from type 'const A' to an integral or unscoped enumeration type}} } diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp --- a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp @@ -97,7 +97,7 @@ class Y : public X { }; void capture(X &x) { - [x]() {}(); // expected-error{{by-copy capture of value of abstract type 'rdar14468891::X'}} + [x]() {}(); // expected-error{{by-copy capture of value of abstract type 'X'}} } } @@ -105,7 +105,7 @@ struct X; // expected-note{{forward declaration of 'rdar15560464::X'}} void foo(const X& param) { auto x = ([=]() { - auto& y = param; // expected-error{{by-copy capture of variable 'param' with incomplete type 'const rdar15560464::X'}} + auto& y = param; // expected-error{{by-copy capture of variable 'param' with incomplete type 'const X'}} }); } } diff --git a/clang/test/CXX/over/over.match/over.match.funcs/over.match.class.deduct/p2.cpp b/clang/test/CXX/over/over.match/over.match.funcs/over.match.class.deduct/p2.cpp --- a/clang/test/CXX/over/over.match/over.match.funcs/over.match.class.deduct/p2.cpp +++ b/clang/test/CXX/over/over.match/over.match.funcs/over.match.class.deduct/p2.cpp @@ -36,7 +36,7 @@ namespace p0702r1 { template struct X { // expected-note {{candidate}} - X(std::initializer_list); // expected-note {{candidate template ignored: could not match 'std::initializer_list' against 'p0702r1::Z'}} + X(std::initializer_list); // expected-note {{candidate template ignored: could not match 'std::initializer_list' against 'Z'}} }; X xi = {0}; diff --git a/clang/test/CXX/over/over.match/over.match.funcs/over.match.copy/p1.cpp b/clang/test/CXX/over/over.match/over.match.funcs/over.match.copy/p1.cpp --- a/clang/test/CXX/over/over.match/over.match.funcs/over.match.copy/p1.cpp +++ b/clang/test/CXX/over/over.match/over.match.funcs/over.match.copy/p1.cpp @@ -10,7 +10,7 @@ void test(const Y& y) { X x(static_cast(y)); X x2((X)y); - X x3 = y; // expected-error{{no viable conversion from 'const ExplicitConv::Y' to 'ExplicitConv::X'}} + X x3 = y; // expected-error{{no viable conversion from 'const Y' to 'X'}} } } diff --git a/clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp b/clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp --- a/clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp +++ b/clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp @@ -48,8 +48,8 @@ bool cmp = x1 <=> x2; // expected-error {{selected deleted operator '<=>'}} // expected-note@#1member 5{{candidate function has been explicitly deleted}} - // expected-note@#1 5{{candidate function not viable: no known conversion from 'bullet4::Y' to 'X<1>' for 1st argument}} - // expected-note@#1 5{{candidate function (with reversed parameter order) not viable: no known conversion from 'bullet4::Y' to 'X<2>' for 1st argument}} + // expected-note@#1 5{{candidate function not viable: no known conversion from 'Y' to 'X<1>' for 1st argument}} + // expected-note@#1 5{{candidate function (with reversed parameter order) not viable: no known conversion from 'Y' to 'X<2>' for 1st argument}} bool mem_lt = y < x2; // expected-error {{selected deleted operator '<=>'}} bool mem_le = y <= x2; // expected-error {{selected deleted operator '<=>'}} bool mem_gt = y > x2; // expected-error {{selected deleted operator '<=>'}} @@ -71,7 +71,7 @@ // expected-note@#1member 5{{candidate function (with reversed parameter order) has been explicitly deleted}} // expected-note@#1 5{{candidate function not viable: no known conversion from 'X<2>' to 'X<1>' for 1st argument}} - // expected-note@#1 5{{candidate function (with reversed parameter order) not viable: no known conversion from 'bullet4::Y' to 'X<1>' for 2nd argument}} + // expected-note@#1 5{{candidate function (with reversed parameter order) not viable: no known conversion from 'Y' to 'X<1>' for 2nd argument}} bool mem_rlt = x2 < y; // expected-error {{selected deleted operator '<=>'}} bool mem_rle = x2 <= y; // expected-error {{selected deleted operator '<=>'}} bool mem_rgt = x2 > y; // expected-error {{selected deleted operator '<=>'}} @@ -88,8 +88,8 @@ bool ne = x1 != x2; // expected-error {{selected deleted operator '=='}} // expected-note@#2member 2{{candidate function has been explicitly deleted}} - // expected-note@#2 2{{candidate function not viable: no known conversion from 'bullet4::Y' to 'X<1>' for 1st argument}} - // expected-note@#2 2{{candidate function (with reversed parameter order) not viable: no known conversion from 'bullet4::Y' to 'X<2>' for 1st argument}} + // expected-note@#2 2{{candidate function not viable: no known conversion from 'Y' to 'X<1>' for 1st argument}} + // expected-note@#2 2{{candidate function (with reversed parameter order) not viable: no known conversion from 'Y' to 'X<2>' for 1st argument}} bool mem_eq = y == x2; // expected-error {{selected deleted operator '=='}} bool mem_ne = y != x2; // expected-error {{selected deleted operator '=='}} @@ -104,7 +104,7 @@ // expected-note@#2member 2{{candidate function (with reversed parameter order) has been explicitly deleted}} // expected-note@#2 2{{candidate function not viable: no known conversion from 'X<2>' to 'X<1>' for 1st argument}} - // expected-note@#2 2{{candidate function (with reversed parameter order) not viable: no known conversion from 'bullet4::Y' to 'X<1>' for 2nd argument}} + // expected-note@#2 2{{candidate function (with reversed parameter order) not viable: no known conversion from 'Y' to 'X<1>' for 2nd argument}} bool mem_req = x2 == y; // expected-error {{selected deleted operator '=='}} bool mem_rne = x2 != y; // expected-error {{selected deleted operator '=='}} @@ -163,7 +163,7 @@ struct ICUDerived : ICUBase { UBool operator==(const ICUBase&) const override; // expected-note {{declared here}} expected-note {{ambiguity is between}} }; - bool cmp_icu = ICUDerived() != ICUDerived(); // expected-warning {{ambiguous}} expected-warning {{'bool', not 'problem_cases::UBool'}} + bool cmp_icu = ICUDerived() != ICUDerived(); // expected-warning {{ambiguous}} expected-warning {{'bool', not 'UBool'}} } #else // NO_ERRORS diff --git a/clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp b/clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp --- a/clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp +++ b/clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp @@ -25,7 +25,7 @@ enum E {}; E operator==(Y, Z); // expected-note {{here}} - bool h = z == y; // expected-warning {{ISO C++20 requires return type of selected 'operator==' function for rewritten '==' comparison to be 'bool', not 'not_bool::E'}} + bool h = z == y; // expected-warning {{ISO C++20 requires return type of selected 'operator==' function for rewritten '==' comparison to be 'bool', not 'E'}} } struct X { bool equal; }; diff --git a/clang/test/CXX/special/class.copy/p23-cxx11.cpp b/clang/test/CXX/special/class.copy/p23-cxx11.cpp --- a/clang/test/CXX/special/class.copy/p23-cxx11.cpp +++ b/clang/test/CXX/special/class.copy/p23-cxx11.cpp @@ -171,7 +171,7 @@ }; void g() { T t; - t = T(); // expected-error{{object of type 'PR13381::T' cannot be assigned because its copy assignment operator is implicitly deleted}} + t = T(); // expected-error{{object of type 'T' cannot be assigned because its copy assignment operator is implicitly deleted}} } } diff --git a/clang/test/CXX/special/class.copy/p3-cxx11.cpp b/clang/test/CXX/special/class.copy/p3-cxx11.cpp --- a/clang/test/CXX/special/class.copy/p3-cxx11.cpp +++ b/clang/test/CXX/special/class.copy/p3-cxx11.cpp @@ -38,7 +38,7 @@ X x2; if (i) throw x2; // okay - throw x; // expected-error{{call to deleted constructor of 'PR10142::X'}} + throw x; // expected-error{{call to deleted constructor of 'X'}} } catch (...) { } } diff --git a/clang/test/CXX/special/class.inhctor/p4.cpp b/clang/test/CXX/special/class.inhctor/p4.cpp --- a/clang/test/CXX/special/class.inhctor/p4.cpp +++ b/clang/test/CXX/special/class.inhctor/p4.cpp @@ -70,5 +70,5 @@ }; constexpr B b0(0, 0.0f); // ok, constexpr - B b1(0, 1); // expected-error {{call to constructor of 'DRnnnn::B' is ambiguous}} + B b1(0, 1); // expected-error {{call to constructor of 'B' is ambiguous}} } diff --git a/clang/test/CXX/special/class.temporary/p1.cpp b/clang/test/CXX/special/class.temporary/p1.cpp --- a/clang/test/CXX/special/class.temporary/p1.cpp +++ b/clang/test/CXX/special/class.temporary/p1.cpp @@ -13,7 +13,7 @@ void test() { A a; - foo(a); // expected-error {{call to deleted constructor of 'test0::A'}} + foo(a); // expected-error {{call to deleted constructor of 'A'}} } } diff --git a/clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp b/clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp --- a/clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp +++ b/clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp @@ -103,7 +103,7 @@ for (auto *a : A()) { // expected-error {{variable 'a' with type 'auto *' has incompatible initializer of type 'int'}} } // : is not a typo for :: here. - for (A NS:A()) { // expected-error {{no viable conversion from 'int' to 'X::A'}} + for (A NS:A()) { // expected-error {{no viable conversion from 'int' to 'A'}} } for (auto not_in_scope : not_in_scope) { // expected-error {{use of undeclared identifier 'not_in_scope'}} } @@ -250,7 +250,7 @@ namespace NS { class ADL {}; - int *begin(ADL); // expected-note {{no known conversion from 'NS::NoADL' to 'NS::ADL'}} + int *begin(ADL); // expected-note {{no known conversion from 'NS::NoADL' to 'ADL'}} int *end(ADL); class NoADL {}; diff --git a/clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp b/clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp --- a/clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp +++ b/clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp @@ -64,11 +64,11 @@ } if constexpr (b) { // expected-error {{constexpr if condition is not a constant expression}} expected-note {{cannot be used in a constant expression}} } - if constexpr (s) { // expected-error {{value of type 'ccce::S' is not contextually convertible to 'bool'}} + if constexpr (s) { // expected-error {{value of type 'S' is not contextually convertible to 'bool'}} } constexpr S constexprS; - if constexpr (constexprS) { // expected-error {{value of type 'const ccce::S' is not contextually convertible to 'bool'}} + if constexpr (constexprS) { // expected-error {{value of type 'const S' is not contextually convertible to 'bool'}} } } } diff --git a/clang/test/CodeGen/builtin-bpf-btf-type-id.c b/clang/test/CodeGen/builtin-bpf-btf-type-id.c --- a/clang/test/CodeGen/builtin-bpf-btf-type-id.c +++ b/clang/test/CodeGen/builtin-bpf-btf-type-id.c @@ -21,5 +21,5 @@ // // CHECK: ![[INT]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed // CHECK: ![[INT_POINTER]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[INT]], size: 64 -// CHECK: ![[TYPEDEF_T1]] = !DIDerivedType(tag: DW_TAG_typedef, name: "__t1" // CHECK: ![[STRUCT_T1]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "t1" +// CHECK: ![[TYPEDEF_T1]] = !DIDerivedType(tag: DW_TAG_typedef, name: "__t1" diff --git a/clang/test/CodeGen/builtins-bpf-preserve-field-info-3.c b/clang/test/CodeGen/builtins-bpf-preserve-field-info-3.c --- a/clang/test/CodeGen/builtins-bpf-preserve-field-info-3.c +++ b/clang/test/CodeGen/builtins-bpf-preserve-field-info-3.c @@ -37,5 +37,5 @@ // CHECK: call i32 @llvm.bpf.preserve.type.info(i32 5, i64 1), !dbg !{{[0-9]+}}, !llvm.preserve.access.index ![[ENUM_AA]] // CHECK: ![[ENUM_AA]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "AA" -// CHECK: ![[TYPEDEF_INT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "__int" // CHECK: ![[STRUCT_S]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "s" +// CHECK: ![[TYPEDEF_INT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "__int" diff --git a/clang/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-return-adjustment.cpp b/clang/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-return-adjustment.cpp --- a/clang/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-return-adjustment.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-return-adjustment.cpp @@ -25,16 +25,16 @@ struct X : D { // CHECK-LABEL: VFTable for 'test1::D' in 'test1::X' (3 entries). - // CHECK-NEXT: 0 | test1::C *test1::X::foo() + // CHECK-NEXT: 0 | C *test1::X::foo() // CHECK-NEXT: [return adjustment (to type 'struct test1::B *'): 4 non-virtual] // CHECK-NEXT: 1 | void test1::D::z() - // CHECK-NEXT: 2 | test1::C *test1::X::foo() + // CHECK-NEXT: 2 | C *test1::X::foo() - // CHECK-LABEL: Thunks for 'test1::C *test1::X::foo()' (1 entry). + // CHECK-LABEL: Thunks for 'C *test1::X::foo()' (1 entry). // CHECK-NEXT: 0 | [return adjustment (to type 'struct test1::B *'): 4 non-virtual] // CHECK-LABEL: VFTable indices for 'test1::X' (1 entry). - // CHECK-NEXT: 2 | test1::C *test1::X::foo() + // CHECK-NEXT: 2 | C *test1::X::foo() // MANGLING-DAG: @"??_7X@test1@@6B@" @@ -72,19 +72,19 @@ struct X : E { virtual F* foo(); // CHECK-LABEL: VFTable for 'test2::D' in 'test2::E' in 'test2::X' (4 entries). - // CHECK-NEXT: 0 | test2::F *test2::X::foo() + // CHECK-NEXT: 0 | F *test2::X::foo() // CHECK-NEXT: [return adjustment (to type 'struct test2::B *'): 4 non-virtual] // CHECK-NEXT: 1 | void test2::D::z() - // CHECK-NEXT: 2 | test2::F *test2::X::foo() + // CHECK-NEXT: 2 | F *test2::X::foo() // CHECK-NEXT: [return adjustment (to type 'struct test2::C *'): 0 non-virtual] - // CHECK-NEXT: 3 | test2::F *test2::X::foo() + // CHECK-NEXT: 3 | F *test2::X::foo() - // CHECK-LABEL: Thunks for 'test2::F *test2::X::foo()' (2 entries). + // CHECK-LABEL: Thunks for 'F *test2::X::foo()' (2 entries). // CHECK-NEXT: 0 | [return adjustment (to type 'struct test2::C *'): 0 non-virtual] // CHECK-NEXT: 1 | [return adjustment (to type 'struct test2::B *'): 4 non-virtual] // CHECK-LABEL: VFTable indices for 'test2::X' (1 entry). - // CHECK-NEXT: 3 | test2::F *test2::X::foo() + // CHECK-NEXT: 3 | F *test2::X::foo() }; void build_vftable(X *obj) { obj->foo(); } @@ -117,19 +117,19 @@ struct X : E { // CHECK-LABEL: VFTable for 'test3::D' in 'test3::E' in 'test3::X' (4 entries). - // CHECK-NEXT: 0 | test3::F *test3::X::foo() + // CHECK-NEXT: 0 | F *test3::X::foo() // CHECK-NEXT: [return adjustment (to type 'struct test3::B *'): 8 non-virtual] // CHECK-NEXT: 1 | void test3::D::z() - // CHECK-NEXT: 2 | test3::F *test3::X::foo() + // CHECK-NEXT: 2 | F *test3::X::foo() // CHECK-NEXT: [return adjustment (to type 'struct test3::C *'): 4 non-virtual] - // CHECK-NEXT: 3 | test3::F *test3::X::foo() + // CHECK-NEXT: 3 | F *test3::X::foo() - // CHECK-LABEL: Thunks for 'test3::F *test3::X::foo()' (2 entries). + // CHECK-LABEL: Thunks for 'F *test3::X::foo()' (2 entries). // CHECK-NEXT: 0 | [return adjustment (to type 'struct test3::C *'): 4 non-virtual] // CHECK-NEXT: 1 | [return adjustment (to type 'struct test3::B *'): 8 non-virtual] // CHECK-LABEL: VFTable indices for 'test3::X' (1 entry). - // CHECK-NEXT: 3 | test3::F *test3::X::foo() + // CHECK-NEXT: 3 | F *test3::X::foo() virtual F* foo(); }; @@ -164,27 +164,27 @@ struct X : D, E { // CHECK-LABEL: VFTable for 'test4::D' in 'test4::X' (3 entries). - // CHECK-NEXT: 0 | test4::F *test4::X::foo() + // CHECK-NEXT: 0 | F *test4::X::foo() // CHECK-NEXT: [return adjustment (to type 'struct test4::B *'): 8 non-virtual] // CHECK-NEXT: 1 | void test4::D::z() - // CHECK-NEXT: 2 | test4::F *test4::X::foo() + // CHECK-NEXT: 2 | F *test4::X::foo() - // CHECK-LABEL: Thunks for 'test4::F *test4::X::foo()' (1 entry). + // CHECK-LABEL: Thunks for 'F *test4::X::foo()' (1 entry). // CHECK-NEXT: 0 | [return adjustment (to type 'struct test4::B *'): 8 non-virtual] // CHECK-LABEL: VFTable for 'test4::D' in 'test4::E' in 'test4::X' (4 entries). - // CHECK-NEXT: 0 | test4::F *test4::X::foo() + // CHECK-NEXT: 0 | F *test4::X::foo() // CHECK-NEXT: [return adjustment (to type 'struct test4::B *'): 8 non-virtual] // CHECK-NEXT: [this adjustment: -4 non-virtual] // CHECK-NEXT: 1 | void test4::D::z() - // CHECK-NEXT: 2 | test4::F *test4::X::foo() + // CHECK-NEXT: 2 | F *test4::X::foo() // CHECK-NEXT: [return adjustment (to type 'struct test4::C *'): 4 non-virtual] // CHECK-NEXT: [this adjustment: -4 non-virtual] - // CHECK-NEXT: 3 | test4::F *test4::X::foo() + // CHECK-NEXT: 3 | F *test4::X::foo() // CHECK-NEXT: [return adjustment (to type 'struct test4::F *'): 0 non-virtual] // CHECK-NEXT: [this adjustment: -4 non-virtual] - // CHECK-LABEL: Thunks for 'test4::F *test4::X::foo()' (3 entries). + // CHECK-LABEL: Thunks for 'F *test4::X::foo()' (3 entries). // CHECK-NEXT: 0 | [return adjustment (to type 'struct test4::F *'): 0 non-virtual] // CHECK-NEXT: [this adjustment: -4 non-virtual] // CHECK-NEXT: 1 | [return adjustment (to type 'struct test4::C *'): 4 non-virtual] @@ -193,7 +193,7 @@ // CHECK-NEXT: [this adjustment: -4 non-virtual] // CHECK-LABEL: VFTable indices for 'test4::X' (1 entry). - // CHECK-NEXT: 2 | test4::F *test4::X::foo() + // CHECK-NEXT: 2 | F *test4::X::foo() virtual F* foo(); }; @@ -226,17 +226,17 @@ // CHECK-NEXT: 1 | void test5::A::h() // CHECK-LABEL: VFTable for 'test5::D' in 'test5::X' (3 entries). - // CHECK-NEXT: 0 | test5::C *test5::X::foo() + // CHECK-NEXT: 0 | C *test5::X::foo() // CHECK-NEXT: [return adjustment (to type 'struct test5::B *'): 4 non-virtual] // CHECK-NEXT: 1 | void test5::D::z() - // CHECK-NEXT: 2 | test5::C *test5::X::foo() + // CHECK-NEXT: 2 | C *test5::X::foo() - // CHECK-LABEL: Thunks for 'test5::C *test5::X::foo()' (1 entry). + // CHECK-LABEL: Thunks for 'C *test5::X::foo()' (1 entry). // CHECK-NEXT: 0 | [return adjustment (to type 'struct test5::B *'): 4 non-virtual] // CHECK-LABEL: VFTable indices for 'test5::X' (1 entry). // CHECK-NEXT: via vfptr at offset 4 - // CHECK-NEXT: 2 | test5::C *test5::X::foo() + // CHECK-NEXT: 2 | C *test5::X::foo() virtual C* foo(); }; @@ -275,20 +275,20 @@ // CHECK-NEXT: 1 | void test6::A::h() // CHECK-LABEL: VFTable for 'test6::D' in 'test6::E' in 'test6::X' (4 entries). - // CHECK-NEXT: 0 | test6::F *test6::X::foo() + // CHECK-NEXT: 0 | F *test6::X::foo() // CHECK-NEXT: [return adjustment (to type 'struct test6::B *'): 8 non-virtual] // CHECK-NEXT: 1 | void test6::D::z() - // CHECK-NEXT: 2 | test6::F *test6::X::foo() + // CHECK-NEXT: 2 | F *test6::X::foo() // CHECK-NEXT: [return adjustment (to type 'struct test6::C *'): 4 non-virtual] - // CHECK-NEXT: 3 | test6::F *test6::X::foo() + // CHECK-NEXT: 3 | F *test6::X::foo() - // CHECK-LABEL: Thunks for 'test6::F *test6::X::foo()' (2 entries). + // CHECK-LABEL: Thunks for 'F *test6::X::foo()' (2 entries). // CHECK-NEXT: 0 | [return adjustment (to type 'struct test6::C *'): 4 non-virtual] // CHECK-NEXT: 1 | [return adjustment (to type 'struct test6::B *'): 8 non-virtual] // CHECK-LABEL: VFTable indices for 'test6::X' (1 entry). // CHECK-NEXT: -- accessible via vfptr at offset 4 -- - // CHECK-NEXT: 3 | test6::F *test6::X::foo() + // CHECK-NEXT: 3 | F *test6::X::foo() virtual F* foo(); }; @@ -310,8 +310,8 @@ // CHECK-NEXT: 0 | void test7::C::g() // CHECK-LABEL: VFTable for 'test7::A' in 'test7::C' (2 entries). - // CHECK-NEXT: 0 | test7::C *test7::C::f() [pure] - // CHECK-NEXT: 1 | test7::C *test7::C::f() [pure] + // CHECK-NEXT: 0 | C *test7::C::f() [pure] + // CHECK-NEXT: 1 | C *test7::C::f() [pure] // No return adjusting thunks needed for pure virtual methods. // CHECK-NOT: Thunks for 'test7::C *test7::C::f()' @@ -330,13 +330,13 @@ struct C : A, B { virtual C* f(); // CHECK-LABEL: VFTable for 'pr20444::A' in 'pr20444::C' (1 entry). - // CHECK-NEXT: 0 | pr20444::C *pr20444::C::f() + // CHECK-NEXT: 0 | C *pr20444::C::f() // CHECK-LABEL: VFTable for 'pr20444::B' in 'pr20444::C' (2 entries). - // CHECK-NEXT: 0 | pr20444::C *pr20444::C::f() + // CHECK-NEXT: 0 | C *pr20444::C::f() // CHECK-NEXT: [return adjustment (to type 'struct pr20444::B *'): 4 non-virtual] // CHECK-NEXT: [this adjustment: -4 non-virtual] - // CHECK-NEXT: 1 | pr20444::C *pr20444::C::f() + // CHECK-NEXT: 1 | C *pr20444::C::f() // CHECK-NEXT: [return adjustment (to type 'struct pr20444::C *'): 0 non-virtual] // CHECK-NEXT: [this adjustment: -4 non-virtual] }; @@ -346,16 +346,16 @@ struct D : C { virtual D* f(); // CHECK-LABEL: VFTable for 'pr20444::A' in 'pr20444::C' in 'pr20444::D' (1 entry). - // CHECK-NEXT: 0 | pr20444::D *pr20444::D::f() + // CHECK-NEXT: 0 | D *pr20444::D::f() // CHECK-LABEL: VFTable for 'pr20444::B' in 'pr20444::C' in 'pr20444::D' (3 entries). - // CHECK-NEXT: 0 | pr20444::D *pr20444::D::f() + // CHECK-NEXT: 0 | D *pr20444::D::f() // CHECK-NEXT: [return adjustment (to type 'struct pr20444::B *'): 4 non-virtual] // CHECK-NEXT: [this adjustment: -4 non-virtual] - // CHECK-NEXT: 1 | pr20444::D *pr20444::D::f() + // CHECK-NEXT: 1 | D *pr20444::D::f() // CHECK-NEXT: [return adjustment (to type 'struct pr20444::C *'): 0 non-virtual] // CHECK-NEXT: [this adjustment: -4 non-virtual] - // CHECK-NEXT: 2 | pr20444::D *pr20444::D::f() + // CHECK-NEXT: 2 | D *pr20444::D::f() // CHECK-NEXT: [return adjustment (to type 'struct pr20444::D *'): 0 non-virtual] // CHECK-NEXT: [this adjustment: -4 non-virtual] }; diff --git a/clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp b/clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp --- a/clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp @@ -20,11 +20,11 @@ J::J() {} // VFTABLES-LABEL: VFTable for 'test1::H' in 'test1::I' in 'test1::J' (3 entries). -// VFTABLES-NEXT: 0 | test1::D *test1::J::foo() +// VFTABLES-NEXT: 0 | D *test1::J::foo() // VFTABLES-NEXT: [return adjustment (to type 'struct test1::B *'): 4 non-virtual] -// VFTABLES-NEXT: 1 | test1::D *test1::J::foo() +// VFTABLES-NEXT: 1 | D *test1::J::foo() // VFTABLES-NEXT: [return adjustment (to type 'struct test1::C *'): 0 non-virtual] -// VFTABLES-NEXT: 2 | test1::D *test1::J::foo() +// VFTABLES-NEXT: 2 | D *test1::J::foo() // GLOBALS-LABEL: @"??_7J@test1@@6B@" = linkonce_odr unnamed_addr constant { [3 x i8*] } // GLOBALS: @"?foo@J@test1@@QAEPAUB@2@XZ" @@ -34,13 +34,13 @@ K::K() {} // VFTABLES-LABEL: VFTable for 'test1::H' in 'test1::I' in 'test1::J' in 'test1::K' (4 entries). -// VFTABLES-NEXT: 0 | test1::E *test1::K::foo() +// VFTABLES-NEXT: 0 | E *test1::K::foo() // VFTABLES-NEXT: [return adjustment (to type 'struct test1::B *'): 4 non-virtual] -// VFTABLES-NEXT: 1 | test1::E *test1::K::foo() +// VFTABLES-NEXT: 1 | E *test1::K::foo() // VFTABLES-NEXT: [return adjustment (to type 'struct test1::C *'): 0 non-virtual] -// VFTABLES-NEXT: 2 | test1::E *test1::K::foo() +// VFTABLES-NEXT: 2 | E *test1::K::foo() // VFTABLES-NEXT: [return adjustment (to type 'struct test1::D *'): 0 non-virtual] -// VFTABLES-NEXT: 3 | test1::E *test1::K::foo() +// VFTABLES-NEXT: 3 | E *test1::K::foo() // Only B to C requires adjustment, but we get 3 thunks in K's vftable, two of // which are trivial. @@ -86,20 +86,20 @@ J::J() {} // VFTABLES-LABEL: VFTable for 'test2::H' in 'test2::I' in 'test2::J' (2 entries). -// VFTABLES-NEXT: 0 | test2::D *test2::J::foo() +// VFTABLES-NEXT: 0 | D *test2::J::foo() // VFTABLES-NEXT: [return adjustment (to type 'struct test2::B *'): 4 non-virtual] -// VFTABLES-NEXT: 1 | test2::D *test2::J::foo() +// VFTABLES-NEXT: 1 | D *test2::J::foo() // GLOBALS-LABEL: @"??_7J@test2@@6B@" = linkonce_odr unnamed_addr constant { [2 x i8*] } K::K() {} // VFTABLES-LABEL: VFTable for 'test2::H' in 'test2::I' in 'test2::J' in 'test2::K' (3 entries). -// VFTABLES-NEXT: 0 | test2::E *test2::K::foo() +// VFTABLES-NEXT: 0 | E *test2::K::foo() // VFTABLES-NEXT: [return adjustment (to type 'struct test2::B *'): 4 non-virtual] -// VFTABLES-NEXT: 1 | test2::E *test2::K::foo() +// VFTABLES-NEXT: 1 | E *test2::K::foo() // VFTABLES-NEXT: [return adjustment (to type 'struct test2::D *'): 0 non-virtual] -// VFTABLES-NEXT: 2 | test2::E *test2::K::foo() +// VFTABLES-NEXT: 2 | E *test2::K::foo() // GLOBALS-LABEL: @"??_7K@test2@@6B@" = linkonce_odr unnamed_addr constant { [3 x i8*] } @@ -116,9 +116,9 @@ struct C : virtual A, B { // VFTABLES-LABEL: VFTable for 'pr20479::A' in 'pr20479::B' in 'pr20479::C' (2 entries). -// VFTABLES-NEXT: 0 | pr20479::B *pr20479::B::f() +// VFTABLES-NEXT: 0 | B *pr20479::B::f() // VFTABLES-NEXT: [return adjustment (to type 'struct pr20479::A *'): vbase #1, 0 non-virtual] -// VFTABLES-NEXT: 1 | pr20479::B *pr20479::B::f() +// VFTABLES-NEXT: 1 | B *pr20479::B::f() C(); }; @@ -140,10 +140,10 @@ struct C : virtual A, virtual B { // VFTABLES-LABEL: VFTable for 'pr21073::A' in 'pr21073::B' in 'pr21073::C' (2 entries). -// VFTABLES-NEXT: 0 | pr21073::B *pr21073::B::f() +// VFTABLES-NEXT: 0 | B *pr21073::B::f() // VFTABLES-NEXT: [return adjustment (to type 'struct pr21073::A *'): vbase #1, 0 non-virtual] // VFTABLES-NEXT: [this adjustment: 8 non-virtual] -// VFTABLES-NEXT: 1 | pr21073::B *pr21073::B::f() +// VFTABLES-NEXT: 1 | B *pr21073::B::f() // VFTABLES-NEXT: [return adjustment (to type 'struct pr21073::B *'): 0 non-virtual] // VFTABLES-NEXT: [this adjustment: 8 non-virtual] C(); @@ -164,9 +164,9 @@ D::D() {} // VFTABLES-LABEL: VFTable for 'pr21073_2::A' in 'pr21073_2::C' in 'pr21073_2::D' (2 entries) -// VFTABLES-NEXT: 0 | pr21073_2::C *pr21073_2::C::foo() +// VFTABLES-NEXT: 0 | C *pr21073_2::C::foo() // VFTABLES-NEXT: [return adjustment (to type 'struct pr21073_2::A *'): vbase #1, 0 non-virtual] -// VFTABLES-NEXT: 1 | pr21073_2::C *pr21073_2::C::foo() +// VFTABLES-NEXT: 1 | C *pr21073_2::C::foo() // GLOBALS-LABEL: @"??_7D@pr21073_2@@6B@" = {{.*}} constant { [2 x i8*] } // GLOBALS: @"?foo@C@pr21073_2@@QAEPAUA@2@XZ" @@ -186,13 +186,13 @@ D::D() {} // VFTABLES-LABEL: VFTable for 'test3::A' in 'test3::B' in 'test3::X' in 'test3::C' in 'test3::D' (3 entries). -// VFTABLES-NEXT: 0 | test3::D *test3::D::fn() +// VFTABLES-NEXT: 0 | D *test3::D::fn() // VFTABLES-NEXT: [return adjustment (to type 'struct test3::A *'): vbase #1, 0 non-virtual] // VFTABLES-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual] -// VFTABLES-NEXT: 1 | test3::D *test3::D::fn() +// VFTABLES-NEXT: 1 | D *test3::D::fn() // VFTABLES-NEXT: [return adjustment (to type 'struct test3::B *'): vbase #2, 0 non-virtual] // VFTABLES-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual] -// VFTABLES-NEXT: 2 | test3::D *test3::D::fn() +// VFTABLES-NEXT: 2 | D *test3::D::fn() // VFTABLES-NEXT: [return adjustment (to type 'struct test3::D *'): 0 non-virtual] // VFTABLES-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual] @@ -214,5 +214,5 @@ // VFTABLES-LABEL: VFTable indices for 'pr34302::C' (2 entries). // VFTABLES-NEXT: -- accessible via vbtable index 1, vfptr at offset 0 -- // VFTABLES-NEXT: 0 | pr34302::C::~C() [scalar deleting] -// VFTABLES-NEXT: 2 | pr34302::C *pr34302::C::f() +// VFTABLES-NEXT: 2 | C *pr34302::C::f() } diff --git a/clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp b/clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp --- a/clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp @@ -609,15 +609,15 @@ struct W : Z { // CHECK-LABEL: VFTable for 'return_adjustment::Z' in 'return_adjustment::W' (2 entries). - // CHECK-NEXT: 0 | return_adjustment::X *return_adjustment::W::foo() + // CHECK-NEXT: 0 | X *return_adjustment::W::foo() // CHECK-NEXT: [return adjustment (to type 'struct A *'): vbase #1, 0 non-virtual] - // CHECK-NEXT: 1 | return_adjustment::X *return_adjustment::W::foo() + // CHECK-NEXT: 1 | X *return_adjustment::W::foo() - // CHECK-LABEL: Thunks for 'return_adjustment::X *return_adjustment::W::foo()' (1 entry). + // CHECK-LABEL: Thunks for 'X *return_adjustment::W::foo()' (1 entry). // CHECK-NEXT: 0 | [return adjustment (to type 'struct A *'): vbase #1, 0 non-virtual] // CHECK-LABEL: VFTable indices for 'return_adjustment::W' (1 entry). - // CHECK-NEXT: 1 | return_adjustment::X *return_adjustment::W::foo() + // CHECK-NEXT: 1 | X *return_adjustment::W::foo() virtual X* foo(); }; @@ -627,18 +627,18 @@ struct T : W { // CHECK-LABEL: VFTable for 'return_adjustment::Z' in 'return_adjustment::W' in 'return_adjustment::T' (3 entries). - // CHECK-NEXT: 0 | return_adjustment::Y *return_adjustment::T::foo() + // CHECK-NEXT: 0 | Y *return_adjustment::T::foo() // CHECK-NEXT: [return adjustment (to type 'struct A *'): vbase #1, 0 non-virtual] - // CHECK-NEXT: 1 | return_adjustment::Y *return_adjustment::T::foo() + // CHECK-NEXT: 1 | Y *return_adjustment::T::foo() // CHECK-NEXT: [return adjustment (to type 'struct return_adjustment::X *'): vbase #2, 0 non-virtual] - // CHECK-NEXT: 2 | return_adjustment::Y *return_adjustment::T::foo() + // CHECK-NEXT: 2 | Y *return_adjustment::T::foo() - // CHECK-LABEL: Thunks for 'return_adjustment::Y *return_adjustment::T::foo()' (2 entries). + // CHECK-LABEL: Thunks for 'Y *return_adjustment::T::foo()' (2 entries). // CHECK-NEXT: 0 | [return adjustment (to type 'struct A *'): vbase #1, 0 non-virtual] // CHECK-NEXT: 1 | [return adjustment (to type 'struct return_adjustment::X *'): vbase #2, 0 non-virtual] // CHECK-LABEL: VFTable indices for 'return_adjustment::T' (1 entry). - // CHECK-NEXT: 2 | return_adjustment::Y *return_adjustment::T::foo() + // CHECK-NEXT: 2 | Y *return_adjustment::T::foo() virtual Y* foo(); }; @@ -652,15 +652,15 @@ struct V : Z { // CHECK-LABEL: VFTable for 'return_adjustment::Z' in 'return_adjustment::V' (2 entries). - // CHECK-NEXT: 0 | return_adjustment::U *return_adjustment::V::foo() + // CHECK-NEXT: 0 | U *return_adjustment::V::foo() // CHECK-NEXT: [return adjustment (to type 'struct A *'): vbptr at offset 4, vbase #1, 0 non-virtual] - // CHECK-NEXT: 1 | return_adjustment::U *return_adjustment::V::foo() + // CHECK-NEXT: 1 | U *return_adjustment::V::foo() - // CHECK-LABEL: Thunks for 'return_adjustment::U *return_adjustment::V::foo()' (1 entry). + // CHECK-LABEL: Thunks for 'U *return_adjustment::V::foo()' (1 entry). // CHECK-NEXT: 0 | [return adjustment (to type 'struct A *'): vbptr at offset 4, vbase #1, 0 non-virtual] // CHECK-LABEL: VFTable indices for 'return_adjustment::V' (1 entry). - // CHECK-NEXT: 1 | return_adjustment::U *return_adjustment::V::foo() + // CHECK-NEXT: 1 | U *return_adjustment::V::foo() virtual U* foo(); }; diff --git a/clang/test/CodeGenCXX/predefined-expr.cpp b/clang/test/CodeGenCXX/predefined-expr.cpp --- a/clang/test/CodeGenCXX/predefined-expr.cpp +++ b/clang/test/CodeGenCXX/predefined-expr.cpp @@ -40,7 +40,7 @@ // CHECK-DAG: private unnamed_addr constant [30 x i8] c"NS::Destructor::~Destructor()\00" // CHECK-DAG: private unnamed_addr constant [12 x i8] c"Constructor\00" -// CHECK-DAG: private unnamed_addr constant [41 x i8] c"NS::Constructor::Constructor(NS::Base *)\00" +// CHECK-DAG: private unnamed_addr constant [37 x i8] c"NS::Constructor::Constructor(Base *)\00" // CHECK-DAG: private unnamed_addr constant [34 x i8] c"NS::Constructor::Constructor(int)\00" // CHECK-DAG: private unnamed_addr constant [31 x i8] c"NS::Constructor::Constructor()\00" @@ -61,22 +61,22 @@ // CHECK-DAG: private unnamed_addr constant [37 x i8] c"void NS::Base::constFunction() const\00" // CHECK-DAG: private unnamed_addr constant [26 x i8] c"functionReturingTemplate2\00" -// CHECK-DAG: private unnamed_addr constant [64 x i8] c"ClassTemplate NS::Base::functionReturingTemplate2()\00" +// CHECK-DAG: private unnamed_addr constant [60 x i8] c"ClassTemplate NS::Base::functionReturingTemplate2()\00" // CHECK-DAG: private unnamed_addr constant [26 x i8] c"functionReturingTemplate1\00" // CHECK-DAG: private unnamed_addr constant [57 x i8] c"ClassTemplate NS::Base::functionReturingTemplate1()\00" // CHECK-DAG: private unnamed_addr constant [23 x i8] c"withTemplateParameter2\00" -// CHECK-DAG: private unnamed_addr constant [65 x i8] c"void NS::Base::withTemplateParameter2(ClassTemplate)\00" +// CHECK-DAG: private unnamed_addr constant [61 x i8] c"void NS::Base::withTemplateParameter2(ClassTemplate)\00" // CHECK-DAG: private unnamed_addr constant [23 x i8] c"withTemplateParameter1\00" // CHECK-DAG: private unnamed_addr constant [58 x i8] c"void NS::Base::withTemplateParameter1(ClassTemplate)\00" // CHECK-DAG: private unnamed_addr constant [23 x i8] c"functionReturningClass\00" -// CHECK-DAG: private unnamed_addr constant [45 x i8] c"NS::Base *NS::Base::functionReturningClass()\00" +// CHECK-DAG: private unnamed_addr constant [41 x i8] c"Base *NS::Base::functionReturningClass()\00" // CHECK-DAG: private unnamed_addr constant [23 x i8] c"functionWithParameters\00" -// CHECK-DAG: private unnamed_addr constant [64 x i8] c"void NS::Base::functionWithParameters(int, float *, NS::Base *)\00" +// CHECK-DAG: private unnamed_addr constant [60 x i8] c"void NS::Base::functionWithParameters(int, float *, Base *)\00" // CHECK-DAG: private unnamed_addr constant [17 x i8] c"variadicFunction\00" // CHECK-DAG: private unnamed_addr constant [42 x i8] c"void NS::Base::variadicFunction(int, ...)\00" diff --git a/clang/test/CodeGenCXX/vtable-layout.cpp b/clang/test/CodeGenCXX/vtable-layout.cpp --- a/clang/test/CodeGenCXX/vtable-layout.cpp +++ b/clang/test/CodeGenCXX/vtable-layout.cpp @@ -81,20 +81,20 @@ // CHECK-2-NEXT: -- (Test2::A, 0) vtable address -- // CHECK-2-NEXT: 2 | void Test2::A::f() // CHECK-2-NEXT: 3 | void Test2::A::f() const -// CHECK-2-NEXT: 4 | Test2::A *Test2::A::g(int) +// CHECK-2-NEXT: 4 | A *Test2::A::g(int) // CHECK-2-NEXT: 5 | Test2::A::~A() [complete] // CHECK-2-NEXT: 6 | Test2::A::~A() [deleting] // CHECK-2-NEXT: 7 | void Test2::A::h() -// CHECK-2-NEXT: 8 | Test2::A &Test2::A::operator=(const Test2::A &) +// CHECK-2-NEXT: 8 | A &Test2::A::operator=(const A &) // // CHECK-2: VTable indices for 'Test2::A' (7 entries). // CHECK-2-NEXT: 0 | void Test2::A::f() // CHECK-2-NEXT: 1 | void Test2::A::f() const -// CHECK-2-NEXT: 2 | Test2::A *Test2::A::g(int) +// CHECK-2-NEXT: 2 | A *Test2::A::g(int) // CHECK-2-NEXT: 3 | Test2::A::~A() [complete] // CHECK-2-NEXT: 4 | Test2::A::~A() [deleting] // CHECK-2-NEXT: 5 | void Test2::A::h() -// CHECK-2-NEXT: 6 | Test2::A &Test2::A::operator=(const Test2::A &) +// CHECK-2-NEXT: 6 | A &Test2::A::operator=(const A &) struct A { virtual void f(); virtual void f() const; @@ -225,12 +225,12 @@ // CHECK-8-NEXT: 1 | Test4::B RTTI // CHECK-8-NEXT: -- (Test4::A, 0) vtable address -- // CHECK-8-NEXT: -- (Test4::B, 0) vtable address -- -// CHECK-8-NEXT: 2 | Test4::R3 *Test4::B::f() +// CHECK-8-NEXT: 2 | R3 *Test4::B::f() // CHECK-8-NEXT: [return adjustment: 4 non-virtual] -// CHECK-8-NEXT: 3 | Test4::R3 *Test4::B::f() +// CHECK-8-NEXT: 3 | R3 *Test4::B::f() // // CHECK-8: VTable indices for 'Test4::B' (1 entries). -// CHECK-8-NEXT: 1 | Test4::R3 *Test4::B::f() +// CHECK-8-NEXT: 1 | R3 *Test4::B::f() struct B : A { virtual R3 *f(); }; @@ -249,12 +249,12 @@ // CHECK-9-NEXT: 1 | Test4::D RTTI // CHECK-9-NEXT: -- (Test4::C, 0) vtable address -- // CHECK-9-NEXT: -- (Test4::D, 0) vtable address -- -// CHECK-9-NEXT: 2 | Test4::V2 *Test4::D::f() +// CHECK-9-NEXT: 2 | V2 *Test4::D::f() // CHECK-9-NEXT: [return adjustment: 0 non-virtual, -24 vbase offset offset] -// CHECK-9-NEXT: 3 | Test4::V2 *Test4::D::f() +// CHECK-9-NEXT: 3 | V2 *Test4::D::f() // // CHECK-9: VTable indices for 'Test4::D' (1 entries). -// CHECK-9-NEXT: 1 | Test4::V2 *Test4::D::f() +// CHECK-9-NEXT: 1 | V2 *Test4::D::f() struct D : C { virtual V2 *f(); }; @@ -268,12 +268,12 @@ // CHECK-10-NEXT: 1 | Test4::E RTTI // CHECK-10-NEXT: -- (Test4::A, 0) vtable address -- // CHECK-10-NEXT: -- (Test4::E, 0) vtable address -- -// CHECK-10-NEXT: 2 | Test4::V3 *Test4::E::f() +// CHECK-10-NEXT: 2 | V3 *Test4::E::f() // CHECK-10-NEXT: [return adjustment: 4 non-virtual, -24 vbase offset offset] -// CHECK-10-NEXT: 3 | Test4::V3 *Test4::E::f() +// CHECK-10-NEXT: 3 | V3 *Test4::E::f() // // CHECK-10: VTable indices for 'Test4::E' (1 entries). -// CHECK-10-NEXT: 1 | Test4::V3 *Test4::E::f() +// CHECK-10-NEXT: 1 | V3 *Test4::E::f() struct E : A { virtual V3 *f(); }; @@ -286,13 +286,13 @@ // CHECK-11-NEXT: 1 | Test4::F RTTI // CHECK-11-NEXT: -- (Test4::A, 0) vtable address -- // CHECK-11-NEXT: -- (Test4::F, 0) vtable address -- -// CHECK-11-NEXT: 2 | Test4::R3 *Test4::F::f() [pure] +// CHECK-11-NEXT: 2 | R3 *Test4::F::f() [pure] // CHECK-11-NEXT: 3 | void Test4::F::g() -// CHECK-11-NEXT: 4 | Test4::R3 *Test4::F::f() [pure] +// CHECK-11-NEXT: 4 | R3 *Test4::F::f() [pure] // // CHECK-11: VTable indices for 'Test4::F' (2 entries). // CHECK-11-NEXT: 1 | void Test4::F::g() -// CHECK-11-NEXT: 2 | Test4::R3 *Test4::F::f() +// CHECK-11-NEXT: 2 | R3 *Test4::F::f() struct F : A { virtual void g(); virtual R3 *f() = 0; @@ -1458,13 +1458,13 @@ // CHECK-36-NEXT: 3 | Test29::B RTTI // CHECK-36-NEXT: -- (Test29::A, 0) vtable address -- // CHECK-36-NEXT: -- (Test29::B, 0) vtable address -- -// CHECK-36-NEXT: 4 | Test29::V2 *Test29::B::f() +// CHECK-36-NEXT: 4 | V2 *Test29::B::f() // CHECK-36-NEXT: [return adjustment: 0 non-virtual, -24 vbase offset offset] // CHECK-36-NEXT: [this adjustment: 0 non-virtual, -24 vcall offset offset] -// CHECK-36-NEXT: 5 | Test29::V2 *Test29::B::f() +// CHECK-36-NEXT: 5 | V2 *Test29::B::f() // // CHECK-36: VTable indices for 'Test29::B' (1 entries). -// CHECK-36-NEXT: 1 | Test29::V2 *Test29::B::f() +// CHECK-36-NEXT: 1 | V2 *Test29::B::f() struct B : virtual A { virtual V2 *f(); }; @@ -1830,7 +1830,7 @@ }; // CHECK-43: VTable indices for 'Test37::C' (1 entries). -// CHECK-43-NEXT: 1 | Test37::C *Test37::C::f() +// CHECK-43-NEXT: 1 | C *Test37::C::f() struct C : B { virtual C* f(); }; diff --git a/clang/test/FixIt/fixit.cpp b/clang/test/FixIt/fixit.cpp --- a/clang/test/FixIt/fixit.cpp +++ b/clang/test/FixIt/fixit.cpp @@ -384,7 +384,7 @@ int f() { Cl0 c; - return c->a; // expected-error {{member reference type 'PR15045::Cl0' is not a pointer; did you mean to use '.'?}} + return c->a; // expected-error {{member reference type 'Cl0' is not a pointer; did you mean to use '.'?}} } } @@ -442,7 +442,7 @@ }; void bar(Bar *o) { - o.~Bar(); // expected-error {{member reference type 'dotPointerDestructor::Bar *' is a pointer; did you mean to use '->'}} + o.~Bar(); // expected-error {{member reference type 'Bar *' is a pointer; did you mean to use '->'}} } // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:4-[[@LINE-1]]:5}:"->" } diff --git a/clang/test/Index/annotate-context-sensitive.cpp b/clang/test/Index/annotate-context-sensitive.cpp --- a/clang/test/Index/annotate-context-sensitive.cpp +++ b/clang/test/Index/annotate-context-sensitive.cpp @@ -24,7 +24,7 @@ // CHECK-OVERRIDE-FINAL: Identifier: "Derived" [6:7 - 6:14] ClassDecl=Derived:6:7 (Definition) // CHECK-OVERRIDE-FINAL: Keyword: "final" [6:15 - 6:20] attribute(final)= // CHECK-OVERRIDE-FINAL: Punctuation: ":" [6:21 - 6:22] ClassDecl=Derived:6:7 (Definition) -// CHECK-OVERRIDE-FINAL: Keyword: "public" [6:23 - 6:29] C++ base class specifier=class Base:1:7 [access=public isVirtual=false] +// CHECK-OVERRIDE-FINAL: Keyword: "public" [6:23 - 6:29] C++ base class specifier=Base:1:7 [access=public isVirtual=false] // CHECK-OVERRIDE-FINAL: Identifier: "Base" [6:30 - 6:34] TypeRef=class Base:1:7 // CHECK-OVERRIDE-FINAL: Punctuation: "{" [6:35 - 6:36] ClassDecl=Derived:6:7 (Definition) // CHECK-OVERRIDE-FINAL: Keyword: "virtual" [7:3 - 7:10] CXXMethod=f:7:16 (virtual) [Overrides @3:16] diff --git a/clang/test/Index/comment-cplus-decls.cpp b/clang/test/Index/comment-cplus-decls.cpp --- a/clang/test/Index/comment-cplus-decls.cpp +++ b/clang/test/Index/comment-cplus-decls.cpp @@ -49,7 +49,7 @@ // CHECK: Test() // CHECK: unsigned int getID() const // CHECK: ~Test(){{( noexcept)?}} -// CHECK: Test::data *reserved +// CHECK: data *reserved class S { @@ -149,7 +149,7 @@ }; } // CHECK: void f(const T &t = T()) -// CHECK: friend void vector<A>::f(const test3::A &) +// CHECK: friend void vector<A>::f(const A &) class MyClass { diff --git a/clang/test/Index/keep-going.cpp b/clang/test/Index/keep-going.cpp --- a/clang/test/Index/keep-going.cpp +++ b/clang/test/Index/keep-going.cpp @@ -26,10 +26,10 @@ // CHECK: FieldDecl=a:4:13 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0] // CHECK: TypeRef=T:3:16 [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0] // CHECK: ClassDecl=B:6:7 (Definition) [type=B] [typekind=Record] [isPOD=0] -// CHECK: C++ base class specifier=A:4:7 [access=public isVirtual=false] [type=A] [typekind=Unexposed] [templateargs/1= [type=int] [typekind=Int]] [canonicaltype=A] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=int] [typekind=Int]] [isPOD=0] [nbFields=1] +// CHECK: C++ base class specifier=A:4:7 [access=public isVirtual=false] [type=A] [typekind=Elaborated] [templateargs/1= [type=int] [typekind=Int]] [canonicaltype=A] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=int] [typekind=Int]] [isPOD=0] [nbFields=1] // CHECK: TemplateRef=A:4:7 [type=] [typekind=Invalid] [isPOD=0] // CHECK: ClassDecl=C:10:7 (Definition) [type=C] [typekind=Record] [isPOD=0] -// CHECK: C++ base class specifier=A:4:7 [access=public isVirtual=false] [type=A] [typekind=Unexposed] [templateargs/1= [type=float] [typekind=Float]] [canonicaltype=A] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=float] [typekind=Float]] [isPOD=0] [nbFields=1] +// CHECK: C++ base class specifier=A:4:7 [access=public isVirtual=false] [type=A] [typekind=Elaborated] [templateargs/1= [type=float] [typekind=Float]] [canonicaltype=A] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=float] [typekind=Float]] [isPOD=0] [nbFields=1] // CHECK: TemplateRef=A:4:7 [type=] [typekind=Invalid] [isPOD=0] // CHECK-KEEP-GOING-ONLY: VarDecl=global_var:1:12 [type=int] [typekind=Int] [isPOD=1] diff --git a/clang/test/Index/load-stmts.cpp b/clang/test/Index/load-stmts.cpp --- a/clang/test/Index/load-stmts.cpp +++ b/clang/test/Index/load-stmts.cpp @@ -156,12 +156,12 @@ // CHECK: load-stmts.cpp:18:7: ClassDecl=B:18:7 (Definition) Extent=[18:1 - 20:2] // CHECK: load-stmts.cpp:19:8: CXXMethod=doB:19:8 Extent=[19:3 - 19:13] // CHECK: load-stmts.cpp:22:7: ClassDecl=C:22:7 (Definition) Extent=[22:1 - 24:2] -// CHECK: load-stmts.cpp:22:18: C++ base class specifier=class A:14:7 [access=public isVirtual=false] -// CHECK: load-stmts.cpp:22:29: C++ base class specifier=class B:18:7 [access=private isVirtual=false] +// CHECK: load-stmts.cpp:22:18: C++ base class specifier=A:14:7 [access=public isVirtual=false] +// CHECK: load-stmts.cpp:22:29: C++ base class specifier=B:18:7 [access=private isVirtual=false] // CHECK: load-stmts.cpp:23:8: CXXMethod=doC:23:8 Extent=[23:3 - 23:13] // CHECK: load-stmts.cpp:26:7: ClassDecl=D:26:7 (Definition) Extent=[26:1 - 26:49] -// CHECK: load-stmts.cpp:26:26: C++ base class specifier=class C:22:7 [access=public isVirtual=true] -// CHECK: load-stmts.cpp:26:45: C++ base class specifier=class A:14:7 [access=private isVirtual=true] +// CHECK: load-stmts.cpp:26:26: C++ base class specifier=C:22:7 [access=public isVirtual=true] +// CHECK: load-stmts.cpp:26:45: C++ base class specifier=A:14:7 [access=private isVirtual=true] // CHECK: load-stmts.cpp:33:7: VarDecl=typeid_marker:33:7 (Definition) // CHECK: load-stmts.cpp:34:10: TypeRef=class C:22:7 Extent=[34:10 - 34:11] // CHECK: load-stmts.cpp:35:10: DeclRefExpr=c:32:20 Extent=[35:10 - 35:11] diff --git a/clang/test/Index/opencl-types.cl b/clang/test/Index/opencl-types.cl --- a/clang/test/Index/opencl-types.cl +++ b/clang/test/Index/opencl-types.cl @@ -17,11 +17,11 @@ } // CHECK: VarDecl=scalarHalf:11:8 (Definition){{( \(invalid\))?}} [type=__private half] [typekind=Half] [isPOD=1] -// CHECK: VarDecl=vectorHalf:12:9 (Definition) [type=__private half4] [typekind=Typedef] [canonicaltype=half __private __attribute__((ext_vector_type(4)))] [canonicaltypekind=ExtVector] [isPOD=1] +// CHECK: VarDecl=vectorHalf:12:9 (Definition) [type=__private half4] [typekind=Elaborated] [canonicaltype=half __private __attribute__((ext_vector_type(4)))] [canonicaltypekind=ExtVector] [isPOD=1] // CHECK: VarDecl=scalarFloat:13:9 (Definition) [type=__private float] [typekind=Float] [isPOD=1] -// CHECK: VarDecl=vectorFloat:14:10 (Definition) [type=__private float4] [typekind=Typedef] [canonicaltype=float __private __attribute__((ext_vector_type(4)))] [canonicaltypekind=ExtVector] [isPOD=1] +// CHECK: VarDecl=vectorFloat:14:10 (Definition) [type=__private float4] [typekind=Elaborated] [canonicaltype=float __private __attribute__((ext_vector_type(4)))] [canonicaltypekind=ExtVector] [isPOD=1] // CHECK: VarDecl=scalarDouble:15:10 (Definition){{( \(invalid\))?}} [type=__private double] [typekind=Double] [isPOD=1] -// CHECK: VarDecl=vectorDouble:16:11 (Definition){{( \(invalid\))?}} [type=__private double4] [typekind=Typedef] [canonicaltype=double __private __attribute__((ext_vector_type(4)))] [canonicaltypekind=ExtVector] [isPOD=1] +// CHECK: VarDecl=vectorDouble:16:11 (Definition){{( \(invalid\))?}} [type=__private double4] [typekind=Elaborated] [canonicaltype=double __private __attribute__((ext_vector_type(4)))] [canonicaltypekind=ExtVector] [isPOD=1] #pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing : enable @@ -120,10 +120,10 @@ reserve_id_t scalarOCLReserveID; } -// CHECK: VarDecl=scalarOCLSampler:117:19 (Definition) [type=const sampler_t] [typekind=Typedef] const [canonicaltype=const sampler_t] [canonicaltypekind=OCLSampler] [isPOD=1] -// CHECK: VarDecl=scalarOCLEvent:118:15 (Definition) [type=__private clk_event_t] [typekind=Typedef] [canonicaltype=__private clk_event_t] [canonicaltypekind=Unexposed] [isPOD=1] -// CHECK: VarDecl=scalarOCLQueue:119:11 (Definition) [type=__private queue_t] [typekind=Typedef] [canonicaltype=__private queue_t] [canonicaltypekind=OCLQueue] [isPOD=1] -// CHECK: VarDecl=scalarOCLReserveID:120:16 (Definition) [type=__private reserve_id_t] [typekind=Typedef] [canonicaltype=__private reserve_id_t] [canonicaltypekind=OCLReserveID] [isPOD=1] +// CHECK: VarDecl=scalarOCLSampler:117:19 (Definition) [type=const sampler_t] [typekind=Elaborated] const [canonicaltype=const sampler_t] [canonicaltypekind=OCLSampler] [isPOD=1] +// CHECK: VarDecl=scalarOCLEvent:118:15 (Definition) [type=__private clk_event_t] [typekind=Elaborated] [canonicaltype=__private clk_event_t] [canonicaltypekind=Unexposed] [isPOD=1] +// CHECK: VarDecl=scalarOCLQueue:119:11 (Definition) [type=__private queue_t] [typekind=Elaborated] [canonicaltype=__private queue_t] [canonicaltypekind=OCLQueue] [isPOD=1] +// CHECK: VarDecl=scalarOCLReserveID:120:16 (Definition) [type=__private reserve_id_t] [typekind=Elaborated] [canonicaltype=__private reserve_id_t] [canonicaltypekind=OCLReserveID] [isPOD=1] #pragma OPENCL EXTENSION cl_intel_device_side_avc_motion_estimation : enable @@ -131,4 +131,4 @@ intel_sub_group_avc_mce_payload_t mce_payload; } -// CHECK: VarDecl=mce_payload:131:37 (Definition){{( \(invalid\))?}} [type=__private intel_sub_group_avc_mce_payload_t] [typekind=Typedef] [canonicaltype=__private intel_sub_group_avc_mce_payload_t] [canonicaltypekind=OCLIntelSubgroupAVCMcePayload] [isPOD=1] +// CHECK: VarDecl=mce_payload:131:37 (Definition){{( \(invalid\))?}} [type=__private intel_sub_group_avc_mce_payload_t] [typekind=Elaborated] [canonicaltype=__private intel_sub_group_avc_mce_payload_t] [canonicaltypekind=OCLIntelSubgroupAVCMcePayload] [isPOD=1] diff --git a/clang/test/Index/paren-type.c b/clang/test/Index/paren-type.c --- a/clang/test/Index/paren-type.c +++ b/clang/test/Index/paren-type.c @@ -9,7 +9,7 @@ typedef int MyTypedef; // CHECK-TYPE: VarDecl=VariableWithParentheses2: -// CHECK-TYPE-SAME: [type=MyTypedef] [typekind=Typedef] +// CHECK-TYPE-SAME: [type=MyTypedef] [typekind=Elaborated] // CHECK-TYPE-SAME: [canonicaltype=int] [canonicaltypekind=Int] // CHECK-TYPEDECL: VarDecl=VariableWithParentheses2 // CHECK-TYPEDECL-SAME: [typedeclaration=MyTypedef] [typekind=Typedef] diff --git a/clang/test/Index/print-type-size.cpp b/clang/test/Index/print-type-size.cpp --- a/clang/test/Index/print-type-size.cpp +++ b/clang/test/Index/print-type-size.cpp @@ -45,8 +45,8 @@ struct simple s1; }; -// CHECK64: VarDecl=s1:[[@LINE+2]]:8 (Definition) [type=basic::simple] [typekind=Record] [sizeof=48] [alignof=8] -// CHECK32: VarDecl=s1:[[@LINE+1]]:8 (Definition) [type=basic::simple] [typekind=Record] [sizeof=36] [alignof=4] +// CHECK64: VarDecl=s1:[[@LINE+2]]:8 (Definition) [type=simple] [typekind=Elaborated] [sizeof=48] [alignof=8] +// CHECK32: VarDecl=s1:[[@LINE+1]]:8 (Definition) [type=simple] [typekind=Elaborated] [sizeof=36] [alignof=4] simple s1; struct Test { @@ -354,11 +354,11 @@ BaseStruct(){} double v0; float v1; -// CHECK64: FieldDecl=fg:[[@LINE+2]]:7 (Definition) [type=Test3::C] [typekind=Record] [sizeof=88] [alignof=8] [offsetof=128] -// CHECK32: FieldDecl=fg:[[@LINE+1]]:7 (Definition) [type=Test3::C] [typekind=Record] [sizeof=60] [alignof=4] [offsetof=96] +// CHECK64: FieldDecl=fg:[[@LINE+2]]:7 (Definition) [type=C] [typekind=Elaborated] [sizeof=88] [alignof=8] [offsetof=128] +// CHECK32: FieldDecl=fg:[[@LINE+1]]:7 (Definition) [type=C] [typekind=Elaborated] [sizeof=60] [alignof=4] [offsetof=96] C fg; -// CHECK64: FieldDecl=rg:[[@LINE+2]]:8 (Definition) [type=Test3::C &] [typekind=LValueReference] [sizeof=88] [alignof=8] [offsetof=832] -// CHECK32: FieldDecl=rg:[[@LINE+1]]:8 (Definition) [type=Test3::C &] [typekind=LValueReference] [sizeof=60] [alignof=4] [offsetof=576] +// CHECK64: FieldDecl=rg:[[@LINE+2]]:8 (Definition) [type=C &] [typekind=LValueReference] [sizeof=88] [alignof=8] [offsetof=832] +// CHECK32: FieldDecl=rg:[[@LINE+1]]:8 (Definition) [type=C &] [typekind=LValueReference] [sizeof=60] [alignof=4] [offsetof=576] C &rg; int x; }; diff --git a/clang/test/Index/print-type.c b/clang/test/Index/print-type.c --- a/clang/test/Index/print-type.c +++ b/clang/test/Index/print-type.c @@ -32,10 +32,10 @@ _Atomic(unsigned long) aul; // RUN: c-index-test -test-print-type %s | FileCheck %s -// CHECK: FunctionDecl=f:3:6 (Definition) [type=int *(int *, char *, FooType, int *, void (*)(int))] [typekind=FunctionProto] [canonicaltype=int *(int *, char *, int, int *, void (*)(int))] [canonicaltypekind=FunctionProto] [resulttype=int *] [resulttypekind=Pointer] [args= [int *] [Pointer] [char *] [Pointer] [FooType] [Typedef] [int[5]] [ConstantArray] [void (*)(int)] [Pointer]] [isPOD=0] +// CHECK: FunctionDecl=f:3:6 (Definition) [type=int *(int *, char *, FooType, int *, void (*)(int))] [typekind=FunctionProto] [canonicaltype=int *(int *, char *, int, int *, void (*)(int))] [canonicaltypekind=FunctionProto] [resulttype=int *] [resulttypekind=Pointer] [args= [int *] [Pointer] [char *] [Pointer] [FooType] [Elaborated] [int[5]] [ConstantArray] [void (*)(int)] [Pointer]] [isPOD=0] // CHECK: ParmDecl=p:3:13 (Definition) [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int] // CHECK: ParmDecl=x:3:22 (Definition) [type=char *] [typekind=Pointer] [isPOD=1] [pointeetype=char] [pointeekind=Char_{{[US]}}] -// CHECK: ParmDecl=z:3:33 (Definition) [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] +// CHECK: ParmDecl=z:3:33 (Definition) [type=FooType] [typekind=Elaborated] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] // CHECK: TypeRef=FooType:1:13 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] // CHECK: ParmDecl=arr:3:40 (Definition) [type=int[5]] [typekind=ConstantArray] [isPOD=1] // CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1] @@ -47,14 +47,14 @@ // CHECK: UnaryOperator= [type=int] [typekind=Int] [isPOD=1] // CHECK: DeclRefExpr=p:3:13 [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int] // CHECK: DeclStmt= [type=] [typekind=Invalid] [isPOD=0] -// CHECK: VarDecl=w:5:17 (Definition) [type=const FooType] [typekind=Typedef] const [canonicaltype=const int] [canonicaltypekind=Int] [isPOD=1] +// CHECK: VarDecl=w:5:17 (Definition) [type=const FooType] [typekind=Elaborated] const [canonicaltype=const int] [canonicaltypekind=Int] [isPOD=1] // CHECK: TypeRef=FooType:1:13 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] -// CHECK: DeclRefExpr=z:3:33 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] +// CHECK: DeclRefExpr=z:3:33 [type=FooType] [typekind=Elaborated] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] // CHECK: ReturnStmt= [type=] [typekind=Invalid] [isPOD=0] // CHECK: BinaryOperator= [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int] // CHECK: BinaryOperator= [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int] // CHECK: DeclRefExpr=p:3:13 [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int] -// CHECK: DeclRefExpr=z:3:33 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] +// CHECK: DeclRefExpr=z:3:33 [type=FooType] [typekind=Elaborated] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] // CHECK: ArraySubscriptExpr= [type=int] [typekind=Int] [isPOD=1] // CHECK: UnexposedExpr=arr:3:40 [type=int[5]] [typekind=ConstantArray] [isPOD=1] // CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1] 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 @@ -112,31 +112,31 @@ // CHECK: TypedefDecl=FooType:19:15 (Definition) [type=outer::inner::Bar::FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] // CHECK: TypeAliasDecl=AliasType:20:9 (Definition) [type=outer::inner::Bar::AliasType] [typekind=Typedef] [canonicaltype=double] [canonicaltypekind=Double] [isPOD=1] // CHECK: FieldDecl=p:21:8 (Definition) [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int] -// CHECK: CXXMethod=f:22:8 (Definition) [type=int *(int *, char *, outer::inner::Bar::FooType){{.*}}] [typekind=FunctionProto] [canonicaltype=int *(int *, char *, int){{.*}}] [canonicaltypekind=FunctionProto] [resulttype=int *] [resulttypekind=Pointer] [args= [int *] [Pointer] [char *] [Pointer] [outer::inner::Bar::FooType] [Typedef]] [isPOD=0] +// CHECK: CXXMethod=f:22:8 (Definition) [type=int *(int *, char *, FooType){{.*}}] [typekind=FunctionProto] [canonicaltype=int *(int *, char *, int){{.*}}] [canonicaltypekind=FunctionProto] [resulttype=int *] [resulttypekind=Pointer] [args= [int *] [Pointer] [char *] [Pointer] [FooType] [Elaborated]] [isPOD=0] // CHECK: ParmDecl=p:22:15 (Definition) [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int] // CHECK: ParmDecl=x:22:24 (Definition) [type=char *] [typekind=Pointer] [isPOD=1] [pointeetype=char] [pointeekind=Char_{{[US]}}] -// CHECK: ParmDecl=z:22:35 (Definition) [type=outer::inner::Bar::FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] +// CHECK: ParmDecl=z:22:35 (Definition) [type=FooType] [typekind=Elaborated] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] // CHECK: TypeRef=outer::inner::Bar::FooType:19:15 [type=outer::inner::Bar::FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] // CHECK: CompoundStmt= [type=] [typekind=Invalid] [isPOD=0] // CHECK: DeclStmt= [type=] [typekind=Invalid] [isPOD=0] -// CHECK: VarDecl=w:23:19 (Definition) [type=const outer::inner::Bar::FooType] [typekind=Typedef] const [canonicaltype=const int] [canonicaltypekind=Int] [isPOD=1] +// CHECK: VarDecl=w:23:19 (Definition) [type=const FooType] [typekind=Elaborated] const [canonicaltype=const int] [canonicaltypekind=Int] [isPOD=1] // CHECK: TypeRef=outer::inner::Bar::FooType:19:15 [type=outer::inner::Bar::FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] -// CHECK: UnexposedExpr=z:22:35 [type=outer::inner::Bar::FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] -// CHECK: DeclRefExpr=z:22:35 [type=outer::inner::Bar::FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] +// CHECK: UnexposedExpr=z:22:35 [type=FooType] [typekind=Elaborated] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] +// CHECK: DeclRefExpr=z:22:35 [type=FooType] [typekind=Elaborated] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] // CHECK: ReturnStmt= [type=] [typekind=Invalid] [isPOD=0] // CHECK: BinaryOperator= [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int] // CHECK: UnexposedExpr=p:22:15 [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int] // CHECK: DeclRefExpr=p:22:15 [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int] -// CHECK: UnexposedExpr=z:22:35 [type=outer::inner::Bar::FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] -// CHECK: DeclRefExpr=z:22:35 [type=outer::inner::Bar::FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] +// CHECK: UnexposedExpr=z:22:35 [type=FooType] [typekind=Elaborated] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] +// CHECK: DeclRefExpr=z:22:35 [type=FooType] [typekind=Elaborated] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1] // CHECK: TypedefDecl=OtherType:26:18 (Definition) [type=outer::inner::Bar::OtherType] [typekind=Typedef] [canonicaltype=double] [canonicaltypekind=Double] [isPOD=1] // CHECK: TypedefDecl=ArrayType:27:15 (Definition) [type=outer::inner::Bar::ArrayType] [typekind=Typedef] [canonicaltype=int[5]] [canonicaltypekind=ConstantArray] [isPOD=1] // CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1] -// CHECK: FieldDecl=baz:28:20 (Definition) [type=Baz] [typekind=Unexposed] [templateargs/3= [type=int] [typekind=Int]] [canonicaltype=outer::Baz] [canonicaltypekind=Record] [canonicaltemplateargs/3= [type=int] [typekind=Int]] [isPOD=1] +// CHECK: FieldDecl=baz:28:20 (Definition) [type=Baz] [typekind=Elaborated] [templateargs/3= [type=int] [typekind=Int]] [canonicaltype=outer::Baz] [canonicaltypekind=Record] [canonicaltemplateargs/3= [type=int] [typekind=Int]] [isPOD=1] // CHECK: TemplateRef=Baz:9:8 [type=] [typekind=Invalid] [isPOD=0] // CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1] // CHECK: TemplateRef=Foo:4:8 [type=] [typekind=Invalid] [isPOD=0] -// CHECK: FieldDecl=qux:29:38 (Definition) [type=Qux, outer::inner::Bar::FooType>] [typekind=Unexposed] [templateargs/4= [type=int] [typekind=Int] [type=char *] [typekind=Pointer] [type=Foo] [typekind=Unexposed] [type=outer::inner::Bar::FooType] [typekind=Typedef]] [canonicaltype=outer::Qux, int>] [canonicaltypekind=Record] [canonicaltemplateargs/4= [type=int] [typekind=Int] [type=char *] [typekind=Pointer] [type=outer::Foo] [typekind=Record] [type=int] [typekind=Int]] [isPOD=1] +// CHECK: FieldDecl=qux:29:38 (Definition) [type=Qux, FooType>] [typekind=Elaborated] [templateargs/4= [type=int] [typekind=Int] [type=char *] [typekind=Pointer] [type=Foo] [typekind=Elaborated] [type=FooType] [typekind=Elaborated]] [canonicaltype=outer::Qux, int>] [canonicaltypekind=Record] [canonicaltemplateargs/4= [type=int] [typekind=Int] [type=char *] [typekind=Pointer] [type=outer::Foo] [typekind=Record] [type=int] [typekind=Int]] [isPOD=1] // CHECK: TemplateRef=Qux:12:8 [type=] [typekind=Invalid] [isPOD=0] // CHECK: TemplateRef=Foo:4:8 [type=] [typekind=Invalid] [isPOD=0] // CHECK: FunctionTemplate=tbar:36:3 [type=T (int)] [typekind=FunctionProto] [canonicaltype=type-parameter-0-0 (int)] [canonicaltypekind=FunctionProto] [resulttype=T] [resulttypekind=Unexposed] [isPOD=0] @@ -176,9 +176,9 @@ // CHECK: DeclRefExpr=tbar:36:3 RefName=[55:17 - 55:21] RefName=[55:21 - 55:26] [type=int (int)] [typekind=FunctionProto] [canonicaltype=int (int)] [canonicaltypekind=FunctionProto] [isPOD=0] // CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1] // CHECK: VarDecl=autoBlob:56:6 (Definition) [type=Blob *] [typekind=Auto] [canonicaltype=Blob *] [canonicaltypekind=Pointer] [isPOD=1] -// CHECK: CXXNewExpr= [type=Blob *] [typekind=Pointer] [isPOD=1] [pointeetype=Blob] [pointeekind=Record] +// CHECK: CXXNewExpr= [type=Blob *] [typekind=Pointer] [canonicaltype=Blob *] [canonicaltypekind=Pointer] [isPOD=1] [pointeetype=Blob] [pointeekind=Elaborated] // CHECK: TypeRef=struct Blob:46:8 [type=Blob] [typekind=Record] [isPOD=1] [nbFields=2] -// CHECK: CallExpr=Blob:46:8 [type=Blob] [typekind=Record] [isPOD=1] [nbFields=2] +// CHECK: CallExpr=Blob:46:8 [type=Blob] [typekind=Elaborated] [canonicaltype=Blob] [canonicaltypekind=Record] [isPOD=1] [nbFields=2] // CHECK: FunctionDecl=autoFunction:57:6 (Definition) [type=int ()] [typekind=FunctionProto] [canonicaltype=int ()] [canonicaltypekind=FunctionProto] [resulttype=int] [resulttypekind=Auto] [isPOD=0] // CHECK: CompoundStmt= [type=] [typekind=Invalid] [isPOD=0] // CHECK: ReturnStmt= [type=] [typekind=Invalid] [isPOD=0] @@ -187,18 +187,18 @@ // CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1] // CHECK: TypeAliasTemplateDecl=TypeAlias:61:1 (Definition) [type=] [typekind=Invalid] [isPOD=0] // CHECK: TemplateTypeParameter=T:60:20 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0] -// CHECK: FieldDecl=foo:63:39 (Definition) [type=TypeAlias] [typekind=Unexposed] [templateargs/1= [type=int] [typekind=Int]] [canonicaltype=outer::Qux] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=int] [typekind=Int]] [isPOD=1] +// CHECK: FieldDecl=foo:63:39 (Definition) [type=TypeAlias] [typekind=Elaborated] [templateargs/1= [type=int] [typekind=Int]] [canonicaltype=outer::Qux] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=int] [typekind=Int]] [isPOD=1] // CHECK: TemplateRef=TypeAlias:61:1 [type=] [typekind=Invalid] [isPOD=0] // CHECK: ClassTemplate=Specialization:66:8 (Definition) [type=] [typekind=Invalid] [isPOD=0] // CHECK: TemplateTypeParameter=T:65:19 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0] // CHECK: StructDecl=Specialization:69:8 [Specialization of Specialization:66:8] [type=Specialization] [typekind=Record] [templateargs/1= [type=int] [typekind=Int]] [isPOD=0] -// CHECK: VarDecl=templRefParam:71:40 (Definition) [type=Specialization &>] [typekind=Unexposed] [templateargs/1= [type=Specialization &] [typekind=LValueReference]] [canonicaltype=Specialization &>] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=Specialization &] [typekind=LValueReference]] [isPOD=1] +// CHECK: VarDecl=templRefParam:71:40 (Definition) [type=Specialization &>] [typekind=Elaborated] [templateargs/1= [type=Specialization &] [typekind=LValueReference]] [canonicaltype=Specialization &>] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=Specialization &] [typekind=LValueReference]] [isPOD=1] // CHECK: TemplateRef=Specialization:66:8 [type=] [typekind=Invalid] [isPOD=0] -// CHECK: CallExpr=Specialization:66:8 [type=Specialization &>] [typekind=Unexposed] [templateargs/1= [type=Specialization &] [typekind=LValueReference]] [canonicaltype=Specialization &>] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=Specialization &] [typekind=LValueReference]] [isPOD=1] +// 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: DeclRefExpr=templRefParam:71:40 [type=Specialization &>] [typekind=Unexposed] [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=Unexposed]] [canonicaltype=A] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=void] [typekind=Void]] [isPOD=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] // CHECK: CallExpr=Bar:17:3 [type=outer::inner::Bar] [typekind=Elaborated] [canonicaltype=outer::inner::Bar] [canonicaltypekind=Record] [args= [outer::Foo *] [Pointer]] [isPOD=0] [nbFields=3] // CHECK: StructDecl=:84:3 (Definition) [type=X::(anonymous struct at {{.*}}print-type.cpp:84:3)] [typekind=Record] [isPOD=1] [nbFields=1] [isAnon=1] diff --git a/clang/test/Layout/aix-bitfield-alignment.cpp b/clang/test/Layout/aix-bitfield-alignment.cpp --- a/clang/test/Layout/aix-bitfield-alignment.cpp +++ b/clang/test/Layout/aix-bitfield-alignment.cpp @@ -29,7 +29,7 @@ // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct B -// CHECK-NEXT: 0:0-0 | enum Bool b +// CHECK-NEXT: 0:0-0 | Bool b // CHECK-NEXT: | [sizeof=4, dsize=4, align=4, preferredalign=4, // CHECK-NEXT: | nvsize=4, nvalign=4, preferrednvalign=4] diff --git a/clang/test/Layout/aix-power-alignment-typedef.cpp b/clang/test/Layout/aix-power-alignment-typedef.cpp --- a/clang/test/Layout/aix-power-alignment-typedef.cpp +++ b/clang/test/Layout/aix-power-alignment-typedef.cpp @@ -13,7 +13,7 @@ int b = sizeof(A); // CHECK: 0 | struct test1::A -// CHECK-NEXT: 0 | test1::Dbl x +// CHECK-NEXT: 0 | Dbl x // CHECK-NEXT: | [sizeof=8, dsize=8, align=2, preferredalign=2, // CHECK-NEXT: | nvsize=8, nvalign=2, preferrednvalign=2] @@ -31,7 +31,7 @@ int x = sizeof(U); // CHECK: 0 | union test2::U -// CHECK-NEXT: 0 | test2::DblArr da +// CHECK-NEXT: 0 | DblArr da // CHECK-NEXT: 0 | char x // CHECK-NEXT: | [sizeof=2, dsize=2, align=2, preferredalign=2, // CHECK-NEXT: | nvsize=2, nvalign=2, preferrednvalign=2] @@ -49,7 +49,7 @@ int x = sizeof(U); // CHECK: 0 | union test3::U -// CHECK-NEXT: 0 | test3::DblArr da +// CHECK-NEXT: 0 | DblArr da // CHECK-NEXT: 0 | char x // CHECK-NEXT: | [sizeof=2, dsize=2, align=2, preferredalign=2, // CHECK-NEXT: | nvsize=2, nvalign=2, preferrednvalign=2] @@ -67,7 +67,7 @@ int x = sizeof(U); // CHECK: 0 | union test4::U -// CHECK-NEXT: 0 | test4::Dbl[] DblArr +// CHECK-NEXT: 0 | Dbl[] DblArr // CHECK-NEXT: 0 | char x // CHECK-NEXT: | [sizeof=2, dsize=2, align=2, preferredalign=2, // CHECK-NEXT: | nvsize=2, nvalign=2, preferrednvalign=2] diff --git a/clang/test/Layout/dump-canonical.cpp b/clang/test/Layout/dump-canonical.cpp --- a/clang/test/Layout/dump-canonical.cpp +++ b/clang/test/Layout/dump-canonical.cpp @@ -14,7 +14,7 @@ } d; // CHECK: 0 | foo_t -// CHECK: 0 | c::bar_t +// CHECK: 0 | bar_t // CANONICAL-NOT: 0 | foo_t -// CANONICAL-NOT: 0 | c::bar_t +// CANONICAL-NOT: 0 | bar_t // CANONICAL: 0 | long diff --git a/clang/test/Layout/ms-x86-basic-layout.cpp b/clang/test/Layout/ms-x86-basic-layout.cpp --- a/clang/test/Layout/ms-x86-basic-layout.cpp +++ b/clang/test/Layout/ms-x86-basic-layout.cpp @@ -716,11 +716,11 @@ }; // CHECK-LABEL: 0 | struct ArrayFieldOfRecords{{$}} -// CHECK-NEXT: 0 | struct A4[2] InlineElts +// CHECK-NEXT: 0 | A4[2] InlineElts // CHECK-NEXT: | [sizeof=8, align=4 // CHECK-NEXT: | nvsize=8, nvalign=4] // CHECK-X64-LABEL: 0 | struct ArrayFieldOfRecords{{$}} -// CHECK-X64-NEXT: 0 | struct A4[2] InlineElts +// CHECK-X64-NEXT: 0 | A4[2] InlineElts // CHECK-X64-NEXT: | [sizeof=8, align=4 // CHECK-X64-NEXT: | nvsize=8, nvalign=4] @@ -729,11 +729,11 @@ }; // CHECK-LABEL: 0 | struct ArrayOfArrayFieldOfRecords{{$}} -// CHECK-NEXT: 0 | struct A4[2][2] InlineElts +// CHECK-NEXT: 0 | A4[2][2] InlineElts // CHECK-NEXT: | [sizeof=16, align=4 // CHECK-NEXT: | nvsize=16, nvalign=4] // CHECK-X64-LABEL: 0 | struct ArrayOfArrayFieldOfRecords{{$}} -// CHECK-X64-NEXT: 0 | struct A4[2][2] InlineElts +// CHECK-X64-NEXT: 0 | A4[2][2] InlineElts // CHECK-X64-NEXT: | [sizeof=16, align=4 // CHECK-X64-NEXT: | nvsize=16, nvalign=4] @@ -743,11 +743,11 @@ }; // CHECK-LABEL: 0 | struct RecordArrayTypedef{{$}} -// CHECK-NEXT: 0 | RecordArrayTypedef::ArrayTy[2] InlineElts +// CHECK-NEXT: 0 | ArrayTy[2] InlineElts // CHECK-NEXT: | [sizeof=16, align=4 // CHECK-NEXT: | nvsize=16, nvalign=4] // CHECK-X64-LABEL: 0 | struct RecordArrayTypedef{{$}} -// CHECK-X64-NEXT: 0 | RecordArrayTypedef::ArrayTy[2] InlineElts +// CHECK-X64-NEXT: 0 | ArrayTy[2] InlineElts // CHECK-X64-NEXT: | [sizeof=16, align=4 // CHECK-X64-NEXT: | nvsize=16, nvalign=4] diff --git a/clang/test/Layout/ms-x86-misalignedarray.cpp b/clang/test/Layout/ms-x86-misalignedarray.cpp --- a/clang/test/Layout/ms-x86-misalignedarray.cpp +++ b/clang/test/Layout/ms-x86-misalignedarray.cpp @@ -11,7 +11,7 @@ // CHECK: *** Dumping AST Record Layout // CHECK: *** Dumping AST Record Layout // CHECK-NEXT: 0 | struct T3 -// CHECK-NEXT: 0 | struct T2[1] a +// CHECK-NEXT: 0 | T2[1] a // CHECK-NEXT: 5 | char c // CHECK-NEXT: | [sizeof=8, align=4 // CHECK-NEXT: | nvsize=8, nvalign=4] @@ -19,7 +19,7 @@ // CHECK-X64: *** Dumping AST Record Layout // CHECK-X64: *** Dumping AST Record Layout // CHECK-X64-NEXT: 0 | struct T3 -// CHECK-X64-NEXT: 0 | struct T2[1] a +// CHECK-X64-NEXT: 0 | T2[1] a // CHECK-X64-NEXT: 16 | char c // CHECK-X64-NEXT: | [sizeof=24, align=8 // CHECK-X64-NEXT: | nvsize=24, nvalign=8] diff --git a/clang/test/Misc/diag-line-wrapping.cpp b/clang/test/Misc/diag-line-wrapping.cpp --- a/clang/test/Misc/diag-line-wrapping.cpp +++ b/clang/test/Misc/diag-line-wrapping.cpp @@ -9,8 +9,8 @@ // Ensure that after line-wrapping takes place, we preserve artificial // newlines introduced to manually format a section of the diagnostic text. // CHECK: {{.*}}: error: - // CHECK: struct DD -> struct D1 -> struct B - // CHECK: struct DD -> struct D2 -> struct B + // CHECK: struct DD -> D1 -> B + // CHECK: struct DD -> D2 -> B }; // A line longer than 4096 characters should cause us to suppress snippets no diff --git a/clang/test/Modules/namespaces.cpp b/clang/test/Modules/namespaces.cpp --- a/clang/test/Modules/namespaces.cpp +++ b/clang/test/Modules/namespaces.cpp @@ -72,8 +72,8 @@ // Test merging when using anonymous namespaces, which does not // actually perform any merging. void testAnonymousNotMerged() { - N11::consumeFoo(N11::getFoo()); // expected-error{{cannot initialize a parameter of type 'N11::(anonymous namespace)::Foo *' with an rvalue of type 'N11::(anonymous namespace)::Foo *'}} - N12::consumeFoo(N12::getFoo()); // expected-error{{cannot initialize a parameter of type 'N12::(anonymous namespace)::Foo *' with an rvalue of type 'N12::(anonymous namespace)::Foo *'}} + N11::consumeFoo(N11::getFoo()); // expected-error{{cannot initialize a parameter of type 'Foo *' with an rvalue of type 'Foo *'}} + N12::consumeFoo(N12::getFoo()); // expected-error{{cannot initialize a parameter of type 'Foo *' with an rvalue of type 'Foo *'}} } // expected-note@Inputs/namespaces-right.h:60 {{passing argument to parameter here}} diff --git a/clang/test/Modules/odr_hash-gnu.cpp b/clang/test/Modules/odr_hash-gnu.cpp --- a/clang/test/Modules/odr_hash-gnu.cpp +++ b/clang/test/Modules/odr_hash-gnu.cpp @@ -111,7 +111,7 @@ // expected-note@first.h:* {{declaration of 'x' does not match}} Invalid2 i2; // expected-error@first.h:* {{'Types::TypeOf::Invalid2' has different definitions in different modules; first difference is definition in module 'FirstModule' found field 'x' with type 'typeof(int)' (aka 'int')}} -// expected-note@second.h:* {{but in 'SecondModule' found field 'x' with type 'typeof(Types::TypeOf::I)' (aka 'int')}} +// expected-note@second.h:* {{but in 'SecondModule' found field 'x' with type 'typeof(I)' (aka 'int')}} Invalid3 i3; // expected-error@second.h:* {{'Types::TypeOf::Invalid3::x' from module 'SecondModule' is not present in definition of 'Types::TypeOf::Invalid3' in module 'FirstModule'}} // expected-note@first.h:* {{declaration of 'x' does not match}} diff --git a/clang/test/Modules/odr_hash.cpp b/clang/test/Modules/odr_hash.cpp --- a/clang/test/Modules/odr_hash.cpp +++ b/clang/test/Modules/odr_hash.cpp @@ -246,12 +246,12 @@ }; #else S4 s4; -// expected-error@second.h:* {{'Field::S4' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type 'Field::B' (aka 'int')}} -// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type 'Field::A' (aka 'int')}} +// expected-error@second.h:* {{'Field::S4' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type 'B' (aka 'int')}} +// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type 'A' (aka 'int')}} S5 s5; // expected-error@second.h:* {{'Field::S5' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type 'int'}} -// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type 'Field::A' (aka 'int')}} +// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type 'A' (aka 'int')}} #endif #if defined(FIRST) @@ -1098,7 +1098,7 @@ #else S6 s6; // expected-error@second.h:* {{'TypeDef::S6' has different definitions in different modules; first difference is definition in module 'SecondModule' found typedef 'b' with underlying type 'float'}} -// expected-note@first.h:* {{but in 'FirstModule' found typedef 'b' with different underlying type 'TypeDef::F' (aka 'float')}} +// expected-note@first.h:* {{but in 'FirstModule' found typedef 'b' with different underlying type 'F' (aka 'float')}} #endif #define DECLS \ @@ -1224,7 +1224,7 @@ #else S6 s6; // expected-error@second.h:* {{'Using::S6' has different definitions in different modules; first difference is definition in module 'SecondModule' found type alias 'b' with underlying type 'float'}} -// expected-note@first.h:* {{but in 'FirstModule' found type alias 'b' with different underlying type 'Using::F' (aka 'float')}} +// expected-note@first.h:* {{but in 'FirstModule' found type alias 'b' with different underlying type 'F' (aka 'float')}} #endif #if defined(FIRST) || defined(SECOND) @@ -2093,7 +2093,7 @@ }; #else S2 s2; -// expected-error@second.h:* {{'VarDecl::S2' has different definitions in different modules; first difference is definition in module 'SecondModule' found data member 'x' with type 'VarDecl::I' (aka 'int')}} +// expected-error@second.h:* {{'VarDecl::S2' has different definitions in different modules; first difference is definition in module 'SecondModule' found data member 'x' with type 'I' (aka 'int')}} // expected-note@first.h:* {{but in 'FirstModule' found data member 'x' with different type 'int'}} #endif @@ -2241,7 +2241,7 @@ }; #else S1 s1; -// expected-error@second.h:* {{'Friend::S1' has different definitions in different modules; first difference is definition in module 'SecondModule' found friend 'Friend::T1'}} +// expected-error@second.h:* {{'Friend::S1' has different definitions in different modules; first difference is definition in module 'SecondModule' found friend 'T1'}} // expected-note@first.h:* {{but in 'FirstModule' found friend 'class T1'}} #endif @@ -2474,8 +2474,8 @@ struct S4 : B4b {}; #else S4 s4; -// expected-error@second.h:* {{'BaseClass::S4' has different definitions in different modules; first difference is definition in module 'SecondModule' found 1st base class with type 'BaseClass::B4b'}} -// expected-note@first.h:* {{but in 'FirstModule' found 1st base class with different type 'BaseClass::B4a'}} +// expected-error@second.h:* {{'BaseClass::S4' has different definitions in different modules; first difference is definition in module 'SecondModule' found 1st base class with type 'B4b'}} +// expected-note@first.h:* {{but in 'FirstModule' found 1st base class with different type 'B4a'}} #endif #if defined(FIRST) @@ -2510,8 +2510,8 @@ struct S7 : B7a {}; #else S7 s7; -// expected-error@second.h:* {{'BaseClass::S7' has different definitions in different modules; first difference is definition in module 'SecondModule' found 1st base class 'BaseClass::B7a' with no access specifier}} -// expected-note@first.h:* {{but in 'FirstModule' found 1st base class 'BaseClass::B7a' with protected access specifier}} +// expected-error@second.h:* {{'BaseClass::S7' has different definitions in different modules; first difference is definition in module 'SecondModule' found 1st base class 'B7a' with no access specifier}} +// expected-note@first.h:* {{but in 'FirstModule' found 1st base class 'B7a' with protected access specifier}} #endif #if defined(FIRST) @@ -2522,8 +2522,8 @@ struct S8 : private B8a {}; #else S8 s8; -// expected-error@second.h:* {{'BaseClass::S8' has different definitions in different modules; first difference is definition in module 'SecondModule' found 1st base class 'BaseClass::B8a' with private access specifier}} -// expected-note@first.h:* {{but in 'FirstModule' found 1st base class 'BaseClass::B8a' with public access specifier}} +// expected-error@second.h:* {{'BaseClass::S8' has different definitions in different modules; first difference is definition in module 'SecondModule' found 1st base class 'B8a' with private access specifier}} +// expected-note@first.h:* {{but in 'FirstModule' found 1st base class 'B8a' with public access specifier}} #endif #if defined(FIRST) @@ -2534,8 +2534,8 @@ struct S9 : public B9a {}; #else S9 s9; -// expected-error@second.h:* {{'BaseClass::S9' has different definitions in different modules; first difference is definition in module 'SecondModule' found 1st base class 'BaseClass::B9a' with public access specifier}} -// expected-note@first.h:* {{but in 'FirstModule' found 1st base class 'BaseClass::B9a' with private access specifier}} +// expected-error@second.h:* {{'BaseClass::S9' has different definitions in different modules; first difference is definition in module 'SecondModule' found 1st base class 'B9a' with public access specifier}} +// expected-note@first.h:* {{but in 'FirstModule' found 1st base class 'B9a' with private access specifier}} #endif #if defined(FIRST) @@ -2546,8 +2546,8 @@ struct S10 : protected B10a {}; #else S10 s10; -// expected-error@second.h:* {{'BaseClass::S10' has different definitions in different modules; first difference is definition in module 'SecondModule' found 1st base class 'BaseClass::B10a' with protected access specifier}} -// expected-note@first.h:* {{but in 'FirstModule' found 1st base class 'BaseClass::B10a' with no access specifier}} +// expected-error@second.h:* {{'BaseClass::S10' has different definitions in different modules; first difference is definition in module 'SecondModule' found 1st base class 'B10a' with protected access specifier}} +// expected-note@first.h:* {{but in 'FirstModule' found 1st base class 'B10a' with no access specifier}} #endif #define DECLS @@ -3817,14 +3817,14 @@ // expected-error@first.h:* {{'Types::UnaryTransform::Invalid1::x' from module 'FirstModule' is not present in definition of 'Types::UnaryTransform::Invalid1' in module 'SecondModule'}} // expected-note@second.h:* {{declaration of 'x' does not match}} Invalid2 i2; -// expected-error@second.h:* {{'Types::UnaryTransform::Invalid2' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type '__underlying_type(Types::UnaryTransform::E2b)' (aka 'unsigned int')}} -// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type '__underlying_type(Types::UnaryTransform::E2a)' (aka 'unsigned int')}} +// expected-error@second.h:* {{'Types::UnaryTransform::Invalid2' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type '__underlying_type(E2b)' (aka 'unsigned int')}} +// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type '__underlying_type(E2a)' (aka 'unsigned int')}} Invalid3 i3; // expected-error@first.h:* {{'Types::UnaryTransform::Invalid3::x' from module 'FirstModule' is not present in definition of 'Types::UnaryTransform::Invalid3' in module 'SecondModule'}} // expected-note@second.h:* {{declaration of 'x' does not match}} Invalid4 i4; -// expected-error@second.h:* {{'Types::UnaryTransform::Invalid4' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type '__underlying_type(Types::UnaryTransform::E4b)' (aka 'unsigned int')}} -// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type '__underlying_type(Types::UnaryTransform::E4a)' (aka 'unsigned int')}} +// expected-error@second.h:* {{'Types::UnaryTransform::Invalid4' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type '__underlying_type(E4b)' (aka 'unsigned int')}} +// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type '__underlying_type(E4a)' (aka 'unsigned int')}} Valid1 v1; Valid2 v2; Valid3 v3; @@ -4514,7 +4514,7 @@ #else int I7 = F7(); // expected-error@second.h:* {{'FunctionDecl::F7' has different definitions in different modules; definition in module 'SecondModule' first difference is return type is 'int'}} -// expected-note@first.h:* {{but in 'FirstModule' found different return type 'FunctionDecl::I' (aka 'int')}} +// expected-note@first.h:* {{but in 'FirstModule' found different return type 'I' (aka 'int')}} #endif #if defined(FIRST) @@ -4523,7 +4523,7 @@ int F8(I) { return 0; } #else int I8 = F8(1); -// expected-error@second.h:* {{'FunctionDecl::F8' has different definitions in different modules; definition in module 'SecondModule' first difference is 1st parameter with type 'FunctionDecl::I' (aka 'int')}} +// expected-error@second.h:* {{'FunctionDecl::F8' has different definitions in different modules; definition in module 'SecondModule' first difference is 1st parameter with type 'I' (aka 'int')}} // expected-note@first.h:* {{but in 'FirstModule' found 1st parameter with type 'int'}} #endif diff --git a/clang/test/OpenMP/declare_mapper_ast_print.cpp b/clang/test/OpenMP/declare_mapper_ast_print.cpp --- a/clang/test/OpenMP/declare_mapper_ast_print.cpp +++ b/clang/test/OpenMP/declare_mapper_ast_print.cpp @@ -21,7 +21,7 @@ }; // CHECK: }; -// CHECK: class vecchild : public N1::vec { +// CHECK: class vecchild : public vec { class vecchild : public vec { public: int lenc; @@ -29,7 +29,7 @@ // CHECK: }; #pragma omp declare mapper(id: vec v) map(v.len) -// CHECK: #pragma omp declare mapper (id : N1::vec v) map(tofrom: v.len){{$}} +// CHECK: #pragma omp declare mapper (id : vec v) map(tofrom: v.len){{$}} }; // CHECK: } // CHECK: ; @@ -49,11 +49,11 @@ // CHECK: template class dat { // CHECK: #pragma omp declare mapper (id : N1::vec v) map(tofrom: v.len){{$}} -// CHECK: #pragma omp declare mapper (id : dat::datin v) map(tofrom: v.in){{$}} +// CHECK: #pragma omp declare mapper (id : datin v) map(tofrom: v.in){{$}} // CHECK: }; // CHECK: template<> class dat { // CHECK: #pragma omp declare mapper (id : N1::vec v) map(tofrom: v.len){{$}} -// CHECK: #pragma omp declare mapper (id : dat::datin v) map(tofrom: v.in){{$}} +// CHECK: #pragma omp declare mapper (id : datin v) map(tofrom: v.in){{$}} // CHECK: }; constexpr int N = 2; diff --git a/clang/test/OpenMP/declare_reduction_ast_print.cpp b/clang/test/OpenMP/declare_reduction_ast_print.cpp --- a/clang/test/OpenMP/declare_reduction_ast_print.cpp +++ b/clang/test/OpenMP/declare_reduction_ast_print.cpp @@ -20,7 +20,7 @@ #pragma omp declare reduction(-: struct A : bar(omp_out, omp_in)) } // CHECK: namespace N1 { -// CHECK: #pragma omp declare reduction (+ : N1::A : bar(omp_out, omp_in)) +// CHECK: #pragma omp declare reduction (+ : A : bar(omp_out, omp_in)) // CHECK: #pragma omp declare reduction (- : struct A : bar(omp_out, omp_in)) #pragma omp declare reduction(+ : int, char : omp_out *= omp_in) diff --git a/clang/test/OpenMP/deferred-diags.cpp b/clang/test/OpenMP/deferred-diags.cpp --- a/clang/test/OpenMP/deferred-diags.cpp +++ b/clang/test/OpenMP/deferred-diags.cpp @@ -41,7 +41,7 @@ struct a; struct b { b() { - delete c; // expected-warning {{deleting pointer to incomplete type 'TestDeleteIncompleteClassDefinition::a' may cause undefined behavior}} + delete c; // expected-warning {{deleting pointer to incomplete type 'a' may cause undefined behavior}} } a *c; }; diff --git a/clang/test/PCH/cxx_exprs.cpp b/clang/test/PCH/cxx_exprs.cpp --- a/clang/test/PCH/cxx_exprs.cpp +++ b/clang/test/PCH/cxx_exprs.cpp @@ -27,7 +27,7 @@ // CHECK: TypedefDecl {{.*}} <{{.*}}, col:{{.*}}> col:{{.*}} referenced dynamic_cast_result 'typeof (dynamic_cast(base_ptr))':'Derived *'{{$}} // CHECK-NEXT: TypeOfExprType {{.*}} 'typeof (dynamic_cast(base_ptr))' sugar{{( imported)?}}{{$}} // CHECK-NEXT: ParenExpr {{.*}} 'Derived *'{{$}} -// CHECK-NEXT: CXXDynamicCastExpr {{.*}} 'Derived *' dynamic_cast {{$}} +// CHECK-NEXT: CXXDynamicCastExpr {{.*}} 'Derived *' dynamic_cast {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'Base *' part_of_explicit_cast{{$}} // CHECK-NEXT: DeclRefExpr {{.*}} 'Base *' lvalue Var {{.*}} 'base_ptr' 'Base *' non_odr_use_unevaluated{{$}} diff --git a/clang/test/Parser/cxx1z-decomposition.cpp b/clang/test/Parser/cxx1z-decomposition.cpp --- a/clang/test/Parser/cxx1z-decomposition.cpp +++ b/clang/test/Parser/cxx1z-decomposition.cpp @@ -92,7 +92,7 @@ const int K = 5; void g() { // defining-type-specifiers other than cv-qualifiers and 'auto' - S [a] = s; // expected-error {{cannot be declared with type 'BadSpecifiers::S'}} + S [a] = s; // expected-error {{cannot be declared with type 'S'}} decltype(auto) [b] = s; // expected-error {{cannot be declared with type 'decltype(auto)'}} auto ([c]) = s; // expected-error {{cannot be declared with parentheses}} diff --git a/clang/test/SemaCXX/MicrosoftCompatibility.cpp b/clang/test/SemaCXX/MicrosoftCompatibility.cpp --- a/clang/test/SemaCXX/MicrosoftCompatibility.cpp +++ b/clang/test/SemaCXX/MicrosoftCompatibility.cpp @@ -118,7 +118,7 @@ void f() { pair p0(3); #if _MSC_VER >= 1900 - pair p = p0; // expected-error {{call to implicitly-deleted copy constructor of 'PR11826::pair'}} + pair p = p0; // expected-error {{call to implicitly-deleted copy constructor of 'pair'}} #else pair p = p0; #endif @@ -138,7 +138,7 @@ pair p0(3); pair p(4); #if _MSC_VER >= 1900 - p = p0; // expected-error {{object of type 'PR11826_for_symmetry::pair' cannot be assigned because its copy assignment operator is implicitly deleted}} + p = p0; // expected-error {{object of type 'pair' cannot be assigned because its copy assignment operator is implicitly deleted}} #else p = p0; #endif diff --git a/clang/test/SemaCXX/abstract.cpp b/clang/test/SemaCXX/abstract.cpp --- a/clang/test/SemaCXX/abstract.cpp +++ b/clang/test/SemaCXX/abstract.cpp @@ -282,7 +282,7 @@ void foo(const C& c ) {} void bar( void ) { - foo(C(99)); // expected-error {{allocating an object of abstract class type 'pr12658::C'}} + foo(C(99)); // expected-error {{allocating an object of abstract class type 'C'}} } } @@ -302,14 +302,14 @@ private: X &operator=(const X&); }; - struct Y : virtual X { // expected-note {{::X' has an inaccessible copy assignment}} + struct Y : virtual X { // expected-note {{class 'X' has an inaccessible copy assignment}} virtual ~Y() = 0; }; - struct Z : Y {}; // expected-note {{::Y' has a deleted copy assignment}} + struct Z : Y {}; // expected-note {{class 'Y' has a deleted copy assignment}} void f(Z &a, const Z &b) { a = b; } // expected-error {{copy assignment operator is implicitly deleted}} struct RedundantInit : virtual A { - RedundantInit() : A(0) {} // expected-warning {{initializer for virtual base class 'pr16659::A' of abstract class 'RedundantInit' will never be used}} + RedundantInit() : A(0) {} // expected-warning {{initializer for virtual base class 'A' of abstract class 'RedundantInit' will never be used}} }; } diff --git a/clang/test/SemaCXX/access-base-class.cpp b/clang/test/SemaCXX/access-base-class.cpp --- a/clang/test/SemaCXX/access-base-class.cpp +++ b/clang/test/SemaCXX/access-base-class.cpp @@ -5,7 +5,7 @@ class B : private A { }; // expected-note {{declared private here}} void f(B* b) { - A *a = b; // expected-error{{cannot cast 'T1::B' to its private base class 'T1::A'}} + A *a = b; // expected-error{{cannot cast 'B' to its private base class 'A'}} } } @@ -16,7 +16,7 @@ class B : A { }; // expected-note {{implicitly declared private here}} void f(B* b) { - A *a = b; // expected-error {{cannot cast 'T2::B' to its private base class 'T2::A'}} + A *a = b; // expected-error {{cannot cast 'B' to its private base class 'A'}} } } @@ -69,7 +69,7 @@ class C : public B { void f(C *c) { - A* a = c; // expected-error {{cannot cast 'T6::C' to its private base class 'T6::A'}} \ + A* a = c; // expected-error {{cannot cast 'C' to its private base class 'A'}} \ // expected-error {{'A' is a private member of 'T6::A'}} } }; diff --git a/clang/test/SemaCXX/accessible-base.cpp b/clang/test/SemaCXX/accessible-base.cpp --- a/clang/test/SemaCXX/accessible-base.cpp +++ b/clang/test/SemaCXX/accessible-base.cpp @@ -11,16 +11,16 @@ struct Y1 : X1, virtual A {}; -struct Y2 : X1, A // expected-warning{{direct base 'A' is inaccessible due to ambiguity:\n struct Y2 -> struct X1 -> struct A\n struct Y2 -> struct A}} +struct Y2 : X1, A // expected-warning{{direct base 'A' is inaccessible due to ambiguity:\n struct Y2 -> X1 -> A\n struct Y2 -> A}} {}; struct X2 : A {}; -struct Z1 : X2, virtual A // expected-warning{{direct base 'A' is inaccessible due to ambiguity:\n struct Z1 -> struct X2 -> struct A\n struct Z1 -> struct A}} +struct Z1 : X2, virtual A // expected-warning{{direct base 'A' is inaccessible due to ambiguity:\n struct Z1 -> X2 -> A\n struct Z1 -> A}} {}; -struct Z2 : X2, A // expected-warning{{direct base 'A' is inaccessible due to ambiguity:\n struct Z2 -> struct X2 -> struct A\n struct Z2 -> struct A}} +struct Z2 : X2, A // expected-warning{{direct base 'A' is inaccessible due to ambiguity:\n struct Z2 -> X2 -> A\n struct Z2 -> A}} {}; A *y2_to_a(Y2 *p) { diff --git a/clang/test/SemaCXX/aggregate-initialization.cpp b/clang/test/SemaCXX/aggregate-initialization.cpp --- a/clang/test/SemaCXX/aggregate-initialization.cpp +++ b/clang/test/SemaCXX/aggregate-initialization.cpp @@ -206,7 +206,7 @@ struct Y { X x; }; void test0() { - auto *y = new Y {}; // expected-error {{temporary of type 'ElementDestructor::X' has private destructor}} + auto *y = new Y {}; // expected-error {{temporary of type 'X' has private destructor}} } struct S0 { int f; ~S0() = delete; }; // expected-note 3 {{'~S0' has been explicitly marked deleted here}} diff --git a/clang/test/SemaCXX/ambig-user-defined-conversions.cpp b/clang/test/SemaCXX/ambig-user-defined-conversions.cpp --- a/clang/test/SemaCXX/ambig-user-defined-conversions.cpp +++ b/clang/test/SemaCXX/ambig-user-defined-conversions.cpp @@ -20,7 +20,7 @@ const int Test1() { func(b1, f()); // expected-error {{call to 'func' is ambiguous}} - return f(); // expected-error {{conversion from 'test0::B' to 'const int' is ambiguous}} + return f(); // expected-error {{conversion from 'B' to 'const int' is ambiguous}} } // This used to crash when comparing the two operands. @@ -63,7 +63,7 @@ struct C : A { }; struct D : B, C { }; - bool f(D d) { return !d; } // expected-error{{ambiguous conversion from derived class 'rdar8876150::D' to base class 'rdar8876150::A':}} + bool f(D d) { return !d; } // expected-error{{ambiguous conversion from derived class 'D' to base class 'rdar8876150::A':}} } namespace assignment { diff --git a/clang/test/SemaCXX/atomic-type.cpp b/clang/test/SemaCXX/atomic-type.cpp --- a/clang/test/SemaCXX/atomic-type.cpp +++ b/clang/test/SemaCXX/atomic-type.cpp @@ -108,6 +108,6 @@ struct S { ~S() {} }; - _Atomic S s; // expected-error {{_Atomic cannot be applied to type 'non_trivially_copyable::S' which is not trivially copyable}} \ + _Atomic S s; // expected-error {{_Atomic cannot be applied to type 'S' which is not trivially copyable}} \ // expected-warning {{'_Atomic' is a C11 extension}} } diff --git a/clang/test/SemaCXX/attr-noreturn.cpp b/clang/test/SemaCXX/attr-noreturn.cpp --- a/clang/test/SemaCXX/attr-noreturn.cpp +++ b/clang/test/SemaCXX/attr-noreturn.cpp @@ -265,13 +265,13 @@ typedef void (*fptr_t)(int); typedef void __attribute__((noreturn)) (*fptr_noreturn_t)(int); - // expected-note@+1 {{candidate function not viable: no overload of 'bar' matching 'PR15291::fptr_t' (aka 'void (*)(int)') for 1st argument}} + // expected-note@+1 {{candidate function not viable: no overload of 'bar' matching 'fptr_t' (aka 'void (*)(int)') for 1st argument}} void accept_fptr_t(fptr_t f) { f(42); } - // expected-note@+2 {{candidate function not viable: no overload of 'baz' matching 'PR15291::fptr_noreturn_t' (aka 'void (*)(int) __attribute__((noreturn))') for 1st argument}} - // expected-note@+1 {{candidate function not viable: no overload of 'qux' matching 'PR15291::fptr_noreturn_t' (aka 'void (*)(int) __attribute__((noreturn))') for 1st argument}} + // expected-note@+2 {{candidate function not viable: no overload of 'baz' matching 'fptr_noreturn_t' (aka 'void (*)(int) __attribute__((noreturn))') for 1st argument}} + // expected-note@+1 {{candidate function not viable: no overload of 'qux' matching 'fptr_noreturn_t' (aka 'void (*)(int) __attribute__((noreturn))') for 1st argument}} void accept_fptr_noreturn_t(fptr_noreturn_t f) { f(42); } diff --git a/clang/test/SemaCXX/builtins.cpp b/clang/test/SemaCXX/builtins.cpp --- a/clang/test/SemaCXX/builtins.cpp +++ b/clang/test/SemaCXX/builtins.cpp @@ -133,7 +133,7 @@ Incomplete &i; }; void test_incomplete(Incomplete *i, IncompleteMember *im) { - // expected-error@+1 {{incomplete type 'test_launder::Incomplete' where a complete type is required}} + // expected-error@+1 {{incomplete type 'Incomplete' where a complete type is required}} __builtin_launder(i); __builtin_launder(&i); // OK __builtin_launder(im); // OK diff --git a/clang/test/SemaCXX/calling-conv-compat.cpp b/clang/test/SemaCXX/calling-conv-compat.cpp --- a/clang/test/SemaCXX/calling-conv-compat.cpp +++ b/clang/test/SemaCXX/calling-conv-compat.cpp @@ -183,31 +183,31 @@ typedef void (__cdecl C::*memb_c_cdecl)(); typedef void (__thiscall C::*memb_c_thiscall)(); -// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((cdecl))' to 'NonVariadic::memb_a_default' (aka 'void (NonVariadic::A::*)() __attribute__((thiscall))') for 1st argument}} +// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((cdecl))' to 'memb_a_default' (aka 'void (NonVariadic::A::*)() __attribute__((thiscall))') for 1st argument}} void cb_memb_a_default(memb_a_default ptr); -// expected-note@+2 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'NonVariadic::memb_a_cdecl' (aka 'void (NonVariadic::A::*)() __attribute__((cdecl))') for 1st argument}} -// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'NonVariadic::memb_a_cdecl' (aka 'void (NonVariadic::A::*)() __attribute__((cdecl))') for 1st argument}} +// expected-note@+2 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'memb_a_cdecl' (aka 'void (NonVariadic::A::*)() __attribute__((cdecl))') for 1st argument}} +// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'memb_a_cdecl' (aka 'void (NonVariadic::A::*)() __attribute__((cdecl))') for 1st argument}} void cb_memb_a_cdecl(memb_a_cdecl ptr); -// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((cdecl))' to 'NonVariadic::memb_a_thiscall' (aka 'void (NonVariadic::A::*)() __attribute__((thiscall))') for 1st argument}} +// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((cdecl))' to 'memb_a_thiscall' (aka 'void (NonVariadic::A::*)() __attribute__((thiscall))') for 1st argument}} void cb_memb_a_thiscall(memb_a_thiscall ptr); -// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((cdecl))' to 'NonVariadic::memb_b_default' (aka 'void (NonVariadic::B::*)() __attribute__((thiscall))') for 1st argument}} +// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((cdecl))' to 'memb_b_default' (aka 'void (NonVariadic::B::*)() __attribute__((thiscall))') for 1st argument}} void cb_memb_b_default(memb_b_default ptr); -// expected-note@+2 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'NonVariadic::memb_b_cdecl' (aka 'void (NonVariadic::B::*)() __attribute__((cdecl))') for 1st argument}} -// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'NonVariadic::memb_b_cdecl' (aka 'void (NonVariadic::B::*)() __attribute__((cdecl))') for 1st argument}} +// expected-note@+2 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'memb_b_cdecl' (aka 'void (NonVariadic::B::*)() __attribute__((cdecl))') for 1st argument}} +// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'memb_b_cdecl' (aka 'void (NonVariadic::B::*)() __attribute__((cdecl))') for 1st argument}} void cb_memb_b_cdecl(memb_b_cdecl ptr); -// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((cdecl))' to 'NonVariadic::memb_b_thiscall' (aka 'void (NonVariadic::B::*)() __attribute__((thiscall))') for 1st argument}} +// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((cdecl))' to 'memb_b_thiscall' (aka 'void (NonVariadic::B::*)() __attribute__((thiscall))') for 1st argument}} void cb_memb_b_thiscall(memb_b_thiscall ptr); -// expected-note@+3 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'NonVariadic::memb_c_default' (aka 'void (NonVariadic::C::*)() __attribute__((thiscall))') for 1st argument}} -// expected-note@+2 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((cdecl))' to 'NonVariadic::memb_c_default' (aka 'void (NonVariadic::C::*)() __attribute__((thiscall))') for 1st argument}} -// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'NonVariadic::memb_c_default' (aka 'void (NonVariadic::C::*)() __attribute__((thiscall))') for 1st argument}} +// expected-note@+3 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'memb_c_default' (aka 'void (NonVariadic::C::*)() __attribute__((thiscall))') for 1st argument}} +// expected-note@+2 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((cdecl))' to 'memb_c_default' (aka 'void (NonVariadic::C::*)() __attribute__((thiscall))') for 1st argument}} +// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'memb_c_default' (aka 'void (NonVariadic::C::*)() __attribute__((thiscall))') for 1st argument}} void cb_memb_c_default(memb_c_default ptr); -// expected-note@+3 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'NonVariadic::memb_c_cdecl' (aka 'void (NonVariadic::C::*)() __attribute__((cdecl))') for 1st argument}} -// expected-note@+2 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((cdecl))' to 'NonVariadic::memb_c_cdecl' (aka 'void (NonVariadic::C::*)() __attribute__((cdecl))') for 1st argument}} -// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'NonVariadic::memb_c_cdecl' (aka 'void (NonVariadic::C::*)() __attribute__((cdecl))') for 1st argument}} +// expected-note@+3 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'memb_c_cdecl' (aka 'void (NonVariadic::C::*)() __attribute__((cdecl))') for 1st argument}} +// expected-note@+2 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((cdecl))' to 'memb_c_cdecl' (aka 'void (NonVariadic::C::*)() __attribute__((cdecl))') for 1st argument}} +// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'memb_c_cdecl' (aka 'void (NonVariadic::C::*)() __attribute__((cdecl))') for 1st argument}} void cb_memb_c_cdecl(memb_c_cdecl ptr); -// expected-note@+3 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'NonVariadic::memb_c_thiscall' (aka 'void (NonVariadic::C::*)() __attribute__((thiscall))') for 1st argument}} -// expected-note@+2 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((cdecl))' to 'NonVariadic::memb_c_thiscall' (aka 'void (NonVariadic::C::*)() __attribute__((thiscall))') for 1st argument}} -// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'NonVariadic::memb_c_thiscall' (aka 'void (NonVariadic::C::*)() __attribute__((thiscall))') for 1st argument}} +// expected-note@+3 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'memb_c_thiscall' (aka 'void (NonVariadic::C::*)() __attribute__((thiscall))') for 1st argument}} +// expected-note@+2 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((cdecl))' to 'memb_c_thiscall' (aka 'void (NonVariadic::C::*)() __attribute__((thiscall))') for 1st argument}} +// expected-note@+1 {{candidate function not viable: no known conversion from 'void (NonVariadic::A::*)() __attribute__((thiscall))' to 'memb_c_thiscall' (aka 'void (NonVariadic::C::*)() __attribute__((thiscall))') for 1st argument}} void cb_memb_c_thiscall(memb_c_thiscall ptr); void call_member() { @@ -279,11 +279,11 @@ void cb_memb_a_cdecl(memb_a_cdecl ptr); void cb_memb_b_default(memb_b_default ptr); void cb_memb_b_cdecl(memb_b_cdecl ptr); -// expected-note@+2 {{candidate function not viable: no known conversion from 'void (Variadic::A::*)(int, ...)' to 'Variadic::memb_c_default' (aka 'void (Variadic::C::*)(int, ...)') for 1st argument}} -// expected-note@+1 {{candidate function not viable: no known conversion from 'void (Variadic::A::*)(int, ...) __attribute__((cdecl))' to 'Variadic::memb_c_default' (aka 'void (Variadic::C::*)(int, ...)') for 1st argument}} +// expected-note@+2 {{candidate function not viable: no known conversion from 'void (Variadic::A::*)(int, ...)' to 'memb_c_default' (aka 'void (Variadic::C::*)(int, ...)') for 1st argument}} +// expected-note@+1 {{candidate function not viable: no known conversion from 'void (Variadic::A::*)(int, ...) __attribute__((cdecl))' to 'memb_c_default' (aka 'void (Variadic::C::*)(int, ...)') for 1st argument}} void cb_memb_c_default(memb_c_default ptr); -// expected-note@+2 {{candidate function not viable: no known conversion from 'void (Variadic::A::*)(int, ...)' to 'Variadic::memb_c_cdecl' (aka 'void (Variadic::C::*)(int, ...) __attribute__((cdecl))') for 1st argument}} -// expected-note@+1 {{candidate function not viable: no known conversion from 'void (Variadic::A::*)(int, ...) __attribute__((cdecl))' to 'Variadic::memb_c_cdecl' (aka 'void (Variadic::C::*)(int, ...) __attribute__((cdecl))') for 1st argument}} +// expected-note@+2 {{candidate function not viable: no known conversion from 'void (Variadic::A::*)(int, ...)' to 'memb_c_cdecl' (aka 'void (Variadic::C::*)(int, ...) __attribute__((cdecl))') for 1st argument}} +// expected-note@+1 {{candidate function not viable: no known conversion from 'void (Variadic::A::*)(int, ...) __attribute__((cdecl))' to 'memb_c_cdecl' (aka 'void (Variadic::C::*)(int, ...) __attribute__((cdecl))') for 1st argument}} void cb_memb_c_cdecl(memb_c_cdecl ptr); void call_member() { @@ -330,7 +330,7 @@ void (A::*(*return_fptr_std_mptr(char))(short))(int) { return return_mptr_std; #if !_M_X64 - // expected-error@-2 {{cannot initialize return object of type 'void (MultiChunkDecls::A::*(*)(short))(int) __attribute__((thiscall))' with an lvalue of type 'MultiChunkDecls::mptr_t (short) __attribute__((stdcall))'}} + // expected-error@-2 {{cannot initialize return object of type 'void (MultiChunkDecls::A::*(*)(short))(int) __attribute__((thiscall))' with an lvalue of type 'mptr_t (short) __attribute__((stdcall))'}} #endif } diff --git a/clang/test/SemaCXX/class-base-member-init.cpp b/clang/test/SemaCXX/class-base-member-init.cpp --- a/clang/test/SemaCXX/class-base-member-init.cpp +++ b/clang/test/SemaCXX/class-base-member-init.cpp @@ -83,7 +83,7 @@ A() : decltype(Base(1))(3) { } A(int) : Base(3), // expected-note {{previous initialization is here}} - decltype(Base(1))(2), // expected-error {{multiple initializations given for base 'decltype(test5::Base(1))' (aka 'test5::Base')}} + decltype(Base(1))(2), // expected-error {{multiple initializations given for base 'decltype(Base(1))' (aka 'test5::Base')}} decltype(int())() { // expected-error {{constructor initializer 'decltype(int())' (aka 'int') does not name a class}} } A(float) : decltype(A())(3) { diff --git a/clang/test/SemaCXX/class.cpp b/clang/test/SemaCXX/class.cpp --- a/clang/test/SemaCXX/class.cpp +++ b/clang/test/SemaCXX/class.cpp @@ -47,7 +47,7 @@ // expected-warning@-2 {{default member initializer for non-static data member is a C++11 extension}} #endif static int si = 0; // expected-error {{non-const static data member must be initialized out of line}} - static const NestedC ci = 0; // expected-error {{static data member of type 'const C::NestedC' must be initialized out of line}} + static const NestedC ci = 0; // expected-error {{static data member of type 'const NestedC' must be initialized out of line}} static const int nci = vs; // expected-error {{in-class initializer for static data member is not a constant expression}} static const int vi = 0; static const volatile int cvi = 0; // ok, illegal in C++11 diff --git a/clang/test/SemaCXX/compound-literal.cpp b/clang/test/SemaCXX/compound-literal.cpp --- a/clang/test/SemaCXX/compound-literal.cpp +++ b/clang/test/SemaCXX/compound-literal.cpp @@ -36,8 +36,8 @@ POD p = (POD){1, 2}; // CHECK-NOT: CXXBindTemporaryExpr {{.*}} 'brace_initializers::POD' - // CHECK: CompoundLiteralExpr {{.*}} 'brace_initializers::POD' - // CHECK-NEXT: InitListExpr {{.*}} 'brace_initializers::POD' + // CHECK: CompoundLiteralExpr {{.*}} 'POD':'brace_initializers::POD' + // CHECK-NEXT: InitListExpr {{.*}} 'POD':'brace_initializers::POD' // CHECK-NEXT: ConstantExpr {{.*}} // CHECK-NEXT: IntegerLiteral {{.*}} 1{{$}} // CHECK-NEXT: ConstantExpr {{.*}} @@ -45,34 +45,34 @@ void test() { (void)(POD){1, 2}; - // CHECK-NOT: CXXBindTemporaryExpr {{.*}} 'brace_initializers::POD' - // CHECK-NOT: ConstantExpr {{.*}} 'brace_initializers::POD' - // CHECK: CompoundLiteralExpr {{.*}} 'brace_initializers::POD' - // CHECK-NEXT: InitListExpr {{.*}} 'brace_initializers::POD' + // CHECK-NOT: CXXBindTemporaryExpr {{.*}} 'POD':'brace_initializers::POD' + // CHECK-NOT: ConstantExpr {{.*}} 'POD':'brace_initializers::POD' + // CHECK: CompoundLiteralExpr {{.*}} 'POD':'brace_initializers::POD' + // CHECK-NEXT: InitListExpr {{.*}} 'POD':'brace_initializers::POD' // CHECK-NEXT: IntegerLiteral {{.*}} 1{{$}} // CHECK-NEXT: IntegerLiteral {{.*}} 2{{$}} (void)(HasDtor){1, 2}; - // CHECK: CXXBindTemporaryExpr {{.*}} 'brace_initializers::HasDtor' - // CHECK-NEXT: CompoundLiteralExpr {{.*}} 'brace_initializers::HasDtor' - // CHECK-NEXT: InitListExpr {{.*}} 'brace_initializers::HasDtor' + // CHECK: CXXBindTemporaryExpr {{.*}} 'HasDtor':'brace_initializers::HasDtor' + // CHECK-NEXT: CompoundLiteralExpr {{.*}} 'HasDtor':'brace_initializers::HasDtor' + // CHECK-NEXT: InitListExpr {{.*}} 'HasDtor':'brace_initializers::HasDtor' // CHECK-NEXT: IntegerLiteral {{.*}} 1{{$}} // CHECK-NEXT: IntegerLiteral {{.*}} 2{{$}} #if __cplusplus >= 201103L (void)(HasCtor){1, 2}; - // CHECK-CXX11-NOT: CXXBindTemporaryExpr {{.*}} 'brace_initializers::HasCtor' - // CHECK-CXX11-NOT: ConstantExpr {{.*}} 'brace_initializers::HasCtor' - // CHECK-CXX11: CompoundLiteralExpr {{.*}} 'brace_initializers::HasCtor' - // CHECK-CXX11-NEXT: CXXTemporaryObjectExpr {{.*}} 'brace_initializers::HasCtor' + // CHECK-CXX11-NOT: CXXBindTemporaryExpr {{.*}} 'HasCtor':'brace_initializers::HasCtor' + // CHECK-CXX11-NOT: ConstantExpr {{.*}} 'HasCtor':'brace_initializers::HasCtor' + // CHECK-CXX11: CompoundLiteralExpr {{.*}} 'HasCtor':'brace_initializers::HasCtor' + // CHECK-CXX11-NEXT: CXXTemporaryObjectExpr {{.*}} 'HasCtor':'brace_initializers::HasCtor' // CHECK-CXX11-NEXT: IntegerLiteral {{.*}} 1{{$}} // CHECK-CXX11-NEXT: IntegerLiteral {{.*}} 2{{$}} (void)(HasCtorDtor){1, 2}; - // CHECK-CXX11: CXXBindTemporaryExpr {{.*}} 'brace_initializers::HasCtorDtor' - // CHECK-CXX11-NOT: ConstantExpr {{.*}} 'brace_initializers::HasCtorDtor' - // CHECK-CXX11: CompoundLiteralExpr {{.*}} 'brace_initializers::HasCtorDtor' - // CHECK-CXX11-NEXT: CXXTemporaryObjectExpr {{.*}} 'brace_initializers::HasCtorDtor' + // CHECK-CXX11: CXXBindTemporaryExpr {{.*}} 'HasCtorDtor':'brace_initializers::HasCtorDtor' + // CHECK-CXX11-NOT: ConstantExpr {{.*}} 'HasCtorDtor':'brace_initializers::HasCtorDtor' + // CHECK-CXX11: CompoundLiteralExpr {{.*}} 'HasCtorDtor':'brace_initializers::HasCtorDtor' + // CHECK-CXX11-NEXT: CXXTemporaryObjectExpr {{.*}} 'HasCtorDtor':'brace_initializers::HasCtorDtor' // CHECK-CXX11-NEXT: IntegerLiteral {{.*}} 1{{$}} // CHECK-CXX11-NEXT: IntegerLiteral {{.*}} 2{{$}} #endif @@ -85,7 +85,7 @@ }; void testPrivateDtor() { - (void)(PrivateDtor){1, 2}; // expected-error {{temporary of type 'brace_initializers::PrivateDtor' has private destructor}} + (void)(PrivateDtor){1, 2}; // expected-error {{temporary of type 'PrivateDtor' has private destructor}} } } diff --git a/clang/test/SemaCXX/constant-expression-cxx11.cpp b/clang/test/SemaCXX/constant-expression-cxx11.cpp --- a/clang/test/SemaCXX/constant-expression-cxx11.cpp +++ b/clang/test/SemaCXX/constant-expression-cxx11.cpp @@ -877,13 +877,13 @@ static_assert(pb1 == &bot1, ""); static_assert(pb2 == &bot2, ""); -constexpr Base2 &fail = (Base2&)bot1; // expected-error {{constant expression}} expected-note {{cannot cast object of dynamic type 'const Class::Derived' to type 'Class::Base2'}} -constexpr Base &fail2 = (Base&)*pb2; // expected-error {{constant expression}} expected-note {{cannot cast object of dynamic type 'const Class::Derived' to type 'Class::Base'}} +constexpr Base2 &fail = (Base2&)bot1; // expected-error {{constant expression}} expected-note {{cannot cast object of dynamic type 'const Derived' to type 'Base2'}} +constexpr Base &fail2 = (Base&)*pb2; // expected-error {{constant expression}} expected-note {{cannot cast object of dynamic type 'const Derived' to type 'Base'}} constexpr Base2 &ok2 = (Base2&)bot2; static_assert(&ok2 == &derived, ""); -constexpr Base2 *pfail = (Base2*)pb1; // expected-error {{constant expression}} expected-note {{cannot cast object of dynamic type 'const Class::Derived' to type 'Class::Base2'}} -constexpr Base *pfail2 = (Base*)&bot2; // expected-error {{constant expression}} expected-note {{cannot cast object of dynamic type 'const Class::Derived' to type 'Class::Base'}} +constexpr Base2 *pfail = (Base2*)pb1; // expected-error {{constant expression}} expected-note {{cannot cast object of dynamic type 'const Derived' to type 'Base2'}} +constexpr Base *pfail2 = (Base*)&bot2; // expected-error {{constant expression}} expected-note {{cannot cast object of dynamic type 'const Derived' to type 'Base'}} constexpr Base2 *pok2 = (Base2*)pb2; static_assert(pok2 == &derived, ""); static_assert(&ok2 == pok2, ""); @@ -892,18 +892,18 @@ // Core issue 903: we do not perform constant evaluation when checking for a // null pointer in C++11. Just check for an integer literal with value 0. -constexpr Base *nullB = 42 - 6 * 7; // expected-error {{cannot initialize a variable of type 'Class::Base *const' with an rvalue of type 'int'}} +constexpr Base *nullB = 42 - 6 * 7; // expected-error {{cannot initialize a variable of type 'Base *const' with an rvalue of type 'int'}} constexpr Base *nullB1 = 0; static_assert((Bottom*)nullB == 0, ""); static_assert((Derived*)nullB1 == 0, ""); static_assert((void*)(Bottom*)nullB1 == (void*)(Derived*)nullB1, ""); -Base *nullB2 = '\0'; // expected-error {{cannot initialize a variable of type 'Class::Base *' with an rvalue of type 'char'}} +Base *nullB2 = '\0'; // expected-error {{cannot initialize a variable of type 'Base *' with an rvalue of type 'char'}} Base *nullB3 = (0); -Base *nullB4 = false; // expected-error {{cannot initialize a variable of type 'Class::Base *' with an rvalue of type 'bool'}} +Base *nullB4 = false; // expected-error {{cannot initialize a variable of type 'Base *' with an rvalue of type 'bool'}} Base *nullB5 = ((0ULL)); -Base *nullB6 = 0.; // expected-error {{cannot initialize a variable of type 'Class::Base *' with an rvalue of type 'double'}} +Base *nullB6 = 0.; // expected-error {{cannot initialize a variable of type 'Base *' with an rvalue of type 'double'}} enum Null { kNull }; -Base *nullB7 = kNull; // expected-error {{cannot initialize a variable of type 'Class::Base *' with an rvalue of type 'Class::Null'}} +Base *nullB7 = kNull; // expected-error {{cannot initialize a variable of type 'Base *' with an rvalue of type 'Class::Null'}} static_assert(nullB1 == (1 - 1), ""); // expected-error {{comparison between pointer and integer}} @@ -975,8 +975,8 @@ // The T temporary is implicitly cast to an S subobject, but we can recover the // T full-object via a base-to-derived cast, or a derived-to-base-casted member // pointer. -static_assert(S().f(), ""); // expected-error {{constant expression}} expected-note {{in call to '&Temporaries::S()->f()'}} -static_assert(S().g(), ""); // expected-error {{constant expression}} expected-note {{in call to '&Temporaries::S()->g()'}} +static_assert(S().f(), ""); // expected-error {{constant expression}} expected-note {{in call to '&S()->f()'}} +static_assert(S().g(), ""); // expected-error {{constant expression}} expected-note {{in call to '&S()->g()'}} static_assert(T(3).f() == 3, ""); static_assert(T(4).g() == 4, ""); @@ -993,7 +993,7 @@ NonLiteral(); int f(); }; -constexpr int k = NonLiteral().f(); // expected-error {{constant expression}} expected-note {{non-literal type 'Temporaries::NonLiteral'}} +constexpr int k = NonLiteral().f(); // expected-error {{constant expression}} expected-note {{non-literal type 'NonLiteral'}} } @@ -1250,10 +1250,10 @@ namespace PR11595 { struct A { constexpr bool operator==(int x) const { return true; } }; struct B { B(); A& x; }; - static_assert(B().x == 3, ""); // expected-error {{constant expression}} expected-note {{non-literal type 'PR11595::B' cannot be used in a constant expression}} + static_assert(B().x == 3, ""); // expected-error {{constant expression}} expected-note {{non-literal type 'B' cannot be used in a constant expression}} constexpr bool f(int k) { // expected-error {{constexpr function never produces a constant expression}} - return B().x == k; // expected-note {{non-literal type 'PR11595::B' cannot be used in a constant expression}} + return B().x == k; // expected-note {{non-literal type 'B' cannot be used in a constant expression}} } } @@ -1766,7 +1766,7 @@ A &g(); // cxx20_2b-note {{declared here}} constexpr auto &x = typeid(f()); constexpr auto &y = typeid(g()); // expected-error{{constant expression}} - // cxx11-note@-1 {{typeid applied to expression of polymorphic type 'TypeId::A' is not allowed in a constant expression}} + // cxx11-note@-1 {{typeid applied to expression of polymorphic type 'A' is not allowed in a constant expression}} // expected-warning@-2 {{expression with side effects will be evaluated despite being used as an operand to 'typeid'}} // cxx20_2b-note@-3 {{non-constexpr function 'g' cannot be used in a constant expression}} } @@ -1925,7 +1925,7 @@ }; constexpr X() noexcept {}; protected: - E val{0}; // cxx11-error {{cannot initialize a member subobject of type 'ConstexprConstructorRecovery::X::E' with an rvalue of type 'int'}} cxx11-note {{here}} + E val{0}; // cxx11-error {{cannot initialize a member subobject of type 'E' with an rvalue of type 'int'}} cxx11-note {{here}} }; // FIXME: We should avoid issuing this follow-on diagnostic. constexpr X x{}; // cxx11-error {{constant expression}} cxx11-note {{not initialized}} diff --git a/clang/test/SemaCXX/constant-expression-cxx2a.cpp b/clang/test/SemaCXX/constant-expression-cxx2a.cpp --- a/clang/test/SemaCXX/constant-expression-cxx2a.cpp +++ b/clang/test/SemaCXX/constant-expression-cxx2a.cpp @@ -255,7 +255,7 @@ static_assert(g.f == (void*)(F*)&g); static_assert(dynamic_cast(static_cast(&g)) == &g); - // expected-note@+1 {{reference dynamic_cast failed: 'DynamicCast::A' is an ambiguous base class of dynamic type 'DynamicCast::G' of operand}} + // expected-note@+1 {{reference dynamic_cast failed: 'A' is an ambiguous base class of dynamic type 'DynamicCast::G' of operand}} constexpr int d_a = (dynamic_cast(static_cast(g)), 0); // expected-error {{}} // Can navigate from A2 to its A... @@ -263,7 +263,7 @@ // ... and from B to its A ... static_assert(&dynamic_cast((B&)g) == &(A&)(B&)g); // ... but not from D. - // expected-note@+1 {{reference dynamic_cast failed: 'DynamicCast::A' is an ambiguous base class of dynamic type 'DynamicCast::G' of operand}} + // expected-note@+1 {{reference dynamic_cast failed: 'A' is an ambiguous base class of dynamic type 'DynamicCast::G' of operand}} static_assert(&dynamic_cast((D&)g) == &(A&)(B&)g); // expected-error {{}} // Can cast from A2 to sibling class D. @@ -274,13 +274,13 @@ constexpr int e_f = (dynamic_cast((E&)g), 0); // expected-error {{}} // Cannot cast from B to private sibling E. - // expected-note@+1 {{reference dynamic_cast failed: 'DynamicCast::E' is a non-public base class of dynamic type 'DynamicCast::G' of operand}} + // expected-note@+1 {{reference dynamic_cast failed: 'E' is a non-public base class of dynamic type 'DynamicCast::G' of operand}} constexpr int b_e = (dynamic_cast((B&)g), 0); // expected-error {{}} struct Unrelated { virtual void unrelated(); }; - // expected-note@+1 {{reference dynamic_cast failed: dynamic type 'DynamicCast::G' of operand does not have a base class of type 'DynamicCast::Unrelated'}} + // expected-note@+1 {{reference dynamic_cast failed: dynamic type 'DynamicCast::G' of operand does not have a base class of type 'Unrelated'}} constexpr int b_unrelated = (dynamic_cast((B&)g), 0); // expected-error {{}} - // expected-note@+1 {{reference dynamic_cast failed: dynamic type 'DynamicCast::G' of operand does not have a base class of type 'DynamicCast::Unrelated'}} + // expected-note@+1 {{reference dynamic_cast failed: dynamic type 'DynamicCast::G' of operand does not have a base class of type 'Unrelated'}} constexpr int e_unrelated = (dynamic_cast((E&)g), 0); // expected-error {{}} } @@ -1031,7 +1031,7 @@ int n; // expected-note {{declared here}} static_assert((delete &n, true)); // expected-error {{}} expected-note {{delete of pointer '&n' that does not point to a heap-allocated object}} struct A { int n; }; - static_assert((delete &(new A)->n, true)); // expected-error {{}} expected-note {{delete of pointer to subobject '&{*new delete_random_things::A#0}.n'}} + static_assert((delete &(new A)->n, true)); // expected-error {{}} expected-note {{delete of pointer to subobject '&{*new A#0}.n'}} static_assert((delete (new int + 1), true)); // expected-error {{}} expected-note {{delete of pointer '&{*new int#0} + 1' that does not point to complete object}} static_assert((delete[] (new int[3] + 1), true)); // expected-error {{}} expected-note {{delete of pointer to subobject '&{*new int[3]#0}[1]'}} static_assert((delete &(int&)(int&&)0, true)); // expected-error {{}} expected-note {{delete of pointer '&0' that does not point to a heap-allocated object}} expected-note {{temporary created here}} diff --git a/clang/test/SemaCXX/constant-expression.cpp b/clang/test/SemaCXX/constant-expression.cpp --- a/clang/test/SemaCXX/constant-expression.cpp +++ b/clang/test/SemaCXX/constant-expression.cpp @@ -121,7 +121,7 @@ // PR12626 namespace test3 { struct X; // expected-note {{forward declaration of 'test3::X'}} - struct Y { bool b; X x; }; // expected-error {{field has incomplete type 'test3::X'}} + struct Y { bool b; X x; }; // expected-error {{field has incomplete type 'X'}} int f() { return Y().b; } } diff --git a/clang/test/SemaCXX/constexpr-default-init-value-crash.cpp b/clang/test/SemaCXX/constexpr-default-init-value-crash.cpp --- a/clang/test/SemaCXX/constexpr-default-init-value-crash.cpp +++ b/clang/test/SemaCXX/constexpr-default-init-value-crash.cpp @@ -8,7 +8,7 @@ }; constexpr Foo getFoo() { - Foo e = 123; // expected-error {{no viable conversion from 'int' to 'NoCrash::Foo'}} + Foo e = 123; // expected-error {{no viable conversion from 'int' to 'Foo'}} return e; } } diff --git a/clang/test/SemaCXX/constructor-initializer.cpp b/clang/test/SemaCXX/constructor-initializer.cpp --- a/clang/test/SemaCXX/constructor-initializer.cpp +++ b/clang/test/SemaCXX/constructor-initializer.cpp @@ -29,7 +29,7 @@ D() : B(), C() { } }; -class E : public D, public B { // expected-warning{{direct base 'B' is inaccessible due to ambiguity:\n class E -> class D -> class C -> class B\n class E -> class B}} +class E : public D, public B { // expected-warning{{direct base 'B' is inaccessible due to ambiguity:\n class E -> D -> C -> B\n class E -> B}} public: E() : B(), D() { } // expected-error{{base class initializer 'B' names both a direct base class and an inherited virtual base class}} }; @@ -211,7 +211,7 @@ struct B : virtual A { }; - struct C : A, B { }; // expected-warning{{direct base 'Test2::A' is inaccessible due to ambiguity:\n struct Test2::C -> struct Test2::A\n struct Test2::C -> struct Test2::B -> struct Test2::A}} + struct C : A, B { }; // expected-warning{{direct base 'A' is inaccessible due to ambiguity:\n struct Test2::C -> A\n struct Test2::C -> B -> A}} C f(C c) { return c; @@ -307,18 +307,18 @@ namespace PR10758 { struct A; struct B { - B (A const &); // expected-note 2 {{candidate constructor not viable: no known conversion from 'const PR10758::B' to 'const PR10758::A &' for 1st argument}} - B (B &); // expected-note 2 {{candidate constructor not viable: 1st argument ('const PR10758::B') would lose const qualifier}} + B (A const &); // expected-note 2 {{candidate constructor not viable: no known conversion from 'const B' to 'const A &' for 1st argument}} + B (B &); // expected-note 2 {{candidate constructor not viable: 1st argument ('const B') would lose const qualifier}} }; struct A { A (B); // expected-note 2 {{passing argument to parameter here}} }; B f(B const &b) { - return b; // expected-error {{no matching constructor for initialization of 'PR10758::B'}} + return b; // expected-error {{no matching constructor for initialization of 'B'}} } A f2(const B &b) { - return b; // expected-error {{no matching constructor for initialization of 'PR10758::B'}} + return b; // expected-error {{no matching constructor for initialization of 'B'}} } } 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 @@ -235,7 +235,7 @@ Y make_Y(); X f() { - X x = make_Y(); // expected-error{{no viable conversion from 'smart_ptr::Y' to 'smart_ptr::X'}} + X x = make_Y(); // expected-error{{no viable conversion from 'Y' to 'X'}} X x2(make_Y()); return X(Y()); } @@ -348,7 +348,7 @@ }; void test2(UeberDerived ud) { - int i = ud; // expected-error{{ambiguous conversion from derived class 'rdar8018274::UeberDerived' to base class 'rdar8018274::Base'}} + int i = ud; // expected-error{{ambiguous conversion from derived class 'UeberDerived' to base class 'rdar8018274::Base'}} } struct Base2 { diff --git a/clang/test/SemaCXX/copy-initialization.cpp b/clang/test/SemaCXX/copy-initialization.cpp --- a/clang/test/SemaCXX/copy-initialization.cpp +++ b/clang/test/SemaCXX/copy-initialization.cpp @@ -41,7 +41,7 @@ void f(Foo); void g(Foo foo) { - f(Bar()); // expected-error{{no viable constructor copying parameter of type 'const PR6757::Foo'}} + f(Bar()); // expected-error{{no viable constructor copying parameter of type 'const Foo'}} f(foo); } } diff --git a/clang/test/SemaCXX/cstyle-cast.cpp b/clang/test/SemaCXX/cstyle-cast.cpp --- a/clang/test/SemaCXX/cstyle-cast.cpp +++ b/clang/test/SemaCXX/cstyle-cast.cpp @@ -127,8 +127,8 @@ (void)(C1&)(*((A*)0)); // expected-error {{cannot cast 'A' to 'C1 &' via virtual base 'B'}} (void)(D*)((A*)0); // expected-error {{cannot cast 'A *' to 'D *' via virtual base 'B'}} (void)(D&)(*((A*)0)); // expected-error {{cannot cast 'A' to 'D &' via virtual base 'B'}} - (void)(H*)((A*)0); // expected-error {{ambiguous cast from base 'A' to derived 'H':\n struct A -> struct B -> struct G1 -> struct H\n struct A -> struct B -> struct G2 -> struct H}} - (void)(H&)(*((A*)0)); // expected-error {{ambiguous cast from base 'A' to derived 'H':\n struct A -> struct B -> struct G1 -> struct H\n struct A -> struct B -> struct G2 -> struct H}} + (void)(H*)((A*)0); // expected-error {{ambiguous cast from base 'A' to derived 'H':\n A -> B -> G1 -> struct H\n A -> B -> G2 -> struct H}} + (void)(H&)(*((A*)0)); // expected-error {{ambiguous cast from base 'A' to derived 'H':\n A -> B -> G1 -> struct H\n A -> B -> G2 -> struct H}} // TODO: Test DR427. This requires user-defined conversions, though. } diff --git a/clang/test/SemaCXX/cxx0x-class.cpp b/clang/test/SemaCXX/cxx0x-class.cpp --- a/clang/test/SemaCXX/cxx0x-class.cpp +++ b/clang/test/SemaCXX/cxx0x-class.cpp @@ -10,7 +10,7 @@ int i = 0; static int si = 0; // expected-error {{non-const static data member must be initialized out of line}} - static const NestedC ci = 0; // expected-error {{static data member of type 'const C::NestedC' must be initialized out of line}} + static const NestedC ci = 0; // expected-error {{static data member of type 'const NestedC' must be initialized out of line}} static const int nci = vs; // expected-error {{in-class initializer for static data member is not a constant expression}} static const int vi = 0; static const volatile int cvi = 0; // expected-error {{static const volatile data member must be initialized out of line}} diff --git a/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp b/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp --- a/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp +++ b/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp @@ -127,7 +127,7 @@ namespace array_addressof { using T = int[5]; - T *p = &T{1,2,3,4,5}; // expected-error {{taking the address of a temporary object of type 'array_addressof::T' (aka 'int[5]')}} + T *p = &T{1,2,3,4,5}; // expected-error {{taking the address of a temporary object of type 'T' (aka 'int[5]')}} } namespace PR24816 { diff --git a/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp b/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp --- a/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp +++ b/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp @@ -122,12 +122,12 @@ } struct B { // expected-note 2 {{candidate constructor}} - B(C, int, C); // expected-note {{candidate constructor not viable: cannot convert initializer list argument to 'objects::C'}} + B(C, int, C); // expected-note {{candidate constructor not viable: cannot convert initializer list argument to 'C'}} }; void nested_init() { B b1{{1, 1.0}, 2, {3, 4}}; - B b2{{1, 1.0, 4}, 2, {3, 4}}; // expected-error {{no matching constructor for initialization of 'objects::B'}} + B b2{{1, 1.0, 4}, 2, {3, 4}}; // expected-error {{no matching constructor for initialization of 'B'}} } void overloaded_call() { @@ -282,7 +282,7 @@ static void bar(C* c) { - c->foo({ nullptr, 1 }); // expected-error{{initialization of incomplete type 'const PR12498::ArrayRef'}} + c->foo({ nullptr, 1 }); // expected-error{{initialization of incomplete type 'const ArrayRef'}} } } diff --git a/clang/test/SemaCXX/cxx0x-initializer-references.cpp b/clang/test/SemaCXX/cxx0x-initializer-references.cpp --- a/clang/test/SemaCXX/cxx0x-initializer-references.cpp +++ b/clang/test/SemaCXX/cxx0x-initializer-references.cpp @@ -76,7 +76,7 @@ void edge_cases() { int const &b({0}); // expected-error {{cannot initialize reference type 'const int &' with a parenthesized initializer list}} const int (&arr)[3] ({1, 2, 3}); // expected-error {{cannot initialize reference type 'const int (&)[3]' with a parenthesized initializer list}} - const X &x({}); // expected-error {{cannot initialize reference type 'const reference::X &' with a parenthesized initializer list}} + const X &x({}); // expected-error {{cannot initialize reference type 'const X &' with a parenthesized initializer list}} } template void dependent_edge_cases() { @@ -112,7 +112,7 @@ namespace inner_init { struct A { int n; }; struct B { A &&r; }; - B b1 { 0 }; // expected-error {{reference to type 'inner_init::A' could not bind to an rvalue of type 'int'}} + B b1 { 0 }; // expected-error {{reference to type 'A' could not bind to an rvalue of type 'int'}} B b2 { { 0 } }; B b3 { { { 0 } } }; // expected-warning {{braces around scalar init}} @@ -122,7 +122,7 @@ D d1 { 0 }; // ok, 0 implicitly converts to C D d2 { { 0 } }; // ok, { 0 } calls C(0) D d3 { { { 0 } } }; // ok, { { 0 } } calls C({ 0 }), expected-warning {{braces around scalar init}} - D d4 { { { { 0 } } } }; // expected-error {{no matching constructor for initialization of 'inner_init::C &&'}} + D d4 { { { { 0 } } } }; // expected-error {{no matching constructor for initialization of 'C &&'}} struct E { explicit E(int); }; // expected-note 2{{here}} struct F { E &&r; }; @@ -134,7 +134,7 @@ namespace PR20844 { struct A {}; struct B { operator A&(); } b; - A &a{b}; // expected-error {{excess elements}} expected-note {{in initialization of temporary of type 'PR20844::A'}} + A &a{b}; // expected-error {{excess elements}} expected-note {{in initialization of temporary of type 'A'}} } namespace PR21834 { diff --git a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp --- a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp @@ -327,7 +327,7 @@ struct A {}; template std::initializer_list ExplodeImpl(F p1, A) { - // expected-error@+1 {{reference to incomplete type 'const update_rbrace_loc_crash::Incomplete' could not bind to an rvalue of type 'void'}} + // expected-error@+1 {{reference to incomplete type 'const Incomplete' could not bind to an rvalue of type 'void'}} return {p1(I)...}; } template diff --git a/clang/test/SemaCXX/cxx0x-nontrivial-union.cpp b/clang/test/SemaCXX/cxx0x-nontrivial-union.cpp --- a/clang/test/SemaCXX/cxx0x-nontrivial-union.cpp +++ b/clang/test/SemaCXX/cxx0x-nontrivial-union.cpp @@ -142,5 +142,5 @@ }; }; - Test2 t2x; // expected-error {{call to implicitly-deleted default constructor of 'Test2'}} + Test2 t2x; // expected-error {{call to implicitly-deleted default constructor of 'Test2'}} } diff --git a/clang/test/SemaCXX/cxx11-inheriting-ctors.cpp b/clang/test/SemaCXX/cxx11-inheriting-ctors.cpp --- a/clang/test/SemaCXX/cxx11-inheriting-ctors.cpp +++ b/clang/test/SemaCXX/cxx11-inheriting-ctors.cpp @@ -94,7 +94,7 @@ struct A : Base { using Base::Base; - bool operator==(A const &) const; // expected-note {{no known conversion from 'PR31606::B' to 'const PR31606::A' for 1st argument}} + bool operator==(A const &) const; // expected-note {{no known conversion from 'B' to 'const A' for 1st argument}} }; struct B : Base { diff --git a/clang/test/SemaCXX/cxx17-compat.cpp b/clang/test/SemaCXX/cxx17-compat.cpp --- a/clang/test/SemaCXX/cxx17-compat.cpp +++ b/clang/test/SemaCXX/cxx17-compat.cpp @@ -126,8 +126,8 @@ struct A {}; template struct Class {}; #if __cplusplus <= 201703L - // expected-error@-2 {{non-type template parameter cannot have type 'NTTP::A' before C++20}} + // expected-error@-2 {{non-type template parameter cannot have type 'A' before C++20}} #else - // expected-warning@-4 {{non-type template parameter of type 'NTTP::A' is incompatible with C++ standards before C++20}} + // expected-warning@-4 {{non-type template parameter of type 'A' is incompatible with C++ standards before C++20}} #endif } diff --git a/clang/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp b/clang/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp --- a/clang/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp +++ b/clang/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp @@ -88,13 +88,13 @@ //expected-error@71 {{cannot overload a member function without a ref-qualifier with a member function with ref-qualifier '&&'}} //expected-note@70 {{previous declaration is here}} -//expected-error@82 {{statement requires expression of integer type ('extended_examples::A2' invalid)}} -//expected-error@83 {{statement requires expression of integer type ('extended_examples::A3' invalid)}} -//expected-error@84 {{statement requires expression of integer type ('extended_examples::A4' invalid)}} +//expected-error@82 {{statement requires expression of integer type ('A2' invalid)}} +//expected-error@83 {{statement requires expression of integer type ('A3' invalid)}} +//expected-error@84 {{statement requires expression of integer type ('A4' invalid)}} #ifdef CXX1Y -//expected-error@81 {{statement requires expression of integer type ('extended_examples::A1' invalid)}} -//expected-error@85 {{statement requires expression of integer type ('extended_examples::B2' invalid)}} +//expected-error@81 {{statement requires expression of integer type ('A1' invalid)}} +//expected-error@85 {{statement requires expression of integer type ('B2' invalid)}} #else //expected-error@81 {{'this' argument to member function 'operator int' is an lvalue, but function has rvalue ref-qualifier}} expected-note@54 {{'operator int' declared here}} //expected-error@85 {{'this' argument to member function 'operator int' is an lvalue, but function has rvalue ref-qualifier}} expected-note@75 {{'operator int' declared here}} @@ -144,10 +144,10 @@ } } -//expected-error@142 {{statement requires expression of integer type ('extended_examples_cxx1y::C' invalid)}} +//expected-error@142 {{statement requires expression of integer type ('C' invalid)}} #ifdef CXX1Y -//expected-error@139 {{statement requires expression of integer type ('extended_examples_cxx1y::A2' invalid)}} +//expected-error@139 {{statement requires expression of integer type ('A2' invalid)}} #else //expected-error@138 {{'this' argument to member function 'operator int' is an lvalue, but function has rvalue ref-qualifier}} expected-note@106 {{'operator int' declared here}} //expected-error@139 {{'this' argument to member function 'operator int' is an lvalue, but function has rvalue ref-qualifier}} expected-note@111 {{'operator int' declared here}} diff --git a/clang/test/SemaCXX/cxx2a-destroying-delete.cpp b/clang/test/SemaCXX/cxx2a-destroying-delete.cpp --- a/clang/test/SemaCXX/cxx2a-destroying-delete.cpp +++ b/clang/test/SemaCXX/cxx2a-destroying-delete.cpp @@ -42,9 +42,9 @@ }; struct B : private A { using A::operator delete; }; // expected-note 2{{declared private here}} struct C : B {}; - void delete_C(C *c) { delete c; } // expected-error {{cannot cast 'convert_param::C' to its private base class 'convert_param::A'}} + void delete_C(C *c) { delete c; } // expected-error {{cannot cast 'C' to its private base class 'A'}} - // expected-error@-7 {{cannot cast 'convert_param::D' to its private base class 'convert_param::A'}} + // expected-error@-7 {{cannot cast 'convert_param::D' to its private base class 'A'}} struct D : B { virtual ~D() {} }; // expected-note {{while checking implicit 'delete this' for virtual destructor}} } @@ -120,7 +120,7 @@ struct D : B {}; struct E : C, D {}; void g(E *e) { - delete e; // expected-error {{ambiguous conversion from derived class 'first_param_conversion::E' to base class 'first_param_conversion::B':}} + delete e; // expected-error {{ambiguous conversion from derived class 'E' to base class 'B':}} } } diff --git a/clang/test/SemaCXX/cxx98-compat-flags.cpp b/clang/test/SemaCXX/cxx98-compat-flags.cpp --- a/clang/test/SemaCXX/cxx98-compat-flags.cpp +++ b/clang/test/SemaCXX/cxx98-compat-flags.cpp @@ -28,10 +28,10 @@ Private p; // expected-note {{copy constructor of 'Deleted' is implicitly deleted because field 'p' has an inaccessible copy constructor}} }; - const Private &a = Private(); // expected-warning {{copying variable of type 'CopyCtorIssues::Private' when binding a reference to a temporary would invoke an inaccessible constructor in C++98}} - const NoViable &b = NoViable(); // expected-warning {{copying variable of type 'CopyCtorIssues::NoViable' when binding a reference to a temporary would find no viable constructor in C++98}} - const Ambiguous &c = Ambiguous(); // expected-warning {{copying variable of type 'CopyCtorIssues::Ambiguous' when binding a reference to a temporary would find ambiguous constructors in C++98}} - const Deleted &d = Deleted(); // expected-warning {{copying variable of type 'CopyCtorIssues::Deleted' when binding a reference to a temporary would invoke a deleted constructor in C++98}} + const Private &a = Private(); // expected-warning {{copying variable of type 'Private' when binding a reference to a temporary would invoke an inaccessible constructor in C++98}} + const NoViable &b = NoViable(); // expected-warning {{copying variable of type 'NoViable' when binding a reference to a temporary would find no viable constructor in C++98}} + const Ambiguous &c = Ambiguous(); // expected-warning {{copying variable of type 'Ambiguous' when binding a reference to a temporary would find ambiguous constructors in C++98}} + const Deleted &d = Deleted(); // expected-warning {{copying variable of type 'Deleted' when binding a reference to a temporary would invoke a deleted constructor in C++98}} int n = 0b00100101001; // expected-warning {{binary integer literals are incompatible with C++ standards before C++14}} } diff --git a/clang/test/SemaCXX/cxx98-compat-pedantic.cpp b/clang/test/SemaCXX/cxx98-compat-pedantic.cpp --- a/clang/test/SemaCXX/cxx98-compat-pedantic.cpp +++ b/clang/test/SemaCXX/cxx98-compat-pedantic.cpp @@ -67,10 +67,10 @@ Private p; // expected-note {{implicitly deleted}} }; - const Private &a = Private(); // expected-warning {{copying variable of type 'CopyCtorIssues::Private' when binding a reference to a temporary would invoke an inaccessible constructor in C++98}} - const NoViable &b = NoViable(); // expected-warning {{copying variable of type 'CopyCtorIssues::NoViable' when binding a reference to a temporary would find no viable constructor in C++98}} + const Private &a = Private(); // expected-warning {{copying variable of type 'Private' when binding a reference to a temporary would invoke an inaccessible constructor in C++98}} + const NoViable &b = NoViable(); // expected-warning {{copying variable of type 'NoViable' when binding a reference to a temporary would find no viable constructor in C++98}} #if !CXX98 - const Ambiguous &c = Ambiguous(); // expected-warning {{copying variable of type 'CopyCtorIssues::Ambiguous' when binding a reference to a temporary would find ambiguous constructors in C++98}} + const Ambiguous &c = Ambiguous(); // expected-warning {{copying variable of type 'Ambiguous' when binding a reference to a temporary would find ambiguous constructors in C++98}} #endif - const Deleted &d = Deleted(); // expected-warning {{copying variable of type 'CopyCtorIssues::Deleted' when binding a reference to a temporary would invoke a deleted constructor in C++98}} + const Deleted &d = Deleted(); // expected-warning {{copying variable of type 'Deleted' when binding a reference to a temporary would invoke a deleted constructor in C++98}} } diff --git a/clang/test/SemaCXX/decl-init-ref.cpp b/clang/test/SemaCXX/decl-init-ref.cpp --- a/clang/test/SemaCXX/decl-init-ref.cpp +++ b/clang/test/SemaCXX/decl-init-ref.cpp @@ -39,7 +39,7 @@ namespace IncompleteTest { struct String; - // expected-error@+1 {{reference to incomplete type 'const IncompleteTest::String' could not bind to an lvalue of type 'const char[1]'}} + // expected-error@+1 {{reference to incomplete type 'const String' could not bind to an lvalue of type 'const char[1]'}} void takeString(const String& = "") {} // expected-note {{passing argument to parameter here}} void test() { takeString(); diff --git a/clang/test/SemaCXX/default-assignment-operator.cpp b/clang/test/SemaCXX/default-assignment-operator.cpp --- a/clang/test/SemaCXX/default-assignment-operator.cpp +++ b/clang/test/SemaCXX/default-assignment-operator.cpp @@ -154,7 +154,7 @@ #if __cplusplus <= 199711L // expected-note@-2 {{implicit copy assignment operator}} #else - // expected-error@-4 {{object of type 'ProtectedCheck::Z' cannot be assigned because its copy assignment operator is implicitly deleted}} + // expected-error@-4 {{object of type 'Z' cannot be assigned because its copy assignment operator is implicitly deleted}} #endif } @@ -165,7 +165,7 @@ struct X1 : public virtual X0 { }; - struct X2 : X0, X1 { }; // expected-warning{{direct base 'MultiplePaths::X0' is inaccessible due to ambiguity:\n struct MultiplePaths::X2 -> struct MultiplePaths::X0\n struct MultiplePaths::X2 -> struct MultiplePaths::X1 -> struct MultiplePaths::X0}} + struct X2 : X0, X1 { }; // expected-warning{{direct base 'X0' is inaccessible due to ambiguity:\n struct MultiplePaths::X2 -> X0\n struct MultiplePaths::X2 -> X1 -> X0}} void f(X2 x2) { x2 = x2; } } diff --git a/clang/test/SemaCXX/derived-to-base-ambig.cpp b/clang/test/SemaCXX/derived-to-base-ambig.cpp --- a/clang/test/SemaCXX/derived-to-base-ambig.cpp +++ b/clang/test/SemaCXX/derived-to-base-ambig.cpp @@ -14,8 +14,8 @@ class B2 : public virtual A2 { }; class C2 : virtual public A2 { }; class D2 : public B2, public C2 { }; -class E2 : public D2, public C2, public virtual A2 { }; // expected-warning{{direct base 'C2' is inaccessible due to ambiguity:\n class E2 -> class D2 -> class C2\n class E2 -> class C2}} -class F2 : public E2, public A2 { }; // expected-warning{{direct base 'A2' is inaccessible due to ambiguity:\n class F2 -> class E2 -> class D2 -> class B2 -> class A2\n class F2 -> class A2}} +class E2 : public D2, public C2, public virtual A2 { }; // expected-warning{{direct base 'C2' is inaccessible due to ambiguity:\n class E2 -> D2 -> C2\n class E2 -> C2}} +class F2 : public E2, public A2 { }; // expected-warning{{direct base 'A2' is inaccessible due to ambiguity:\n class F2 -> E2 -> D2 -> B2 -> A2\n class F2 -> A2}} void g(E2* e2, F2* f2) { Object2* o2; diff --git a/clang/test/SemaCXX/destructor.cpp b/clang/test/SemaCXX/destructor.cpp --- a/clang/test/SemaCXX/destructor.cpp +++ b/clang/test/SemaCXX/destructor.cpp @@ -439,8 +439,8 @@ void foo() { B b; b.~B(); - b.~A(); // expected-error{{destructor type 'PR7900::A' in object destruction expression does not match the type 'PR7900::B' of the object being destroyed}} - (&b)->~A(); // expected-error{{destructor type 'PR7900::A' in object destruction expression does not match the type 'PR7900::B' of the object being destroyed}} + b.~A(); // expected-error{{destructor type 'PR7900::A' in object destruction expression does not match the type 'B' of the object being destroyed}} + (&b)->~A(); // expected-error{{destructor type 'PR7900::A' in object destruction expression does not match the type 'B' of the object being destroyed}} } } diff --git a/clang/test/SemaCXX/dynamic-cast.cpp b/clang/test/SemaCXX/dynamic-cast.cpp --- a/clang/test/SemaCXX/dynamic-cast.cpp +++ b/clang/test/SemaCXX/dynamic-cast.cpp @@ -59,8 +59,8 @@ //(void)dynamic_cast(*((D*)0)); // Ambiguous - (void)dynamic_cast((F*)0); // expected-error {{ambiguous conversion from derived class 'F' to base class 'A':\n struct F -> struct B -> struct A\n struct F -> struct E -> struct A}} - (void)dynamic_cast(*((F*)0)); // expected-error {{ambiguous conversion from derived class 'F' to base class 'A':\n struct F -> struct B -> struct A\n struct F -> struct E -> struct A}} + (void)dynamic_cast((F*)0); // expected-error {{ambiguous conversion from derived class 'F' to base class 'A':\n struct F -> B -> A\n struct F -> E -> A}} + (void)dynamic_cast(*((F*)0)); // expected-error {{ambiguous conversion from derived class 'F' to base class 'A':\n struct F -> B -> A\n struct F -> E -> A}} } void poly() diff --git a/clang/test/SemaCXX/elaborated-type-specifier.cpp b/clang/test/SemaCXX/elaborated-type-specifier.cpp --- a/clang/test/SemaCXX/elaborated-type-specifier.cpp +++ b/clang/test/SemaCXX/elaborated-type-specifier.cpp @@ -27,7 +27,7 @@ void test_X_elab(NS::X x) { struct S4 *s4 = 0; // expected-note{{'S4' is not defined, but forward declared here; conversion would be valid if it was derived from 'NS::S4'}} - x.test_elab2(s4); // expected-error{{cannot initialize a parameter of type 'NS::S4 *' with an lvalue of type 'struct S4 *'}} + x.test_elab2(s4); // expected-error{{cannot initialize a parameter of type 'S4 *' (aka 'NS::S4 *') with an lvalue of type 'struct S4 *'}} } namespace NS { diff --git a/clang/test/SemaCXX/enum-scoped.cpp b/clang/test/SemaCXX/enum-scoped.cpp --- a/clang/test/SemaCXX/enum-scoped.cpp +++ b/clang/test/SemaCXX/enum-scoped.cpp @@ -115,8 +115,8 @@ enum class X : unsigned { value }; void f(X x) { - x % X::value; // expected-error{{invalid operands to binary expression ('rdar9366066::X' and 'rdar9366066::X')}} - x % 8; // expected-error{{invalid operands to binary expression ('rdar9366066::X' and 'int')}} + x % X::value; // expected-error{{invalid operands to binary expression ('X' and 'rdar9366066::X')}} + x % 8; // expected-error{{invalid operands to binary expression ('X' and 'int')}} } } @@ -272,7 +272,7 @@ namespace PR16900 { enum class A; - A f(A a) { return -a; } // expected-error {{invalid argument type 'PR16900::A' to unary expression}} + A f(A a) { return -a; } // expected-error {{invalid argument type 'A' to unary expression}} } namespace PR18551 { @@ -310,7 +310,7 @@ typedef E E2; E2 f1() { return E::a; } - bool f() { return !f1(); } // expected-error {{invalid argument type 'test11::E2' (aka 'test11::E') to unary expression}} + bool f() { return !f1(); } // expected-error {{invalid argument type 'E2' (aka 'test11::E') to unary expression}} } namespace PR35586 { diff --git a/clang/test/SemaCXX/enum.cpp b/clang/test/SemaCXX/enum.cpp --- a/clang/test/SemaCXX/enum.cpp +++ b/clang/test/SemaCXX/enum.cpp @@ -78,8 +78,8 @@ enum E { e0 }; void f() { E e; - e = 1; // expected-error{{assigning to 'PR7051::E' from incompatible type 'int'}} - e |= 1; // expected-error{{assigning to 'PR7051::E' from incompatible type 'int'}} + e = 1; // expected-error{{assigning to 'E' from incompatible type 'int'}} + e |= 1; // expected-error{{assigning to 'E' from incompatible type 'int'}} } } diff --git a/clang/test/SemaCXX/exceptions.cpp b/clang/test/SemaCXX/exceptions.cpp --- a/clang/test/SemaCXX/exceptions.cpp +++ b/clang/test/SemaCXX/exceptions.cpp @@ -173,15 +173,15 @@ void f1() { try { - } catch (B &b) { // expected-note {{for type 'HandlerInversion::B &'}} - } catch (D &d) { // expected-warning {{exception of type 'HandlerInversion::D &' will be caught by earlier handler}} + } catch (B &b) { // expected-note {{for type 'B &'}} + } catch (D &d) { // expected-warning {{exception of type 'D &' will be caught by earlier handler}} } } void f2() { try { - } catch (B *b) { // expected-note {{for type 'HandlerInversion::B *'}} - } catch (D *d) { // expected-warning {{exception of type 'HandlerInversion::D *' will be caught by earlier handler}} + } catch (B *b) { // expected-note {{for type 'B *'}} + } catch (D *d) { // expected-warning {{exception of type 'D *' will be caught by earlier handler}} } } @@ -207,8 +207,8 @@ void f6() { try { - } catch (B &b) { // expected-note {{for type 'HandlerInversion::B &'}} - } catch (D2 &d) { // expected-warning {{exception of type 'HandlerInversion::D2 &' will be caught by earlier handler}} + } catch (B &b) { // expected-note {{for type 'B &'}} + } catch (D2 &d) { // expected-warning {{exception of type 'D2 &' will be caught by earlier handler}} } } @@ -226,18 +226,18 @@ void f8() { try { - } catch (const B &b) { // expected-note {{for type 'const HandlerInversion::B &'}} - } catch (D2 &d) { // expected-warning {{exception of type 'HandlerInversion::D2 &' will be caught by earlier handler}} + } catch (const B &b) { // expected-note {{for type 'const B &'}} + } catch (D2 &d) { // expected-warning {{exception of type 'D2 &' will be caught by earlier handler}} } try { - } catch (B &b) { // expected-note {{for type 'HandlerInversion::B &'}} - } catch (const D2 &d) { // expected-warning {{exception of type 'const HandlerInversion::D2 &' will be caught by earlier handler}} + } catch (B &b) { // expected-note {{for type 'B &'}} + } catch (const D2 &d) { // expected-warning {{exception of type 'const D2 &' will be caught by earlier handler}} } try { - } catch (B b) { // expected-note {{for type 'HandlerInversion::B'}} - } catch (D &d) { // expected-warning {{exception of type 'HandlerInversion::D &' will be caught by earlier handler}} + } catch (B b) { // expected-note {{for type 'B'}} + } catch (D &d) { // expected-warning {{exception of type 'D &' will be caught by earlier handler}} } } } diff --git a/clang/test/SemaCXX/for-range-examples.cpp b/clang/test/SemaCXX/for-range-examples.cpp --- a/clang/test/SemaCXX/for-range-examples.cpp +++ b/clang/test/SemaCXX/for-range-examples.cpp @@ -207,7 +207,7 @@ void foo(vector arr[]) { // expected-note {{declared here}} // Don't suggest to dereference arr. for (auto i : arr) { } - // expected-error@-1 {{cannot build range expression with array function parameter 'arr' since parameter with array type 'test6::vector[]' is treated as pointer type 'test6::vector *'}} + // expected-error@-1 {{cannot build range expression with array function parameter 'arr' since parameter with array type 'vector[]' is treated as pointer type 'vector *'}} } } diff --git a/clang/test/SemaCXX/function-extern-c.cpp b/clang/test/SemaCXX/function-extern-c.cpp --- a/clang/test/SemaCXX/function-extern-c.cpp +++ b/clang/test/SemaCXX/function-extern-c.cpp @@ -45,7 +45,7 @@ // For now this tests that a second 'extern "C"' is not necessary to trigger // the warning. struct A; - extern "C" A f(void); // expected-warning {{'f' has C-linkage specified, but returns incomplete type 'test2::A' which could be incompatible with C}} + extern "C" A f(void); // expected-warning {{'f' has C-linkage specified, but returns incomplete type 'A' which could be incompatible with C}} struct A { A(const A&); }; @@ -74,8 +74,8 @@ #pragma clang diagnostic ignored "-Wreturn-type-c-linkage" A xyzzy(); #pragma clang diagnostic pop -A bbb(); // expected-warning {{'bbb' has C-linkage specified, but returns user-defined type 'rdar13364028::A' which is incompatible with C}} -A ccc() { // expected-warning {{'ccc' has C-linkage specified, but returns user-defined type 'rdar13364028::A' which is incompatible with C}} +A bbb(); // expected-warning {{'bbb' has C-linkage specified, but returns user-defined type 'A' which is incompatible with C}} +A ccc() { // expected-warning {{'ccc' has C-linkage specified, but returns user-defined type 'A' which is incompatible with C}} return A(); }; } diff --git a/clang/test/SemaCXX/functional-cast.cpp b/clang/test/SemaCXX/functional-cast.cpp --- a/clang/test/SemaCXX/functional-cast.cpp +++ b/clang/test/SemaCXX/functional-cast.cpp @@ -185,9 +185,9 @@ typedef D &Dr; (void)Dr(*((A*)0)); // expected-error {{cannot cast 'A' to 'Dr' (aka 'D &') via virtual base 'B'}} typedef H *Hp; - (void)Hp((A*)0); // expected-error {{ambiguous cast from base 'A' to derived 'H':\n struct A -> struct B -> struct G1 -> struct H\n struct A -> struct B -> struct G2 -> struct H}} + (void)Hp((A*)0); // expected-error {{ambiguous cast from base 'A' to derived 'H':\n A -> B -> G1 -> struct H\n A -> B -> G2 -> struct H}} typedef H &Hr; - (void)Hr(*((A*)0)); // expected-error {{ambiguous cast from base 'A' to derived 'H':\n struct A -> struct B -> struct G1 -> struct H\n struct A -> struct B -> struct G2 -> struct H}} + (void)Hr(*((A*)0)); // expected-error {{ambiguous cast from base 'A' to derived 'H':\n A -> B -> G1 -> struct H\n A -> B -> G2 -> struct H}} // TODO: Test DR427. This requires user-defined conversions, though. } diff --git a/clang/test/SemaCXX/ignored-reference-qualifiers-disabled.cpp b/clang/test/SemaCXX/ignored-reference-qualifiers-disabled.cpp --- a/clang/test/SemaCXX/ignored-reference-qualifiers-disabled.cpp +++ b/clang/test/SemaCXX/ignored-reference-qualifiers-disabled.cpp @@ -17,5 +17,5 @@ using value_type = T; using reference = value_type&; reference get(); - const reference get() const; // qual-warning{{'const' qualifier on reference type 'container::reference' (aka 'T &') has no effect}} + const reference get() const; // qual-warning{{'const' qualifier on reference type 'reference' (aka 'T &') has no effect}} }; diff --git a/clang/test/SemaCXX/matrix-type-operators.cpp b/clang/test/SemaCXX/matrix-type-operators.cpp --- a/clang/test/SemaCXX/matrix-type-operators.cpp +++ b/clang/test/SemaCXX/matrix-type-operators.cpp @@ -12,13 +12,13 @@ template typename MyMatrix::matrix_t add(MyMatrix &A, MyMatrix &B) { char *v1 = A.value + B.value; - // expected-error@-1 {{cannot initialize a variable of type 'char *' with an rvalue of type 'MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))')}} - // expected-error@-2 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))') and 'MyMatrix::matrix_t' (aka 'float __attribute__((matrix_type(2, 2)))'))}} - // expected-error@-3 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))') and 'MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))'))}} + // expected-error@-1 {{cannot initialize a variable of type 'char *' with an rvalue of type 'matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))')}} + // expected-error@-2 {{invalid operands to binary expression ('matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))') and 'matrix_t' (aka 'float __attribute__((matrix_type(2, 2)))'))}} + // expected-error@-3 {{invalid operands to binary expression ('matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))') and 'matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))'))}} return A.value + B.value; - // expected-error@-1 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))') and 'MyMatrix::matrix_t' (aka 'float __attribute__((matrix_type(2, 2)))'))}} - // expected-error@-2 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))') and 'MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))'))}} + // expected-error@-1 {{invalid operands to binary expression ('matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))') and 'matrix_t' (aka 'float __attribute__((matrix_type(2, 2)))'))}} + // expected-error@-2 {{invalid operands to binary expression ('matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))') and 'matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))'))}} } void test_add_template(unsigned *Ptr1, float *Ptr2) { @@ -40,13 +40,13 @@ template typename MyMatrix::matrix_t subtract(MyMatrix &A, MyMatrix &B) { char *v1 = A.value - B.value; - // expected-error@-1 {{cannot initialize a variable of type 'char *' with an rvalue of type 'MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))')}} - // expected-error@-2 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))') and 'MyMatrix::matrix_t' (aka 'float __attribute__((matrix_type(2, 2)))')}} - // expected-error@-3 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))') and 'MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))')}} + // expected-error@-1 {{cannot initialize a variable of type 'char *' with an rvalue of type 'matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))')}} + // expected-error@-2 {{invalid operands to binary expression ('matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))') and 'matrix_t' (aka 'float __attribute__((matrix_type(2, 2)))')}} + // expected-error@-3 {{invalid operands to binary expression ('matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))') and 'matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))')}} return A.value - B.value; - // expected-error@-1 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))') and 'MyMatrix::matrix_t' (aka 'float __attribute__((matrix_type(2, 2)))')}} - // expected-error@-2 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))') and 'MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))')}} + // expected-error@-1 {{invalid operands to binary expression ('matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))') and 'matrix_t' (aka 'float __attribute__((matrix_type(2, 2)))')}} + // expected-error@-2 {{invalid operands to binary expression ('matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))') and 'matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))')}} } void test_subtract_template(unsigned *Ptr1, float *Ptr2) { @@ -68,19 +68,19 @@ template typename MyMatrix::matrix_t multiply(MyMatrix &A, MyMatrix &B) { char *v1 = A.value * B.value; - // expected-error@-1 {{cannot initialize a variable of type 'char *' with an rvalue of type 'MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))')}} - // expected-error@-2 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 2)))') and 'MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))'))}} - // expected-error@-3 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'float __attribute__((matrix_type(2, 2)))') and 'MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))'))}} + // expected-error@-1 {{cannot initialize a variable of type 'char *' with an rvalue of type 'matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))')}} + // expected-error@-2 {{invalid operands to binary expression ('matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 2)))') and 'matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))'))}} + // expected-error@-3 {{invalid operands to binary expression ('matrix_t' (aka 'float __attribute__((matrix_type(2, 2)))') and 'matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))'))}} MyMatrix m; B.value = m.value * A.value; - // expected-error@-1 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'int __attribute__((matrix_type(5, 6)))') and 'MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))'))}} - // expected-error@-2 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'int __attribute__((matrix_type(5, 6)))') and 'MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 2)))'))}} - // expected-error@-3 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'int __attribute__((matrix_type(5, 6)))') and 'MyMatrix::matrix_t' (aka 'float __attribute__((matrix_type(2, 2)))'))}} + // expected-error@-1 {{invalid operands to binary expression ('matrix_t' (aka 'int __attribute__((matrix_type(5, 6)))') and 'matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))'))}} + // expected-error@-2 {{invalid operands to binary expression ('matrix_t' (aka 'int __attribute__((matrix_type(5, 6)))') and 'matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 2)))'))}} + // expected-error@-3 {{invalid operands to binary expression ('matrix_t' (aka 'int __attribute__((matrix_type(5, 6)))') and 'matrix_t' (aka 'float __attribute__((matrix_type(2, 2)))'))}} return A.value * B.value; - // expected-error@-1 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 2)))') and 'MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))'))}} - // expected-error@-2 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'float __attribute__((matrix_type(2, 2)))') and 'MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))'))}} + // expected-error@-1 {{invalid operands to binary expression ('matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 2)))') and 'matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 3)))'))}} + // expected-error@-2 {{invalid operands to binary expression ('matrix_t' (aka 'float __attribute__((matrix_type(2, 2)))') and 'matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 2)))'))}} } void test_multiply_template(unsigned *Ptr1, float *Ptr2) { @@ -101,7 +101,7 @@ Mat4.value = Mat4.value * Mat1; // expected-error@-1 {{no viable conversion from 'MyMatrix' to 'unsigned int'}} - // expected-error@-2 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 2)))') and 'MyMatrix')}} + // expected-error@-2 {{invalid operands to binary expression ('matrix_t' (aka 'unsigned int __attribute__((matrix_type(3, 2)))') and 'MyMatrix')}} } struct UserT {}; @@ -116,19 +116,19 @@ void test_DoubleWrapper(MyMatrix &m, StructWithC &c) { m.value = m.value + c; // expected-error@-1 {{no viable conversion from 'StructWithC' to 'double'}} - // expected-error@-2 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'double __attribute__((matrix_type(10, 9)))') and 'StructWithC')}} + // expected-error@-2 {{invalid operands to binary expression ('matrix_t' (aka 'double __attribute__((matrix_type(10, 9)))') and 'StructWithC')}} m.value = c + m.value; // expected-error@-1 {{no viable conversion from 'StructWithC' to 'double'}} - // expected-error@-2 {{invalid operands to binary expression ('StructWithC' and 'MyMatrix::matrix_t' (aka 'double __attribute__((matrix_type(10, 9)))'))}} + // expected-error@-2 {{invalid operands to binary expression ('StructWithC' and 'matrix_t' (aka 'double __attribute__((matrix_type(10, 9)))'))}} m.value = m.value - c; // expected-error@-1 {{no viable conversion from 'StructWithC' to 'double'}} - // expected-error@-2 {{invalid operands to binary expression ('MyMatrix::matrix_t' (aka 'double __attribute__((matrix_type(10, 9)))') and 'StructWithC')}} + // expected-error@-2 {{invalid operands to binary expression ('matrix_t' (aka 'double __attribute__((matrix_type(10, 9)))') and 'StructWithC')}} m.value = c - m.value; // expected-error@-1 {{no viable conversion from 'StructWithC' to 'double'}} - // expected-error@-2 {{invalid operands to binary expression ('StructWithC' and 'MyMatrix::matrix_t' (aka 'double __attribute__((matrix_type(10, 9)))'))}} + // expected-error@-2 {{invalid operands to binary expression ('StructWithC' and 'matrix_t' (aka 'double __attribute__((matrix_type(10, 9)))'))}} } sx5x10_t get_matrix(); diff --git a/clang/test/SemaCXX/member-expr.cpp b/clang/test/SemaCXX/member-expr.cpp --- a/clang/test/SemaCXX/member-expr.cpp +++ b/clang/test/SemaCXX/member-expr.cpp @@ -85,11 +85,11 @@ } void test1(A *x) { - x.A::foo(); // expected-error {{'test5::A *' is a pointer}} + x.A::foo(); // expected-error {{'A *' is a pointer}} } void test2(A &x) { - x->A::foo(); // expected-error {{'test5::A' is not a pointer; did you mean to use '.'?}} + x->A::foo(); // expected-error {{'A' is not a pointer; did you mean to use '.'?}} } } @@ -116,9 +116,9 @@ template struct Z { int n; }; void f(Y *y) { - y->N::X1; // expected-error{{'rdar8231724::N::X1' is not a member of class 'rdar8231724::Y'}} - y->Z::n; // expected-error{{'rdar8231724::Z::n' is not a member of class 'rdar8231724::Y'}} - y->template Z::n; // expected-error{{'rdar8231724::Z::n' is not a member of class 'rdar8231724::Y'}} + y->N::X1; // expected-error{{'rdar8231724::N::X1' is not a member of class 'Y'}} + y->Z::n; // expected-error{{'rdar8231724::Z::n' is not a member of class 'Y'}} + y->template Z::n; // expected-error{{'rdar8231724::Z::n' is not a member of class 'Y'}} #if __cplusplus <= 199711L // C++03 or earlier modes // expected-warning@-2{{'template' keyword outside of a template}} #endif @@ -185,7 +185,7 @@ int f() { Cl0 c; - return c->a; // expected-error {{member reference type 'PR15045::Cl0' is not a pointer; did you mean to use '.'?}} + return c->a; // expected-error {{member reference type 'Cl0' is not a pointer; did you mean to use '.'?}} } struct bar { @@ -197,7 +197,7 @@ }; template void call_func(T t) { - t->func(); // expected-error-re 2 {{member reference type 'PR15045::bar' is not a pointer{{$}}}} \ + t->func(); // expected-error-re 2 {{member reference type '{{(PR15045::)?}}bar' is not a pointer{{$}}}} \ // expected-note {{did you mean to use '.' instead?}} } @@ -206,12 +206,12 @@ foo f; // Show that recovery has happened by also triggering typo correction - e->Func(); // expected-error {{member reference type 'PR15045::bar' is not a pointer; did you mean to use '.'?}} \ + e->Func(); // expected-error {{member reference type 'bar' is not a pointer; did you mean to use '.'?}} \ // expected-error {{no member named 'Func' in 'PR15045::bar'; did you mean 'func'?}} // Make sure a fixit isn't given in the case that the '->' isn't actually // the problem (the problem is with the return value of an operator->). - f->func(); // expected-error-re {{member reference type 'PR15045::bar' is not a pointer{{$}}}} + f->func(); // expected-error-re {{member reference type 'bar' is not a pointer{{$}}}} call_func(e); // expected-note {{in instantiation of function template specialization 'PR15045::call_func' requested here}} @@ -225,6 +225,6 @@ int f(S* s) { T t; return t.get_s // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}} - .i; // expected-error {{member reference type 'pr16676::S *' is a pointer; did you mean to use '->'}} + .i; // expected-error {{member reference type 'S *' is a pointer; did you mean to use '->'}} } } diff --git a/clang/test/SemaCXX/member-init.cpp b/clang/test/SemaCXX/member-init.cpp --- a/clang/test/SemaCXX/member-init.cpp +++ b/clang/test/SemaCXX/member-init.cpp @@ -87,7 +87,7 @@ struct thing {}; struct another { another() : r(thing()) {} // expected-error {{binds to a temporary object}} - // expected-error@-1 {{temporary of type 'PR14838::function' has private destructor}} + // expected-error@-1 {{temporary of type 'function' has private destructor}} const function &r; // expected-note {{reference member declared here}} } af; } @@ -98,7 +98,7 @@ double y; }; struct Sprite { - Point location = Point(0,0); // expected-error {{no matching constructor for initialization of 'rdar14084171::Point'}} + Point location = Point(0,0); // expected-error {{no matching constructor for initialization of 'Point'}} }; void f(Sprite& x) { x = x; } // expected-warning {{explicitly assigning value of variable}} } diff --git a/clang/test/SemaCXX/microsoft-cxx0x.cpp b/clang/test/SemaCXX/microsoft-cxx0x.cpp --- a/clang/test/SemaCXX/microsoft-cxx0x.cpp +++ b/clang/test/SemaCXX/microsoft-cxx0x.cpp @@ -15,7 +15,7 @@ template auto x(F f) -> decltype(f(make())); #ifndef MS_COMPAT -// expected-error@-2{{calling 'make' with incomplete return type 'PR13433::S'}} +// expected-error@-2{{calling 'make' with incomplete return type 'S'}} // expected-note@-5{{'make' declared here}} // expected-note@-7{{forward declaration of 'PR13433::S'}} #endif diff --git a/clang/test/SemaCXX/microsoft-dtor-lookup.cpp b/clang/test/SemaCXX/microsoft-dtor-lookup.cpp --- a/clang/test/SemaCXX/microsoft-dtor-lookup.cpp +++ b/clang/test/SemaCXX/microsoft-dtor-lookup.cpp @@ -42,7 +42,7 @@ int a; }; -struct B : public A { // expected-note {{destructor of 'B' is implicitly deleted because base class 'Test2::A' has an inaccessible destructor}} +struct B : public A { // expected-note {{destructor of 'B' is implicitly deleted because base class 'A' has an inaccessible destructor}} int b; }; diff --git a/clang/test/SemaCXX/new-array-size-conv.cpp b/clang/test/SemaCXX/new-array-size-conv.cpp --- a/clang/test/SemaCXX/new-array-size-conv.cpp +++ b/clang/test/SemaCXX/new-array-size-conv.cpp @@ -18,7 +18,7 @@ struct ValueBoth : ValueInt, ValueEnum { }; struct IndirectValueInt : ValueInt { }; -struct TwoValueInts : ValueInt, IndirectValueInt { }; // expected-warning{{direct base 'ValueInt' is inaccessible due to ambiguity:\n struct TwoValueInts -> struct ValueInt\n struct TwoValueInts -> struct IndirectValueInt -> struct ValueInt}} +struct TwoValueInts : ValueInt, IndirectValueInt { }; // expected-warning{{direct base 'ValueInt' is inaccessible due to ambiguity:\n struct TwoValueInts -> ValueInt\n struct TwoValueInts -> IndirectValueInt -> ValueInt}} void test() { diff --git a/clang/test/SemaCXX/new-delete.cpp b/clang/test/SemaCXX/new-delete.cpp --- a/clang/test/SemaCXX/new-delete.cpp +++ b/clang/test/SemaCXX/new-delete.cpp @@ -479,7 +479,7 @@ #endif struct B { B(); A a; }; #if __cplusplus <= 199711L - // expected-error@-2 {{field of type 'ArrayNewNeedsDtor::A' has private destructor}} + // expected-error@-2 {{field of type 'A' has private destructor}} #else // expected-note@-4 {{destructor of 'B' is implicitly deleted because field 'a' has an inaccessible destructor}} #endif diff --git a/clang/test/SemaCXX/out-of-line-def-mismatch.cpp b/clang/test/SemaCXX/out-of-line-def-mismatch.cpp --- a/clang/test/SemaCXX/out-of-line-def-mismatch.cpp +++ b/clang/test/SemaCXX/out-of-line-def-mismatch.cpp @@ -7,9 +7,9 @@ class C1 {}; struct S2 { - void func(S1*); // expected-note {{type of 1st parameter of member declaration does not match definition ('N2::S1 *' vs 'N2::N1::S1 *')}} - void func(C1&, unsigned, const S1*); // expected-note {{type of 3rd parameter of member declaration does not match definition ('const N2::S1 *' vs 'const N2::N1::S1 *')}} - void func(const S1*, unsigned); //expected-note {{type of 1st parameter of member declaration does not match definition ('const N2::S1 *' vs 'N2::N1::S1')}} + void func(S1*); // expected-note {{type of 1st parameter of member declaration does not match definition ('S1 *' (aka 'N2::S1 *') vs 'S1 *' (aka 'N2::N1::S1 *'))}} + void func(C1&, unsigned, const S1*); // expected-note {{type of 3rd parameter of member declaration does not match definition ('const S1 *' (aka 'const N2::S1 *') vs 'const S1 *' (aka 'const N2::N1::S1 *'))}} + void func(const S1*, unsigned); //expected-note {{type of 1st parameter of member declaration does not match definition ('const S1 *' vs 'S1')}} void func(unsigned, const S1*); // expected-note {{type of 1st parameter of member declaration does not match definition ('unsigned int' vs 'unsigned int *')}} }; diff --git a/clang/test/SemaCXX/overload-0x.cpp b/clang/test/SemaCXX/overload-0x.cpp --- a/clang/test/SemaCXX/overload-0x.cpp +++ b/clang/test/SemaCXX/overload-0x.cpp @@ -2,11 +2,11 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s namespace test0 { - struct A { // expected-note {{candidate function (the implicit copy assignment operator) not viable: 'this' argument has type 'const test0::A', but method is not marked const}} + struct A { // expected-note {{candidate function (the implicit copy assignment operator) not viable: 'this' argument has type 'const A', but method is not marked const}} #if __cplusplus >= 201103L - // expected-note@-2 {{candidate function (the implicit move assignment operator) not viable: 'this' argument has type 'const test0::A', but method is not marked const}} + // expected-note@-2 {{candidate function (the implicit move assignment operator) not viable: 'this' argument has type 'const A', but method is not marked const}} #endif - A &operator=(void*); // expected-note {{candidate function not viable: 'this' argument has type 'const test0::A', but method is not marked const}} + A &operator=(void*); // expected-note {{candidate function not viable: 'this' argument has type 'const A', but method is not marked const}} }; void test(const A &a) { diff --git a/clang/test/SemaCXX/overload-call.cpp b/clang/test/SemaCXX/overload-call.cpp --- a/clang/test/SemaCXX/overload-call.cpp +++ b/clang/test/SemaCXX/overload-call.cpp @@ -388,8 +388,8 @@ completeFunction(*P); // expected-error {{no matching function for call to 'completeFunction'}} } - void incompletePointerFunction(Incomplete *); // expected-note {{candidate function not viable: cannot convert argument of incomplete type 'IncompleteConversion::Incomplete' to 'IncompleteConversion::Incomplete *' for 1st argument; take the address of the argument with &}} - void incompleteReferenceFunction(Incomplete &); // expected-note {{candidate function not viable: cannot convert argument of incomplete type 'IncompleteConversion::Incomplete *' to 'IncompleteConversion::Incomplete &' for 1st argument; dereference the argument with *}} + void incompletePointerFunction(Incomplete *); // expected-note {{candidate function not viable: cannot convert argument of incomplete type 'Incomplete' to 'Incomplete *' for 1st argument; take the address of the argument with &}} + void incompleteReferenceFunction(Incomplete &); // expected-note {{candidate function not viable: cannot convert argument of incomplete type 'Incomplete *' to 'Incomplete &' for 1st argument; dereference the argument with *}} void testPointerReferenceConversion(Incomplete &reference, Incomplete *pointer) { incompletePointerFunction(reference); // expected-error {{no matching function for call to 'incompletePointerFunction'}} @@ -467,7 +467,7 @@ }; void f() { - S()(0); // expected-error{{conversion from 'int' to 'PR6078::A' is ambiguous}} + S()(0); // expected-error{{conversion from 'int' to 'A' is ambiguous}} } } diff --git a/clang/test/SemaCXX/overload-member-call.cpp b/clang/test/SemaCXX/overload-member-call.cpp --- a/clang/test/SemaCXX/overload-member-call.cpp +++ b/clang/test/SemaCXX/overload-member-call.cpp @@ -77,11 +77,11 @@ void foo(int n, const char *s, int t, ...); // expected-note {{candidate function not viable: requires at least 3 arguments, but 2 were provided}} void foo(int n, const char *s, int t, int u = 0); // expected-note {{candidate function not viable: requires at least 3 arguments, but 2 were provided}} - void bar(double d); //expected-note {{candidate function not viable: 'this' argument has type 'const test1::A', but method is not marked const}} - void bar(int i); //expected-note {{candidate function not viable: 'this' argument has type 'const test1::A', but method is not marked const}} + void bar(double d); //expected-note {{candidate function not viable: 'this' argument has type 'const A', but method is not marked const}} + void bar(int i); //expected-note {{candidate function not viable: 'this' argument has type 'const A', but method is not marked const}} - void baz(A &d); // expected-note {{candidate function not viable: 1st argument ('const test1::A') would lose const qualifier}} - void baz(int i); // expected-note {{candidate function not viable: no known conversion from 'const test1::A' to 'int' for 1st argument}} + void baz(A &d); // expected-note {{candidate function not viable: 1st argument ('const A') would lose const qualifier}} + void baz(int i); // expected-note {{candidate function not viable: no known conversion from 'const A' to 'int' for 1st argument}} void ref() &&; // expected-note {{expects an rvalue for object argument}} expected-note {{requires 0 arguments, but 1 was provided}} void ref(int) &; // expected-note {{expects an lvalue for object argument}} expected-note {{requires 1 argument, but 0 were provided}} @@ -114,7 +114,7 @@ namespace b7398190 { struct S { - int f(); // expected-note {{'this' argument has type 'const b7398190::S', but method is not marked const}} + int f(); // expected-note {{'this' argument has type 'const S', but method is not marked const}} void f(int); // expected-note {{requires 1 argument, but 0 were provided}} }; const S *p; diff --git a/clang/test/SemaCXX/overloaded-operator.cpp b/clang/test/SemaCXX/overloaded-operator.cpp --- a/clang/test/SemaCXX/overloaded-operator.cpp +++ b/clang/test/SemaCXX/overloaded-operator.cpp @@ -404,7 +404,7 @@ namespace rdar9222009 { class StringRef { inline bool operator==(StringRef LHS, StringRef RHS) { // expected-error{{overloaded 'operator==' must be a binary operator (has 3 parameters)}} - return !(LHS == RHS); // expected-error{{invalid operands to binary expression ('rdar9222009::StringRef' and 'rdar9222009::StringRef')}} + return !(LHS == RHS); // expected-error{{invalid operands to binary expression ('StringRef' and 'StringRef')}} } }; @@ -481,7 +481,7 @@ void h() { D d; d++; // ok - ++d; // expected-error{{cannot increment value of type 'PR14995::D'}} + ++d; // expected-error{{cannot increment value of type 'D'}} } template struct E { diff --git a/clang/test/SemaCXX/pseudo-destructors.cpp b/clang/test/SemaCXX/pseudo-destructors.cpp --- a/clang/test/SemaCXX/pseudo-destructors.cpp +++ b/clang/test/SemaCXX/pseudo-destructors.cpp @@ -108,15 +108,15 @@ void test() { Derived d; - static_cast(&d).~Base(); // expected-error {{member reference type 'dotPointerAccess::Base *' is a pointer; did you mean to use '->'}} - d->~Derived(); // expected-error {{member reference type 'dotPointerAccess::Derived' is not a pointer; did you mean to use '.'}} + static_cast(&d).~Base(); // expected-error {{member reference type 'Base *' is a pointer; did you mean to use '->'}} + d->~Derived(); // expected-error {{member reference type 'Derived' is not a pointer; did you mean to use '.'}} } typedef Derived *Foo; void test2(Foo d) { d.~Foo(); // This is ok - d.~Derived(); // expected-error {{member reference type 'dotPointerAccess::Foo' (aka 'dotPointerAccess::Derived *') is a pointer; did you mean to use '->'}} + d.~Derived(); // expected-error {{member reference type 'Foo' (aka 'dotPointerAccess::Derived *') is a pointer; did you mean to use '->'}} } } diff --git a/clang/test/SemaCXX/recovery-expr-type.cpp b/clang/test/SemaCXX/recovery-expr-type.cpp --- a/clang/test/SemaCXX/recovery-expr-type.cpp +++ b/clang/test/SemaCXX/recovery-expr-type.cpp @@ -101,7 +101,7 @@ namespace test8 { typedef int arr[]; int v = arr(); // expected-error {{array types cannot be value-initialized}} \ - expected-error {{cannot initialize a variable of type 'int' with an rvalue of type 'test8::arr'}} + expected-error {{cannot initialize a variable of type 'int' with an rvalue of type 'arr'}} } namespace test9 { diff --git a/clang/test/SemaCXX/references.cpp b/clang/test/SemaCXX/references.cpp --- a/clang/test/SemaCXX/references.cpp +++ b/clang/test/SemaCXX/references.cpp @@ -90,7 +90,7 @@ int& okay; // expected-note{{reference member 'okay' will never be initialized}} }; -struct C : B, A { }; // expected-warning {{direct base 'A' is inaccessible due to ambiguity:\n struct C -> struct B -> struct A\nstruct C -> struct A}} +struct C : B, A { }; // expected-warning {{direct base 'A' is inaccessible due to ambiguity:\n struct C -> B -> A\nstruct C -> A}} void test7(C& c) { A& a1 = c; // expected-error {{ambiguous conversion from derived class 'C' to base class 'A':}} @@ -180,7 +180,7 @@ // This is invalid: we can't copy-initialize an 'A' temporary using an // explicit constructor. struct A { explicit A(int); }; - const A &a(0); // expected-error {{reference to type 'const ExplicitRefInit::A' could not bind to an rvalue of type 'int'}} + const A &a(0); // expected-error {{reference to type 'const A' could not bind to an rvalue of type 'int'}} } namespace RefCollapseTypePrinting { diff --git a/clang/test/SemaCXX/static-cast.cpp b/clang/test/SemaCXX/static-cast.cpp --- a/clang/test/SemaCXX/static-cast.cpp +++ b/clang/test/SemaCXX/static-cast.cpp @@ -90,8 +90,8 @@ (void)static_cast(*((const A*)0)); // expected-error {{static_cast from 'const A' to 'B &' casts away qualifiers}} (void)static_cast((A*)0); // expected-error {{cannot cast private base class 'A' to 'E'}} (void)static_cast(*((A*)0)); // expected-error {{cannot cast private base class 'A' to 'E'}} - (void)static_cast((A*)0); // expected-error {{ambiguous cast from base 'A' to derived 'H':\n struct A -> struct B -> struct G1 -> struct H\n struct A -> struct B -> struct G2 -> struct H}} - (void)static_cast(*((A*)0)); // expected-error {{ambiguous cast from base 'A' to derived 'H':\n struct A -> struct B -> struct G1 -> struct H\n struct A -> struct B -> struct G2 -> struct H}} + (void)static_cast((A*)0); // expected-error {{ambiguous cast from base 'A' to derived 'H':\n A -> B -> G1 -> struct H\n struct A -> B -> G2 -> struct H}} + (void)static_cast(*((A*)0)); // expected-error {{ambiguous cast from base 'A' to derived 'H':\n A -> B -> G1 -> struct H\n A -> B -> G2 -> struct H}} (void)static_cast((B*)0); // expected-error {{static_cast from 'B *' to 'E *', which are not related by inheritance, is not allowed}} (void)static_cast(*((B*)0)); // expected-error {{non-const lvalue reference to type 'E' cannot bind to a value of unrelated type 'B'}} diff --git a/clang/test/SemaCXX/switch.cpp b/clang/test/SemaCXX/switch.cpp --- a/clang/test/SemaCXX/switch.cpp +++ b/clang/test/SemaCXX/switch.cpp @@ -124,7 +124,7 @@ switch (d) { case Defined::a: break; - case (Defined)2: // expected-warning {{case value not in enumerated type 'OpaqueEnumWarnings::Defined'}} + case (Defined)2: // expected-warning {{case value not in enumerated type 'Defined'}} break; } } diff --git a/clang/test/SemaCXX/type-traits.cpp b/clang/test/SemaCXX/type-traits.cpp --- a/clang/test/SemaCXX/type-traits.cpp +++ b/clang/test/SemaCXX/type-traits.cpp @@ -2789,7 +2789,7 @@ struct S; //expected-note{{forward declaration of 'ErrorType::S'}} struct T { - S t; //expected-error{{field has incomplete type 'ErrorType::S'}} + S t; //expected-error{{field has incomplete type 'S'}} }; bool b = __has_unique_object_representations(T); }; diff --git a/clang/test/SemaCXX/undefined-internal.cpp b/clang/test/SemaCXX/undefined-internal.cpp --- a/clang/test/SemaCXX/undefined-internal.cpp +++ b/clang/test/SemaCXX/undefined-internal.cpp @@ -128,7 +128,7 @@ #if __cplusplus <= 199711L // C++03 or earlier modes // expected-warning@-2 {{C++98 requires an accessible copy constructor}} #else - // expected-warning@-4 {{copying parameter of type 'PR9323::(anonymous namespace)::Uncopyable' when binding a reference to a temporary would invoke an inaccessible constructor in C++98}} + // expected-warning@-4 {{copying parameter of type 'Uncopyable' when binding a reference to a temporary would invoke an inaccessible constructor in C++98}} #endif }; } diff --git a/clang/test/SemaCXX/underlying_type.cpp b/clang/test/SemaCXX/underlying_type.cpp --- a/clang/test/SemaCXX/underlying_type.cpp +++ b/clang/test/SemaCXX/underlying_type.cpp @@ -47,11 +47,11 @@ // expected-error@-1 {{ISO C++ forbids forward references to 'enum'}} // expected-error@-2 {{variable has incomplete type}} __underlying_type(Invalid) dont_crash; - // expected-error@-1 {{cannot determine underlying type of incomplete enumeration type 'PR19966::Invalid'}} + // expected-error@-1 {{cannot determine underlying type of incomplete enumeration type 'Invalid'}} } enum E { // expected-note {{forward declaration of 'E'}} a = (__underlying_type(E)){} - // expected-error@-1 {{cannot determine underlying type of incomplete enumeration type 'PR19966::E'}} + // expected-error@-1 {{cannot determine underlying type of incomplete enumeration type 'E'}} // expected-error@-2 {{constant expression}} }; } diff --git a/clang/test/SemaCXX/vector.cpp b/clang/test/SemaCXX/vector.cpp --- a/clang/test/SemaCXX/vector.cpp +++ b/clang/test/SemaCXX/vector.cpp @@ -508,8 +508,8 @@ E e; c &Value; // expected-error{{cannot convert between scalar type 'PR45780::E' and vector type 'char16'}} c == Value; // expected-error{{cannot convert between scalar type 'PR45780::E' and vector type 'char16'}} - e | c; // expected-error{{cannot convert between scalar type 'PR45780::E' and vector type 'char16'}} - e != c; // expected-error{{cannot convert between scalar type 'PR45780::E' and vector type 'char16'}} + e | c; // expected-error{{cannot convert between scalar type 'E' and vector type 'char16'}} + e != c; // expected-error{{cannot convert between scalar type 'E' and vector type 'char16'}} } } // namespace PR45780 diff --git a/clang/test/SemaCXX/virtual-override.cpp b/clang/test/SemaCXX/virtual-override.cpp --- a/clang/test/SemaCXX/virtual-override.cpp +++ b/clang/test/SemaCXX/virtual-override.cpp @@ -22,7 +22,7 @@ }; class B : A { - virtual b* f(); // expected-error{{return type of virtual function 'f' is not covariant with the return type of the function it overrides ('T2::b *' is not derived from 'T2::a *')}} + virtual b* f(); // expected-error{{return type of virtual function 'f' is not covariant with the return type of the function it overrides ('b *' is not derived from 'a *')}} }; } @@ -37,7 +37,7 @@ }; class B : A { - virtual b* f(); // expected-error{{invalid covariant return for virtual function: 'T3::a' is a private base class of 'T3::b'}} + virtual b* f(); // expected-error{{invalid covariant return for virtual function: 'a' is a private base class of 'b'}} }; } @@ -46,16 +46,16 @@ struct a { }; struct a1 : a { }; -struct b : a, a1 { }; // expected-warning{{direct base 'T4::a' is inaccessible due to ambiguity:\n struct T4::b -> struct T4::a\n struct T4::b -> struct T4::a1 -> struct T4::a}} +struct b : a, a1 { }; // expected-warning{{direct base 'a' is inaccessible due to ambiguity:\n struct T4::b -> a\n struct T4::b -> a1 -> a}} class A { virtual a* f(); // expected-note{{overridden virtual function is here}} }; class B : A { - virtual b* f(); // expected-error{{return type of virtual function 'f' is not covariant with the return type of the function it overrides (ambiguous conversion from derived class 'T4::b' to base class 'T4::a':\n\ - struct T4::b -> struct T4::a\n\ - struct T4::b -> struct T4::a1 -> struct T4::a)}} + virtual b* f(); // expected-error{{return type of virtual function 'f' is not covariant with the return type of the function it overrides (ambiguous conversion from derived class 'b' to base class 'a':\n\ + struct T4::b -> a\n\ + struct T4::b -> a1 -> a)}} }; } @@ -71,7 +71,7 @@ class B : A { virtual a* const f(); - virtual a* g(); // expected-error{{return type of virtual function 'g' is not covariant with the return type of the function it overrides ('T5::a *' has different qualifiers than 'T5::a *const')}} + virtual a* g(); // expected-error{{return type of virtual function 'g' is not covariant with the return type of the function it overrides ('a *' has different qualifiers than 'a *const')}} }; } @@ -87,7 +87,7 @@ class B : A { virtual a* f(); - virtual const a* g(); // expected-error{{return type of virtual function 'g' is not covariant with the return type of the function it overrides (class type 'const T6::a *' is more qualified than class type 'T6::a *'}} + virtual const a* g(); // expected-error{{return type of virtual function 'g' is not covariant with the return type of the function it overrides (class type 'const a *' is more qualified than class type 'a *'}} }; } @@ -114,7 +114,7 @@ }; class B : A { - b* f(); // expected-error {{return type of virtual function 'f' is not covariant with the return type of the function it overrides ('T8::b' is incomplete)}} + b* f(); // expected-error {{return type of virtual function 'f' is not covariant with the return type of the function it overrides ('b' is incomplete)}} }; } @@ -231,7 +231,7 @@ }; template struct X1 : X { virtual TD* f1(); // expected-error{{return type of virtual function 'f1' is not covariant with the return type of the function it overrides ('TD<1> *'}} - virtual D* f2(); // expected-error{{return type of virtual function 'f2' is not covariant with the return type of the function it overrides ('type_dependent_covariance::D *' is not derived from 'TB<1> *')}} + virtual D* f2(); // expected-error{{return type of virtual function 'f2' is not covariant with the return type of the function it overrides ('D *' is not derived from 'TB<1> *')}} }; X1<0, 0> good; @@ -261,7 +261,7 @@ }; struct D : C { - virtual B&& f(); // expected-error {{virtual function 'f' has a different return type ('T11::B &&') than the function it overrides (which has return type 'T11::A &')}} + virtual B&& f(); // expected-error {{virtual function 'f' has a different return type ('B &&') than the function it overrides (which has return type 'A &')}} }; }; @@ -274,7 +274,7 @@ }; struct D : C { - virtual B& f(); // expected-error {{virtual function 'f' has a different return type ('T12::B &') than the function it overrides (which has return type 'T12::A &&')}} + virtual B& f(); // expected-error {{virtual function 'f' has a different return type ('B &') than the function it overrides (which has return type 'A &&')}} }; }; diff --git a/clang/test/SemaCXX/warn-bad-memaccess.cpp b/clang/test/SemaCXX/warn-bad-memaccess.cpp --- a/clang/test/SemaCXX/warn-bad-memaccess.cpp +++ b/clang/test/SemaCXX/warn-bad-memaccess.cpp @@ -152,7 +152,7 @@ namespace recursive_class { struct S { S v; - // expected-error@-1{{field has incomplete type 'recursive_class::S'}} + // expected-error@-1{{field has incomplete type 'S'}} // expected-note@-3{{definition of 'recursive_class::S' is not complete until the closing '}'}} } a; diff --git a/clang/test/SemaCXX/warn-enum-compare.cpp b/clang/test/SemaCXX/warn-enum-compare.cpp --- a/clang/test/SemaCXX/warn-enum-compare.cpp +++ b/clang/test/SemaCXX/warn-enum-compare.cpp @@ -78,15 +78,15 @@ while (B1 == B2); // expected-warning {{comparison of different enumeration types ('name1::Baz' and 'name2::Baz')}} while (name1::B2 == name2::B3); // expected-warning {{comparison of different enumeration types ('name1::Baz' and 'name2::Baz')}} - while (z == name2::B2); // expected-warning {{comparison of different enumeration types ('name1::Baz' and 'name2::Baz')}} + while (z == name2::B2); // expected-warning {{comparison of different enumeration types ('Baz' and 'name2::Baz')}} while (((((B1)))) == B2); // expected-warning {{comparison of different enumeration types ('name1::Baz' and 'name2::Baz')}} while (name1::B2 == (name2::B3)); // expected-warning {{comparison of different enumeration types ('name1::Baz' and 'name2::Baz')}} - while (z == ((((name2::B2))))); // expected-warning {{comparison of different enumeration types ('name1::Baz' and 'name2::Baz')}} + while (z == ((((name2::B2))))); // expected-warning {{comparison of different enumeration types ('Baz' and 'name2::Baz')}} while ((((B1))) == (((B2)))); // expected-warning {{comparison of different enumeration types ('name1::Baz' and 'name2::Baz')}} while ((name1::B2) == (((name2::B3)))); // expected-warning {{comparison of different enumeration types ('name1::Baz' and 'name2::Baz')}} - while ((((z))) == (name2::B2)); // expected-warning {{comparison of different enumeration types ('name1::Baz' and 'name2::Baz')}} + while ((((z))) == (name2::B2)); // expected-warning {{comparison of different enumeration types ('Baz' and 'name2::Baz')}} while (x == a); // expected-warning {{comparison of different enumeration types ('Foo' and 'name1::Foo')}} while (x == b); // expected-warning {{comparison of different enumeration types ('Foo' and 'oneFoo' (aka 'name1::Foo'))}} @@ -229,14 +229,14 @@ while (td == c); // expected-warning {{comparison of different enumeration types ('TD' and 'twoFoo' (aka 'name1::Foo'))}} while (td == x); // expected-warning {{comparison of different enumeration types ('TD' and 'Foo')}} while (td == y); // expected-warning {{comparison of different enumeration types ('TD' and 'Bar')}} - while (td == z); // expected-warning {{comparison of different enumeration types ('TD' and 'name1::Baz')}} + while (td == z); // expected-warning {{comparison of different enumeration types ('TD' and 'Baz')}} while (a == TD1); // expected-warning {{comparison of different enumeration types ('name1::Foo' and 'TD')}} while (b == TD2); // expected-warning {{comparison of different enumeration types ('oneFoo' (aka 'name1::Foo') and 'TD')}} while (c == TD1); // expected-warning {{comparison of different enumeration types ('twoFoo' (aka 'name1::Foo') and 'TD')}} while (x == TD2); // expected-warning {{comparison of different enumeration types ('Foo' and 'TD')}} while (y == TD1); // expected-warning {{comparison of different enumeration types ('Bar' and 'TD')}} - while (z == TD2); // expected-warning {{comparison of different enumeration types ('name1::Baz' and 'TD')}} + while (z == TD2); // expected-warning {{comparison of different enumeration types ('Baz' and 'TD')}} switch (a) { case name1::F1: break; diff --git a/clang/test/SemaCXX/warn-new-overaligned-3.cpp b/clang/test/SemaCXX/warn-new-overaligned-3.cpp --- a/clang/test/SemaCXX/warn-new-overaligned-3.cpp +++ b/clang/test/SemaCXX/warn-new-overaligned-3.cpp @@ -16,8 +16,8 @@ void helper() { Test t; - new Test; // expected-warning {{type 'test1::Test' requires 256 bytes of alignment and the default allocator only guarantees}} - new Test[10]; // expected-warning {{type 'test1::Test' requires 256 bytes of alignment and the default allocator only guarantees}} + new Test; // expected-warning {{type 'Test' requires 256 bytes of alignment and the default allocator only guarantees}} + new Test[10]; // expected-warning {{type 'Test' requires 256 bytes of alignment and the default allocator only guarantees}} } } diff --git a/clang/test/SemaCXX/warn-new-overaligned.cpp b/clang/test/SemaCXX/warn-new-overaligned.cpp --- a/clang/test/SemaCXX/warn-new-overaligned.cpp +++ b/clang/test/SemaCXX/warn-new-overaligned.cpp @@ -12,8 +12,8 @@ void helper() { Test t; - new Test; // expected-warning {{type 'test1::Test' requires 256 bytes of alignment and the default allocator only guarantees}} - new Test[10]; // expected-warning {{type 'test1::Test' requires 256 bytes of alignment and the default allocator only guarantees}} + new Test; // expected-warning {{type 'Test' requires 256 bytes of alignment and the default allocator only guarantees}} + new Test[10]; // expected-warning {{type 'Test' requires 256 bytes of alignment and the default allocator only guarantees}} } } @@ -25,8 +25,8 @@ void helper() { Test t; - new Test; // expected-warning {{type 'test2::Test' requires 256 bytes of alignment and the default allocator only guarantees}} - new Test[10]; // expected-warning {{type 'test2::Test' requires 256 bytes of alignment and the default allocator only guarantees}} + new Test; // expected-warning {{type 'Test' requires 256 bytes of alignment and the default allocator only guarantees}} + new Test[10]; // expected-warning {{type 'Test' requires 256 bytes of alignment and the default allocator only guarantees}} } } @@ -47,7 +47,7 @@ void helper() { Test t; new Test; - new Test[10]; // expected-warning {{type 'test3::Test' requires 256 bytes of alignment and the default allocator only guarantees}} + new Test[10]; // expected-warning {{type 'Test' requires 256 bytes of alignment and the default allocator only guarantees}} } } @@ -67,7 +67,7 @@ void helper() { Test t; - new Test; // expected-warning {{type 'test4::Test' requires 256 bytes of alignment and the default allocator only guarantees}} + new Test; // expected-warning {{type 'Test' requires 256 bytes of alignment and the default allocator only guarantees}} new Test[10]; } } diff --git a/clang/test/SemaCXX/warn-reinterpret-base-class.cpp b/clang/test/SemaCXX/warn-reinterpret-base-class.cpp --- a/clang/test/SemaCXX/warn-reinterpret-base-class.cpp +++ b/clang/test/SemaCXX/warn-reinterpret-base-class.cpp @@ -20,7 +20,7 @@ }; class DDVA : public virtual DA { }; -class DMA : public virtual A, public virtual DA { //expected-warning{{direct base 'A' is inaccessible due to ambiguity:\n class DMA -> class A\n class DMA -> class DA -> class A}} +class DMA : public virtual A, public virtual DA { //expected-warning{{direct base 'A' is inaccessible due to ambiguity:\n class DMA -> A\n class DMA -> DA -> A}} }; class B; @@ -46,7 +46,7 @@ namespace BaseMalformed { struct A; // expected-note {{forward declaration of 'BaseMalformed::A'}} struct B { - A a; // expected-error {{field has incomplete type 'BaseMalformed::A'}} + A a; // expected-error {{field has incomplete type 'A'}} }; struct C : public B {} c; B *b = reinterpret_cast(&c); @@ -57,7 +57,7 @@ struct A; // expected-note {{forward declaration of 'ChildMalformed::A'}} struct B {}; struct C : public B { - A a; // expected-error {{field has incomplete type 'ChildMalformed::A'}} + A a; // expected-error {{field has incomplete type 'A'}} } c; B *b = reinterpret_cast(&c); } // end anonymous namespace @@ -66,7 +66,7 @@ namespace BaseBaseMalformed { struct A; // expected-note {{forward declaration of 'BaseBaseMalformed::A'}} struct Y {}; - struct X { A a; }; // expected-error {{field has incomplete type 'BaseBaseMalformed::A'}} + struct X { A a; }; // expected-error {{field has incomplete type 'A'}} struct B : Y, X {}; struct C : B {} c; B *p = reinterpret_cast(&c); @@ -82,7 +82,7 @@ // Virtual base class outside upcast base-chain is malformed. namespace VBaseMalformed{ struct A; // expected-note {{forward declaration of 'VBaseMalformed::A'}} - struct X { A a; }; // expected-error {{field has incomplete type 'VBaseMalformed::A'}} + struct X { A a; }; // expected-error {{field has incomplete type 'A'}} struct B : public virtual X {}; struct C : B {} c; B *p = reinterpret_cast(&c); diff --git a/clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp b/clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp --- a/clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp +++ b/clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp @@ -91,7 +91,7 @@ struct S3 { }; struct S4: virtual S3, S2 { - S4() : S2(), // expected-warning {{base class 'T1::S2' will be initialized after base 'T1::S3'}} + S4() : S2(), // expected-warning {{base class 'S2' will be initialized after base 'S3'}} S3() { }; }; } diff --git a/clang/test/SemaCXX/warn-thread-safety-parsing.cpp b/clang/test/SemaCXX/warn-thread-safety-parsing.cpp --- a/clang/test/SemaCXX/warn-thread-safety-parsing.cpp +++ b/clang/test/SemaCXX/warn-thread-safety-parsing.cpp @@ -1485,7 +1485,7 @@ int a GUARDED_BY(mu1_); int b GUARDED_BY(mu2_); int c GUARDED_BY(mu3_); // \ - // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'InheritanceTest::Derived3'}} + // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Derived3'}} void foo() EXCLUSIVE_LOCKS_REQUIRED(mu1_, mu2_) { a = 0; diff --git a/clang/test/SemaObjCXX/arc-templates.mm b/clang/test/SemaObjCXX/arc-templates.mm --- a/clang/test/SemaObjCXX/arc-templates.mm +++ b/clang/test/SemaObjCXX/arc-templates.mm @@ -102,8 +102,8 @@ template struct make_weak_fail { typedef T T_type; - typedef __weak T_type type; // expected-error{{the type 'make_weak_fail<__weak id>::T_type' (aka '__weak id') is already explicitly ownership-qualified}} \ - // expected-error{{the type 'make_weak_fail::T_type' (aka '__strong id') is already explicitly ownership-qualified}} + typedef __weak T_type type; // expected-error{{the type 'T_type' (aka '__weak id') is already explicitly ownership-qualified}} \ + // expected-error{{the type 'T_type' (aka '__strong id') is already explicitly ownership-qualified}} }; int check_make_weak_fail0[is_same::type, __weak id>::value? 1 : -1]; // expected-note{{in instantiation of template class 'make_weak_fail<__weak id>' requested here}} diff --git a/clang/test/SemaObjCXX/blocks.mm b/clang/test/SemaObjCXX/blocks.mm --- a/clang/test/SemaObjCXX/blocks.mm +++ b/clang/test/SemaObjCXX/blocks.mm @@ -172,6 +172,6 @@ B1 test_move() { __block B0 b; - return b; // expected-error {{no viable conversion from returned value of type 'MoveBlockVariable::B0' to function return type 'MoveBlockVariable::B1'}} + return b; // expected-error {{no viable conversion from returned value of type 'B0' to function return type 'B1'}} } } diff --git a/clang/test/SemaSYCL/float128.cpp b/clang/test/SemaSYCL/float128.cpp --- a/clang/test/SemaSYCL/float128.cpp +++ b/clang/test/SemaSYCL/float128.cpp @@ -30,8 +30,8 @@ // expected-error@+2 {{'A' requires 128 bit size '__float128' type support, but target 'spir64' does not support it}} // expected-error@+1 {{'field1' requires 128 bit size '__float128' type support, but target 'spir64' does not support it}} C.field1 = A; - // expected-error@+2 {{expression requires 128 bit size 'Z::BIGTYPE' (aka '__float128') type support, but target 'spir64' does not support it}} - // expected-error@+1 {{'bigfield' requires 128 bit size 'Z::BIGTYPE' (aka '__float128') type support, but target 'spir64' does not support it}} + // expected-error@+2 {{expression requires 128 bit size 'BIGTYPE' (aka '__float128') type support, but target 'spir64' does not support it}} + // expected-error@+1 {{'bigfield' requires 128 bit size 'BIGTYPE' (aka '__float128') type support, but target 'spir64' does not support it}} C.bigfield += 1.0; // expected-error@+1 {{'A' requires 128 bit size '__float128' type support, but target 'spir64' does not support it}} diff --git a/clang/test/SemaSYCL/int128.cpp b/clang/test/SemaSYCL/int128.cpp --- a/clang/test/SemaSYCL/int128.cpp +++ b/clang/test/SemaSYCL/int128.cpp @@ -30,8 +30,8 @@ // expected-error@+2 {{'A' requires 128 bit size '__int128' type support, but target 'spir64' does not support it}} // expected-error@+1 {{'field1' requires 128 bit size '__int128' type support, but target 'spir64' does not support it}} C.field1 = A; - // expected-error@+2 {{expression requires 128 bit size 'Z::BIGTYPE' (aka '__int128') type support, but target 'spir64' does not support it}} - // expected-error@+1 {{'bigfield' requires 128 bit size 'Z::BIGTYPE' (aka '__int128') type support, but target 'spir64' does not support it}} + // expected-error@+2 {{expression requires 128 bit size 'BIGTYPE' (aka '__int128') type support, but target 'spir64' does not support it}} + // expected-error@+1 {{'bigfield' requires 128 bit size 'BIGTYPE' (aka '__int128') type support, but target 'spir64' does not support it}} C.bigfield += 1.0; // expected-error@+1 {{'A' requires 128 bit size '__int128' type support, but target 'spir64' does not support it}} diff --git a/clang/test/SemaTemplate/anonymous-union.cpp b/clang/test/SemaTemplate/anonymous-union.cpp --- a/clang/test/SemaTemplate/anonymous-union.cpp +++ b/clang/test/SemaTemplate/anonymous-union.cpp @@ -8,7 +8,7 @@ }; }; template -struct T1 : public T0, public T { //expected-warning{{direct base 'T0' is inaccessible due to ambiguity:\n struct T1 -> struct T0\n struct T1 -> struct A -> struct T0}} +struct T1 : public T0, public T { //expected-warning{{direct base 'T0' is inaccessible due to ambiguity:\n struct T1 -> T0\n struct T1 -> A -> T0}} void f0() { m0 = 0; // expected-error{{ambiguous conversion}} } diff --git a/clang/test/SemaTemplate/attributes.cpp b/clang/test/SemaTemplate/attributes.cpp --- a/clang/test/SemaTemplate/attributes.cpp +++ b/clang/test/SemaTemplate/attributes.cpp @@ -75,21 +75,21 @@ using Z = const C; // expected-note {{'Z' declared here}} template struct [[clang::preferred_name(C)]] C; // expected-error {{argument 'C' to 'preferred_name' attribute is not a typedef for a specialization of 'C'}} template struct [[clang::preferred_name(X), clang::preferred_name(Y)]] C; - template struct [[clang::preferred_name(const X)]] C; // expected-error {{argument 'const preferred_name::X'}} - template struct [[clang::preferred_name(Z)]] C; // expected-error {{argument 'preferred_name::Z' (aka 'const C')}} + template struct [[clang::preferred_name(const X)]] C; // expected-error {{argument 'const X'}} + template struct [[clang::preferred_name(Z)]] C; // expected-error {{argument 'Z' (aka 'const C')}} template struct C {}; // CHECK: ClassTemplateDecl {{.*}} , Ts (*)[Ns]...) -> A' dependent trailing_return // CHECK: |-InjectedClassNameType {{.*}} 'A' dependent -// CHECK: |-TemplateSpecializationType {{.*}} 'X' dependent X -// CHECK: | `-TemplateArgument expr -// CHECK: | `-PackExpansionExpr {{.*}} 'T *' -// CHECK: | `-DeclRefExpr {{.*}} 'T *' NonTypeTemplateParm {{.*}} 'Ps' 'T *' +// CHECK: |-ElaboratedType {{.*}} 'X' sugar dependent +// CHECK: | `-TemplateSpecializationType {{.*}} 'X' dependent X +// CHECK: | `-TemplateArgument expr +// CHECK: | `-PackExpansionExpr {{.*}} 'T *' +// CHECK: | `-DeclRefExpr {{.*}} 'T *' NonTypeTemplateParm {{.*}} 'Ps' 'T *' // CHECK: `-PackExpansionType {{.*}} 'Ts (*)[Ns]...' dependent // CHECK: `-PointerType {{.*}} 'Ts (*)[Ns]' dependent contains_unexpanded_pack // CHECK: `-ParenType {{.*}} 'Ts[Ns]' sugar dependent contains_unexpanded_pack @@ -117,8 +118,9 @@ // CHECK: |-InjectedClassNameType {{.*}} 'C' dependent // CHECK: |-TemplateTypeParmType {{.*}} 'A' dependent depth 0 index 0 // CHECK: | `-TemplateTypeParm {{.*}} 'A' -// CHECK: |-TemplateSpecializationType {{.*}} 'Y<>' dependent Y -// CHECK: | `-TemplateArgument template +// CHECK: |-ElaboratedType {{.*}} 'Y<>' sugar dependent +// CHECK: | `-TemplateSpecializationType {{.*}} 'Y<>' dependent Y +// CHECK: | `-TemplateArgument template // CHECK: `-TemplateTypeParmType {{.*}} 'type-parameter-0-2' dependent depth 0 index 2 template struct D { // expected-note {{candidate}} diff --git a/clang/test/SemaTemplate/default-expr-arguments-3.cpp b/clang/test/SemaTemplate/default-expr-arguments-3.cpp --- a/clang/test/SemaTemplate/default-expr-arguments-3.cpp +++ b/clang/test/SemaTemplate/default-expr-arguments-3.cpp @@ -4,7 +4,7 @@ // CHECK: FunctionDecl {{.*}} used func 'void ()' // CHECK-NEXT: TemplateArgument type 'int' // CHECK: LambdaExpr {{.*}} '(lambda at -// CHECK: ParmVarDecl {{.*}} used f 'foo' cinit +// CHECK: ParmVarDecl {{.*}} used f 'foo':'foo' cinit // CHECK-NEXT: DeclRefExpr {{.*}} 'foo' EnumConstant {{.*}} 'a' 'foo' namespace PR28795 { @@ -23,7 +23,7 @@ // CHECK: ClassTemplateSpecializationDecl {{.*}} struct class2 definition // CHECK: TemplateArgument type 'int' // CHECK: LambdaExpr {{.*}} '(lambda at -// CHECK: ParmVarDecl {{.*}} used f 'foo' cinit +// CHECK: ParmVarDecl {{.*}} used f 'foo':'foo' cinit // CHECK-NEXT: DeclRefExpr {{.*}} 'foo' EnumConstant {{.*}} 'a' 'foo' // Template struct case: @@ -41,7 +41,7 @@ // CHECK-NEXT: FunctionDecl {{.*}} f1 'void ()' // CHECK: FunctionDecl {{.*}} f1 'void ()' // CHECK-NEXT: TemplateArgument type 'int' -// CHECK: ParmVarDecl {{.*}} n 'foo' cinit +// CHECK: ParmVarDecl {{.*}} n 'foo':'foo' cinit // CHECK-NEXT: DeclRefExpr {{.*}} 'foo' EnumConstant {{.*}} 'a' 'foo' template diff --git a/clang/test/SemaTemplate/dependent-names.cpp b/clang/test/SemaTemplate/dependent-names.cpp --- a/clang/test/SemaTemplate/dependent-names.cpp +++ b/clang/test/SemaTemplate/dependent-names.cpp @@ -344,11 +344,11 @@ namespace rdar12629723 { template struct X { - struct C : public C { }; // expected-error{{circular inheritance between 'rdar12629723::X::C' and 'rdar12629723::X::C'}} + struct C : public C { }; // expected-error{{circular inheritance between 'C' and 'rdar12629723::X::C'}} struct B; - struct A : public B { // expected-note{{'rdar12629723::X::A' declared here}} + struct A : public B { // expected-note{{'A' declared here}} virtual void foo() { } }; @@ -357,7 +357,7 @@ }; template - struct X::B : public A { // expected-error{{circular inheritance between 'rdar12629723::X::A' and 'rdar12629723::X::B'}} + struct X::B : public A { // expected-error{{circular inheritance between 'A' and 'rdar12629723::X::B'}} virtual void foo() { } }; } diff --git a/clang/test/SemaTemplate/destructor-template.cpp b/clang/test/SemaTemplate/destructor-template.cpp --- a/clang/test/SemaTemplate/destructor-template.cpp +++ b/clang/test/SemaTemplate/destructor-template.cpp @@ -98,7 +98,7 @@ template ~S(); // expected-error{{destructor cannot be declared as a template}} }; -struct T : S { // expected-note{{destructor of 'T' is implicitly deleted because base class 'PR38671::S' has no destructor}} +struct T : S { // expected-note{{destructor of 'T' is implicitly deleted because base class 'S' has no destructor}} ~T() = default; // expected-warning{{explicitly defaulted destructor is implicitly deleted}} }; } // namespace PR38671 diff --git a/clang/test/SemaTemplate/instantiate-self.cpp b/clang/test/SemaTemplate/instantiate-self.cpp --- a/clang/test/SemaTemplate/instantiate-self.cpp +++ b/clang/test/SemaTemplate/instantiate-self.cpp @@ -5,7 +5,7 @@ namespace test1 { template struct A { struct B { // expected-note {{not complete until the closing '}'}} - B b; // expected-error {{has incomplete type 'test1::A::B'}} + B b; // expected-error {{has incomplete type 'B'}} }; B b; // expected-note {{in instantiation of}} }; diff --git a/clang/test/SemaTemplate/member-access-ambig.cpp b/clang/test/SemaTemplate/member-access-ambig.cpp --- a/clang/test/SemaTemplate/member-access-ambig.cpp +++ b/clang/test/SemaTemplate/member-access-ambig.cpp @@ -48,7 +48,7 @@ typedef int (A::*P); template struct S : T { void f() { - P(&T::X) // expected-error {{cannot cast from type 'int *' to member pointer type 'AddrOfMember::P'}} + P(&T::X) // expected-error {{cannot cast from type 'int *' to member pointer type 'P'}} == &A::X; } }; diff --git a/clang/test/SemaTemplate/member-access-expr.cpp b/clang/test/SemaTemplate/member-access-expr.cpp --- a/clang/test/SemaTemplate/member-access-expr.cpp +++ b/clang/test/SemaTemplate/member-access-expr.cpp @@ -156,7 +156,7 @@ void get(B **ptr) { // It's okay if at some point we figure out how to diagnose this // at instantiation time. - *ptr = field; // expected-error {{incompatible pointer types assigning to 'test6::B *' from 'test6::A *'}} + *ptr = field; // expected-error {{incompatible pointer types assigning to 'B *' from 'A *'}} } }; } diff --git a/clang/test/SemaTemplate/ms-lookup-template-base-classes.cpp b/clang/test/SemaTemplate/ms-lookup-template-base-classes.cpp --- a/clang/test/SemaTemplate/ms-lookup-template-base-classes.cpp +++ b/clang/test/SemaTemplate/ms-lookup-template-base-classes.cpp @@ -217,8 +217,8 @@ }; template struct C : T { - int foo() { return b; } // expected-error {{no member named 'b' in 'PR16014::C'}} expected-warning {{lookup into dependent bases}} - int *bar() { return &b; } // expected-error {{no member named 'b' in 'PR16014::C'}} expected-warning {{lookup into dependent bases}} + int foo() { return b; } // expected-error {{no member named 'b' in 'PR16014::C'}} expected-warning {{lookup into dependent bases}} + int *bar() { return &b; } // expected-error {{no member named 'b' in 'PR16014::C'}} expected-warning {{lookup into dependent bases}} int baz() { return T::b; } // expected-error {{no member named 'b' in 'PR16014::A'}} int T::*qux() { return &T::b; } // expected-error {{no member named 'b' in 'PR16014::A'}} int T::*fuz() { return &U::a; } // expected-error {{use of undeclared identifier 'U'}} \ diff --git a/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp b/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp --- a/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp +++ b/clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp @@ -131,7 +131,7 @@ struct X { constexpr operator int() { return 0; } } x; template struct C {}; - template int c(C); // expected-error {{value of type 'int' is not implicitly convertible to 'DeduceDifferentType::X &'}} + template int c(C); // expected-error {{value of type 'int' is not implicitly convertible to 'X &'}} int c_imp = c(C()); // expected-error {{no matching function}} int c_exp = c(C()); // expected-error {{no matching function}} diff --git a/clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp b/clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp --- a/clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp +++ b/clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp @@ -67,14 +67,14 @@ static_assert(&id == &id); static_assert(&id != &id); - int k = id<1>; // expected-error {{no viable conversion from 'int' to 'ClassNTTP::A'}} + int k = id<1>; // expected-error {{no viable conversion from 'int' to 'A'}} struct B { constexpr B() {} constexpr B(int) = delete; // expected-note {{here}} }; template struct Q {}; // expected-note {{passing argument to parameter here}} - Q<1> q; // expected-error {{conversion function from 'int' to 'ClassNTTP::B' invokes a deleted function}} + Q<1> q; // expected-error {{conversion function from 'int' to 'B' invokes a deleted function}} struct C { constexpr C() {} @@ -91,7 +91,7 @@ }; template struct X {}; void f(X<1.0f>) {} // OK, user-defined conversion - void f(X<2>) {} // expected-error {{conversion from 'int' to 'ConvertedConstant::A' is not allowed in a converted constant expression}} + void f(X<2>) {} // expected-error {{conversion from 'int' to 'A' is not allowed in a converted constant expression}} } namespace CopyCounting { diff --git a/clang/test/SemaTemplate/virtual-member-functions.cpp b/clang/test/SemaTemplate/virtual-member-functions.cpp --- a/clang/test/SemaTemplate/virtual-member-functions.cpp +++ b/clang/test/SemaTemplate/virtual-member-functions.cpp @@ -92,12 +92,12 @@ public: class Inner : public A { }; #if __cplusplus <= 199711L -// expected-error@-2{{base class 'PR7114::A' has private destructor}} +// expected-error@-2{{base class 'A' has private destructor}} #else // expected-error@-4 2 {{deleted function '~Inner' cannot override a non-deleted function}} -// expected-note@-5 2 {{destructor of 'Inner' is implicitly deleted because base class 'PR7114::A' has an inaccessible destructor}} +// expected-note@-5 2 {{destructor of 'Inner' is implicitly deleted because base class 'A' has an inaccessible destructor}} #ifdef MSABI -// expected-note@-7 1 {{destructor of 'Inner' is implicitly deleted because base class 'PR7114::A' has an inaccessible destructor}} +// expected-note@-7 1 {{destructor of 'Inner' is implicitly deleted because base class 'A' has an inaccessible destructor}} #endif #endif @@ -140,7 +140,7 @@ struct X : A { #if __cplusplus >= 201103L // expected-error@-2 {{deleted function '~X' cannot override a non-deleted function}} -// expected-note@-3 {{destructor of 'X' is implicitly deleted because base class 'PR7114::A' has an inaccessible destructor}} +// expected-note@-3 {{destructor of 'X' is implicitly deleted because base class 'A' has an inaccessible destructor}} #endif void f() { } }; diff --git a/clang/unittests/AST/ASTImporterTest.cpp b/clang/unittests/AST/ASTImporterTest.cpp --- a/clang/unittests/AST/ASTImporterTest.cpp +++ b/clang/unittests/AST/ASTImporterTest.cpp @@ -420,14 +420,15 @@ "typedef dummy declToImport;" "template class dummy;", Lang_CXX03, "", Lang_CXX03, Verifier, - typedefDecl(hasType(templateSpecializationType( + typedefDecl(hasType(elaboratedType(namesType(templateSpecializationType( hasDeclaration(classTemplateSpecializationDecl(hasSpecializedTemplate( - classTemplateDecl(hasTemplateDecl(cxxRecordDecl(hasMethod(allOf( - hasName("f"), - hasBody(compoundStmt(has(declStmt(hasSingleDecl( - varDecl(hasInitializer(parenListExpr(has(unaryOperator( - hasOperatorName("*"), - hasUnaryOperand(cxxThisExpr()))))))))))))))))))))))); + classTemplateDecl(hasTemplateDecl(cxxRecordDecl(hasMethod( + allOf(hasName("f"), + hasBody(compoundStmt(has(declStmt(hasSingleDecl(varDecl( + hasInitializer(parenListExpr(has(unaryOperator( + hasOperatorName("*"), + hasUnaryOperand( + cxxThisExpr()))))))))))))))))))))))))); } TEST_P(ImportExpr, ImportSwitch) { @@ -514,20 +515,19 @@ TEST_P(ImportExpr, ImportInitListExpr) { MatchVerifier Verifier; - testImport( - "void declToImport() {" - " struct point { double x; double y; };" - " point ptarray[10] = { [2].y = 1.0, [2].x = 2.0," - " [0].x = 1.0 }; }", - Lang_CXX03, "", Lang_CXX03, Verifier, - functionDecl(hasDescendant(initListExpr( - has(cxxConstructExpr(requiresZeroInitialization())), - has(initListExpr( - hasType(asString("struct point")), has(floatLiteral(equals(1.0))), - has(implicitValueInitExpr(hasType(asString("double")))))), - has(initListExpr(hasType(asString("struct point")), - has(floatLiteral(equals(2.0))), - has(floatLiteral(equals(1.0))))))))); + testImport("void declToImport() {" + " struct point { double x; double y; };" + " point ptarray[10] = { [2].y = 1.0, [2].x = 2.0," + " [0].x = 1.0 }; }", + Lang_CXX03, "", Lang_CXX03, Verifier, + functionDecl(hasDescendant(initListExpr( + has(cxxConstructExpr(requiresZeroInitialization())), + has(initListExpr( + hasType(asString("point")), has(floatLiteral(equals(1.0))), + has(implicitValueInitExpr(hasType(asString("double")))))), + has(initListExpr(hasType(asString("point")), + has(floatLiteral(equals(2.0))), + has(floatLiteral(equals(1.0))))))))); } @@ -656,7 +656,8 @@ "class C { public: C(T); };" "C declToImport(123);", Lang_CXX17, "", Lang_CXX17, Verifier, - varDecl(hasType(deducedTemplateSpecializationType()))); + varDecl(hasType(elaboratedType( + namesType(deducedTemplateSpecializationType()))))); } const internal::VariadicDynCastAllOfMatcher @@ -6950,7 +6951,7 @@ ParmVarDecl *Param = Guide->getParamDecl(0); // The type of the first param (which is a typedef) should match the typedef // in the global scope. - EXPECT_EQ(Param->getType()->castAs()->getDecl(), Typedef); + EXPECT_EQ(Param->getType()->getAs()->getDecl(), Typedef); } TEST_P(CTAD, DeductionGuideShouldReferToANonLocalTypedefInParamPtr) { @@ -6991,7 +6992,7 @@ auto *Typedef = FirstDeclMatcher().match( TU, typedefNameDecl(hasName("U"))); ParmVarDecl *Param = Guide->getParamDecl(0); - EXPECT_NE(Param->getType()->castAs()->getDecl(), Typedef); + EXPECT_NE(Param->getType()->getAs()->getDecl(), Typedef); } INSTANTIATE_TEST_SUITE_P(ParameterizedTests, CTAD, diff --git a/clang/unittests/AST/ASTTraverserTest.cpp b/clang/unittests/AST/ASTTraverserTest.cpp --- a/clang/unittests/AST/ASTTraverserTest.cpp +++ b/clang/unittests/AST/ASTTraverserTest.cpp @@ -1171,9 +1171,9 @@ CXXRecordDecl 'Record' |-CXXRecordDecl 'Record' |-CXXConstructorDecl 'Record' -| |-CXXCtorInitializer 'struct Simple' +| |-CXXCtorInitializer 'Simple' | | `-CXXConstructExpr -| |-CXXCtorInitializer 'struct Other' +| |-CXXCtorInitializer 'Other' | | `-CXXConstructExpr | |-CXXCtorInitializer 'm_i' | | `-IntegerLiteral @@ -1194,7 +1194,7 @@ R"cpp( CXXRecordDecl 'Record' |-CXXConstructorDecl 'Record' -| |-CXXCtorInitializer 'struct Simple' +| |-CXXCtorInitializer 'Simple' | | `-CXXConstructExpr | |-CXXCtorInitializer 'm_i' | | `-IntegerLiteral diff --git a/clang/unittests/AST/TypePrinterTest.cpp b/clang/unittests/AST/TypePrinterTest.cpp --- a/clang/unittests/AST/TypePrinterTest.cpp +++ b/clang/unittests/AST/TypePrinterTest.cpp @@ -60,6 +60,6 @@ [](PrintingPolicy &Policy) { Policy.FullyQualifiedName = false; })); ASSERT_TRUE(PrintedTypeMatches( - Code, {}, Matcher, "const N::Type &", + Code, {}, Matcher, "const Type &", [](PrintingPolicy &Policy) { Policy.FullyQualifiedName = true; })); -} \ No newline at end of file +} diff --git a/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp --- a/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp +++ b/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp @@ -1348,15 +1348,14 @@ EXPECT_TRUE( matches("class Y { public: void x(); }; void z() {Y* y; y->x(); }", - cxxMemberCallExpr(on(hasType(asString("class Y *")))))); + cxxMemberCallExpr(on(hasType(asString("Y *")))))); EXPECT_TRUE( matches("class X { void x(int x) {} };", cxxMethodDecl(hasParameter(0, hasType(asString("int")))))); EXPECT_TRUE(matches("namespace ns { struct A {}; } struct B { ns::A a; };", fieldDecl(hasType(asString("ns::A"))))); - EXPECT_TRUE( - matches("namespace { struct A {}; } struct B { A a; };", - fieldDecl(hasType(asString("struct (anonymous namespace)::A"))))); + EXPECT_TRUE(matches("namespace { struct A {}; } struct B { A a; };", + fieldDecl(hasType(asString("A"))))); } TEST_P(ASTMatchersTest, HasOverloadedOperatorName) { @@ -2078,9 +2077,10 @@ EXPECT_TRUE(matches( Code, cxxDependentScopeMemberExpr( - hasObjectExpression(declRefExpr(hasType(templateSpecializationType( - hasDeclaration(classTemplateDecl(has(cxxRecordDecl( - has(cxxMethodDecl(hasName("mem")).bind("templMem")))))))))), + hasObjectExpression(declRefExpr(hasType(elaboratedType(namesType( + templateSpecializationType(hasDeclaration(classTemplateDecl( + has(cxxRecordDecl(has(cxxMethodDecl(hasName("mem")) + .bind("templMem")))))))))))), memberHasSameNameAsBoundNode("templMem")))); EXPECT_TRUE( @@ -2098,9 +2098,10 @@ EXPECT_TRUE(matches( Code, cxxDependentScopeMemberExpr( - hasObjectExpression(declRefExpr(hasType(templateSpecializationType( - hasDeclaration(classTemplateDecl(has(cxxRecordDecl( - has(fieldDecl(hasName("mem")).bind("templMem")))))))))), + hasObjectExpression(declRefExpr( + hasType(elaboratedType(namesType(templateSpecializationType( + hasDeclaration(classTemplateDecl(has(cxxRecordDecl(has( + fieldDecl(hasName("mem")).bind("templMem")))))))))))), memberHasSameNameAsBoundNode("templMem")))); } @@ -2115,9 +2116,10 @@ EXPECT_TRUE(matches( Code, cxxDependentScopeMemberExpr( - hasObjectExpression(declRefExpr(hasType(templateSpecializationType( - hasDeclaration(classTemplateDecl(has(cxxRecordDecl( - has(varDecl(hasName("mem")).bind("templMem")))))))))), + hasObjectExpression(declRefExpr( + hasType(elaboratedType(namesType(templateSpecializationType( + hasDeclaration(classTemplateDecl(has(cxxRecordDecl( + has(varDecl(hasName("mem")).bind("templMem")))))))))))), memberHasSameNameAsBoundNode("templMem")))); } { diff --git a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp --- a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp +++ b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp @@ -1798,7 +1798,8 @@ TEST_P(ASTMatchersTest, TypedefType) { EXPECT_TRUE(matches("typedef int X; X a;", - varDecl(hasName("a"), hasType(typedefType())))); + varDecl(hasName("a"), hasType(elaboratedType( + namesType(typedefType())))))); } TEST_P(ASTMatchersTest, TemplateSpecializationType) { @@ -1847,7 +1848,7 @@ "N::M::D d;", elaboratedType())); EXPECT_TRUE(matches("class C {} c;", elaboratedType())); - EXPECT_TRUE(notMatches("class C {}; C c;", elaboratedType())); + EXPECT_TRUE(matches("class C {}; C c;", elaboratedType())); } TEST_P(ASTMatchersTest, SubstTemplateTypeParmType) { @@ -2168,7 +2169,8 @@ } EXPECT_TRUE(matches( "template class C {}; C var;", - varDecl(hasName("var"), hasTypeLoc(templateSpecializationTypeLoc())))); + varDecl(hasName("var"), hasTypeLoc(elaboratedTypeLoc(hasNamedTypeLoc( + templateSpecializationTypeLoc())))))); } TEST_P( @@ -2207,13 +2209,12 @@ } TEST_P(ASTMatchersTest, - ElaboratedTypeLocTest_DoesNotBindToNonElaboratedObjectDeclaration) { + ElaboratedTypeLocTest_BindsToBareElaboratedObjectDeclaration) { if (!GetParam().isCXX()) { return; } - EXPECT_TRUE( - notMatches("class C {}; C c;", - varDecl(hasName("c"), hasTypeLoc(elaboratedTypeLoc())))); + EXPECT_TRUE(matches("class C {}; C c;", + varDecl(hasName("c"), hasTypeLoc(elaboratedTypeLoc())))); } TEST_P( @@ -2222,19 +2223,17 @@ if (!GetParam().isCXX()) { return; } - EXPECT_TRUE( - notMatches("namespace N { class D {}; } using N::D; D d;", - varDecl(hasName("d"), hasTypeLoc(elaboratedTypeLoc())))); + EXPECT_TRUE(matches("namespace N { class D {}; } using N::D; D d;", + varDecl(hasName("d"), hasTypeLoc(elaboratedTypeLoc())))); } TEST_P(ASTMatchersTest, - ElaboratedTypeLocTest_DoesNotBindToNonElaboratedStructDeclaration) { + ElaboratedTypeLocTest_BindsToBareElaboratedStructDeclaration) { if (!GetParam().isCXX()) { return; } - EXPECT_TRUE( - notMatches("struct s {}; s ss;", - varDecl(hasName("ss"), hasTypeLoc(elaboratedTypeLoc())))); + EXPECT_TRUE(matches("struct s {}; s ss;", + varDecl(hasName("ss"), hasTypeLoc(elaboratedTypeLoc())))); } TEST(ASTMatchersTestObjC, ObjCMessageExpr) { diff --git a/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp --- a/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp +++ b/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp @@ -187,13 +187,15 @@ parmVarDecl(hasType(namedDecl(hasName("T")))))); // InjectedClassNameType EXPECT_TRUE(matches("template struct S {" - " void f(S s);" - "};", - parmVarDecl(hasType(injectedClassNameType())))); + " void f(S s);" + "};", + parmVarDecl(hasType(elaboratedType( + namesType(injectedClassNameType())))))); EXPECT_TRUE(notMatches("template struct S {" - " void g(S s);" - "};", - parmVarDecl(hasType(injectedClassNameType())))); + " void g(S s);" + "};", + parmVarDecl(hasType(elaboratedType( + namesType(injectedClassNameType())))))); // InjectedClassNameType -> CXXRecordDecl EXPECT_TRUE(matches("template struct S {" " void f(S s);" @@ -243,24 +245,28 @@ } TEST(HasDeclaration, HasDeclarationOfTypeWithDecl) { - EXPECT_TRUE(matches("typedef int X; X a;", - varDecl(hasName("a"), - hasType(typedefType(hasDeclaration(decl())))))); + EXPECT_TRUE(matches( + "typedef int X; X a;", + varDecl(hasName("a"), hasType(elaboratedType(namesType( + typedefType(hasDeclaration(decl())))))))); // FIXME: Add tests for other types with getDecl() (e.g. RecordType) } TEST(HasDeclaration, HasDeclarationOfTemplateSpecializationType) { - EXPECT_TRUE(matches("template class A {}; A a;", - varDecl(hasType(templateSpecializationType( - hasDeclaration(namedDecl(hasName("A")))))))); - EXPECT_TRUE(matches("template class A {};" - "template class B { A a; };", - fieldDecl(hasType(templateSpecializationType( - hasDeclaration(namedDecl(hasName("A")))))))); - EXPECT_TRUE(matches("template class A {}; A a;", - varDecl(hasType(templateSpecializationType( - hasDeclaration(cxxRecordDecl())))))); + EXPECT_TRUE(matches( + "template class A {}; A a;", + varDecl(hasType(elaboratedType(namesType(templateSpecializationType( + hasDeclaration(namedDecl(hasName("A")))))))))); + EXPECT_TRUE(matches( + "template class A {};" + "template class B { A a; };", + fieldDecl(hasType(elaboratedType(namesType(templateSpecializationType( + hasDeclaration(namedDecl(hasName("A")))))))))); + EXPECT_TRUE(matches( + "template class A {}; A a;", + varDecl(hasType(elaboratedType(namesType( + templateSpecializationType(hasDeclaration(cxxRecordDecl())))))))); } TEST(HasDeclaration, HasDeclarationOfCXXNewExpr) { @@ -270,9 +276,10 @@ } TEST(HasDeclaration, HasDeclarationOfTypeAlias) { - EXPECT_TRUE(matches("template using C = T; C c;", - varDecl(hasType(templateSpecializationType( - hasDeclaration(typeAliasTemplateDecl())))))); + EXPECT_TRUE(matches( + "template using C = T; C c;", + varDecl(hasType(elaboratedType(namesType(templateSpecializationType( + hasDeclaration(typeAliasTemplateDecl())))))))); } TEST(HasUnqualifiedDesugaredType, DesugarsUsing) { @@ -393,9 +400,9 @@ )cpp"; EXPECT_TRUE(matches( - code, cxxRecordDecl(hasAnyBase(hasTypeLoc(loc(asString("class Foo"))))))); - EXPECT_TRUE(matches( - code, cxxCtorInitializer(hasTypeLoc(loc(asString("class Foo")))))); + code, cxxRecordDecl(hasAnyBase(hasTypeLoc(loc(asString("Foo"))))))); + EXPECT_TRUE( + matches(code, cxxCtorInitializer(hasTypeLoc(loc(asString("Foo")))))); } TEST(HasTypeLoc, MatchesCXXFunctionalCastExpr) { @@ -407,13 +414,13 @@ EXPECT_TRUE(matches("auto* x = new int(3);", cxxNewExpr(hasTypeLoc(loc(asString("int")))))); EXPECT_TRUE(matches("class Foo{}; auto* x = new Foo();", - cxxNewExpr(hasTypeLoc(loc(asString("class Foo")))))); + cxxNewExpr(hasTypeLoc(loc(asString("Foo")))))); } TEST(HasTypeLoc, MatchesCXXTemporaryObjectExpr) { EXPECT_TRUE( matches("struct Foo { Foo(int, int); }; auto x = Foo(1, 2);", - cxxTemporaryObjectExpr(hasTypeLoc(loc(asString("struct Foo")))))); + cxxTemporaryObjectExpr(hasTypeLoc(loc(asString("Foo")))))); } TEST(HasTypeLoc, MatchesCXXUnresolvedConstructExpr) { @@ -439,9 +446,8 @@ varDecl(hasName("x"), hasTypeLoc(loc(asString("int")))))); EXPECT_TRUE(matches("int x(3);", varDecl(hasName("x"), hasTypeLoc(loc(asString("int")))))); - EXPECT_TRUE( - matches("struct Foo { Foo(int, int); }; Foo x(1, 2);", - varDecl(hasName("x"), hasTypeLoc(loc(asString("struct Foo")))))); + EXPECT_TRUE(matches("struct Foo { Foo(int, int); }; Foo x(1, 2);", + varDecl(hasName("x"), hasTypeLoc(loc(asString("Foo")))))); // Make sure we don't crash on implicit constructors. EXPECT_TRUE(notMatches("class X {}; X x;", @@ -5979,19 +5985,21 @@ } TEST(HasAnyTemplateArgumentLoc, BindsToSpecializationWithIntArgument) { - EXPECT_TRUE( - matches("template class A {}; A a;", - varDecl(hasName("a"), hasTypeLoc(templateSpecializationTypeLoc( - hasAnyTemplateArgumentLoc(hasTypeLoc( - loc(asString("int"))))))))); + EXPECT_TRUE(matches( + "template class A {}; A a;", + varDecl(hasName("a"), + hasTypeLoc(elaboratedTypeLoc(hasNamedTypeLoc( + templateSpecializationTypeLoc(hasAnyTemplateArgumentLoc( + hasTypeLoc(loc(asString("int"))))))))))); } TEST(HasAnyTemplateArgumentLoc, BindsToSpecializationWithDoubleArgument) { - EXPECT_TRUE( - matches("template class A {}; A a;", - varDecl(hasName("a"), hasTypeLoc(templateSpecializationTypeLoc( - hasAnyTemplateArgumentLoc(hasTypeLoc( - loc(asString("double"))))))))); + EXPECT_TRUE(matches( + "template class A {}; A a;", + varDecl(hasName("a"), + hasTypeLoc(elaboratedTypeLoc(hasNamedTypeLoc( + templateSpecializationTypeLoc(hasAnyTemplateArgumentLoc( + hasTypeLoc(loc(asString("double"))))))))))); } TEST(HasAnyTemplateArgumentLoc, BindsToExplicitSpecializationWithIntArgument) { @@ -6051,19 +6059,21 @@ } TEST(HasTemplateArgumentLoc, BindsToSpecializationWithIntArgument) { - EXPECT_TRUE(matches( - "template class A {}; A a;", - varDecl(hasName("a"), - hasTypeLoc(templateSpecializationTypeLoc(hasTemplateArgumentLoc( - 0, hasTypeLoc(loc(asString("int"))))))))); + EXPECT_TRUE( + matches("template class A {}; A a;", + varDecl(hasName("a"), + hasTypeLoc(elaboratedTypeLoc(hasNamedTypeLoc( + templateSpecializationTypeLoc(hasTemplateArgumentLoc( + 0, hasTypeLoc(loc(asString("int"))))))))))); } TEST(HasTemplateArgumentLoc, BindsToSpecializationWithDoubleArgument) { - EXPECT_TRUE(matches( - "template class A {}; A a;", - varDecl(hasName("a"), - hasTypeLoc(templateSpecializationTypeLoc(hasTemplateArgumentLoc( - 0, hasTypeLoc(loc(asString("double"))))))))); + EXPECT_TRUE( + matches("template class A {}; A a;", + varDecl(hasName("a"), + hasTypeLoc(elaboratedTypeLoc(hasNamedTypeLoc( + templateSpecializationTypeLoc(hasTemplateArgumentLoc( + 0, hasTypeLoc(loc(asString("double"))))))))))); } TEST(HasTemplateArgumentLoc, BindsToExplicitSpecializationWithIntArgument) { @@ -6201,7 +6211,7 @@ } TEST(HasNamedTypeLoc, DoesNotBindToNonElaboratedObjectDeclaration) { - EXPECT_TRUE(notMatches( + EXPECT_TRUE(matches( R"( template class C {}; diff --git a/clang/unittests/Introspection/IntrospectionTest.cpp b/clang/unittests/Introspection/IntrospectionTest.cpp --- a/clang/unittests/Introspection/IntrospectionTest.cpp +++ b/clang/unittests/Introspection/IntrospectionTest.cpp @@ -780,13 +780,23 @@ EXPECT_THAT( ExpectedLocations, UnorderedElementsAre( -STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getAs().getNameLoc()), STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getBeginLoc()), STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getEndLoc()), +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getAs().getNamedTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getAs().getNamedTypeLoc().getEndLoc()), +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getNextTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getNextTypeLoc().getEndLoc()), +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getAs().getNamedTypeLoc().getAs().getNameLoc()), +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getNextTypeLoc().getAs().getNameLoc()), STRING_LOCATION_PAIR(CtorInit, getLParenLoc()), STRING_LOCATION_PAIR(CtorInit, getRParenLoc()), STRING_LOCATION_PAIR(CtorInit, getSourceLocation()), -STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNameLoc()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getAs().getNameLoc()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getAs().getNameLoc()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getEndLoc()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getEndLoc()), STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getBeginLoc()), STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getEndLoc()) )); @@ -798,11 +808,17 @@ EXPECT_THAT( ExpectedRanges, UnorderedElementsAre( - STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getLocalSourceRange()), - STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getSourceRange()), - STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getLocalSourceRange()), - STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getSourceRange()), - STRING_LOCATION_PAIR(CtorInit, getSourceRange()))); +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getNextTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getNextTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getAs().getNamedTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getAs().getNamedTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getSourceRange()))); // clang-format on } @@ -882,26 +898,31 @@ STRING_LOCATION_PAIR(CtorInit, getLParenLoc()), STRING_LOCATION_PAIR(CtorInit, getRParenLoc()), STRING_LOCATION_PAIR(CtorInit, getSourceLocation()), -STRING_LOCATION_PAIR(CtorInit, - getTypeSourceInfo()->getTypeLoc().getBeginLoc()), -STRING_LOCATION_PAIR(CtorInit, - getTypeSourceInfo()->getTypeLoc().getEndLoc()), -STRING_LOCATION_PAIR(CtorInit, - getTypeSourceInfo()->getTypeLoc().getAs().getNameLoc()) +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getEndLoc()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getEndLoc()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getEndLoc()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getAs().getNameLoc()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getAs().getNameLoc()) )); // clang-format on auto ExpectedRanges = FormatExpected(Result.RangeAccessors); + // clang-format off EXPECT_THAT( ExpectedRanges, UnorderedElementsAre( - STRING_LOCATION_PAIR(CtorInit, getSourceRange()), - STRING_LOCATION_PAIR( - CtorInit, - getTypeSourceInfo()->getTypeLoc().getLocalSourceRange()), - STRING_LOCATION_PAIR( - CtorInit, getTypeSourceInfo()->getTypeLoc().getSourceRange()))); +STRING_LOCATION_PAIR(CtorInit, getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getSourceRange()) + )); + // clang-format on } TEST(Introspection, SourceLocations_CXXCtorInitializer_pack) { @@ -943,38 +964,57 @@ EXPECT_EQ( llvm::makeArrayRef(ExpectedLocations), (ArrayRef>{ -STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getAs().getLAngleLoc()), -STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getAs().getRAngleLoc()), -STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getAs().getTemplateNameLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getAs().getNamedTypeLoc().getAs().getLAngleLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getAs().getNamedTypeLoc().getAs().getRAngleLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getAs().getNamedTypeLoc().getAs().getTemplateNameLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getAs().getNamedTypeLoc().getBeginLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getAs().getNamedTypeLoc().getEndLoc()), STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getBeginLoc()), STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getEndLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getNextTypeLoc().getAs().getLAngleLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getNextTypeLoc().getAs().getRAngleLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getNextTypeLoc().getAs().getTemplateNameLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getNextTypeLoc().getBeginLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getBaseClassLoc().getNextTypeLoc().getEndLoc()), STRING_LOCATION_STDPAIR(CtorInit, getEllipsisLoc()), STRING_LOCATION_STDPAIR(CtorInit, getLParenLoc()), STRING_LOCATION_STDPAIR(CtorInit, getMemberLocation()), STRING_LOCATION_STDPAIR(CtorInit, getRParenLoc()), STRING_LOCATION_STDPAIR(CtorInit, getSourceLocation()), -STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getLAngleLoc()), -STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getRAngleLoc()), -STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getTemplateNameLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getAs().getLAngleLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getAs().getRAngleLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getAs().getTemplateNameLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getBeginLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getEndLoc()), STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getBeginLoc()), -STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getEndLoc()) +STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getEndLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getAs().getLAngleLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getAs().getRAngleLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getAs().getTemplateNameLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getBeginLoc()), +STRING_LOCATION_STDPAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getEndLoc()) })); // clang-format on auto ExpectedRanges = FormatExpected(Result.RangeAccessors); + // clang-format off EXPECT_THAT( ExpectedRanges, UnorderedElementsAre( - STRING_LOCATION_PAIR(CtorInit, - getBaseClassLoc().getLocalSourceRange()), - STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getSourceRange()), - STRING_LOCATION_PAIR(CtorInit, getSourceRange()), - STRING_LOCATION_PAIR( - CtorInit, - getTypeSourceInfo()->getTypeLoc().getLocalSourceRange()), - STRING_LOCATION_PAIR( - CtorInit, getTypeSourceInfo()->getTypeLoc().getSourceRange()))); +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getAs().getNamedTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getNextTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getAs().getNamedTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getBaseClassLoc().getNextTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getTypeSourceInfo()->getTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(CtorInit, getSourceRange()) + )); + // clang-format on } TEST(Introspection, SourceLocations_CXXBaseSpecifier_plain) { @@ -991,7 +1031,7 @@ auto BoundNodes = ast_matchers::match( decl(hasDescendant(cxxRecordDecl(hasDirectBase( - cxxBaseSpecifier(hasType(asString("class A"))).bind("base"))))), + cxxBaseSpecifier(hasType(asString("A"))).bind("base"))))), TU, Ctx); EXPECT_EQ(BoundNodes.size(), 1u); @@ -1007,11 +1047,17 @@ EXPECT_THAT(ExpectedLocations, UnorderedElementsAre( STRING_LOCATION_PAIR(Base, getBaseTypeLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getBeginLoc()), STRING_LOCATION_PAIR(Base, getBeginLoc()), -STRING_LOCATION_PAIR(Base, getEndLoc()), -STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNameLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getElaboratedKeywordLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getEndLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getEndLoc()), STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getEndLoc()), -STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getBeginLoc()) +STRING_LOCATION_PAIR(Base, getEndLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getAs().getNameLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getAs().getNameLoc()) )); // clang-format on @@ -1019,9 +1065,13 @@ // clang-format off EXPECT_THAT(ExpectedRanges, UnorderedElementsAre( -STRING_LOCATION_PAIR(Base, getSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getSourceRange()), STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getSourceRange()), -STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getLocalSourceRange()) +STRING_LOCATION_PAIR(Base, getSourceRange()) )); // clang-format on } @@ -1040,7 +1090,7 @@ auto BoundNodes = ast_matchers::match( decl(hasDescendant(cxxRecordDecl(hasDirectBase( - cxxBaseSpecifier(hasType(asString("class A"))).bind("base"))))), + cxxBaseSpecifier(hasType(asString("A"))).bind("base"))))), TU, Ctx); EXPECT_EQ(BoundNodes.size(), 1u); @@ -1055,12 +1105,18 @@ // clang-format off EXPECT_THAT(ExpectedLocations, UnorderedElementsAre( -STRING_LOCATION_PAIR(Base, getBaseTypeLoc()), STRING_LOCATION_PAIR(Base, getBeginLoc()), -STRING_LOCATION_PAIR(Base, getEndLoc()), -STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNameLoc()), +STRING_LOCATION_PAIR(Base, getBaseTypeLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getElaboratedKeywordLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getEndLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getEndLoc()), STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getEndLoc()), -STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getBeginLoc()) +STRING_LOCATION_PAIR(Base, getEndLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getAs().getNameLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getAs().getNameLoc()) )); // clang-format on @@ -1069,7 +1125,11 @@ // clang-format off EXPECT_THAT(ExpectedRanges, UnorderedElementsAre( STRING_LOCATION_PAIR(Base, getSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getLocalSourceRange()), STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getSourceRange()), STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getSourceRange()) )); // clang-format on @@ -1090,7 +1150,7 @@ auto BoundNodes = ast_matchers::match( decl(hasDescendant(cxxRecordDecl(hasDirectBase( - cxxBaseSpecifier(hasType(asString("class A"))).bind("base"))))), + cxxBaseSpecifier(hasType(asString("A"))).bind("base"))))), TU, Ctx); EXPECT_EQ(BoundNodes.size(), 1u); @@ -1106,11 +1166,17 @@ EXPECT_THAT(ExpectedLocations, UnorderedElementsAre( STRING_LOCATION_PAIR(Base, getBaseTypeLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getBeginLoc()), STRING_LOCATION_PAIR(Base, getBeginLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getElaboratedKeywordLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getEndLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getEndLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getEndLoc()), STRING_LOCATION_PAIR(Base, getEndLoc()), -STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getBeginLoc()), -STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNameLoc()), -STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getEndLoc()) +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getAs().getNameLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getAs().getNameLoc()) )); // clang-format on @@ -1118,9 +1184,13 @@ // clang-format off EXPECT_THAT(ExpectedRanges, UnorderedElementsAre( -STRING_LOCATION_PAIR(Base, getSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getSourceRange()), STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getSourceRange()), -STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getLocalSourceRange()) +STRING_LOCATION_PAIR(Base, getSourceRange()) )); // clang-format on } @@ -1156,13 +1226,20 @@ EXPECT_THAT(ExpectedLocations, UnorderedElementsAre( STRING_LOCATION_PAIR(Base, getBaseTypeLoc()), -STRING_LOCATION_PAIR(Base, getBeginLoc()), -STRING_LOCATION_PAIR(Base, getEndLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getBeginLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getBeginLoc()), STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getBeginLoc()), -STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getTemplateNameLoc()), -STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getLAngleLoc()), +STRING_LOCATION_PAIR(Base, getBeginLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getAs().getTemplateNameLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getAs().getTemplateNameLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getAs().getLAngleLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getAs().getLAngleLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getEndLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getEndLoc()), STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getEndLoc()), -STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getRAngleLoc()) +STRING_LOCATION_PAIR(Base, getEndLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getAs().getRAngleLoc()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getAs().getRAngleLoc()) )); // clang-format on @@ -1170,9 +1247,12 @@ // clang-format off EXPECT_THAT(ExpectedRanges, UnorderedElementsAre( -STRING_LOCATION_PAIR(Base, getSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getLocalSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getAs().getNamedTypeLoc().getSourceRange()), +STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getNextTypeLoc().getSourceRange()), STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getSourceRange()), -STRING_LOCATION_PAIR(Base, getTypeSourceInfo()->getTypeLoc().getLocalSourceRange()) +STRING_LOCATION_PAIR(Base, getSourceRange()) )); // clang-format on } diff --git a/clang/unittests/Sema/CodeCompleteTest.cpp b/clang/unittests/Sema/CodeCompleteTest.cpp --- a/clang/unittests/Sema/CodeCompleteTest.cpp +++ b/clang/unittests/Sema/CodeCompleteTest.cpp @@ -250,7 +250,7 @@ a | ^1; a & ^1; } )cpp"; - EXPECT_THAT(collectPreferredTypes(Code), Each("enum A")); + EXPECT_THAT(collectPreferredTypes(Code), Each("A")); Code = R"cpp( enum class A {}; @@ -260,7 +260,7 @@ a | ^a; a & ^a; } )cpp"; - EXPECT_THAT(collectPreferredTypes(Code), Each("enum A")); + EXPECT_THAT(collectPreferredTypes(Code), Each("A")); // Binary shifts. Code = R"cpp( @@ -296,7 +296,7 @@ c = ^c; c += ^c; c -= ^c; c *= ^c; c /= ^c; c %= ^c; } )cpp"; - EXPECT_THAT(collectPreferredTypes(Code), Each("class Cls")); + EXPECT_THAT(collectPreferredTypes(Code), Each("Cls")); Code = R"cpp( class Cls {}; diff --git a/clang/unittests/StaticAnalyzer/SValTest.cpp b/clang/unittests/StaticAnalyzer/SValTest.cpp --- a/clang/unittests/StaticAnalyzer/SValTest.cpp +++ b/clang/unittests/StaticAnalyzer/SValTest.cpp @@ -297,7 +297,10 @@ ASSERT_TRUE(LD.hasValue()); auto LDT = LD->getType(Context); ASSERT_FALSE(LDT.isNull()); - const auto *DRecordType = dyn_cast(LDT); + const auto *DElaboratedType = dyn_cast(LDT); + ASSERT_NE(DElaboratedType, nullptr); + const auto *DRecordType = + dyn_cast(DElaboratedType->getNamedType()); ASSERT_NE(DRecordType, nullptr); EXPECT_EQ("TestStruct", DRecordType->getDecl()->getName()); } diff --git a/clang/unittests/StaticAnalyzer/TestReturnValueUnderConstruction.cpp b/clang/unittests/StaticAnalyzer/TestReturnValueUnderConstruction.cpp --- a/clang/unittests/StaticAnalyzer/TestReturnValueUnderConstruction.cpp +++ b/clang/unittests/StaticAnalyzer/TestReturnValueUnderConstruction.cpp @@ -38,7 +38,8 @@ const auto *RetReg = cast(RetVal->getAsRegion()); const Expr *OrigExpr = Call.getOriginExpr(); - ASSERT_EQ(OrigExpr->getType(), RetReg->getValueType()); + ASSERT_EQ(OrigExpr->getType()->getCanonicalTypeInternal(), + RetReg->getValueType()->getCanonicalTypeInternal()); } }; diff --git a/clang/unittests/Tooling/RecursiveASTVisitorTestTypeLocVisitor.cpp b/clang/unittests/Tooling/RecursiveASTVisitorTestTypeLocVisitor.cpp --- a/clang/unittests/Tooling/RecursiveASTVisitorTestTypeLocVisitor.cpp +++ b/clang/unittests/Tooling/RecursiveASTVisitorTestTypeLocVisitor.cpp @@ -45,7 +45,7 @@ TEST(RecursiveASTVisitor, VisitsCXXBaseSpecifiersOfSelfReferentialType) { TypeLocVisitor Visitor; - Visitor.ExpectMatch("X", 2, 18); + Visitor.ExpectMatch("X", 2, 18, 2); EXPECT_TRUE(Visitor.runOver( "template class X {};\n" "class Y : public X {};")); diff --git a/clang/unittests/Tooling/StencilTest.cpp b/clang/unittests/Tooling/StencilTest.cpp --- a/clang/unittests/Tooling/StencilTest.cpp +++ b/clang/unittests/Tooling/StencilTest.cpp @@ -40,6 +40,7 @@ S* operator->() const; S& operator*() const; }; + template T desugar() { return T(); }; )cc"; return (Preface + ExtraPreface + "auto stencil_test_snippet = []{" + StatementCode + "};") @@ -559,7 +560,7 @@ TEST_F(StencilTest, DescribeUnqualifiedType) { std::string Snippet = "using N::C; C c; c;"; - std::string Expected = "N::C"; + std::string Expected = "C"; auto StmtMatch = matchStmt(Snippet, declRefExpr(hasType(qualType().bind("type")))); ASSERT_TRUE(StmtMatch); @@ -568,7 +569,7 @@ } TEST_F(StencilTest, DescribeAnonNamespaceType) { - std::string Snippet = "AnonC c; c;"; + std::string Snippet = "auto c = desugar(); c;"; std::string Expected = "(anonymous namespace)::AnonC"; auto StmtMatch = matchStmt(Snippet, declRefExpr(hasType(qualType().bind("type"))));