[clang] [analyzer][NFC] Fix a warning in RegionStore.cpp (PR #157630)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 9 02:10:49 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-static-analyzer-1
Author: Balazs Benics (steakhal)
<details>
<summary>Changes</summary>
```
clang/lib/StaticAnalyzer/Core/RegionStore.cpp: warning: bitwise operation between different enumeration types ('Kind' and '(anonymous namespace)::BindingKey::(unnamed enum at clang/lib/StaticAnalyzer/Core/RegionStore.cpp)') is deprecated [-Wdeprecated-anon-enum-enum-conversion]
XX | : P(r, k | Symbolic), Data(reinterpret_cast<uintptr_t>(Base)) {
| ~ ^ ~~~~~~~~
1 warning generated.
```
---
Full diff: https://github.com/llvm/llvm-project/pull/157630.diff
1 Files Affected:
- (modified) clang/lib/StaticAnalyzer/Core/RegionStore.cpp (+6-3)
``````````diff
diff --git a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp
index 8f18533af68b9..8e9d6fe59e6ae 100644
--- a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp
+++ b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp
@@ -43,10 +43,13 @@ using namespace ento;
namespace {
class BindingKey {
public:
- enum Kind { Default = 0x0, Direct = 0x1 };
-private:
- enum { Symbolic = 0x2 };
+ enum Kind {
+ Default = 0x0,
+ Direct = 0x1,
+ Symbolic = 0x2,
+ };
+private:
llvm::PointerIntPair<const MemRegion *, 2> P;
uint64_t Data;
``````````
</details>
https://github.com/llvm/llvm-project/pull/157630
More information about the cfe-commits
mailing list