[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaCXX / warn-new-overaligned-2.cpp
blobe643015f31b8010516a90acdae04ea3f1cd5db5b
1 // RUN: %clang_cc1 -triple=x86_64-pc-linux-gnu -Wover-aligned -verify %s
2 // expected-no-diagnostics
4 // This test verifies that we don't warn when the global operator new is
5 // overridden. That's why we can't merge this with the other test file.
7 void* operator new(unsigned long);
8 void* operator new[](unsigned long);
10 struct Test {
11 template <typename T>
12 struct SeparateCacheLines {
13 T data;
14 } __attribute__((aligned(256)));
16 SeparateCacheLines<int> high_contention_data[10];
19 void helper() {
20 Test t;
21 new Test;
22 new Test[10];