[PATCH] D18261: Show members of DeclContexts (i.e., class members) in Visual Studio native visualizers
Mike Spertus via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 18 08:39:13 PDT 2016
mspertus added a comment.
I think the code is correct as written, see response in comment
================
Comment at: clang.natvis:77
@@ +76,3 @@
+
+ <!-- Unfortunately, Visual Studio has trouble seeing the PointerBitMask member PointerIntUnion, so I hardwire it to 2 bits-->
+ <Type Name="clang::DeclContext">
----------------
aaron.ballman wrote:
> The only hard-wiring I see uses 3 bits, so is this comment still accurate?
I think the code is correct.
```
llvm::PointerIntPair<Decl *, 2, unsigned> NextInContextAndBits;
```
so `NextInContextAndBits` uses 2 bits for the `int` part. Just to be sure, I also double checked in the debugger (an `IntMask` of 3 represents two bits :) ),
```
((((clang::DeclContext *)(clang::CXXRecordDecl *)D)->FirstDecl)->NextInContextAndBits).IntMask IntMask (3) llvm::PointerIntPair<clang::Decl *,2,unsigned int,llvm::PointerLikeTypeTraits<clang::Decl *> >::<unnamed-enum-PointerBitMask>
```
http://reviews.llvm.org/D18261
More information about the cfe-commits
mailing list