[clang-tools-extra] r318951 - [clang-tidy] rename_check.py: fix header guard handling

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 24 06:33:06 PST 2017


Author: alexfh
Date: Fri Nov 24 06:33:06 2017
New Revision: 318951

URL: http://llvm.org/viewvc/llvm-project?rev=318951&view=rev
Log:
[clang-tidy] rename_check.py: fix header guard handling

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

Modified: clang-tools-extra/trunk/clang-tidy/rename_check.py
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/rename_check.py?rev=318951&r1=318950&r2=318951&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/rename_check.py (original)
+++ clang-tools-extra/trunk/clang-tidy/rename_check.py Fri Nov 24 06:33:06 2017
@@ -196,8 +196,8 @@ def main():
 
   clang_tidy_path = os.path.dirname(__file__)
 
-  header_guard_old = args.old_check_name.upper().replace('-', '_')
-  header_guard_new = args.new_check_name.upper().replace('-', '_')
+  header_guard_old = (old_module + '_' + check_name_camel).upper()
+  header_guard_new = (new_module + '_' + new_check_name_camel).upper()
 
   old_module_path = os.path.join(clang_tidy_path, old_module)
   new_module_path = os.path.join(clang_tidy_path, new_module)




More information about the cfe-commits mailing list