danielmarjamaki added inline comments.
================ Comment at: tools/scan-build-py/libscanbuild/analyze.py:165 + with open(filename, 'r') as in_file: + for line in in_file: + yield line ---------------- I believe you can write: for line in open(filename, 'r'): ================ Comment at: tools/scan-build-py/libscanbuild/analyze.py:172 + extern_fns_map_file = os.path.join(ctudir, CTU_FUNCTION_MAP_FILENAME) + with open(extern_fns_map_file, 'w') as out_file: + for mangled_name, ast_file in mangled_ast_pairs: ---------------- this 'with' seems redundant. I suggest an assignment and then less indentation will be needed below ================ Comment at: tools/scan-build-py/libscanbuild/analyze.py:223 + ctu_config = get_ctu_config(args) + if ctu_config.collect: + shutil.rmtree(ctu_config.dir, ignore_errors=True) ---------------- not a big deal but I would use early exits in this function ================ Comment at: tools/scan-build-py/libscanbuild/clang.py:177 + arch = "" + i = 0 + while i < len(cmd) and cmd[i] != "-triple": ---------------- I am guessing that you can use cmd.find() instead of the loop https://reviews.llvm.org/D30691 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits