Author: Fangrui Song Date: 2020-12-06T20:39:01-08:00 New Revision: 5755522b5a8be69d8a9f3b05c5e7078298d0d581
URL: https://github.com/llvm/llvm-project/commit/5755522b5a8be69d8a9f3b05c5e7078298d0d581 DIFF: https://github.com/llvm/llvm-project/commit/5755522b5a8be69d8a9f3b05c5e7078298d0d581.diff LOG: Sema.h: delete unused variables/functions/type aliases Added: Modified: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaTemplate.cpp Removed: ################################################################################ diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index c2fc5dface7f..4eddd07f66d0 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -1072,10 +1072,6 @@ class Sema final { /// have been declared. bool GlobalNewDeleteDeclared; - /// A flag to indicate that we're in a context that permits abstract - /// references to fields. This is really a - bool AllowAbstractFieldReference; - /// Describes how the expressions currently being parsed are /// evaluated at run-time, if at all. enum class ExpressionEvaluationContext { @@ -1134,9 +1130,6 @@ class Sema final { /// Whether the enclosing context needed a cleanup. CleanupInfo ParentCleanup; - /// Whether we are in a decltype expression. - bool IsDecltype; - /// The number of active cleanup objects when we entered /// this expression evaluation context. unsigned NumCleanupObjects; @@ -1635,7 +1628,6 @@ class Sema final { llvm::Optional<ImmediateDiagBuilder> ImmediateDiag; llvm::Optional<unsigned> PartialDiagId; }; - using DiagBuilderT = SemaDiagnosticBuilder; /// Is the last error level diagnostic immediate. This is used to determined /// whether the next info diagnostic should be immediate. @@ -2810,12 +2802,6 @@ class Sema final { /// and partial specializations are visible, and diagnose if not. void checkSpecializationVisibility(SourceLocation Loc, NamedDecl *Spec); - /// We've found a use of a template specialization that would select a - /// partial specialization. Check that the partial specialization is visible, - /// and diagnose if not. - void checkPartialSpecializationVisibility(SourceLocation Loc, - NamedDecl *Spec); - /// Retrieve a suitable printing policy for diagnostics. PrintingPolicy getPrintingPolicy() const { return getPrintingPolicy(Context, PP); diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 5710f9e3daad..a465c6594851 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -11114,14 +11114,3 @@ void Sema::checkSpecializationVisibility(SourceLocation Loc, NamedDecl *Spec) { ExplicitSpecializationVisibilityChecker(*this, Loc).check(Spec); } - -/// Check whether a template partial specialization that we've discovered -/// is hidden, and produce suitable diagnostics if so. -void Sema::checkPartialSpecializationVisibility(SourceLocation Loc, - NamedDecl *Spec) { - llvm::SmallVector<Module *, 8> Modules; - if (!hasVisibleDeclaration(Spec, &Modules)) - diagnoseMissingImport(Loc, Spec, Spec->getLocation(), Modules, - MissingImportKind::PartialSpecialization, - /*Recover*/true); -} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits