|
|
| Bugzilla Link |
9527 |
| Resolution |
FIXED |
| Resolved on |
Jan 24, 2012 15:16 |
| Version |
trunk |
| OS |
Linux |
| Reporter |
LLVM Bugzilla Contributor |
Extended Description
I'd like a new warning that fires whenever a class has alignment that is larger than that provided by the operator new, and doesn't provide its own operator new. We could make it -Wobject-alignment=16 and off by default.
Sample:
class Test {
template
struct SeparateCacheLines {
T data;
} attribute((aligned(64)));
SeparateCacheLines<int> high_contention_data[10];
};
I'd like a warning that fires on class Test, "class Test can not be heap allocated". It should not fire if operator new is overloaded. It should not fire on SeparateCacheLines<> itself.