[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 10 08:04:48 PDT 2024
================
@@ -254,6 +254,33 @@ class CXXBaseSpecifier {
TypeSourceInfo *getTypeSourceInfo() const { return BaseTypeInfo; }
};
+class ContextDeclOrSentinel {
+ uintptr_t Pointer;
+
+public:
+ ContextDeclOrSentinel(Decl *Pointer) : Pointer(uintptr_t(Pointer)) {}
+ explicit ContextDeclOrSentinel(unsigned TemplateDepth)
+ : Pointer(TemplateDepth << 1 | 1) {}
----------------
zyn0217 wrote:
Can we use `PointerIntPair`?
https://github.com/llvm/llvm-project/pull/107942
More information about the cfe-commits
mailing list