Skip to content

Commit bf46b0b

Browse files
committed
[clang][dataflow] Eliminate deprecated ControlFlowContext::build() overload.
Reviewed By: ymandel, xazax.hun Differential Revision: https://reviews.llvm.org/D159262
1 parent d948d91 commit bf46b0b

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,6 @@ class ControlFlowContext {
4040
static llvm::Expected<ControlFlowContext> build(const Decl &D, Stmt &S,
4141
ASTContext &C);
4242

43-
/// Builds a ControlFlowContext from an AST node. `D` is the function in which
44-
/// `S` resides. `D` must not be null and `D->isTemplated()` must be false.
45-
LLVM_DEPRECATED("Use the version that takes a const Decl & instead", "")
46-
static llvm::Expected<ControlFlowContext> build(const Decl *D, Stmt &S,
47-
ASTContext &C);
48-
4943
/// Returns the `Decl` containing the statement used to construct the CFG, if
5044
/// available.
5145
const Decl &getDecl() const { return ContainingDecl; }

clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,5 @@ ControlFlowContext::build(const Decl &D, Stmt &S, ASTContext &C) {
109109
std::move(BlockReachable));
110110
}
111111

112-
llvm::Expected<ControlFlowContext>
113-
ControlFlowContext::build(const Decl *D, Stmt &S, ASTContext &C) {
114-
if (D == nullptr)
115-
return llvm::createStringError(
116-
std::make_error_code(std::errc::invalid_argument),
117-
"Declaration must not be null");
118-
119-
return build(*D, S, C);
120-
}
121-
122112
} // namespace dataflow
123113
} // namespace clang

0 commit comments

Comments
 (0)