Skip to content

Commit bd100c8

Browse files
committed
Completely remove -analyzer-opt-analyze-headers option
1 parent d26991b commit bd100c8

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

analyzer/codechecker_analyzer/analyzers/clangsa/analyzer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,6 @@ def construct_analyzer_cmd(self, result_handler):
507507

508508
analyzer_mode = 'plist-multi-file'
509509
analyzer_cmd.extend(['-Xclang',
510-
'-analyzer-opt-analyze-headers',
511-
'-Xclang',
512510
'-analyzer-output=' + analyzer_mode,
513511
'-o', analyzer_output_file])
514512

analyzer/tests/unit/test_analyzer_command.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,13 @@ def test_isystem_idirafter(self):
6363
result_handler = create_result_handler(analyzer)
6464
cmd = analyzer.construct_analyzer_cmd(result_handler)
6565
self.assertIn('-idirafter', cmd)
66+
67+
def test_no_analyze_headers(self):
68+
"""
69+
Test that the -analyzer-opt-analyze-headers flag is NOT present in the
70+
analyzer command.
71+
"""
72+
analyzer = create_analyzer_sa()
73+
result_handler = create_result_handler(analyzer)
74+
cmd = analyzer.construct_analyzer_cmd(result_handler)
75+
self.assertNotIn('-analyzer-opt-analyze-headers', cmd)

0 commit comments

Comments
 (0)