[PATCH] D20766: [clang-tidy] Fix script adding new clang-tidy check
Etienne Bergeron via cfe-commits
cfe-commits at lists.llvm.org
Fri May 27 20:19:38 PDT 2016
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
The `getName()` call is useless. It's better to show a better example
as tutorial.
http://reviews.llvm.org/D20766
Files:
clang-tidy/add_new_check.py
Index: clang-tidy/add_new_check.py
===================================================================
--- clang-tidy/add_new_check.py
+++ clang-tidy/add_new_check.py
@@ -138,7 +138,7 @@
if (MatchedDecl->getName().startswith("awesome_"))
return;
diag(MatchedDecl->getLocation(), "function '%%0' is insufficiently awesome")
- << MatchedDecl->getName()
+ << MatchedDecl
<< FixItHint::CreateInsertion(MatchedDecl->getLocation(), "awesome_");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20766.58878.patch
Type: text/x-patch
Size: 472 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160528/b90b5572/attachment.bin>
More information about the cfe-commits
mailing list