katzdm wrote:
> > > LGTM, but please add a release note so users know about the fix.
> >
> >
> > @AaronBallman Appreciate the reminder! Done.
>
> Thanks! Do you need someone to land the changes?
Yep, I don't have commit privilege - would appreciate the help :)
https://github.com/llvm/llvm-pr
katzdm wrote:
> LGTM, but please add a release note so users know about the fix.
@AaronBallman Appreciate the reminder! Done.
https://github.com/llvm/llvm-project/pull/98671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/98671
>From 1ad95178817e58dd7767f0c8b472ec0b7e46cd45 Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Fri, 12 Jul 2024 13:57:33 -0400
Subject: [PATCH 1/5] Fix assertion failure during operator overload
resolution.
---
c
katzdm wrote:
@AaronBallman @cor3ntin Would you mind taking another look?
https://github.com/llvm/llvm-project/pull/98671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
katzdm wrote:
@zygoloid Friendly ping here, if you have a chance to take another look.
https://github.com/llvm/llvm-project/pull/98671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5824,12 +5824,23 @@ FunctionDecl
*Sema::getMoreConstrainedFunction(FunctionDecl *FD1,
FunctionDecl *FD2) {
assert(!FD1->getDescribedTemplate() && !FD2->getDescribedTemplate() &&
"not for function templates");
- Fun
@@ -5824,12 +5824,23 @@ FunctionDecl
*Sema::getMoreConstrainedFunction(FunctionDecl *FD1,
FunctionDecl *FD2) {
assert(!FD1->getDescribedTemplate() && !FD2->getDescribedTemplate() &&
"not for function templates");
- Fun
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/98671
>From 47db72077258ebe086059f116bbf7fb32c184c8d Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Fri, 12 Jul 2024 13:57:33 -0400
Subject: [PATCH 1/4] Fix assertion failure during operator overload
resolution.
---
c
katzdm wrote:
Looking further into this, I think this is a narrow problem that arises when
selecting a function from an overload set which includes a specialization of a
conversion function template.
Consider a class:
```cpp
struct S {
template void fn();
template operator T();
};
```
W
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/98671
>From 47db72077258ebe086059f116bbf7fb32c184c8d Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Fri, 12 Jul 2024 13:57:33 -0400
Subject: [PATCH 1/3] Fix assertion failure during operator overload
resolution.
---
c
@@ -1519,7 +1519,8 @@ bool Sema::IsAtLeastAsConstrained(NamedDecl *D1,
auto IsExpectedEntity = [](const FunctionDecl *FD) {
FunctionDecl::TemplatedKind Kind = FD->getTemplatedKind();
return Kind == FunctionDecl::TK_NonTemplate ||
- Kind == FunctionDe
https://github.com/katzdm edited https://github.com/llvm/llvm-project/pull/98671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1519,7 +1519,8 @@ bool Sema::IsAtLeastAsConstrained(NamedDecl *D1,
auto IsExpectedEntity = [](const FunctionDecl *FD) {
FunctionDecl::TemplatedKind Kind = FD->getTemplatedKind();
return Kind == FunctionDecl::TK_NonTemplate ||
- Kind == FunctionDe
https://github.com/katzdm deleted
https://github.com/llvm/llvm-project/pull/98671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/katzdm edited https://github.com/llvm/llvm-project/pull/98671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1519,7 +1519,8 @@ bool Sema::IsAtLeastAsConstrained(NamedDecl *D1,
auto IsExpectedEntity = [](const FunctionDecl *FD) {
FunctionDecl::TemplatedKind Kind = FD->getTemplatedKind();
return Kind == FunctionDecl::TK_NonTemplate ||
- Kind == FunctionDe
@@ -1519,7 +1519,8 @@ bool Sema::IsAtLeastAsConstrained(NamedDecl *D1,
auto IsExpectedEntity = [](const FunctionDecl *FD) {
FunctionDecl::TemplatedKind Kind = FD->getTemplatedKind();
return Kind == FunctionDecl::TK_NonTemplate ||
- Kind == FunctionDe
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/98671
>From 47db72077258ebe086059f116bbf7fb32c184c8d Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Fri, 12 Jul 2024 13:57:33 -0400
Subject: [PATCH 1/2] Fix assertion failure during operator overload
resolution.
---
c
https://github.com/katzdm edited https://github.com/llvm/llvm-project/pull/98671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/katzdm ready_for_review
https://github.com/llvm/llvm-project/pull/98671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/98671
>From 47db72077258ebe086059f116bbf7fb32c184c8d Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Fri, 12 Jul 2024 13:57:33 -0400
Subject: [PATCH] Fix assertion failure during operator overload resolution.
---
clang/
https://github.com/katzdm created
https://github.com/llvm/llvm-project/pull/98671
When clang is built with assertions, an otherwise silent (and seemingly
innocuous) assertion failure from `SemaConcept.cpp` is triggered by the
following program:
```cpp
struct S {
operator int();
template
katzdm wrote:
> @katzdm Does it make sense to file an issue so we don't forget to bring the
> warning back?
Yep, for sure - I've opened #92656.
https://github.com/llvm/llvm-project/pull/89565
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
katzdm wrote:
@Fznamznon Hmm...my suggested change does seem to break some tests :( But to
circle back to your original question, I think it's not totally unexpected - a
broader class of variable initializers are now (correctly afaict) evaluated as
constant expressions, which could make some
katzdm wrote:
> @katzdm It seems after this a `warn_impcast_integer_precision_constant`
> warning went missing:
>
> https://godbolt.org/z/ndsPb44b4
>
> Is that expected?
We changed [this
diagnostic](https://github.com/llvm/llvm-project/blob/5ac34358181b21135851979c1c949632be5a9d32/clang/lib/
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/89565
>From 218ffb6d5a03c96d46bfecdb4490277809f5b62e Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Tue, 16 Apr 2024 17:14:50 -0400
Subject: [PATCH 1/8] Fix bug with constexpr initialization.
---
clang/lib/Parse/ParseD
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/89565
>From 218ffb6d5a03c96d46bfecdb4490277809f5b62e Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Tue, 16 Apr 2024 17:14:50 -0400
Subject: [PATCH 1/8] Fix bug with constexpr initialization.
---
clang/lib/Parse/ParseD
https://github.com/katzdm edited https://github.com/llvm/llvm-project/pull/89565
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
katzdm wrote:
๐ Friendly ping - No worries if more time is needed to consider the impact of
this one, but wanted to check if any more changes are needed at this time.
https://github.com/llvm/llvm-project/pull/89565
___
cfe-commits mailing list
cfe-com
@@ -16548,11 +16548,10 @@ static void CheckImplicitConversion(Sema &S, Expr *E,
QualType T,
std::string PrettySourceValue = toString(Value, 10);
std::string PrettyTargetValue = PrettyPrintInRange(Value, TargetRange);
-S.DiagRuntimeBehavior(
-
@@ -18573,25 +18562,35 @@ void Sema::ActOnCXXEnterDeclInitializer(Scope *S,
Decl *D) {
if (S && D->isOutOfLine())
EnterDeclaratorContext(S, D->getDeclContext());
- // If we are parsing the initializer for a static data member, push a
- // new expression evaluation con
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/89565
>From 218ffb6d5a03c96d46bfecdb4490277809f5b62e Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Tue, 16 Apr 2024 17:14:50 -0400
Subject: [PATCH 1/8] Fix bug with constexpr initialization.
---
clang/lib/Parse/ParseD
@@ -16548,11 +16548,10 @@ static void CheckImplicitConversion(Sema &S, Expr *E,
QualType T,
std::string PrettySourceValue = toString(Value, 10);
std::string PrettyTargetValue = PrettyPrintInRange(Value, TargetRange);
-S.DiagRuntimeBehavior(
-
@@ -18573,25 +18562,35 @@ void Sema::ActOnCXXEnterDeclInitializer(Scope *S,
Decl *D) {
if (S && D->isOutOfLine())
EnterDeclaratorContext(S, D->getDeclContext());
- // If we are parsing the initializer for a static data member, push a
- // new expression evaluation con
@@ -18562,9 +18553,7 @@ static bool isNonlocalVariable(const Decl *D) {
/// class X. If the declaration had a scope specifier, a scope will have
/// been created and passed in for this purpose. Otherwise, S will be null.
void Sema::ActOnCXXEnterDeclInitializer(Scope *S, Decl *D
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/89565
>From 218ffb6d5a03c96d46bfecdb4490277809f5b62e Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Tue, 16 Apr 2024 17:14:50 -0400
Subject: [PATCH 1/7] Fix bug with constexpr initialization.
---
clang/lib/Parse/ParseD
https://github.com/katzdm edited https://github.com/llvm/llvm-project/pull/89565
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/89565
>From 218ffb6d5a03c96d46bfecdb4490277809f5b62e Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Tue, 16 Apr 2024 17:14:50 -0400
Subject: [PATCH 1/7] Fix bug with constexpr initialization.
---
clang/lib/Parse/ParseD
@@ -1032,17 +1043,15 @@ int f() {
namespace GH57682 {
void test() {
- constexpr auto l1 = []() consteval { // expected-error {{cannot take address
of consteval call operator of '(lambda at}} \
- // expected-note 2{{declared here}}
+ co
@@ -244,8 +244,8 @@ namespace UndefinedBehavior {
constexpr int n13 = n5 + n5; // expected-error {{constant expression}}
expected-note {{value -4294967296 is outside the range of }}
constexpr int n14 = n3 - n5; // expected-error {{constant expression}}
expected-note {{
@@ -2554,16 +2554,27 @@ Decl *Parser::ParseDeclarationAfterDeclarator(
return ParseDeclarationAfterDeclaratorAndAttributes(D, TemplateInfo);
}
+static bool isConstexprVariable(const Decl *D) {
+ if (const VarDecl *Var = dyn_cast_if_present(D))
+return Var->isConstexpr()
katzdm wrote:
This ended up being a lot more subtle than I expected. My latest push proposes
a different solution; @cor3ntin and @efriedma-quic - please let me know your
thoughts.
This PR turns out to be a bug fix on the implementation of
[P2564R3](https://wg21.link/p2564r3); as such, it onl
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/89565
>From 218ffb6d5a03c96d46bfecdb4490277809f5b62e Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Tue, 16 Apr 2024 17:14:50 -0400
Subject: [PATCH 1/6] Fix bug with constexpr initialization.
---
clang/lib/Parse/ParseD
@@ -2554,16 +2554,27 @@ Decl *Parser::ParseDeclarationAfterDeclarator(
return ParseDeclarationAfterDeclaratorAndAttributes(D, TemplateInfo);
}
+static bool isConstexprVariable(const Decl *D) {
+ if (const VarDecl *Var = dyn_cast_if_present(D))
+return Var->isConstexpr()
@@ -2554,16 +2554,27 @@ Decl *Parser::ParseDeclarationAfterDeclarator(
return ParseDeclarationAfterDeclaratorAndAttributes(D, TemplateInfo);
}
+static bool isConstexprVariable(const Decl *D) {
+ if (const VarDecl *Var = dyn_cast_if_present(D))
+return Var->isConstexpr()
@@ -244,8 +244,8 @@ namespace UndefinedBehavior {
constexpr int n13 = n5 + n5; // expected-error {{constant expression}}
expected-note {{value -4294967296 is outside the range of }}
constexpr int n14 = n3 - n5; // expected-error {{constant expression}}
expected-note {{
@@ -244,8 +244,8 @@ namespace UndefinedBehavior {
constexpr int n13 = n5 + n5; // expected-error {{constant expression}}
expected-note {{value -4294967296 is outside the range of }}
constexpr int n14 = n3 - n5; // expected-error {{constant expression}}
expected-note {{
katzdm wrote:
> LGTM, thanks! Will you need me to merge the change for you?
@cor3ntin That would be great, thanks!
https://github.com/llvm/llvm-project/pull/89702
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/m
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/89702
>From ba1c87956f74248467d2f85c20c2f450eef953bd Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Mon, 22 Apr 2024 22:39:06 -0400
Subject: [PATCH] Push immediate function context while transforming lambdas in
template
https://github.com/katzdm created
https://github.com/llvm/llvm-project/pull/89702
The following program is [accepted](https://godbolt.org/z/oEc34Trh4) by Clang,
EDG, and MSVC, but rejected by Clang:
```cpp
#include
consteval auto fn() { return std::vector {1,2,3}; }
template
void fn2() {
@@ -2554,16 +2554,26 @@ Decl *Parser::ParseDeclarationAfterDeclarator(
return ParseDeclarationAfterDeclaratorAndAttributes(D, TemplateInfo);
}
+static bool isConstexprVariable(const Decl *D) {
+ if (const VarDecl *Var = dyn_cast_or_null(D))
katzdm wrote:
@
@@ -1032,17 +1043,15 @@ int f() {
namespace GH57682 {
void test() {
- constexpr auto l1 = []() consteval { // expected-error {{cannot take address
of consteval call operator of '(lambda at}} \
- // expected-note 2{{declared here}}
+ co
@@ -2554,16 +2554,26 @@ Decl *Parser::ParseDeclarationAfterDeclarator(
return ParseDeclarationAfterDeclaratorAndAttributes(D, TemplateInfo);
}
+static bool isConstexprVariable(const Decl *D) {
+ if (const VarDecl *Var = dyn_cast_or_null(D))
katzdm wrote:
A
https://github.com/katzdm commented:
@cor3ntin Thanks for your review; this is ready for another look.
Note that the use of a full `ExpressionEvaluationContext` caused a handful of
other tests to start failing - in particular, ones that previously expected
warnings related to changes of value
https://github.com/katzdm edited https://github.com/llvm/llvm-project/pull/89565
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/89565
>From a3f8a8648e2002273d47d7886b29fb02c728b5b7 Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Tue, 16 Apr 2024 17:14:50 -0400
Subject: [PATCH 1/5] Fix bug with constexpr initialization.
---
clang/lib/Parse/ParseD
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/89565
>From a3f8a8648e2002273d47d7886b29fb02c728b5b7 Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Tue, 16 Apr 2024 17:14:50 -0400
Subject: [PATCH 1/2] Fix bug with constexpr initialization.
---
clang/lib/Parse/ParseD
katzdm wrote:
> I think the change makes sense. Can you add a release note?
Appreciate the reminder!
https://github.com/llvm/llvm-project/pull/89565
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
https://github.com/katzdm created
https://github.com/llvm/llvm-project/pull/89565
The following program produces a diagnostic in Clang and EDG, but compiles
correctly in GCC and MSVC:
```cpp
#include
consteval std::vector fn() { return {1,2,3}; }
constexpr int a = fn()[1];
```
Clang's diagno
katzdm wrote:
> You can ignore the merge conflicts in the release notes; itโs better to let
> whoever ends up merging this (probably me) take care of that when it comes to
> the release notes (because they get updated constantly).
Ah, missed this - already fixed it. Will ignore if it happens a
@@ -33,6 +33,7 @@ def get_num_tests(self, path, litConfig, localConfig):
[path, "--gtest_list_tests", "--gtest_filter=-*DISABLED_*"]
)
try:
+localConfig.environment['DYLD_LIBRARY_PATH'] = ''
katzdm wrote:
I did not.
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/86122
>From 319b7d99b4010514a1680ffd99fb0586b5e7221d Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Thu, 21 Mar 2024 09:47:04 -0400
Subject: [PATCH 1/4] Raise an error on namespace aliases with qualified names.
Current
@@ -33,6 +33,7 @@ def get_num_tests(self, path, litConfig, localConfig):
[path, "--gtest_list_tests", "--gtest_filter=-*DISABLED_*"]
)
try:
+localConfig.environment['DYLD_LIBRARY_PATH'] = ''
katzdm wrote:
Done, thanks fo
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/86122
>From 1998809477ce9ef03516278e1f0e9084426ea7f2 Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Thu, 21 Mar 2024 09:47:04 -0400
Subject: [PATCH 1/4] Raise an error on namespace aliases with qualified names.
Current
@@ -394,6 +394,8 @@ Bug Fixes to C++ Support
expression references to an entity declared outside of the lambda. (#GH64808)
- Clang's __builtin_bit_cast will now produce a constant value for records
with empty bases. See:
(#GH82383)
+- Fix an issue where a namespace alias c
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/86122
>From 319b7d99b4010514a1680ffd99fb0586b5e7221d Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Thu, 21 Mar 2024 09:47:04 -0400
Subject: [PATCH 1/3] Raise an error on namespace aliases with qualified names.
Current
https://github.com/katzdm updated
https://github.com/llvm/llvm-project/pull/86122
>From 319b7d99b4010514a1680ffd99fb0586b5e7221d Mon Sep 17 00:00:00 2001
From: Dan Katz
Date: Thu, 21 Mar 2024 09:47:04 -0400
Subject: [PATCH 1/2] Raise an error on namespace aliases with qualified names.
Current
katzdm wrote:
@Sirraide Thanks for the quick review! I've applied your feedback. Here is an
example error message with the patch applied:
```
test.cpp:4:20: error: namespace alias must be a single identifier
4 | namespace alias::extra::qualifiers = ::myns;
|^~~~
@@ -268,6 +268,8 @@ def err_expected_semi_after_namespace_name : Error<
"expected ';' after namespace name">;
def err_unexpected_namespace_attributes_alias : Error<
"attributes cannot be specified on namespace alias">;
+def err_unexpected_qualified_namespace_alias : Error<
https://github.com/katzdm created
https://github.com/llvm/llvm-project/pull/86122
Clang's current behavior is to ignore the trailing qualifiers, but the
[grammar](https://eel.is/c++draft/namespace.alias#nt:namespace-alias-definition)
for `namespace-alias-definition` requires an `identifier` wi
70 matches
Mail list logo