Skip to content

Commit 818b063

Browse files
committed
[fix] Disable clang-diagnostic-error checker
It is a fix PR to disable clang-diagnostic-error checker in cmd. Now, the users cannot set this checker as enabled with -e.
1 parent b843db0 commit 818b063

File tree

1 file changed

+6
-1
lines changed
  • analyzer/codechecker_analyzer/analyzers/clangtidy

1 file changed

+6
-1
lines changed

analyzer/codechecker_analyzer/analyzers/clangtidy/analyzer.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,12 @@ def get_checker_list(self, config) -> Tuple[List[str], List[str]]:
396396
# as -clang-diagnostic-... .
397397
elif warning_type == CheckerType.ANALYZER:
398398
if state == CheckerState.ENABLED:
399-
compiler_warnings.append('-W' + warning_name)
399+
if checker_name == "clang-diagnostic-error":
400+
# Disable warning of clang-diagnostic-error to
401+
# avoid generated compiler errors.
402+
compiler_warnings.append('-Wno-' + warning_name)
403+
else:
404+
compiler_warnings.append('-W' + warning_name)
400405
enabled_checkers.append(checker_name)
401406
else:
402407
compiler_warnings.append('-Wno-' + warning_name)

0 commit comments

Comments
 (0)