[clang] [clang] Fix crash in concept deprecation (PR #98622)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 18 08:23:55 PDT 2024


================
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
     tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(),
                                     /*DiagID=*/0);
 
-  if (const AutoType *AutoT = R->getAs<AutoType>())
-    CheckConstrainedAuto(
-        AutoT,
-        TInfo->getTypeLoc().getContainedAutoTypeLoc().getConceptNameLoc());
+  if (const AutoType *AutoT = R->getAs<AutoType>()) {
+    AutoTypeLoc Loc = TInfo->getTypeLoc().getContainedAutoTypeLoc();
----------------
mizvekov wrote:

Yeah, we don't need to have both TypeSourceInfo and TypeLoc in clang. I am not sure the history of how the situation arose, but we can pretty much consolidate on TypeLoc at some point.

https://github.com/llvm/llvm-project/pull/98622


More information about the cfe-commits mailing list