-
Notifications
You must be signed in to change notification settings - Fork 457
Open
Labels
analyzer 📈Related to the analyze commands (analysis driver)Related to the analyze commands (analysis driver)bug 🐛clang-tidy 🐉clang-tidy is a clang-based C++ “linter” tool.clang-tidy is a clang-based C++ “linter” tool.
Description
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 | 2With --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 | 0Expected 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 postprocessingThis 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-errorchecker)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
analyzer 📈Related to the analyze commands (analysis driver)Related to the analyze commands (analysis driver)bug 🐛clang-tidy 🐉clang-tidy is a clang-based C++ “linter” tool.clang-tidy is a clang-based C++ “linter” tool.