sdkrystian wrote:
This does seem to cause an error in libstdc++:
```
include/c++/11/bits/shared_ptr.h:365:10: error: use 'template' keyword to treat
'__shared_ptr' as a dependent template name
this->__shared_ptr<_Tp>::operator=(__r);
^
```
Since `this` is dependent (it's of
https://github.com/sdkrystian edited
https://github.com/llvm/llvm-project/pull/92957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
sdkrystian wrote:
> > Per [[basic.lookup.qual.general]
> > p1](http://eel.is/c++draft/basic.lookup.qual.general#1), lookup for a
> > member-qualified name is type-only if it's an identifier followed by ::;
>
> Per my reading, type-only lookup is performed only for elaborated type
>
Endilll wrote:
> This means that we must perform the second (unqualified) lookup during
> parsing even when the type of the object expression is dependent, but those
> results are not used to determine whether a < token is the start of a
> template-argument_list; they are stored so we can
Endilll wrote:
> Per [[basic.lookup.qual.general]
> p1](http://eel.is/c++draft/basic.lookup.qual.general#1), lookup for a
> member-qualified name is type-only if it's an identifier followed by ::;
Per my reading, type-only lookup is performed only for elaborated type
specifiers
sdkrystian wrote:
Ping @erichkeane @shafik @Endilll (not sure if drafts send emails for review
requests)
https://github.com/llvm/llvm-project/pull/92957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
sdkrystian wrote:
I still need to add more comments and a release note, but this is otherwise
functionally complete
https://github.com/llvm/llvm-project/pull/92957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
llvmbot wrote:
@llvm/pr-subscribers-coroutines
Author: Krystian Stasiowski (sdkrystian)
Changes
[CWG1835](https://cplusplus.github.io/CWG/issues/1835.html) was one of the many
core issues resolved by [P1787R6: Declarations and where to find
them](http://wg21.link/p1787r6). Its
https://github.com/sdkrystian ready_for_review
https://github.com/llvm/llvm-project/pull/92957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
sdkrystian wrote:
I added support for unqualified lookup finding multiple declarations in the
most recent commits, fixing the crash the currently happens on clang assertions
trunk for the following ([godbolt link](https://godbolt.org/z/rEzo76qr5)):
```cpp
inline namespace N
{
struct A { };
https://github.com/sdkrystian updated
https://github.com/llvm/llvm-project/pull/92957
>From 616b2cf138f9b4a1f3a23db404f77c0603ad61e1 Mon Sep 17 00:00:00 2001
From: Krystian Stasiowski
Date: Tue, 21 May 2024 13:15:24 -0400
Subject: [PATCH 1/2] [WIP][Clang] Implement resolution for CWG1835
---
@@ -55,15 +55,21 @@ namespace PR11856 {
template T *end(T*);
- class X { };
+ struct X { };
+ struct Y {
+int end;
+ };
template
void Foo2() {
T it1;
-if (it1->end < it1->end) {
-}
+if (it1->end < it1->end) { }
X *x;
-if (x->end <
@@ -55,15 +55,21 @@ namespace PR11856 {
template T *end(T*);
- class X { };
+ struct X { };
+ struct Y {
+int end;
+ };
template
void Foo2() {
T it1;
-if (it1->end < it1->end) {
-}
+if (it1->end < it1->end) { }
X *x;
-if (x->end <
@@ -618,7 +618,6 @@ namespace cwg141 { // cwg141: 3.1
// FIXME: we issue a useful diagnostic first, then some bogus ones.
mizvekov wrote:
It looks like this FIXME is fixed as per change below.
https://github.com/llvm/llvm-project/pull/92957
@@ -2893,6 +2893,8 @@ class TreeTransform {
CXXScopeSpec SS;
SS.Adopt(QualifierLoc);
+if (FirstQualifierInScope)
+ SS.setFoundFirstQualifierInScope(FirstQualifierInScope);
mizvekov wrote:
It looks like adding 'FirstQualifierInScope' as a
@@ -55,15 +55,21 @@ namespace PR11856 {
template T *end(T*);
- class X { };
+ struct X { };
+ struct Y {
+int end;
+ };
template
void Foo2() {
T it1;
-if (it1->end < it1->end) {
-}
+if (it1->end < it1->end) { }
X *x;
-if (x->end <
@@ -397,22 +397,32 @@ NamedDecl *Sema::FindFirstQualifierInScope(Scope *S,
NestedNameSpecifier *NNS) {
while (NNS->getPrefix())
NNS = NNS->getPrefix();
- if (NNS->getKind() != NestedNameSpecifier::Identifier)
-return nullptr;
-
- LookupResult Found(*this,
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/92957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -720,7 +720,7 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration(
return nullptr;
}
CXXScopeSpec SS;
-if (ParseOptionalCXXScopeSpecifier(SS, /*ParsedType=*/nullptr,
+if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr,
@@ -6891,7 +6891,7 @@ class Sema final : public SemaBase {
const TemplateArgumentListInfo *TemplateArgs);
ExprResult ActOnMemberAccessExpr(Scope *S, Expr *Base, SourceLocation OpLoc,
- tok::TokenKind OpKind, CXXScopeSpec ,
+
@@ -47,8 +47,8 @@ template
void DerivedT::Inner() {
Derived1T::Foo();
Derived2T::Member = 42;
- this->Derived1T::Foo();
- this->Derived2T::Member = 42;
+ this->Derived1T::Foo(); // expected-error{{use 'template' keyword to
treat 'Derived1T' as a dependent template
https://github.com/mizvekov commented:
I think overall this looks like the right direction to me.
https://github.com/llvm/llvm-project/pull/92957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
sdkrystian wrote:
@Endilll I'm still in the process of writing tests, but I'll add several soon.
I'm quite confident about my interpretation being correct but I just want to be
100% sure :).
At the very least this patch gets [[basic.lookup.qual.general] example
Endilll wrote:
It was a pure accident I opened this PR. I think draft status does a good job
at silencing notifications.
I spend a decent amount of time in P1787R6, so I might be able to provide good
feedback. I'll take a look tomorrow.
It would be nice to see a test for CWG1835 among the
https://github.com/sdkrystian updated
https://github.com/llvm/llvm-project/pull/92957
>From 4524db5ae7f3133b51328fbabd1f6188d7d3707b Mon Sep 17 00:00:00 2001
From: Krystian Stasiowski
Date: Tue, 21 May 2024 13:15:24 -0400
Subject: [PATCH 1/2] [WIP][Clang] Implement resolution for CWG1835
---
sdkrystian wrote:
(this PR is by no means complete, but I would like feedback regarding the
validity of my interpretation of the DR resolution and perhaps some guidance
with how to best go about implementing it. The currently included
implementation _works_, but I'm uncertain whether it's the
https://github.com/sdkrystian created
https://github.com/llvm/llvm-project/pull/92957
[CWG1835](https://cplusplus.github.io/CWG/issues/1835.html) was one of the many
core issues resolved by [P1787R6: Declarations and where to find
them](http://wg21.link/p1787r6). Its resolution changes how
27 matches
Mail list logo