[PATCH] D53206: Allow padding checker to traverse simple class hierarchies
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 26 11:49:48 PDT 2018
NoQ added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/PaddingChecker.cpp:78-81
+ // We need to be looking at a definition, not just any pointer to the
+ // declaration.
+ if (!(RD = RD->getDefinition()))
+ return;
----------------
tekknolagi wrote:
> tekknolagi wrote:
> > NoQ wrote:
> > > This check is already in `shouldSkipDecl()` (?)
> > Oh yes, you're right.
> Actually, I'm not sure if you're right. I think it's necessary here because it's only tested for C++ classes in shouldSkipDecl(). This tests it for C structs too. Either we could lift that outside the C++ section of shouldSkipDecl or repeat it here.
Hmm, indeed. Sry!
Repository:
rC Clang
https://reviews.llvm.org/D53206
More information about the cfe-commits
mailing list