Affects Version/s: 6.24
Fix Version/s: 6.26
This is currently triggered by (mainly) the following use case:
- SonarLint CLion with remote toolchain and analysis of a single file (preamble is built only when a single file is analyzed)
- target triple defaults to x86_64-unknown-unknown in case of remote toolchains
- preamble is built with x86_64-unknown-unknown target info
- analysis runs with a custom target info not matching the target info used during preamble build
- inconsistency of target info leads to a crash when a builtin is present in x86_64-unknown-unknown and used in the analyzed compilation unit. The builtin will be present in the Preamble but not found during analysis in the custom target info
CPP-3159, that leads to inconsistency, and crash.
Example of a builtin to reproduce the issue: __builtin_ia32_pand
We should use the same target info during Preamble construction as the one used during analysis.