[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 18 10:52:39 PDT 2020


martong added a comment.

Please note about the alignment requirements that they are not checked in the static analyzer for a reason. To track the alignment data across the data flow, probably we should modify the analyzer's core structure (e.g. `MemRegion`) and some modeling checkers like the `MallocChecker`. That is not an impossible task but also far from easy IMHO (would require several patches built on top of each other). Just as an example for the subtleties: think about the nuances of `operator new`s default alignment and specific C++17 rules (https://reviews.llvm.org/D67545).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76229





More information about the cfe-commits mailing list