Author: Martin Braenne Date: 2023-09-04T08:30:54Z New Revision: bf46b0b551011d958ae642f808894311513517ef
URL: https://github.com/llvm/llvm-project/commit/bf46b0b551011d958ae642f808894311513517ef DIFF: https://github.com/llvm/llvm-project/commit/bf46b0b551011d958ae642f808894311513517ef.diff LOG: [clang][dataflow] Eliminate deprecated `ControlFlowContext::build()` overload. Reviewed By: ymandel, xazax.hun Differential Revision: https://reviews.llvm.org/D159262 Added: Modified: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp Removed: ################################################################################ diff --git a/clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h b/clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h index a45bb0635a2f363..768387a121b920a 100644 --- a/clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h +++ b/clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h @@ -40,12 +40,6 @@ class ControlFlowContext { static llvm::Expected<ControlFlowContext> build(const Decl &D, Stmt &S, ASTContext &C); - /// Builds a ControlFlowContext from an AST node. `D` is the function in which - /// `S` resides. `D` must not be null and `D->isTemplated()` must be false. - LLVM_DEPRECATED("Use the version that takes a const Decl & instead", "") - static llvm::Expected<ControlFlowContext> build(const Decl *D, Stmt &S, - ASTContext &C); - /// Returns the `Decl` containing the statement used to construct the CFG, if /// available. const Decl &getDecl() const { return ContainingDecl; } diff --git a/clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp b/clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp index d5e0b443caf3015..7f9bc31bd41f2dd 100644 --- a/clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp +++ b/clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp @@ -109,15 +109,5 @@ ControlFlowContext::build(const Decl &D, Stmt &S, ASTContext &C) { std::move(BlockReachable)); } -llvm::Expected<ControlFlowContext> -ControlFlowContext::build(const Decl *D, Stmt &S, ASTContext &C) { - if (D == nullptr) - return llvm::createStringError( - std::make_error_code(std::errc::invalid_argument), - "Declaration must not be null"); - - return build(*D, S, C); -} - } // namespace dataflow } // namespace clang _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits