In D72333 we've introduced support for if constexpr but the test for uninstantiated template was not ready to land on windows platform since this target uses -fdelayed-template-parsing by default. This patch addresses this by passing -fno-delayed-template-parsing to the test.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Hm, didn't clang gain such a diagnostic itself recently? https://godbolt.org/z/MYJTvw
Wouldn't it make sense to migrate everything into it, and drop this now-duplicating check?
True, but for the moment we are currently using this check in our review-time infrastructure si I'm not sure If we want to drop this just yet.
LGTM.
This check already existed in clang-tidy and had a bug. So we should fix that (thank you for that) and probably even backport (release coming soon).
So even though clang itself might be able to do it, clang-tidy should do it properly as well.
I'll point out that with this approach we lose all test coverage of the checker with delayed template parsing on, even though most of the test works in that mode and delayed template parsing is the default when targeting windows.
That is common in clang-tidies tests, because when the templates are not parsed, the diagnostics are not emitted. But that is not a problem, because the templates only make problems when different instantiation and the template itself create different / conflicting diagnostics.
But here that is ok.