Author: Kazu Hirata Date: 2026-11-16T18:49:30-08:00 New Revision: 537664177ff491782726a86f4881e7fd2d5925c8
URL: https://github.com/llvm/llvm-project/commit/537664177ff491782726a86f4881e7fd2d5925c8 DIFF: https://github.com/llvm/llvm-project/commit/537664177ff491782726a86f4881e7fd2d5925c8.diff LOG: [clang] Remove declarations without definitions (NFC) (#242170) This patch removes function and method declarations that have no definitions and no callers. This patch also explicitly deletes two undefined default constructors so that accidental default construction fails at compile time instead of link time. Assisted-by: Antigravity Added: Modified: clang/include/clang/AST/OpenMPClause.h clang/include/clang/AST/TypeBase.h clang/include/clang/CIR/LoweringHelpers.h clang/lib/CIR/CodeGen/CIRGenFunction.h clang/lib/CodeGen/CGExprAgg.cpp Removed: ################################################################################ diff --git a/clang/include/clang/AST/OpenMPClause.h b/clang/include/clang/AST/OpenMPClause.h index 3fc2e696b1c2d..9a16b63c70222 100644 --- a/clang/include/clang/AST/OpenMPClause.h +++ b/clang/include/clang/AST/OpenMPClause.h @@ -10262,8 +10262,6 @@ class OMPChildren final getTrailingObjects<Stmt *>()[NumChildren] = S; } - void setChildren(ArrayRef<Stmt *> Children); - /// Sets the list of variables for this clause. /// /// \param Clauses The list of clauses for the directive. diff --git a/clang/include/clang/AST/TypeBase.h b/clang/include/clang/AST/TypeBase.h index 56e31f25c26d6..dc376530f1506 100644 --- a/clang/include/clang/AST/TypeBase.h +++ b/clang/include/clang/AST/TypeBase.h @@ -5305,7 +5305,7 @@ template <typename Container> class FunctionEffectIterator { size_t Idx = 0; public: - FunctionEffectIterator(); + FunctionEffectIterator() = delete; FunctionEffectIterator(const Container &O, size_t I) : Outer(&O), Idx(I) {} bool operator==(const FunctionEffectIterator &Other) const { return Idx == Other.Idx; @@ -5432,7 +5432,7 @@ class FunctionEffectKindSet { } public: - iterator(); + iterator() = delete; iterator(const FunctionEffectKindSet &O, size_t I) : Outer(&O), Idx(I) { advanceToNextSetBit(); } diff --git a/clang/include/clang/CIR/LoweringHelpers.h b/clang/include/clang/CIR/LoweringHelpers.h index 1b584c6824fc7..6451c72671de4 100644 --- a/clang/include/clang/CIR/LoweringHelpers.h +++ b/clang/include/clang/CIR/LoweringHelpers.h @@ -34,10 +34,6 @@ template <typename StorageTy> StorageTy getZeroInitFromType(mlir::Type ty); template <> mlir::APInt getZeroInitFromType(mlir::Type ty); template <> mlir::APFloat getZeroInitFromType(mlir::Type ty); -template <typename AttrTy, typename StorageTy> -void convertToDenseElementsAttrImpl(cir::ConstArrayAttr attr, - llvm::SmallVectorImpl<StorageTy> &values); - template <typename AttrTy, typename StorageTy> std::optional<mlir::DenseElementsAttr> convertToDenseElementsAttr(cir::ConstArrayAttr attr, diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.h b/clang/lib/CIR/CodeGen/CIRGenFunction.h index ab316a7d83a7c..4a80f3f2989f8 100644 --- a/clang/lib/CIR/CodeGen/CIRGenFunction.h +++ b/clang/lib/CIR/CodeGen/CIRGenFunction.h @@ -2792,10 +2792,6 @@ class CIRGenFunction : public CIRGenTypeCache { ConditionalInfo emitConditionalBlocks(const AbstractConditionalOperator *e, const FuncTy &branchGenFunc); - mlir::Value emitTernaryOnBoolExpr(const clang::Expr *cond, mlir::Location loc, - const clang::Stmt *thenS, - const clang::Stmt *elseS); - /// Build a "reference" to a va_list; this is either the address or the value /// of the expression, depending on how va_list is defined. Address emitVAListRef(const Expr *e); diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index 73c6301c5d585..d4602056b1518 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -227,8 +227,6 @@ class AggExprEmitter : public StmtVisitor<AggExprEmitter> { void VisitVAArgExpr(VAArgExpr *E); void VisitCXXParenListInitExpr(CXXParenListInitExpr *E); - void VisitCXXParenListOrInitListExpr(Expr *ExprToVisit, ArrayRef<Expr *> Args, - Expr *ArrayFiller); void EmitInitializationToLValue(Expr *E, LValue Address); void EmitNullInitializationToLValue(LValue Address); _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
