[PATCH] D140620: [clang] Migrate away from a deprecated Clang CFG factory function
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 23 04:34:10 PST 2022
gribozavr created this revision.
gribozavr added a reviewer: merrymeerkat.
Herald added a subscriber: carlosgalvezp.
Herald added a reviewer: njames93.
Herald added a project: All.
gribozavr requested review of this revision.
Herald added projects: clang, clang-tools-extra.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D140620
Files:
clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp
clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp
Index: clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp
===================================================================
--- clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp
+++ clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp
@@ -68,7 +68,7 @@
assert(Body != nullptr);
auto CFCtx = llvm::cantFail(
- ControlFlowContext::build(nullptr, Body, &AST->getASTContext()));
+ ControlFlowContext::build(nullptr, *Body, AST->getASTContext()));
AnalysisT Analysis = MakeAnalysis(AST->getASTContext());
DataflowAnalysisContext DACtx(std::make_unique<WatchedLiteralsSolver>());
Index: clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp
===================================================================
--- clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp
+++ clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp
@@ -43,7 +43,7 @@
using llvm::Expected;
Expected<ControlFlowContext> Context =
- ControlFlowContext::build(&FuncDecl, FuncDecl.getBody(), &ASTCtx);
+ ControlFlowContext::build(&FuncDecl, *FuncDecl.getBody(), ASTCtx);
if (!Context)
return std::nullopt;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140620.485085.patch
Type: text/x-patch
Size: 1246 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221223/3469b9ab/attachment.bin>
More information about the cfe-commits
mailing list