summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/checkers/modernize-use-equals-default-macros.cpp
blob: a660f81e2935e8365dcb04e908d00e3e78562b3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %check_clang_tidy %s modernize-use-equals-default %t -- \
// RUN:   -config="{CheckOptions: [{key: modernize-use-equals-default.IgnoreMacros, value: 0}]}"

#define STRUCT_WITH_DEFAULT(_base, _type) \
  struct _type {                          \
    _type() {}                            \
    _base value;                          \
  };

STRUCT_WITH_DEFAULT(unsigned char, InMacro)
// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use '= default' to define a trivial default constructor
// CHECK-MESSAGES: :[[@LINE-6]]:13: note:
OpenPOWER on IntegriCloud