blob: e643015f31b8010516a90acdae04ea3f1cd5db5b [file] [log] [blame]
Nick Lewycky32d4abf2012-01-24 21:28:47 +00001// RUN: %clang_cc1 -triple=x86_64-pc-linux-gnu -Wover-aligned -verify %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Nick Lewyckyfca84b22012-01-24 21:15:41 +00003
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.
6
7void* operator new(unsigned long);
8void* operator new[](unsigned long);
9
10struct Test {
11 template <typename T>
12 struct SeparateCacheLines {
13 T data;
14 } __attribute__((aligned(256)));
15
16 SeparateCacheLines<int> high_contention_data[10];
17};
18
19void helper() {
20 Test t;
21 new Test;
22 new Test[10];
23}