forked from OSchip/llvm-project
18 lines
485 B
C++
18 lines
485 B
C++
// RUN: %check_clang_tidy %s modernize-use-default-member-init %t -- \
|
|
// RUN: -config="{CheckOptions: [{key: modernize-use-default-member-init.IgnoreMacros, value: false}]}"
|
|
|
|
#define MACRO() \
|
|
struct S { \
|
|
void *P; \
|
|
S() : P(nullptr) {} \
|
|
};
|
|
|
|
MACRO();
|
|
// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use default member initializer for 'P'
|
|
|
|
struct S2 {
|
|
void *P;
|
|
// CHECK-MESSAGES: :[[@LINE-1]]:9: warning: use default member initializer for 'P'
|
|
S2() : P(nullptr) {}
|
|
};
|