[PATCH] D69435: [clang-tidy] New checker performance-trivially-destructible-check

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 28 13:06:48 PDT 2019


aaron.ballman added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp:27
+  for (FieldDecl *Field : RecordDecl->fields()) {
+    const QualType FieldType = Field->getType();
+    if (FieldType->isDependentType() ||
----------------
Drop top-level `const` qualifiers unless it's a pointer or reference (it's not a style we use elsewhere).


================
Comment at: clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp:39
+  }
+  // TODO(bikineev): Check for empty compound statement?
+  return true;
----------------
We don't usually attach names to TODOs -- are you planning to work on that for this patch?


================
Comment at: clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp:71
+       "class %0 can be made trivially destructible by defaulting the "
+       "destructor on it first declaration")
+      << FirstDecl->getParent()
----------------
it -> its


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

https://reviews.llvm.org/D69435





More information about the cfe-commits mailing list