[PATCH] D132290: [clang-tidy] Skip unions in use-equals-default

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 20 13:35:59 PDT 2022


njames93 added inline comments.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-copy.cpp:38
+  NU(const NU &Other) : Field(Other.Field) {}
+  // CHECK-MESSAGES-NOT: :[[@LINE-1]]:3: warning: use '= default'
+  // CHECK-FIXES: NU(const NU &Other) :
----------------
These lines are redundant as FileCheck will report a failure for any line containing the word 'warning' that doesn't have a directive in the input file.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default.cpp:39
+  NU() {}
+  // CHECK-MESSAGES-NOT: :[[@LINE-1]]:3: warning: use '= default'
+  // CHECK-FIXES: NU() {}
----------------
Same as above


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132290/new/

https://reviews.llvm.org/D132290



More information about the cfe-commits mailing list