summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/add_new_check.py
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2015-10-06 13:31:00 +0000
committerAaron Ballman <aaron@aaronballman.com>2015-10-06 13:31:00 +0000
commitaaa4080d21ecc6a68221ddea558726950c719b17 (patch)
tree5d69206b7a5ed9d3c9e7dfe59bf96ca4bab87e13 /clang-tools-extra/clang-tidy/add_new_check.py
parent814e5caebcd0ee7346be03bea0aab6221c09ebbe (diff)
downloadbcm5719-llvm-aaa4080d21ecc6a68221ddea558726950c719b17.tar.gz
bcm5719-llvm-aaa4080d21ecc6a68221ddea558726950c719b17.zip
Add a new module for the C++ Core Guidelines, and the first checker for those guidelines: cppcoreguidelines-pro-type-reinterpret-cast.
Patch by Matthias Gehre! llvm-svn: 249399
Diffstat (limited to 'clang-tools-extra/clang-tidy/add_new_check.py')
-rwxr-xr-xclang-tools-extra/clang-tidy/add_new_check.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py
index ebee5049aa2..6de707da3e0 100755
--- a/clang-tools-extra/clang-tidy/add_new_check.py
+++ b/clang-tools-extra/clang-tidy/add_new_check.py
@@ -147,7 +147,8 @@ void %(check_name)s::check(const MatchFinder::MatchResult &Result) {
# Modifies the module to include the new check.
def adapt_module(module_path, module, check_name, check_name_camel):
- filename = os.path.join(module_path, module.capitalize() + 'TidyModule.cpp')
+ modulecpp = filter(lambda p: p.lower() == module.lower() + "tidymodule.cpp", os.listdir(module_path))[0]
+ filename = os.path.join(module_path, modulecpp)
with open(filename, 'r') as f:
lines = f.readlines()
OpenPOWER on IntegriCloud