]> granicus.if.org Git - clang/commit
[analyzer] Allow padding checker to traverse simple class hierarchies
authorAlexander Shaposhnikov <shal1t712@gmail.com>
Tue, 30 Oct 2018 01:20:37 +0000 (01:20 +0000)
committerAlexander Shaposhnikov <shal1t712@gmail.com>
Tue, 30 Oct 2018 01:20:37 +0000 (01:20 +0000)
commit09b3136b5b683b6de8dfd465c0c8d3859f1a2689
tree47f10debf55b3af4d409bdfcff9d3dbd2bf630dd
parent9c00cb380abfef70fad586e8e8bbfb784b6f912c
[analyzer] Allow padding checker to traverse simple class hierarchies

The existing padding checker skips classes that have any base classes.
This patch allows the checker to traverse very simple cases:
classes that have no fields and have exactly one base class.
This is important mostly in the case of array declarations.

Patch by Max Bernstein!

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D53206

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345558 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/PaddingChecker.cpp
test/Analysis/padding_inherit.cpp [new file with mode: 0644]