[clang-tools-extra] r271207 - [clang-tidy] Fix script adding new clang-tidy check

Etienne Bergeron via cfe-commits cfe-commits at lists.llvm.org
Mon May 30 08:05:18 PDT 2016


Author: etienneb
Date: Mon May 30 10:05:10 2016
New Revision: 271207

URL: http://llvm.org/viewvc/llvm-project?rev=271207&view=rev
Log:
[clang-tidy] Fix script adding new clang-tidy check

Summary:
The `getName()` call is useless. It's better to show a better example
as tutorial.

Reviewers: alexfh

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D20766

Modified:
    clang-tools-extra/trunk/clang-tidy/add_new_check.py

Modified: clang-tools-extra/trunk/clang-tidy/add_new_check.py
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/add_new_check.py?rev=271207&r1=271206&r2=271207&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/add_new_check.py (original)
+++ clang-tools-extra/trunk/clang-tidy/add_new_check.py Mon May 30 10:05:10 2016
@@ -138,7 +138,7 @@ void %(check_name)s::check(const MatchFi
   if (MatchedDecl->getName().startswith("awesome_"))
     return;
   diag(MatchedDecl->getLocation(), "function '%%0' is insufficiently awesome")
-      << MatchedDecl->getName()
+      << MatchedDecl
       << FixItHint::CreateInsertion(MatchedDecl->getLocation(), "awesome_");
 }
 




More information about the cfe-commits mailing list