We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
uint32_t(Opaque)
Opaque
1 parent cfb3afe commit df81082Copy full SHA for df81082
clang/include/clang/AST/Type.h
@@ -52,6 +52,7 @@
52
#include <cstddef>
53
#include <cstdint>
54
#include <cstring>
55
+#include <limits>
56
#include <optional>
57
#include <string>
58
#include <type_traits>
@@ -423,8 +424,9 @@ class Qualifiers {
423
424
// Deserialize qualifiers from an opaque representation.
425
static Qualifiers fromOpaqueValue(uint64_t Opaque) {
426
Qualifiers Qs;
- Qs.Mask = uint32_t(Opaque);
427
- Qs.PtrAuth = PointerAuthQualifier::fromOpaqueValue(uint32_t(Opaque >> 32));
+ constexpr uint32_t U32Max = std::numeric_limits<uint32_t>::max();
428
+ Qs.Mask = Opaque & U32Max;
429
+ Qs.PtrAuth = PointerAuthQualifier::fromOpaqueValue((Opaque >> 32) & U32Max);
430
return Qs;
431
}
432
0 commit comments