[clang] 096c20c - [clang][NFC] Convert enums in TypeLocBuilder into constants
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 27 20:57:22 PDT 2025
Author: Vlad Serebrennikov
Date: 2025-04-28T06:57:16+03:00
New Revision: 096c20c0b1284ccf3d3af106a026450403bc288f
URL: https://github.com/llvm/llvm-project/commit/096c20c0b1284ccf3d3af106a026450403bc288f
DIFF: https://github.com/llvm/llvm-project/commit/096c20c0b1284ccf3d3af106a026450403bc288f.diff
LOG: [clang][NFC] Convert enums in TypeLocBuilder into constants
Added:
Modified:
clang/lib/Sema/TypeLocBuilder.h
Removed:
################################################################################
diff --git a/clang/lib/Sema/TypeLocBuilder.h b/clang/lib/Sema/TypeLocBuilder.h
index 15eb2226cdf7f..0c27088a1748b 100644
--- a/clang/lib/Sema/TypeLocBuilder.h
+++ b/clang/lib/Sema/TypeLocBuilder.h
@@ -20,7 +20,7 @@
namespace clang {
class TypeLocBuilder {
- enum { InlineCapacity = 8 * sizeof(SourceLocation) };
+ static constexpr int InlineCapacity = 8 * sizeof(SourceLocation);
/// The underlying location-data buffer. Data grows from the end
/// of the buffer backwards.
@@ -38,7 +38,7 @@ class TypeLocBuilder {
#endif
/// The inline buffer.
- enum { BufferMaxAlignment = alignof(void *) };
+ static constexpr int BufferMaxAlignment = alignof(void *);
alignas(BufferMaxAlignment) char InlineBuffer[InlineCapacity];
unsigned NumBytesAtAlign4;
bool AtAlign8;
More information about the cfe-commits
mailing list