[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 3 10:08:58 PDT 2024
jansvoboda11 wrote:
I don't think this is correct. If you concurrently scan the same file under two language standards with the same scanning service, it becomes non-deterministic which one gets cached in the filesystem cache. For subsequent FS queries the cache might return wrong results, ignoring language options. You need to make the language standard a part of the cache key.
An alternative solution (that I prefer) is to set up the scanner in a way that always accepts `'` in integer constants. This works around the caching issue and the build can still fail at compile-time where the language standard kicks in as usual.
https://github.com/llvm/llvm-project/pull/93753
More information about the cfe-commits
mailing list