================
@@ -4887,9 +4887,18 @@ static TypeSourceInfo
*GetFullTypeForDeclarator(TypeProcessingState &state,
cast<AutoType>(T)->getKeyword() !=
AutoTypeKeyword::Auto ||
cast<AutoType>(T)->isConstrained())) {
- S.Diag(D.getDeclSpec().getTypeSpecTypeLoc(),
- diag::err_trailing_return_without_auto)
- << T << D.getDeclSpec().getSourceRange();
+ SourceLocation Loc = D.getDeclSpec().getTypeSpecTypeLoc();
+ SourceRange SR = D.getDeclSpec().getSourceRange();
+ if (Loc.isInvalid()) {
----------------
Fznamznon wrote:
Could you please add a comment explaining what is being done here? It is clear
from the context of the patch, but I don't think it is easy to understand when
simply browsing through the code.
https://github.com/llvm/llvm-project/pull/115786
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits