[clang-tools-extra] 2239fd5 - Fix build failure caused by https://reviews.llvm.org/D150352
Amy Kwan via cfe-commits
cfe-commits at lists.llvm.org
Mon May 15 10:18:18 PDT 2023
Author: Amy Kwan
Date: 2023-05-15T12:18:06-05:00
New Revision: 2239fd50bd807ce32c54e03d548cc0cc7c6e64dd
URL: https://github.com/llvm/llvm-project/commit/2239fd50bd807ce32c54e03d548cc0cc7c6e64dd
DIFF: https://github.com/llvm/llvm-project/commit/2239fd50bd807ce32c54e03d548cc0cc7c6e64dd.diff
LOG: Fix build failure caused by https://reviews.llvm.org/D150352
This patch fixes the following build error on the clang-ppc64le-rhel bot seen in
in https://lab.llvm.org/buildbot/#/builders/57/builds/26816/steps/5/logs/stdio:
FAILED: tools/clang/tools/extra/clang-tidy/bugprone/CMakeFiles/obj.clangTidyBugproneModule.dir/UncheckedOptionalAccessCheck.cpp.o
.../clang-ppc64le-rhel/llvm-project/clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp:43:27: error: 'build' is deprecated: Use the version that takes a const Decl & instead [-Werror,-Wdeprecated-declarations]
ControlFlowContext::build(&FuncDecl, *FuncDecl.getBody(), ASTCtx);
^
.../ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:41:3: note: 'build' has been explicitly marked deprecated here
LLVM_DEPRECATED("Use the version that takes a const Decl & instead", "")
^
.../clang-ppc64le-rhel/llvm-project/llvm/include/llvm/Support/Compiler.h:143:50: note: expanded from macro 'LLVM_DEPRECATED'
#define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
^
1 error generated.
Added:
Modified:
clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp
index f02eeceabe96a..eae955e8d4761 100644
--- a/clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp
@@ -40,7 +40,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;
More information about the cfe-commits
mailing list