Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Analysis / new-aligned.cpp
blob041e63ec24debba2c0d1e5979a12d3c61000be40
1 //RUN: %clang_analyze_cc1 -std=c++17 -analyzer-checker=core -verify %s
3 // expected-no-diagnostics
5 // Notice the weird alignment.
6 struct alignas(1024) S {};
8 void foo() {
9 // Operator new() here is the C++17 aligned new that takes two arguments:
10 // size and alignment. Size is passed implicitly as usual, and alignment
11 // is passed implicitly in a similar manner.
12 S *s = new S; // no-warning
13 delete s;