blob: fae1f48648561140d3e5ed07aae39cff5d7014f7 [file] [log] [blame]
Artem Dergachevfcf107d2018-10-15 17:53:18 +00001//RUN: %clang_analyze_cc1 -std=c++17 -analyze -analyzer-checker=core -verify %s
2
3// expected-no-diagnostics
4
5// Notice the weird alignment.
6struct alignas(1024) S {};
7
8void 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;
14}