Skip to content

Commit

Permalink
[clang][dataflow] Eliminate deprecated ControlFlowContext::build()
Browse files Browse the repository at this point in the history
…overload.

Reviewed By: ymandel, xazax.hun

Differential Revision: https://reviews.llvm.org/D159262
  • Loading branch information
martinboehme committed Sep 4, 2023
1 parent d948d91 commit bf46b0b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
10 changes: 0 additions & 10 deletions clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bf46b0b

Please sign in to comment.