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
diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py
index ebee504..6de707d 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 @@
# 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()