aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
diff options
context:
space:
mode:
authorJie Fu <jiefu@tencent.com>2023-04-04 16:17:25 +0800
committerJie Fu <jiefu@tencent.com>2023-04-04 16:17:25 +0800
commitc107231cde99c0b8cdda5c5befe6354750ca03f2 (patch)
tree044d45ad8441f2475da38ba58e2c60f6e800d029 /clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
parent78b1fbc63f78660ef10e3ccf0e527c667a563bc8 (diff)
downloadllvm-c107231cde99c0b8cdda5c5befe6354750ca03f2.zip
llvm-c107231cde99c0b8cdda5c5befe6354750ca03f2.tar.gz
llvm-c107231cde99c0b8cdda5c5befe6354750ca03f2.tar.bz2
[clang][dataflow] Fix -Wdeprecated-declarations after D147302 (NFC)
Replace: 1. createAtomicBoolValue() --> create<AtomicBoolValue>() 2. createTopBoolValue() --> create<TopBoolValue>() /Users/jiefu/llvm-project/clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:386:19: error: 'createAtomicBoolValue' is deprecated: use create<AtomicBoolValue> instead [-Werror,-Wdeprecated-declarations] return DACtx->createAtomicBoolValue(); ^~~~~~~~~~~~~~~~~~~~~ create<AtomicBoolValue> /Users/jiefu/llvm-project/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:215:3: note: 'createAtomicBoolValue' has been explicitly marked deprecated here LLVM_DEPRECATED("use create<AtomicBoolValue> instead", ^ /Users/jiefu/llvm-project/llvm/include/llvm/Support/Compiler.h:143:50: note: expanded from macro 'LLVM_DEPRECATED' ^ In file included from /Users/jiefu/llvm-project/clang/lib/Analysis/FlowSensitive/Transfer.cpp:14: In file included from /Users/jiefu/llvm-project/clang/include/clang/Analysis/FlowSensitive/Transfer.h:19: /Users/jiefu/llvm-project/clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:391:19: error: 'createTopBoolValue' is deprecated: use create<TopBoolValue> instead [-Werror,-Wdeprecated-declarations] return DACtx->createTopBoolValue(); ^~~~~~~~~~~~~~~~~~ create<TopBoolValue> /Users/jiefu/llvm-project/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:227:3: note: 'createTopBoolValue' has been explicitly marked deprecated here LLVM_DEPRECATED("use create<TopBoolValue> instead", "create<TopBoolValue>") ^ /Users/jiefu/llvm-project/llvm/include/llvm/Support/Compiler.h:143:50: note: expanded from macro 'LLVM_DEPRECATED' ^ 2 errors generated.
Diffstat (limited to 'clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp')
-rw-r--r--clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp b/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
index 5a49ef1..4d8a42c 100644
--- a/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
+++ b/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
@@ -157,7 +157,7 @@ BoolValue &DataflowAnalysisContext::getOrCreateIff(BoolValue &LHS,
}
AtomicBoolValue &DataflowAnalysisContext::makeFlowConditionToken() {
- return createAtomicBoolValue();
+ return create<AtomicBoolValue>();
}
void DataflowAnalysisContext::addFlowConditionConstraint(
@@ -378,8 +378,8 @@ DataflowAnalysisContext::getControlFlowContext(const FunctionDecl *F) {
DataflowAnalysisContext::DataflowAnalysisContext(std::unique_ptr<Solver> S,
Options Opts)
- : S(std::move(S)), TrueVal(createAtomicBoolValue()),
- FalseVal(createAtomicBoolValue()), Opts(Opts) {
+ : S(std::move(S)), TrueVal(create<AtomicBoolValue>()),
+ FalseVal(create<AtomicBoolValue>()), Opts(Opts) {
assert(this->S != nullptr);
// If the -dataflow-log command-line flag was set, synthesize a logger.
// This is ugly but provides a uniform method for ad-hoc debugging dataflow-