1 // RUN: %clang_analyze_cc1 -std=c++14 -triple x86_64-linux-gnu -analyzer-checker=optin.performance -analyzer-config optin.performance.Padding:AllowedPad=2 -verify %s
3 class Empty
{}; // no-warning
5 // expected-warning@+1{{Excessive padding in 'struct NoUniqueAddressWarn1' (6 padding}}
6 struct NoUniqueAddressWarn1
{
8 [[no_unique_address
]] Empty empty
;
13 // expected-warning@+1{{Excessive padding in 'struct NoUniqueAddressWarn2' (6 padding}}
14 struct NoUniqueAddressWarn2
{
16 [[no_unique_address
]] Empty e1
, e2
;
21 struct NoUniqueAddressNoWarn1
{
23 [[no_unique_address
]] Empty empty
;
27 struct NoUniqueAddressNoWarn2
{
29 [[no_unique_address
]] Empty e1
, e2
;