History log of /llvm-project/clang/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp (Results 26 – 33 of 33)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2
# c205d8cc 27-Mar-2018 Mandeep Singh Grang <mgrang@codeaurora.org>

[clang] Change std::sort to llvm::sort in response to r327219

r327219 added wrappers to std::sort which randomly shuffle the container before
sorting. This will help in uncovering non-determinism c

[clang] Change std::sort to llvm::sort in response to r327219

r327219 added wrappers to std::sort which randomly shuffle the container before
sorting. This will help in uncovering non-determinism caused due to undefined
sorting order of objects having the same key.

To make use of that infrastructure we need to invoke llvm::sort instead of
std::sort.

llvm-svn: 328636

show more ...


Revision tags: llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1
# 8c20828b 21-Dec-2017 Aaron Ballman <aaron@aaronballman.com>

Re-commit r321223, which adds a printing policy to the ASTDumper.

This allows you to dump C++ code that spells bool instead of _Bool, leaves off the elaborated type specifiers when printing struct o

Re-commit r321223, which adds a printing policy to the ASTDumper.

This allows you to dump C++ code that spells bool instead of _Bool, leaves off the elaborated type specifiers when printing struct or class names, and other C-isms.

Fixes the -Wreorder issue and fixes the ast-dump-color.cpp test.

llvm-svn: 321310

show more ...


# 9d6501f6 20-Dec-2017 Aaron Ballman <aaron@aaronballman.com>

Reverting r321223 and its follow-up commit because of failing bots due to Misc/ast-dump-color.cpp.

llvm-svn: 321229


# 207ee3d0 20-Dec-2017 Aaron Ballman <aaron@aaronballman.com>

Add a printing policy to the ASTDumper.

This allows you to dump C++ code that spells bool instead of _Bool, leaves off the elaborated type specifiers when printing struct or class names, and other C

Add a printing policy to the ASTDumper.

This allows you to dump C++ code that spells bool instead of _Bool, leaves off the elaborated type specifiers when printing struct or class names, and other C-isms.

llvm-svn: 321223

show more ...


Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1, llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2
# b9250475 15-Aug-2016 Saleem Abdulrasool <compnerd@compnerd.org>

StaticAnalyzer: Report found fields order in PaddingChecker

Report the found fields order in PaddingChecker.

Patch by Alexander Shaposhnikov!

llvm-svn: 278730


Revision tags: llvmorg-3.9.0-rc1, llvmorg-3.8.1, llvmorg-3.8.1-rc1
# 4d511909 22-Mar-2016 Justin Bogner <mail@justinbogner.com>

StaticAnalyzer: Avoid an unintentional copy

The range here isn't over references, so using `auto &` here incites a
copy. Switching to `auto *` would do, but we might as well list an
explicit type fo

StaticAnalyzer: Avoid an unintentional copy

The range here isn't over references, so using `auto &` here incites a
copy. Switching to `auto *` would do, but we might as well list an
explicit type for clarity.

Found by -Wrange-loop-analysis.

llvm-svn: 264071

show more ...


Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3, llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1
# 83aa9794 14-Jan-2016 Rui Ueyama <ruiu@google.com>

Update for LLVM function name change.

llvm-svn: 257802


# 97c191c4 14-Dec-2015 Ben Craig <ben.craig@codeaurora.org>

[PATCH] Adding checker to detect excess padding in records

The intent of this checker is to generate a report for any class / structure
that could reduce its padding by reordering the fields. This

[PATCH] Adding checker to detect excess padding in records

The intent of this checker is to generate a report for any class / structure
that could reduce its padding by reordering the fields. This results in a very
noisy checker. To reduce the noise, this checker will currently only warn when
the number of bytes over "optimal" is more than 24. This value is configurable
with -analyzer-config performance.Padding:AllowedPad=N. Small values of
AllowedPad have the potential to generate hundreds of reports, and gigabytes
of HTML reports.

The checker searches for padding violations in two main ways. First, it goes
record by record. A report is generated if the fields could be reordered in a
way that reduces the padding by more than AllowedPad bytes. Second, the
checker will generate a report if an array will cause more than AllowedPad
padding bytes to be generated.

The record checker currently skips many ABI specific cases. Classes with base
classes are skipped because base class tail padding is ABI specific. Bitfields
are just plain hard, and duplicating that code seems like a bad idea. VLAs are
both uncommon and non-trivial to fix.

The array checker isn't very thorough right now. It only checks to see if the
element type's fields could be reordered, and it doesn't recursively check to
see if any of the fields' fields could be reordered. At some point in the
future, it would be nice if "arrays" could also look at array new usages and
malloc patterns that appear to be creating arrays.

llvm-svn: 255545

show more ...


12