Skip to content

Commit

Permalink
[fix] Disable clang-diagnostic-error checker
Browse files Browse the repository at this point in the history
It is a fix PR to disable clang-diagnostic-error checker in cmd. Now, the users cannot set this checker as enabled with -e.
  • Loading branch information
cservakt committed Aug 26, 2024
1 parent b843db0 commit 5108c23
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,11 @@ def get_checker_list(self, config) -> Tuple[List[str], List[str]]:
# as -clang-diagnostic-... .
elif warning_type == CheckerType.ANALYZER:
if state == CheckerState.ENABLED:
compiler_warnings.append('-W' + warning_name)
# Disable warning of clang-diagnostic-error to avoid
# generated compiler errors.
compiler_warnings.append('-Wno-' + warning_name) \
if checker_name == "clang-diagnostic-error" \
else compiler_warnings.append('-W' + warning_name)
enabled_checkers.append(checker_name)
else:
compiler_warnings.append('-Wno-' + warning_name)
Expand Down

0 comments on commit 5108c23

Please sign in to comment.