[PATCH] D115503: [DebugInfo][Clang] record the access flag for class/struct/union types.

ChenZheng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 12 23:19:17 PST 2021


shchenz added inline comments.


================
Comment at: clang/test/CodeGenCXX/debug-info-access.cpp:28
 
+class C {
+public:
----------------
Esme wrote:
> dblaikie wrote:
> > shchenz wrote:
> > > Will we generate a redundant flag if we define a private type in the class or a public type in the struct/union? Maybe we could add a case for that too.
> > How',s this compare to member variables? Do we always put the access level on members even when it's the default? Perhaps the Flag handling code could be generalized and used between both these cases & if one of them gets fixed in favor of not explicitly specifying the default, both would benefit.
> Member variables use the same Flag handling code, i.e. getAccessFlag(), which returns 0 if the access specifier equals the default for the containing type.
> Therefore for both cases we will not record the access flag when it's the default.
> The case where the default access is not explicitly specified is added now.
Good to know `getAccessFlag()` already takes care of this case. Thanks


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115503/new/

https://reviews.llvm.org/D115503



More information about the cfe-commits mailing list