[PATCH] D147924: [clang-tidy] Exclude template instantiations in modernize-use-override
Carlos Galvez via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 15 02:45:48 PDT 2023
carlosgalvezp accepted this revision.
carlosgalvezp added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/use-override-templates.cpp:46
+ // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override]
+ // CHECK-FIXES: {{^}} void boo3() override;{{$}}
+};
----------------
PiotrZSL wrote:
> carlosgalvezp wrote:
> > Same as above, start/end markers seem to not be needed.
> I will remove it, but note that If I do that, test will still pass if I comment out removal of virtual keyword in code.
That's a good point, I didn't consider that. It's important that the test fails if that part is removed, so you are right and the markers are indeed needed. Sorry for the confusion! I can approve now, feel free to bring the markers back before landing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147924/new/
https://reviews.llvm.org/D147924
More information about the cfe-commits
mailing list