[clang] d44f4fa - [clang][Interp][NFC] Initialize constants as ~0u
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 19 00:24:21 PST 2023
Author: Timm Bäder
Date: 2023-01-19T09:22:57+01:00
New Revision: d44f4fac424d70e7c8c463ad9f44a228fc61e9e5
URL: https://github.com/llvm/llvm-project/commit/d44f4fac424d70e7c8c463ad9f44a228fc61e9e5
DIFF: https://github.com/llvm/llvm-project/commit/d44f4fac424d70e7c8c463ad9f44a228fc61e9e5.diff
LOG: [clang][Interp][NFC] Initialize constants as ~0u
Added:
Modified:
clang/lib/AST/Interp/Pointer.h
Removed:
################################################################################
diff --git a/clang/lib/AST/Interp/Pointer.h b/clang/lib/AST/Interp/Pointer.h
index 44c485681af5..c0628314e869 100644
--- a/clang/lib/AST/Interp/Pointer.h
+++ b/clang/lib/AST/Interp/Pointer.h
@@ -60,8 +60,8 @@ enum PrimType : unsigned;
/// Base
class Pointer {
private:
- static constexpr unsigned PastEndMark = (unsigned)-1;
- static constexpr unsigned RootPtrMark = (unsigned)-1;
+ static constexpr unsigned PastEndMark = ~0u;
+ static constexpr unsigned RootPtrMark = ~0u;
public:
Pointer() {}
More information about the cfe-commits
mailing list