Author: Matheus Izvekov Date: 2026-07-17T13:17:19-03:00 New Revision: 5f7060ce4559c1079e850c96b106f1a43955b828
URL: https://github.com/llvm/llvm-project/commit/5f7060ce4559c1079e850c96b106f1a43955b828 DIFF: https://github.com/llvm/llvm-project/commit/5f7060ce4559c1079e850c96b106f1a43955b828.diff LOG: [clang] remove templight support (#210166) Removed as unmaintained, per discussion in https://discourse.llvm.org/t/rfc-removing-templight-support/90777 Added: Modified: clang/docs/ReleaseNotes.md clang/include/clang/Frontend/FrontendActions.h clang/include/clang/Frontend/FrontendOptions.h clang/include/clang/Options/Options.td clang/include/clang/Sema/Sema.h clang/lib/Frontend/CompilerInvocation.cpp clang/lib/Frontend/FrontendActions.cpp clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp clang/lib/Parse/ParseAST.cpp clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaTemplateInstantiate.cpp clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/lib/Sema/SemaType.cpp Removed: clang/include/clang/Sema/TemplateInstCallback.h clang/test/Templight/templight-deduced-func.cpp clang/test/Templight/templight-default-arg-inst.cpp clang/test/Templight/templight-default-func-arg.cpp clang/test/Templight/templight-default-template-arg.cpp clang/test/Templight/templight-empty-entries-fix.cpp clang/test/Templight/templight-exception-spec-func.cpp clang/test/Templight/templight-explicit-template-arg.cpp clang/test/Templight/templight-memoization.cpp clang/test/Templight/templight-nested-memoization.cpp clang/test/Templight/templight-nested-template-instantiation.cpp clang/test/Templight/templight-one-instantiation.cpp clang/test/Templight/templight-prior-template-arg.cpp ################################################################################ diff --git a/clang/docs/ReleaseNotes.md b/clang/docs/ReleaseNotes.md index 8e47adbc64a4c..a39bc2dfc5b6d 100644 --- a/clang/docs/ReleaseNotes.md +++ b/clang/docs/ReleaseNotes.md @@ -54,6 +54,8 @@ latest release, please see the [Clang Web Site](https://clang.llvm.org) or the ### Clang Frontend Potentially Breaking Changes +- Templight support has been removed. + ### Clang Python Bindings Potentially Breaking Changes ### OpenCL Potentially Breaking Changes diff --git a/clang/include/clang/Frontend/FrontendActions.h b/clang/include/clang/Frontend/FrontendActions.h index ed347c625d481..fa2168d6dfdcc 100644 --- a/clang/include/clang/Frontend/FrontendActions.h +++ b/clang/include/clang/Frontend/FrontendActions.h @@ -251,14 +251,6 @@ class VerifyPCHAction : public ASTFrontendAction { bool hasCodeCompletionSupport() const override { return false; } }; -class TemplightDumpAction : public ASTFrontendAction { -protected: - std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, - StringRef InFile) override; - - void ExecuteAction() override; -}; - /** * Frontend action adaptor that merges ASTs together. * diff --git a/clang/include/clang/Frontend/FrontendOptions.h b/clang/include/clang/Frontend/FrontendOptions.h index ec42e44d035b6..73c422998a217 100644 --- a/clang/include/clang/Frontend/FrontendOptions.h +++ b/clang/include/clang/Frontend/FrontendOptions.h @@ -138,9 +138,6 @@ enum ActionKind { /// Run one or more source code analyses. RunAnalysis, - /// Dump template instantiations - TemplightDump, - /// Just lex, no output. RunPreprocessorOnly, diff --git a/clang/include/clang/Options/Options.td b/clang/include/clang/Options/Options.td index a1d45163fa354..a00395f448ffd 100644 --- a/clang/include/clang/Options/Options.td +++ b/clang/include/clang/Options/Options.td @@ -8571,8 +8571,6 @@ def ast_dump_all_EQ : Joined<["-"], "ast-dump-all=">, def ast_dump_decl_types : Flag<["-"], "ast-dump-decl-types">, HelpText<"Include declaration types in AST dumps">, MarshallingInfoFlag<FrontendOpts<"ASTDumpDeclTypes">>; -def templight_dump : Flag<["-"], "templight-dump">, - HelpText<"Dump templight information to stdout">; def ast_dump_lookups : Flag<["-"], "ast-dump-lookups">, HelpText<"Build ASTs and then debug dump their name lookup tables">, MarshallingInfoFlag<FrontendOpts<"ASTDumpLookups">>; diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index 11550340ac8d2..d43b6954196a2 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -13778,14 +13778,6 @@ class Sema final : public SemaBase { // FIXME: Does this belong in Sema? It's tough to implement it anywhere else. unsigned LastEmittedCodeSynthesisContextDepth = 0; - /// The template instantiation callbacks to trace or track - /// instantiations (objects can be chained). - /// - /// This callbacks is used to print, trace or track template - /// instantiations as they are being constructed. - std::vector<std::unique_ptr<TemplateInstantiationCallback>> - TemplateInstCallbacks; - /// The current index into pack expansion arguments that will be /// used for substitution of parameter packs. /// diff --git a/clang/include/clang/Sema/TemplateInstCallback.h b/clang/include/clang/Sema/TemplateInstCallback.h deleted file mode 100644 index 9258a7f41ac12..0000000000000 --- a/clang/include/clang/Sema/TemplateInstCallback.h +++ /dev/null @@ -1,82 +0,0 @@ -//===- TemplateInstCallback.h - Template Instantiation Callback - C++ --===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===---------------------------------------------------------------------===// -// -// This file defines the TemplateInstantiationCallback class, which is the -// base class for callbacks that will be notified at template instantiations. -// -//===---------------------------------------------------------------------===// - -#ifndef LLVM_CLANG_SEMA_TEMPLATEINSTCALLBACK_H -#define LLVM_CLANG_SEMA_TEMPLATEINSTCALLBACK_H - -#include "clang/Sema/Sema.h" - -namespace clang { - -/// This is a base class for callbacks that will be notified at every -/// template instantiation. -class TemplateInstantiationCallback { -public: - virtual ~TemplateInstantiationCallback() = default; - - /// Called before doing AST-parsing. - virtual void initialize(const Sema &TheSema) = 0; - - /// Called after AST-parsing is completed. - virtual void finalize(const Sema &TheSema) = 0; - - /// Called when instantiation of a template just began. - virtual void atTemplateBegin(const Sema &TheSema, - const Sema::CodeSynthesisContext &Inst) = 0; - - /// Called when instantiation of a template is just about to end. - virtual void atTemplateEnd(const Sema &TheSema, - const Sema::CodeSynthesisContext &Inst) = 0; -}; - -template <class TemplateInstantiationCallbackPtrs> -void initialize(TemplateInstantiationCallbackPtrs &Callbacks, - const Sema &TheSema) { - for (auto &C : Callbacks) { - if (C) - C->initialize(TheSema); - } -} - -template <class TemplateInstantiationCallbackPtrs> -void finalize(TemplateInstantiationCallbackPtrs &Callbacks, - const Sema &TheSema) { - for (auto &C : Callbacks) { - if (C) - C->finalize(TheSema); - } -} - -template <class TemplateInstantiationCallbackPtrs> -void atTemplateBegin(TemplateInstantiationCallbackPtrs &Callbacks, - const Sema &TheSema, - const Sema::CodeSynthesisContext &Inst) { - for (auto &C : Callbacks) { - if (C) - C->atTemplateBegin(TheSema, Inst); - } -} - -template <class TemplateInstantiationCallbackPtrs> -void atTemplateEnd(TemplateInstantiationCallbackPtrs &Callbacks, - const Sema &TheSema, - const Sema::CodeSynthesisContext &Inst) { - for (auto &C : Callbacks) { - if (C) - C->atTemplateEnd(TheSema, Inst); - } -} - -} // namespace clang - -#endif diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 8898e63ab93b1..56362e758a78b 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2832,7 +2832,6 @@ static const auto &getFrontendActionTable() { {frontend::VerifyPCH, OPT_verify_pch}, {frontend::PrintPreamble, OPT_print_preamble}, {frontend::PrintPreprocessedInput, OPT_E}, - {frontend::TemplightDump, OPT_templight_dump}, {frontend::RewriteMacros, OPT_rewrite_macros}, {frontend::RewriteObjC, OPT_rewrite_objc}, {frontend::RewriteTest, OPT_rewrite_test}, @@ -4742,7 +4741,6 @@ static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) { case frontend::RewriteObjC: case frontend::RewriteTest: case frontend::RunAnalysis: - case frontend::TemplightDump: return false; case frontend::DumpCompilerOptions: @@ -4789,7 +4787,6 @@ static bool isCodeGenAction(frontend::ActionKind Action) { case frontend::RewriteObjC: case frontend::RewriteTest: case frontend::RunAnalysis: - case frontend::TemplightDump: case frontend::DumpCompilerOptions: case frontend::DumpRawTokens: case frontend::DumpTokens: diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index f89ec9b985a20..4ef94c1991ee2 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -23,7 +23,6 @@ #include "clang/Lex/Preprocessor.h" #include "clang/Lex/PreprocessorOptions.h" #include "clang/Parse/ParseHLSLRootSignature.h" -#include "clang/Sema/TemplateInstCallback.h" #include "clang/Serialization/ASTReader.h" #include "clang/Serialization/ASTWriter.h" #include "clang/Serialization/ModuleFile.h" @@ -39,23 +38,6 @@ using namespace clang; -namespace { -CodeCompleteConsumer *GetCodeCompletionConsumer(CompilerInstance &CI) { - return CI.hasCodeCompletionConsumer() ? &CI.getCodeCompletionConsumer() - : nullptr; -} - -void EnsureSemaIsCreated(CompilerInstance &CI, FrontendAction &Action) { - if (Action.hasCodeCompletionSupport() && - !CI.getFrontendOpts().CodeCompletionAt.FileName.empty()) - CI.createCodeCompletionConsumer(); - - if (!CI.hasSema()) - CI.createSema(Action.getTranslationUnitKind(), - GetCodeCompletionConsumer(CI)); -} -} // namespace - //===----------------------------------------------------------------------===// // Custom Actions //===----------------------------------------------------------------------===// @@ -374,250 +356,6 @@ void VerifyPCHAction::ExecuteAction() { SourceLocation(), ASTReader::ARR_ConfigurationMismatch); } -namespace { -struct TemplightEntry { - std::string Name; - std::string Kind; - std::string Event; - std::string DefinitionLocation; - std::string PointOfInstantiation; -}; -} // namespace - -namespace llvm { -namespace yaml { -template <> struct MappingTraits<TemplightEntry> { - static void mapping(IO &io, TemplightEntry &fields) { - io.mapRequired("name", fields.Name); - io.mapRequired("kind", fields.Kind); - io.mapRequired("event", fields.Event); - io.mapRequired("orig", fields.DefinitionLocation); - io.mapRequired("poi", fields.PointOfInstantiation); - } -}; -} // namespace yaml -} // namespace llvm - -namespace { -class DefaultTemplateInstCallback : public TemplateInstantiationCallback { - using CodeSynthesisContext = Sema::CodeSynthesisContext; - -public: - void initialize(const Sema &) override {} - - void finalize(const Sema &) override {} - - void atTemplateBegin(const Sema &TheSema, - const CodeSynthesisContext &Inst) override { - displayTemplightEntry<true>(llvm::outs(), TheSema, Inst); - } - - void atTemplateEnd(const Sema &TheSema, - const CodeSynthesisContext &Inst) override { - displayTemplightEntry<false>(llvm::outs(), TheSema, Inst); - } - -private: - static std::string toString(CodeSynthesisContext::SynthesisKind Kind) { - switch (Kind) { - case CodeSynthesisContext::TemplateInstantiation: - return "TemplateInstantiation"; - case CodeSynthesisContext::DefaultTemplateArgumentInstantiation: - return "DefaultTemplateArgumentInstantiation"; - case CodeSynthesisContext::DefaultFunctionArgumentInstantiation: - return "DefaultFunctionArgumentInstantiation"; - case CodeSynthesisContext::ExplicitTemplateArgumentSubstitution: - return "ExplicitTemplateArgumentSubstitution"; - case CodeSynthesisContext::DeducedTemplateArgumentSubstitution: - return "DeducedTemplateArgumentSubstitution"; - case CodeSynthesisContext::LambdaExpressionSubstitution: - return "LambdaExpressionSubstitution"; - case CodeSynthesisContext::PriorTemplateArgumentSubstitution: - return "PriorTemplateArgumentSubstitution"; - case CodeSynthesisContext::DefaultTemplateArgumentChecking: - return "DefaultTemplateArgumentChecking"; - case CodeSynthesisContext::ExceptionSpecEvaluation: - return "ExceptionSpecEvaluation"; - case CodeSynthesisContext::ExceptionSpecInstantiation: - return "ExceptionSpecInstantiation"; - case CodeSynthesisContext::DeclaringSpecialMember: - return "DeclaringSpecialMember"; - case CodeSynthesisContext::DeclaringImplicitEqualityComparison: - return "DeclaringImplicitEqualityComparison"; - case CodeSynthesisContext::DefiningSynthesizedFunction: - return "DefiningSynthesizedFunction"; - case CodeSynthesisContext::RewritingOperatorAsSpaceship: - return "RewritingOperatorAsSpaceship"; - case CodeSynthesisContext::Memoization: - return "Memoization"; - case CodeSynthesisContext::ConstraintsCheck: - return "ConstraintsCheck"; - case CodeSynthesisContext::ConstraintSubstitution: - return "ConstraintSubstitution"; - case CodeSynthesisContext::RequirementParameterInstantiation: - return "RequirementParameterInstantiation"; - case CodeSynthesisContext::ParameterMappingSubstitution: - return "ParameterMappingSubstitution"; - case CodeSynthesisContext::RequirementInstantiation: - return "RequirementInstantiation"; - case CodeSynthesisContext::NestedRequirementConstraintsCheck: - return "NestedRequirementConstraintsCheck"; - case CodeSynthesisContext::InitializingStructuredBinding: - return "InitializingStructuredBinding"; - case CodeSynthesisContext::MarkingClassDllexported: - return "MarkingClassDllexported"; - case CodeSynthesisContext::BuildingBuiltinDumpStructCall: - return "BuildingBuiltinDumpStructCall"; - case CodeSynthesisContext::BuildingDeductionGuides: - return "BuildingDeductionGuides"; - case CodeSynthesisContext::TypeAliasTemplateInstantiation: - return "TypeAliasTemplateInstantiation"; - case CodeSynthesisContext::PartialOrderingTTP: - return "PartialOrderingTTP"; - case CodeSynthesisContext::SYCLKernelLaunchLookup: - return "SYCLKernelLaunchLookup"; - case CodeSynthesisContext::SYCLKernelLaunchOverloadResolution: - return "SYCLKernelLaunchOverloadResolution"; - case CodeSynthesisContext::ExpansionStmtInstantiation: - return "ExpansionStmtInstantiation"; - } - return ""; - } - - template <bool BeginInstantiation> - static void displayTemplightEntry(llvm::raw_ostream &Out, const Sema &TheSema, - const CodeSynthesisContext &Inst) { - std::string YAML; - { - llvm::raw_string_ostream OS(YAML); - llvm::yaml::Output YO(OS); - TemplightEntry Entry = - getTemplightEntry<BeginInstantiation>(TheSema, Inst); - llvm::yaml::EmptyContext Context; - llvm::yaml::yamlize(YO, Entry, true, Context); - } - Out << "---" << YAML << "\n"; - } - - static void printEntryName(const Sema &TheSema, const Decl *Entity, - llvm::raw_string_ostream &OS) { - auto *NamedTemplate = cast<NamedDecl>(Entity); - - PrintingPolicy Policy = TheSema.Context.getPrintingPolicy(); - // FIXME: Also ask for FullyQualifiedNames? - Policy.SuppressDefaultTemplateArgs = false; - NamedTemplate->getNameForDiagnostic(OS, Policy, true); - - if (!OS.str().empty()) - return; - - Decl *Ctx = Decl::castFromDeclContext(NamedTemplate->getDeclContext()); - NamedDecl *NamedCtx = dyn_cast_or_null<NamedDecl>(Ctx); - - if (const auto *Decl = dyn_cast<TagDecl>(NamedTemplate)) { - if (const auto *R = dyn_cast<RecordDecl>(Decl)) { - if (R->isLambda()) { - OS << "lambda at "; - Decl->getLocation().print(OS, TheSema.getSourceManager()); - return; - } - } - OS << "unnamed " << Decl->getKindName(); - return; - } - - assert(NamedCtx && "NamedCtx cannot be null"); - - if (const auto *Decl = dyn_cast<ParmVarDecl>(NamedTemplate)) { - OS << "unnamed function parameter " << Decl->getFunctionScopeIndex() - << " "; - if (Decl->getFunctionScopeDepth() > 0) - OS << "(at depth " << Decl->getFunctionScopeDepth() << ") "; - OS << "of "; - NamedCtx->getNameForDiagnostic(OS, TheSema.getLangOpts(), true); - return; - } - - if (const auto *Decl = dyn_cast<TemplateTypeParmDecl>(NamedTemplate)) { - if (const Type *Ty = Decl->getTypeForDecl()) { - if (const auto *TTPT = dyn_cast_or_null<TemplateTypeParmType>(Ty)) { - OS << "unnamed template type parameter " << TTPT->getIndex() << " "; - if (TTPT->getDepth() > 0) - OS << "(at depth " << TTPT->getDepth() << ") "; - OS << "of "; - NamedCtx->getNameForDiagnostic(OS, TheSema.getLangOpts(), true); - return; - } - } - } - - if (const auto *Decl = dyn_cast<NonTypeTemplateParmDecl>(NamedTemplate)) { - OS << "unnamed template non-type parameter " << Decl->getIndex() << " "; - if (Decl->getDepth() > 0) - OS << "(at depth " << Decl->getDepth() << ") "; - OS << "of "; - NamedCtx->getNameForDiagnostic(OS, TheSema.getLangOpts(), true); - return; - } - - if (const auto *Decl = dyn_cast<TemplateTemplateParmDecl>(NamedTemplate)) { - OS << "unnamed template template parameter " << Decl->getIndex() << " "; - if (Decl->getDepth() > 0) - OS << "(at depth " << Decl->getDepth() << ") "; - OS << "of "; - NamedCtx->getNameForDiagnostic(OS, TheSema.getLangOpts(), true); - return; - } - - llvm_unreachable("Failed to retrieve a name for this entry!"); - OS << "unnamed identifier"; - } - - template <bool BeginInstantiation> - static TemplightEntry getTemplightEntry(const Sema &TheSema, - const CodeSynthesisContext &Inst) { - TemplightEntry Entry; - Entry.Kind = toString(Inst.Kind); - Entry.Event = BeginInstantiation ? "Begin" : "End"; - llvm::raw_string_ostream OS(Entry.Name); - printEntryName(TheSema, Inst.Entity, OS); - const PresumedLoc DefLoc = - TheSema.getSourceManager().getPresumedLoc(Inst.Entity->getLocation()); - if (!DefLoc.isInvalid()) - Entry.DefinitionLocation = std::string(DefLoc.getFilename()) + ":" + - std::to_string(DefLoc.getLine()) + ":" + - std::to_string(DefLoc.getColumn()); - const PresumedLoc PoiLoc = - TheSema.getSourceManager().getPresumedLoc(Inst.PointOfInstantiation); - if (!PoiLoc.isInvalid()) { - Entry.PointOfInstantiation = std::string(PoiLoc.getFilename()) + ":" + - std::to_string(PoiLoc.getLine()) + ":" + - std::to_string(PoiLoc.getColumn()); - } - return Entry; - } -}; -} // namespace - -std::unique_ptr<ASTConsumer> -TemplightDumpAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { - return std::make_unique<ASTConsumer>(); -} - -void TemplightDumpAction::ExecuteAction() { - CompilerInstance &CI = getCompilerInstance(); - - // This part is normally done by ASTFrontEndAction, but needs to happen - // before Templight observers can be created - // FIXME: Move the truncation aspect of this into Sema, we delayed this till - // here so the source manager would be initialized. - EnsureSemaIsCreated(CI, *this); - - CI.getSema().TemplateInstCallbacks.push_back( - std::make_unique<DefaultTemplateInstCallback>()); - ASTFrontendAction::ExecuteAction(); -} - namespace { /// AST reader listener that dumps module information for a module /// file. diff --git a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp index 1f5c3ed5375db..7142383fc64b3 100644 --- a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp +++ b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp @@ -11,7 +11,6 @@ #include "clang/Basic/TargetInfo.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/FrontendActions.h" -#include "clang/Sema/TemplateInstCallback.h" #include "llvm/BinaryFormat/ELF.h" using namespace clang; diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index a206770c8490f..6a9ea0364cba1 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -120,8 +120,8 @@ CreateFrontendBaseAction(CompilerInstance &CI) { case InitOnly: return std::make_unique<InitOnlyAction>(); case ParseSyntaxOnly: return std::make_unique<SyntaxOnlyAction>(); case ModuleFileInfo: return std::make_unique<DumpModuleInfoAction>(); - case VerifyPCH: return std::make_unique<VerifyPCHAction>(); - case TemplightDump: return std::make_unique<TemplightDumpAction>(); + case VerifyPCH: + return std::make_unique<VerifyPCHAction>(); case PluginAction: { for (const FrontendPluginRegistry::entry &Plugin : diff --git a/clang/lib/Parse/ParseAST.cpp b/clang/lib/Parse/ParseAST.cpp index c8ee625eb57ad..b2eec498a5457 100644 --- a/clang/lib/Parse/ParseAST.cpp +++ b/clang/lib/Parse/ParseAST.cpp @@ -20,7 +20,6 @@ #include "clang/Sema/EnterExpressionEvaluationContext.h" #include "clang/Sema/Sema.h" #include "clang/Sema/SemaConsumer.h" -#include "clang/Sema/TemplateInstCallback.h" #include "llvm/Support/CrashRecoveryContext.h" #include "llvm/Support/TimeProfiler.h" #include <cstdio> @@ -122,10 +121,6 @@ void clang::ParseAST(Sema &S, bool PrintStats, bool SkipFunctionBodies) { bool OldCollectStats = PrintStats; std::swap(OldCollectStats, S.CollectStats); - // Initialize the template instantiation observer chain. - // FIXME: See note on "finalize" below. - initialize(S.TemplateInstCallbacks, S); - ASTConsumer *Consumer = &S.getASTConsumer(); std::unique_ptr<Parser> ParseOP( @@ -182,13 +177,6 @@ void clang::ParseAST(Sema &S, bool PrintStats, bool SkipFunctionBodies) { Consumer->HandleTranslationUnit(S.getASTContext()); - // Finalize the template instantiation observer chain. - // FIXME: This (and init.) should be done in the Sema class, but because - // Sema does not have a reliable "Finalize" function (it has a - // destructor, but it is not guaranteed to be called ("-disable-free")). - // So, do the initialization above and do the finalization here: - finalize(S.TemplateInstCallbacks, S); - std::swap(OldCollectStats, S.CollectStats); if (PrintStats) { llvm::errs() << "\nSTATISTICS:\n"; diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 5a7dfb1b5b035..9f962912148ab 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -69,7 +69,6 @@ #include "clang/Sema/SemaWasm.h" #include "clang/Sema/SemaX86.h" #include "clang/Sema/TemplateDeduction.h" -#include "clang/Sema/TemplateInstCallback.h" #include "clang/Sema/TypoCorrection.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/STLExtras.h" diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp index bad0cdd1b7067..ab0f2730a6a38 100644 --- a/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -33,7 +33,6 @@ #include "clang/Sema/SemaInternal.h" #include "clang/Sema/Template.h" #include "clang/Sema/TemplateDeduction.h" -#include "clang/Sema/TemplateInstCallback.h" #include "llvm/ADT/SmallVectorExtras.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/ErrorHandling.h" @@ -638,8 +637,6 @@ Sema::InstantiatingTemplate::InstantiatingTemplate( } Invalid = SemaRef.pushCodeSynthesisContext(Inst); - if (!Invalid) - atTemplateBegin(SemaRef.TemplateInstCallbacks, SemaRef, Inst); } Sema::InstantiatingTemplate::InstantiatingTemplate( @@ -879,9 +876,6 @@ void Sema::popCodeSynthesisContext() { void Sema::InstantiatingTemplate::Clear() { if (!Invalid) { - atTemplateEnd(SemaRef.TemplateInstCallbacks, SemaRef, - SemaRef.CodeSynthesisContexts.back()); - SemaRef.popCodeSynthesisContext(); Invalid = true; } diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index c2e90624b8a6e..2a711db70280e 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -32,7 +32,6 @@ #include "clang/Sema/SemaOpenMP.h" #include "clang/Sema/SemaSwift.h" #include "clang/Sema/Template.h" -#include "clang/Sema/TemplateInstCallback.h" #include "llvm/Support/SaveAndRestore.h" #include "llvm/Support/TimeProfiler.h" #include <optional> @@ -5465,10 +5464,8 @@ TemplateDeclInstantiator::InitFunctionInstantiation(FunctionDecl *New, ActiveInst.Kind == ActiveInstType::DeducedTemplateArgumentSubstitution) { if (isa<FunctionTemplateDecl>(ActiveInst.Entity)) { SemaRef.CurrentSFINAEContext = nullptr; - atTemplateEnd(SemaRef.TemplateInstCallbacks, SemaRef, ActiveInst); ActiveInst.Kind = ActiveInstType::TemplateInstantiation; ActiveInst.Entity = New; - atTemplateBegin(SemaRef.TemplateInstCallbacks, SemaRef, ActiveInst); } } diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 5161db6ac1a99..0bfb9be9ec644 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -41,7 +41,6 @@ #include "clang/Sema/SemaObjC.h" #include "clang/Sema/SemaOpenMP.h" #include "clang/Sema/Template.h" -#include "clang/Sema/TemplateInstCallback.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/STLForwardCompat.h" #include "llvm/ADT/StringExtras.h" @@ -9720,16 +9719,7 @@ bool Sema::RequireCompleteTypeImpl(SourceLocation Loc, QualType T, diagnoseMissingImport(Loc, Suggested, MissingImportKind::Definition, /*Recover*/ TreatAsComplete); return !TreatAsComplete; - } else if (Def && !TemplateInstCallbacks.empty()) { - CodeSynthesisContext TempInst; - TempInst.Kind = CodeSynthesisContext::Memoization; - TempInst.Template = Def; - TempInst.Entity = Def; - TempInst.PointOfInstantiation = Loc; - atTemplateBegin(TemplateInstCallbacks, *this, TempInst); - atTemplateEnd(TemplateInstCallbacks, *this, TempInst); } - return false; } diff --git a/clang/test/Templight/templight-deduced-func.cpp b/clang/test/Templight/templight-deduced-func.cpp deleted file mode 100644 index 779fb5f45228d..0000000000000 --- a/clang/test/Templight/templight-deduced-func.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// RUN: %clang_cc1 -templight-dump %s 2>&1 | FileCheck %s - -template <class T> -int foo(T){return 0;} - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+foo$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-deduced-func.cpp:4:5'}} -// CHECK: {{^poi:[ ]+'.*templight-deduced-func.cpp:44:12'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+foo$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-deduced-func.cpp:4:5'}} -// CHECK: {{^poi:[ ]+'.*templight-deduced-func.cpp:44:12'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-deduced-func.cpp:4:5'}} -// CHECK: {{^poi:[ ]+'.*templight-deduced-func.cpp:44:12'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-deduced-func.cpp:4:5'}} -// CHECK: {{^poi:[ ]+'.*templight-deduced-func.cpp:44:12'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-deduced-func.cpp:4:5'}} -// CHECK: {{^poi:[ ]+'.*templight-deduced-func.cpp:44:12'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-deduced-func.cpp:4:5'}} -// CHECK: {{^poi:[ ]+'.*templight-deduced-func.cpp:44:12'$}} -int gvar = foo(0); diff --git a/clang/test/Templight/templight-default-arg-inst.cpp b/clang/test/Templight/templight-default-arg-inst.cpp deleted file mode 100644 index fe2bab3a837e6..0000000000000 --- a/clang/test/Templight/templight-default-arg-inst.cpp +++ /dev/null @@ -1,82 +0,0 @@ -// RUN: %clang_cc1 -templight-dump %s 2>&1 | FileCheck %s -template<class T, class U = T> -class A {}; - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A::U'$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-arg-inst.cpp:2:25'}} -// CHECK: {{^poi:[ ]+'.*templight-default-arg-inst.cpp:82:1'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A::U'$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-arg-inst.cpp:2:25'}} -// CHECK: {{^poi:[ ]+'.*templight-default-arg-inst.cpp:82:1'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A::U'$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentChecking$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-arg-inst.cpp:2:25'}} -// CHECK: {{^poi:[ ]+'.*templight-default-arg-inst.cpp:82:6'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A::U'$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentChecking$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-arg-inst.cpp:2:25'}} -// CHECK: {{^poi:[ ]+'.*templight-default-arg-inst.cpp:82:6'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int, int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-arg-inst.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-arg-inst.cpp:82:8'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int, int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-arg-inst.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-arg-inst.cpp:82:8'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int, int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-arg-inst.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-arg-inst.cpp:82:8'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int, int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-arg-inst.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-arg-inst.cpp:82:8'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int, int>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-arg-inst.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-arg-inst.cpp:82:8'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int, int>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-arg-inst.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-arg-inst.cpp:82:8'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int, int>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-arg-inst.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-arg-inst.cpp:82:8'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int, int>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-arg-inst.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-arg-inst.cpp:82:8'$}} -A<int> a; diff --git a/clang/test/Templight/templight-default-func-arg.cpp b/clang/test/Templight/templight-default-func-arg.cpp deleted file mode 100644 index 19e6039379724..0000000000000 --- a/clang/test/Templight/templight-default-func-arg.cpp +++ /dev/null @@ -1,73 +0,0 @@ -// RUN: %clang_cc1 -std=c++14 -templight-dump %s 2>&1 | FileCheck %s -template <class T> -void foo(T b = 0) {}; - -int main() -{ - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+foo$}} -// CHECK: {{^kind:[ ]+ExplicitTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+foo$}} -// CHECK: {{^kind:[ ]+ExplicitTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+foo$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+foo$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+b$}} -// CHECK: {{^kind:[ ]+DefaultFunctionArgumentInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:12'}} -// CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+b$}} -// CHECK: {{^kind:[ ]+DefaultFunctionArgumentInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:12'}} -// CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} - foo<int>(); -} diff --git a/clang/test/Templight/templight-default-template-arg.cpp b/clang/test/Templight/templight-default-template-arg.cpp deleted file mode 100644 index 5d2ccb4e40881..0000000000000 --- a/clang/test/Templight/templight-default-template-arg.cpp +++ /dev/null @@ -1,69 +0,0 @@ -// RUN: %clang_cc1 -templight-dump %s 2>&1 | FileCheck %s -template <class T = int> -class A {}; - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A::T'$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentChecking$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-template-arg.cpp:2:17'}} -// CHECK: {{^poi:[ ]+'.*templight-default-template-arg.cpp:69:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A::T'$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentChecking$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-template-arg.cpp:2:17'}} -// CHECK: {{^poi:[ ]+'.*templight-default-template-arg.cpp:69:3'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-template-arg.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-template-arg.cpp:69:5'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-template-arg.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-template-arg.cpp:69:5'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-template-arg.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-template-arg.cpp:69:5'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-template-arg.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-template-arg.cpp:69:5'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-template-arg.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-template-arg.cpp:69:5'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-template-arg.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-template-arg.cpp:69:5'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-default-template-arg.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-template-arg.cpp:69:5'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'A<int>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-default-template-arg.cpp:3:7'}} -// CHECK: {{^poi:[ ]+'.*templight-default-template-arg.cpp:69:5'$}} -A<> a; diff --git a/clang/test/Templight/templight-empty-entries-fix.cpp b/clang/test/Templight/templight-empty-entries-fix.cpp deleted file mode 100644 index 7f34b10134929..0000000000000 --- a/clang/test/Templight/templight-empty-entries-fix.cpp +++ /dev/null @@ -1,345 +0,0 @@ -// RUN: %clang_cc1 -templight-dump -Wno-unused-value %s 2>&1 | FileCheck %s - -void a(long) { - [] {}; -} - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'\(lambda at .*templight-empty-entries-fix.cpp:4:3\)'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:4:3'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:4:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'\(lambda at .*templight-empty-entries-fix.cpp:4:3\)'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:4:3'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:4:3'$}} - -template <int = 0> void a(long) { a(0); } - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+a$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:20:25'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:20:35'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+unnamed template non-type parameter 0 of a$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:20:15'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:20:25'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+unnamed template non-type parameter 0 of a$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:20:15'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:20:25'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+a$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:20:25'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:20:35'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'a<0>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:20:25'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:20:35'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'a<0>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:20:25'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:20:35'$}} - -template <int> struct b { typedef int c; }; -template <bool d = true, class = typename b<d>::c> void a(long) { a(0); } - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+a$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:60:57'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:67'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+d$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:60:16'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:57'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+d$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:60:16'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:57'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+unnamed template type parameter 1 of a$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:60:32'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:57'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'b<1>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:59:23'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:43'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'b<1>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:59:23'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:43'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'b<1>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:59:23'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:43'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'b<1>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:59:23'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:43'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'b<1>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:59:23'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:43'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'b<1>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:59:23'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:43'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+unnamed template type parameter 1 of a$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:60:32'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:57'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+a$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:60:57'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:67'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'a<true, int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:60:57'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:67'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'a<true, int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:60:57'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:67'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+a$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:20:25'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:67'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+unnamed template non-type parameter 0 of a$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:20:15'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:20:25'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+unnamed template non-type parameter 0 of a$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:20:15'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:20:25'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+a$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:20:25'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:60:67'$}} - -template <bool = true> void d(int = 0) { d(); } - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+d$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:171:29'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:171:42'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+unnamed template non-type parameter 0 of d$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:171:16'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:171:29'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+unnamed template non-type parameter 0 of d$}} -// CHECK: {{^kind:[ ]+DefaultTemplateArgumentInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:171:16'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:171:29'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+d$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:171:29'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:171:42'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'d<true>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:171:29'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:171:42'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'d<true>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:171:29'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:171:42'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'unnamed function parameter 0 of d<true>'$}} -// CHECK: {{^kind:[ ]+DefaultFunctionArgumentInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:171:35'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:171:42'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'unnamed function parameter 0 of d<true>'$}} -// CHECK: {{^kind:[ ]+DefaultFunctionArgumentInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:171:35'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:171:42'$}} - -void e() { - struct { - } f; -} - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'\(unnamed struct at .*templight-empty-entries-fix.cpp:223:3\)'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:223:3'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:224:5'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'\(unnamed struct at .*templight-empty-entries-fix.cpp:223:3\)'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:223:3'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:224:5'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'\(unnamed struct at .*templight-empty-entries-fix.cpp:223:3\)'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:223:3'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:224:5'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'\(unnamed struct at .*templight-empty-entries-fix.cpp:223:3\)'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:223:3'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:224:5'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'\(unnamed struct at .*templight-empty-entries-fix.cpp:223:3\)'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:223:3'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:223:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'\(unnamed struct at .*templight-empty-entries-fix.cpp:223:3\)'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:223:3'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:223:3'$}} - - -template <template<typename> class> -void d(); - -template <typename T> struct C; - -void foo() { - d<C>(); -} - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+d$}} -// CHECK: {{^kind:[ ]+ExplicitTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:266:6'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:271:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+unnamed template template parameter 0 of d$}} -// CHECK: {{^kind:[ ]+PriorTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:265:35'$}} -// CHECK: {{^poi:[ ]+''$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+unnamed template template parameter 0 of d$}} -// CHECK: {{^kind:[ ]+PriorTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:265:35'$}} -// CHECK: {{^poi:[ ]+''$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+unnamed template template parameter 0 of d$}} -// CHECK: {{^kind:[ ]+PartialOrderingTTP$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:265:35'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:271:5'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+unnamed template template parameter 0 of d$}} -// CHECK: {{^kind:[ ]+PartialOrderingTTP$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:265:35'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:271:5'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+d$}} -// CHECK: {{^kind:[ ]+ExplicitTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:266:6'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:271:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+d$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:266:6'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:271:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+d$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:266:6'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:271:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'d<C>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:266:6'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:271:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'d<C>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:266:6'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:271:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+d$}} -// CHECK: {{^kind:[ ]+ExplicitTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:171:29'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:271:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+d$}} -// CHECK: {{^kind:[ ]+ExplicitTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-empty-entries-fix.cpp:171:29'$}} -// CHECK: {{^poi:[ ]+'.*templight-empty-entries-fix.cpp:271:3'$}} diff --git a/clang/test/Templight/templight-exception-spec-func.cpp b/clang/test/Templight/templight-exception-spec-func.cpp deleted file mode 100644 index 39a66d0ecdd2b..0000000000000 --- a/clang/test/Templight/templight-exception-spec-func.cpp +++ /dev/null @@ -1,73 +0,0 @@ -// RUN: %clang_cc1 -templight-dump -std=c++14 %s 2>&1 | FileCheck %s -template <bool B> -void f() noexcept(B) {} - -int main() -{ - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+f$}} -// CHECK: {{^kind:[ ]+ExplicitTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+f$}} -// CHECK: {{^kind:[ ]+ExplicitTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+f$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+f$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'f<false>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'f<false>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'f<false>'$}} -// CHECK: {{^kind:[ ]+ExceptionSpecInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'f<false>'$}} -// CHECK: {{^kind:[ ]+ExceptionSpecInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'f<false>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'f<false>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} - f<false>(); -} diff --git a/clang/test/Templight/templight-explicit-template-arg.cpp b/clang/test/Templight/templight-explicit-template-arg.cpp deleted file mode 100644 index 678cba28cdc0f..0000000000000 --- a/clang/test/Templight/templight-explicit-template-arg.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// RUN: %clang_cc1 -templight-dump %s 2>&1 | FileCheck %s -template <class T> -void f(){} - -int main() -{ -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+f$}} -// CHECK: {{^kind:[ ]+ExplicitTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-explicit-template-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-explicit-template-arg.cpp:58:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+f$}} -// CHECK: {{^kind:[ ]+ExplicitTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-explicit-template-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-explicit-template-arg.cpp:58:3'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+f$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-explicit-template-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-explicit-template-arg.cpp:58:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+f$}} -// CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-explicit-template-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-explicit-template-arg.cpp:58:3'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'f<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-explicit-template-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-explicit-template-arg.cpp:58:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'f<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-explicit-template-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-explicit-template-arg.cpp:58:3'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'f<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-explicit-template-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-explicit-template-arg.cpp:58:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'f<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-explicit-template-arg.cpp:3:6'}} -// CHECK: {{^poi:[ ]+'.*templight-explicit-template-arg.cpp:58:3'$}} - f<int>(); -} diff --git a/clang/test/Templight/templight-memoization.cpp b/clang/test/Templight/templight-memoization.cpp deleted file mode 100644 index ddf2447834fd3..0000000000000 --- a/clang/test/Templight/templight-memoization.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// RUN: %clang_cc1 -templight-dump %s 2>&1 | FileCheck %s - -template <class T> -struct foo {}; - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-memoization.cpp:18:10'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-memoization.cpp:18:10'$}} -foo<int> x; - -// CHECK-LABEL: {{^---$}} -// CHECK-LABEL: {{^---$}} -// CHECK-LABEL: {{^---$}} -// CHECK-LABEL: {{^---$}} -// CHECK-LABEL: {{^---$}} -// CHECK-LABEL: {{^---$}} -// CHECK-LABEL: {{^---$}} -// CHECK-LABEL: {{^---$}} -// CHECK-LABEL: {{^---$}} - -// CHECK: {{^name:[ ]+'foo<int>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-memoization.cpp:41:10'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<int>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-memoization.cpp:41:10'$}} -foo<int> y; - diff --git a/clang/test/Templight/templight-nested-memoization.cpp b/clang/test/Templight/templight-nested-memoization.cpp deleted file mode 100644 index 37e8483f5381a..0000000000000 --- a/clang/test/Templight/templight-nested-memoization.cpp +++ /dev/null @@ -1,174 +0,0 @@ -// RUN: %clang_cc1 -templight-dump %s 2>&1 | FileCheck %s - -template <int N> -struct fib -{ - static const int value = fib<N-1>::value + fib<N-2>::value; -}; - -template <> -struct fib<0> -{ - static const int value = 1; -}; - -template <> -struct fib<1> -{ - static const int value = 1; -}; - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<4>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:173:8'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<4>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:173:8'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<4>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:173:8'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<3>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:28'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<3>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:28'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<3>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:28'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<2>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:28'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<2>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:28'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<2>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:28'$}} - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<1>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:16:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:28'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<1>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:16:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:28'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<0>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:10:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:46'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<0>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:10:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:46'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<2>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:28'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<2>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:28'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<2>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:28'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<1>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:16:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:46'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<1>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:16:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:46'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<3>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:28'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<3>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:28'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<3>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:28'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<2>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:46'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'fib<2>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:6:46'$}} -// CHECK-LABEL: {{^---$}} -// -// CHECK: {{^name:[ ]+'fib<4>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-memoization.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-memoization.cpp:173:8'$}} -fib<4> x; - diff --git a/clang/test/Templight/templight-nested-template-instantiation.cpp b/clang/test/Templight/templight-nested-template-instantiation.cpp deleted file mode 100644 index a064c16d59181..0000000000000 --- a/clang/test/Templight/templight-nested-template-instantiation.cpp +++ /dev/null @@ -1,84 +0,0 @@ -// RUN: %clang_cc1 -templight-dump %s 2>&1 | FileCheck %s - -template <int N> -struct foo : foo<N - 1> {}; - -template <> -struct foo<0> {}; - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<2>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:84:8'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<2>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:84:8'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<2>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:84:8'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<1>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<1>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<1>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<0>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:7:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<0>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:7:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<1>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<1>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<1>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<2>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:84:8'$}} -foo<2> x; diff --git a/clang/test/Templight/templight-one-instantiation.cpp b/clang/test/Templight/templight-one-instantiation.cpp deleted file mode 100644 index e865ef3a4ba94..0000000000000 --- a/clang/test/Templight/templight-one-instantiation.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// RUN: %clang_cc1 -templight-dump %s 2>&1 | FileCheck %s - -template <class T> -struct foo {}; - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-one-instantiation.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-one-instantiation.cpp:18:10'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'foo<int>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-one-instantiation.cpp:4:8'}} -// CHECK: {{^poi:[ ]+'.*templight-one-instantiation.cpp:18:10'$}} -foo<int> x; diff --git a/clang/test/Templight/templight-prior-template-arg.cpp b/clang/test/Templight/templight-prior-template-arg.cpp deleted file mode 100644 index 14bcb6a4d48f6..0000000000000 --- a/clang/test/Templight/templight-prior-template-arg.cpp +++ /dev/null @@ -1,85 +0,0 @@ -// RUN: %clang_cc1 -templight-dump %s 2>&1 | FileCheck %s -template<class T> -class A {}; - -template <template <class Inner> class Outer> -class B {}; - -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'B::Outer'$}} -// CHECK: {{^kind:[ ]+PriorTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-prior-template-arg.cpp:5:40'}} -// CHECK: {{^poi:[ ]+'.*templight-prior-template-arg.cpp:85:1'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'B::Outer'$}} -// CHECK: {{^kind:[ ]+PriorTemplateArgumentSubstitution$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-prior-template-arg.cpp:5:40'}} -// CHECK: {{^poi:[ ]+'.*templight-prior-template-arg.cpp:85:1'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'B::Outer'$}} -// CHECK: {{^kind:[ ]+PartialOrderingTTP$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-prior-template-arg.cpp:5:40'}} -// CHECK: {{^poi:[ ]+'.*templight-prior-template-arg.cpp:85:3'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'B::Outer'$}} -// CHECK: {{^kind:[ ]+PartialOrderingTTP$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-prior-template-arg.cpp:5:40'}} -// CHECK: {{^poi:[ ]+'.*templight-prior-template-arg.cpp:85:3'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'B<A>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-prior-template-arg.cpp:6:7'}} -// CHECK: {{^poi:[ ]+'.*templight-prior-template-arg.cpp:85:6'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'B<A>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-prior-template-arg.cpp:6:7'}} -// CHECK: {{^poi:[ ]+'.*templight-prior-template-arg.cpp:85:6'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'B<A>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-prior-template-arg.cpp:6:7'}} -// CHECK: {{^poi:[ ]+'.*templight-prior-template-arg.cpp:85:6'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'B<A>'$}} -// CHECK: {{^kind:[ ]+TemplateInstantiation$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-prior-template-arg.cpp:6:7'}} -// CHECK: {{^poi:[ ]+'.*templight-prior-template-arg.cpp:85:6'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'B<A>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-prior-template-arg.cpp:6:7'}} -// CHECK: {{^poi:[ ]+'.*templight-prior-template-arg.cpp:85:6'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'B<A>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-prior-template-arg.cpp:6:7'}} -// CHECK: {{^poi:[ ]+'.*templight-prior-template-arg.cpp:85:6'$}} -// -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'B<A>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+Begin$}} -// CHECK: {{^orig:[ ]+'.*templight-prior-template-arg.cpp:6:7'}} -// CHECK: {{^poi:[ ]+'.*templight-prior-template-arg.cpp:85:6'$}} -// CHECK-LABEL: {{^---$}} -// CHECK: {{^name:[ ]+'B<A>'$}} -// CHECK: {{^kind:[ ]+Memoization$}} -// CHECK: {{^event:[ ]+End$}} -// CHECK: {{^orig:[ ]+'.*templight-prior-template-arg.cpp:6:7'}} -// CHECK: {{^poi:[ ]+'.*templight-prior-template-arg.cpp:85:6'$}} -B<A> b; _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
