Author: Eisuke Kawashima Date: 2024-06-01T09:12:35+02:00 New Revision: daaaf4e9009edf38dfc3d01d3c30de0827ffd1b5
URL: https://github.com/llvm/llvm-project/commit/daaaf4e9009edf38dfc3d01d3c30de0827ffd1b5 DIFF: https://github.com/llvm/llvm-project/commit/daaaf4e9009edf38dfc3d01d3c30de0827ffd1b5.diff LOG: [analyzer][NFC] Fix comparison to True/False (#94038) from PEP8 (https://peps.python.org/pep-0008/#programming-recommendations): > Comparisons to singletons like None should always be done with is or is not, never the equality operators. Co-authored-by: Eisuke Kawashima <e-k...@users.noreply.github.com> Added: Modified: clang/tools/scan-build/bin/set-xcode-analyzer clang/utils/check_cfc/check_cfc.py Removed: ################################################################################ diff --git a/clang/tools/scan-build/bin/set-xcode-analyzer b/clang/tools/scan-build/bin/set-xcode-analyzer index f8c3f775ef7de..8e4a5794594a6 100755 --- a/clang/tools/scan-build/bin/set-xcode-analyzer +++ b/clang/tools/scan-build/bin/set-xcode-analyzer @@ -107,7 +107,7 @@ def main(): foundSpec = True ModifySpec(x, isBuiltinAnalyzer, path) - if foundSpec == False: + if not foundSpec: print "(-) No compiler configuration file was found. Xcode's analyzer has not been updated." if __name__ == '__main__': diff --git a/clang/utils/check_cfc/check_cfc.py b/clang/utils/check_cfc/check_cfc.py index 27d732d91030c..8d42ec532bbb7 100755 --- a/clang/utils/check_cfc/check_cfc.py +++ b/clang/utils/check_cfc/check_cfc.py @@ -156,7 +156,7 @@ def get_output_file(args): elif arg.startswith("-o"): # Specified conjoined with -o return arg[2:] - assert grabnext == False + assert not grabnext return None @@ -182,7 +182,7 @@ def replace_output_file(args, new_name): if replaceidx is None: raise Exception replacement = new_name - if attached == True: + if attached: replacement = "-o" + new_name args[replaceidx] = replacement return args _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits