[PATCH] D132990: [Clang] Fix compat diagnostic to detect a nontype template parameter has a placeholder type using getContainedAutoType()
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 1 17:53:14 PDT 2022
shafik added inline comments.
================
Comment at: clang/lib/Sema/SemaTemplate.cpp:1534-1538
+ if (TInfo->getType()->getContainedAutoType()) {
Diag(D.getIdentifierLoc(),
diag::warn_cxx14_compat_template_nontype_parm_auto_type)
<< QualType(TInfo->getType()->getContainedAutoType(), 0);
}
----------------
mizvekov wrote:
> I think checking that the deduced type is undeduced was really unnecessary though, as I don't think we update the type source infos after deduction in any case.
I am not sure about the `DeducedTemplateSpecializationType` I was looking at the change that brought in that type and it is not clear to me what a good test would be. I believe outside of C++17 mode they would be hard errors. Can you provide an example that would work outside of C++17 mode?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132990/new/
https://reviews.llvm.org/D132990
More information about the cfe-commits
mailing list