diff options
author | Gabor Marton <gabor.marton@ericsson.com> | 2020-01-10 16:51:14 +0100 |
---|---|---|
committer | Gabor Marton <gabor.marton@ericsson.com> | 2020-01-10 17:59:06 +0100 |
commit | 5e7beb0a4146267f1d65c57543e67ca158aca4aa (patch) | |
tree | 5252392205ad00370004e139557f6f4e9f1381bf /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | e9331a56fead1823d528d6412828fb9e16fd62ff (diff) | |
download | llvm-5e7beb0a4146267f1d65c57543e67ca158aca4aa.zip llvm-5e7beb0a4146267f1d65c57543e67ca158aca4aa.tar.gz llvm-5e7beb0a4146267f1d65c57543e67ca158aca4aa.tar.bz2 |
[analyzer] Add PlacementNewChecker
Summary:
This checker verifies if default placement new is provided with pointers
to sufficient storage capacity.
Noncompliant Code Example:
#include <new>
void f() {
short s;
long *lp = ::new (&s) long;
}
Based on SEI CERT rule MEM54-CPP
https://wiki.sei.cmu.edu/confluence/display/cplusplus/MEM54-CPP.+Provide+placement+new+with+properly+aligned+pointe
This patch does not implement checking of the alignment.
Reviewers: NoQ, xazax.hun
Subscribers: mgorny, whisperity, xazax.hun, baloghadamsoftware, szepet,
rnkovacs, a.sidorin, mikhail.ramalho, donat
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71612
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions