Bug: --generate-reproducer prevents compiler error postprocessing
Description
When --generate-reproducer flag is used, failed analyses are not postprocessed, causing compiler errors to not appear in analysis statistics or reports.
Current Behavior
Without --generate-reproducer:
$ CodeChecker analyze compile_commands.json -o reports --analyzers clang-tidy
# Compiler errors are postprocessed into reports
$ CodeChecker parse reports
Number of processed analyzer result files | 2
With --generate-reproducer:
$ CodeChecker analyze compile_commands.json -o reports --analyzers clang-tidy --generate-reproducer
# Compiler errors are NOT postprocessed
$ CodeChecker parse reports
Number of processed analyzer result files | 0
Expected Behavior
Compiler errors should be postprocessed into reports regardless of --generate-reproducer flag, unless explicitly disabled via --disable clang-diagnostic-error.
Root Cause
In analysis_manager.py, the handle_analysis_result() function only calls handle_failure() when generate_reproducer is False:
elif not generate_reproducer:
handle_failure(...) # This does postprocessing
This means postprocessing is skipped when --generate-reproducer is enabled.
Impact
- Analysis statistics are incomplete
- Compiler errors don't appear in reports
- Users must choose between reproducers and error reports
Proposed Fix
Move postprocessing logic from handle_failure() into handle_analysis_result() to ensure it runs before reproducer generation, regardless of the flag.
Environment
- CodeChecker version: 6.27.1
- Analyzer: clang-tidy (affects
clang-diagnostic-error checker)
Bug:
--generate-reproducerprevents compiler error postprocessingDescription
When
--generate-reproducerflag is used, failed analyses are not postprocessed, causing compiler errors to not appear in analysis statistics or reports.Current Behavior
Without
--generate-reproducer:With
--generate-reproducer:Expected Behavior
Compiler errors should be postprocessed into reports regardless of
--generate-reproducerflag, unless explicitly disabled via--disable clang-diagnostic-error.Root Cause
In
analysis_manager.py, thehandle_analysis_result()function only callshandle_failure()whengenerate_reproduceris False:This means postprocessing is skipped when
--generate-reproduceris enabled.Impact
Proposed Fix
Move postprocessing logic from
handle_failure()intohandle_analysis_result()to ensure it runs before reproducer generation, regardless of the flag.Environment
clang-diagnostic-errorchecker)