[PATCH] D82784: [clang-tidy] For `run-clang-tidy.py` do not treat `allow_enabling_alpha_checkers` as a none value.
Andi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 29 09:42:28 PDT 2020
Abpostelnicu created this revision.
Abpostelnicu added a reviewer: JonasToth.
Herald added subscribers: cfe-commits, Charusso, xazax.hun.
Herald added a project: clang.
Abpostelnicu edited the summary of this revision.
`allow_enabling_alpha_checkers` will never be None, it will be `True` or `False` from argparse so threat it accordingly.
The issue has been discovered by felixn <https://github.com/felixn>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D82784
Files:
clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
Index: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
===================================================================
--- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -84,7 +84,7 @@
extra_arg, extra_arg_before, quiet, config):
"""Gets a command line for clang-tidy."""
start = [clang_tidy_binary]
- if allow_enabling_alpha_checkers is not None:
+ if allow_enabling_alpha_checkers:
start.append('-allow-enabling-analyzer-alpha-checkers')
if header_filter is not None:
start.append('-header-filter=' + header_filter)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82784.274153.patch
Type: text/x-patch
Size: 636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200629/5546b5c7/attachment-0001.bin>
More information about the cfe-commits
mailing list