[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:18:18 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:
NVM, this is a different situation; the TemplateDepth might be large enough that a `PointerIntPair` couldn't hold.
https://github.com/llvm/llvm-project/pull/107942
More information about the cfe-commits
mailing list