[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

Carlos Galvez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 30 00:14:10 PDT 2021


carlosgalvezp marked 5 inline comments as done.
carlosgalvezp added inline comments.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-virtual-class-destructor.cpp:208
+// Forward declarations
+// CHECK-MESSAGES-NOT: :[[@LINE+1]]:8: warning: destructor of 'ForwardDeclaredStruct' is public and non-virtual [cppcoreguidelines-virtual-class-destructor]
+struct ForwardDeclaredStruct;
----------------
whisperity wrote:
> What does this prefix do? (I've never seen this before! 😮)
I got the tip from @aaron.ballman :) Most likely it's not technically needed (the tests would catch unexpected warnings) but it expresses more clearly the expectations.


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

https://reviews.llvm.org/D110614



More information about the cfe-commits mailing list