alexfh added a comment. Hi Richard,
Thank you for working on this. The script has been begging for refactoring for a while ;) A couple of initial comments, and while I'm looking further into into this patch, could you find other possible usages (in currently existing tests) of the new functionality in check_clang_tidy.py? Thanks! ================ Comment at: test/clang-tidy/check_clang_tidy.py:82 @@ +81,3 @@ + try: + clang_tidy_output = \ + subprocess.check_output(args, stderr=subprocess.STDOUT).decode() ---------------- Looks like this function is used not only for clang-tidy. Maybe this variable should be named more generically? ================ Comment at: test/clang-tidy/check_clang_tidy.py:122 @@ -40,2 +121,3 @@ parser.add_argument('-resource-dir') + parser.add_argument('--header-filter') parser.add_argument('input_file_name') ---------------- There's no need for a separate argument for this. The script passes all arguments after a `--` to clang-tidy, so you can just append `-- -header-filter=... -- -std=c++11` to the RUN: line in the test. ================ Comment at: test/clang-tidy/check_clang_tidy.py:152 @@ -68,4 +151,3 @@ - has_check_fixes = input_text.find('CHECK-FIXES') >= 0 - has_check_messages = input_text.find('CHECK-MESSAGES') >= 0 + has_check_fixes, has_check_messages = has_checks(input_text) ---------------- This function doesn't look like a particularly useful one: 5 lines of code instead of 2 lines and an unclear interface (in which order do the two bools come?). Please revert this part. http://reviews.llvm.org/D16953 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits