[PATCH] D76996: [analyzer] Improve PlacementNewChecker
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 31 01:04:10 PDT 2020
martong added inline comments.
================
Comment at: clang/test/Analysis/placement-new.cpp:265
+
+ // bad 2(custom align) + 1(index '2' offset)
+ ::new (&Xi.b[1]) long; // expected-warning{{Storage type is aligned to 3 bytes but allocated type is aligned to 8 bytes}} expected-note 1 {{}}
----------------
Maybe it is just me, but the contents of the parens here and above seems a bit muddled `(index '2' offset)`. This should be `(index '1' offset)`, shouldn't it?
What is the exact meaning of the number in the hyphens (`'2'` in this case), could you please elaborate?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76996/new/
https://reviews.llvm.org/D76996
More information about the cfe-commits
mailing list