https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/98622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6308,11 +6308,11 @@ TypeResult Sema::ActOnTypeName(Declarator &D) {
CheckExtraCXXDefaultArguments(D);
}
- if (const AutoType *AutoT = T->getAs())
-CheckConstrainedAuto(
-AutoT,
-TInfo->getTypeLoc().getContainedAutoTypeLoc().getConceptNameLoc());
@@ -6308,11 +6308,11 @@ TypeResult Sema::ActOnTypeName(Declarator &D) {
CheckExtraCXXDefaultArguments(D);
}
- if (const AutoType *AutoT = T->getAs())
-CheckConstrainedAuto(
-AutoT,
-TInfo->getTypeLoc().getContainedAutoTypeLoc().getConceptNameLoc());
https://github.com/Endilll closed
https://github.com/llvm/llvm-project/pull/98622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/98622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
LGTM, Thanks!
https://github.com/llvm/llvm-project/pull/98622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/98622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(),
/*DiagID=*/0);
- if (const AutoType *AutoT = R->getAs())
-CheckConstrainedAuto(
-AutoT,
-
@@ -36,4 +36,11 @@ template
// expected-warning@-1 {{'C' is deprecated}}
// expected-note@#C {{'C' has been explicitly marked deprecated here}}
void f();
+
+template
+auto b() = delete; // #b
+
+decltype(b<0>()) x;
+// expected-error@-1 {{call to deleted function 'b'}}
+//
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/98622
>From 5310764fb4044bcd4229434e80b64870c4b4ee8c Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Fri, 12 Jul 2024 15:12:37 +0300
Subject: [PATCH 1/4] [clang] Fix crash in concept deprecation
Apparently we
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(),
/*DiagID=*/0);
- if (const AutoType *AutoT = R->getAs())
-CheckConstrainedAuto(
-AutoT,
-
@@ -36,4 +36,11 @@ template
// expected-warning@-1 {{'C' is deprecated}}
// expected-note@#C {{'C' has been explicitly marked deprecated here}}
void f();
+
+template
+auto b() = delete; // #b
+
+decltype(b<0>()) x;
+// expected-error@-1 {{call to deleted function 'b'}}
+//
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/98622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin approved this pull request.
I think this makes sense but please give @mizvekov the day to review before
landing
Thank you both for working on this
https://github.com/llvm/llvm-project/pull/98622
___
cfe-commits mailing li
@@ -6308,11 +6308,11 @@ TypeResult Sema::ActOnTypeName(Declarator &D) {
CheckExtraCXXDefaultArguments(D);
}
- if (const AutoType *AutoT = T->getAs())
-CheckConstrainedAuto(
-AutoT,
-TInfo->getTypeLoc().getContainedAutoTypeLoc().getConceptNameLoc());
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/98622
>From 5310764fb4044bcd4229434e80b64870c4b4ee8c Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Fri, 12 Jul 2024 15:12:37 +0300
Subject: [PATCH 1/3] [clang] Fix crash in concept deprecation
Apparently we
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(),
/*DiagID=*/0);
- if (const AutoType *AutoT = R->getAs())
-CheckConstrainedAuto(
-AutoT,
-
@@ -6308,11 +6308,11 @@ TypeResult Sema::ActOnTypeName(Declarator &D) {
CheckExtraCXXDefaultArguments(D);
}
- if (const AutoType *AutoT = T->getAs())
-CheckConstrainedAuto(
-AutoT,
-TInfo->getTypeLoc().getContainedAutoTypeLoc().getConceptNameLoc());
@@ -6308,11 +6308,11 @@ TypeResult Sema::ActOnTypeName(Declarator &D) {
CheckExtraCXXDefaultArguments(D);
}
- if (const AutoType *AutoT = T->getAs())
-CheckConstrainedAuto(
-AutoT,
-TInfo->getTypeLoc().getContainedAutoTypeLoc().getConceptNameLoc());
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(),
/*DiagID=*/0);
- if (const AutoType *AutoT = R->getAs())
-CheckConstrainedAuto(
-AutoT,
-
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(),
/*DiagID=*/0);
- if (const AutoType *AutoT = R->getAs())
-CheckConstrainedAuto(
-AutoT,
-
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/98622
>From 5310764fb4044bcd4229434e80b64870c4b4ee8c Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Fri, 12 Jul 2024 15:12:37 +0300
Subject: [PATCH 1/2] [clang] Fix crash in concept deprecation
Apparently we
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(),
/*DiagID=*/0);
- if (const AutoType *AutoT = R->getAs())
-CheckConstrainedAuto(
-AutoT,
-
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(),
/*DiagID=*/0);
- if (const AutoType *AutoT = R->getAs())
-CheckConstrainedAuto(
-AutoT,
-
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(),
/*DiagID=*/0);
- if (const AutoType *AutoT = R->getAs())
-CheckConstrainedAuto(
-AutoT,
-
https://github.com/mizvekov requested changes to this pull request.
See previous comments, I think this is primarily an error recovery issue on the
decltype, we shouldn't let it escape an undeduced auto, as that would confuse
further analysis.
https://github.com/llvm/llvm-project/pull/98622
__
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(),
/*DiagID=*/0);
- if (const AutoType *AutoT = R->getAs())
-CheckConstrainedAuto(
-AutoT,
-
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(),
/*DiagID=*/0);
- if (const AutoType *AutoT = R->getAs())
-CheckConstrainedAuto(
-AutoT,
-
AaronBallman wrote:
> > Do you have an idea as to why the type location is invalid in the first
> > place?
>
> Looking at the new test, my guess is that `auto` remains undeduced, so it has
> nowhere to point out to.
Even when it's undeduced, we should still have a source location for it becau
https://github.com/cor3ntin approved this pull request.
LGTM but I agree with Aaron that tracking exactly where we create an invalid
Loc would be interesting.
https://github.com/llvm/llvm-project/pull/98622
___
cfe-commits mailing list
cfe-commits@lis
Endilll wrote:
> Do you have an idea as to why the type location is invalid in the first place?
Looking at the new test, my guess is that `auto` remains undeduced, so it has
nowhere to point out to.
https://github.com/llvm/llvm-project/pull/98622
___
https://github.com/AaronBallman commented:
Do you have an idea as to why the type location is invalid in the first place?
https://github.com/llvm/llvm-project/pull/98622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Vlad Serebrennikov (Endilll)
Changes
Apparently we can't assume that `AutoTypeLoc` from `AutoType` is always valid.
Fixes #98164
---
Full diff: https://github.com/llvm/llvm-project/pull/98622.diff
3 Files Affected:
- (modified) clang/l
https://github.com/Endilll created
https://github.com/llvm/llvm-project/pull/98622
Apparently we can't assume that `AutoTypeLoc` from `AutoType` is always valid.
Fixes #98164
>From 5310764fb4044bcd4229434e80b64870c4b4ee8c Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Fri, 12 Jul 202
34 matches
Mail list logo