linux-packaging-mono/external/llvm-project/clang-tools-extra/test/clang-tidy/modernize-use-default-member-init-macros.cpp
Xamarin Public Jenkins (auto-signing) 468663ddbb Imported Upstream version 6.10.0.49
Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
2020-01-16 16:38:04 +00:00

19 lines
507 B
C++

// RUN: %check_clang_tidy %s modernize-use-default-member-init %t -- \
// RUN: -config="{CheckOptions: [{key: modernize-use-default-member-init.IgnoreMacros, value: 0}]}" \
// RUN: -- -std=c++11
#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) {}
};