Author: Dmitri Gribenko Date: 2022-12-23T14:36:52+01:00 New Revision: 3a39b0ac1a72a2fb554e2ccc286003da5166faeb
URL: https://github.com/llvm/llvm-project/commit/3a39b0ac1a72a2fb554e2ccc286003da5166faeb DIFF: https://github.com/llvm/llvm-project/commit/3a39b0ac1a72a2fb554e2ccc286003da5166faeb.diff LOG: [clang] Migrate away from a deprecated Clang CFG factory function Reviewed By: merrymeerkat Differential Revision: https://reviews.llvm.org/D140620 Added: Modified: clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp index c97917ebc3e05..ccf9365940191 100644 --- a/clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp @@ -43,7 +43,7 @@ analyzeFunction(const FunctionDecl &FuncDecl, ASTContext &ASTCtx, using llvm::Expected; Expected<ControlFlowContext> Context = - ControlFlowContext::build(&FuncDecl, FuncDecl.getBody(), &ASTCtx); + ControlFlowContext::build(&FuncDecl, *FuncDecl.getBody(), ASTCtx); if (!Context) return std::nullopt; diff --git a/clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp b/clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp index 8e0e27efae9e8..31d51173d29b2 100644 --- a/clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp +++ b/clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp @@ -68,7 +68,7 @@ runAnalysis(llvm::StringRef Code, AnalysisT (*MakeAnalysis)(ASTContext &)) { 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>()); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits