================
@@ -1342,7 +1342,10 @@ QualType
Sema::CheckNonTypeTemplateParameterType(TypeSourceInfo *&TSI,
// - an identifier associated by name lookup with a non-type
// template-parameter declared with a type that contains a
// placeholder type (7.1.7.4),
- TSI = SubstAutoTypeSourceInfoDependent(TSI);
+ TypeSourceInfo *NewTSI = SubstAutoTypeSourceInfoDependent(TSI);
+ if (!NewTSI)
+ return QualType();
+ TSI = NewTSI;
----------------
sdkrystian wrote:
`SubstAutoTypeSourceInfoDependent` won't modify `TSI`. It returns `TSI`
unchanged if there is nothing to transform, a new `TypeSourceInfo` if
substitution was performed and succeeded, or `nullptr` if it fails.
https://github.com/llvm/llvm-project/pull/186200
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits