[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-28 Thread Alan Zhao via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4848f3bf2ff5: [C++2a] P0634r3: Down with typename! (authored by Rakete, committed by ayzhao). Changed prior to commit:

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D53847#3819344 , @ayzhao wrote: > add test and fix for P2092 These changes look good to me, thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-27 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 463351. ayzhao added a comment. add test and fix for P2092 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files:

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-27 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. In D53847#3819200 , @cor3ntin wrote: > Good catch > > template > concept K = requires (typename T::Type X) { // (3) > X.next(); > } > > That typename should be optional. Can you add a test for that? If it works > you can

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Good catch template concept K = requires (typename T::Type X) { // (3) X.next(); } That typename should be optional. Can you add a test for that? If it works you can mark P2092 as fully supported. Repository: rG LLVM Github

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-27 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. In D53847#3817376 , @cor3ntin wrote: > It's great to see this make progress. > Can you update cxx_status.html and ReleaseNotes.txt? Done. I also saw that P2092R0 was marked as partially supported in `cxx_status.html` due to

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-27 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 463334. ayzhao added a comment. update cxx_status.html and ReleaseNotes.rst + rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files:

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. It's great to see this make progress. Can you update cxx_status.html and ReleaseNotes.txt? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-26 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 462969. ayzhao added a comment. clang-format + rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. Thanks for looking into it. I think you're right that it is a mistake that we accepted that without the 'struct' keyword after a quick look, so I think I am OK with this. Please give

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-23 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. In D53847#3809072 , @erichkeane wrote: > I think this is on the right track, but would like to see more work done on > that fixme before we commit (or at least better understand what is causing > this). I'm afraid of what else

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-23 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked an inline comment as done. ayzhao added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:367 +// with this method returning a non-null ParsedType? +if (isa(CurContext)) + return nullptr; ayzhao wrote: > ayzhao

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-23 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 462633. ayzhao added a comment. remove the hack for the test p2-2.cpp and patch in patch in D134578 which fixes the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-23 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked 2 inline comments as done. ayzhao added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:367 +// with this method returning a non-null ParsedType? +if (isa(CurContext)) + return nullptr; ayzhao wrote: > erichkeane

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-23 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:367 +// with this method returning a non-null ParsedType? +if (isa(CurContext)) + return nullptr; erichkeane wrote: > Hmm... this scares me quite a bit, I don't really

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-23 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 462587. ayzhao marked an inline comment as done. ayzhao added a comment. address some more review comments + rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked 4 inline comments as done. ayzhao added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:5592 +bool Parser::isConstructorDeclarator(bool IsUnqualified, bool DeductionGuide, + bool IsFriend) { TentativeParsingAction

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 462317. ayzhao added a comment. fix spacing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 462315. ayzhao added a comment. Add FriendSpecified enum Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:1806 +// typename is allowed (C++2a [temp.res]p5]). +enum class ImplicitTypenameContext { + No, ayzhao wrote: > aaron.ballman wrote: > > Not opposed to this construct, but I am

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:5592 +bool Parser::isConstructorDeclarator(bool IsUnqualified, bool DeductionGuide, + bool IsFriend) { TentativeParsingAction TPA(*this);

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:1806 +// typename is allowed (C++2a [temp.res]p5]). +enum class ImplicitTypenameContext { + No, aaron.ballman wrote: > Not opposed to this construct, but I am worried about how well

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 462239. ayzhao marked 2 inline comments as done. ayzhao added a comment. address some comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files:

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:5592 +bool Parser::isConstructorDeclarator(bool IsUnqualified, bool DeductionGuide, + bool IsFriend) { TentativeParsingAction TPA(*this);

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:5592 +bool Parser::isConstructorDeclarator(bool IsUnqualified, bool DeductionGuide, + bool IsFriend) { TentativeParsingAction TPA(*this);

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Parse/Parser.h:2343 + static ImplicitTypenameContext + isImplicitTypenameContext(DeclSpecContext DSC) { +switch (DSC) { Starting with `is` implies contextual conversion to bool

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 46. ayzhao marked 2 inline comments as done. ayzhao added a comment. address some review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files:

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I think this is on the right track, but would like to see more work done on that fixme before we commit (or at least better understand what is causing this). I'm afraid of what else can get us into that situation besides the export-decl. Comment

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a subscriber: aaron.ballman. shafik added a comment. I made mostly small comments but I think @aaron.ballman and/or @erichkeane should take a look as well. Comment at: clang/lib/Parse/ParseDecl.cpp:3434-3435 ) && -

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-21 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 462032. ayzhao added a comment. rebase + upload; also friendly ping! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files:

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:1918 + /// Lookup result of declarator, if any. + std::unique_ptr PrevLookupResult; + shafik wrote: > Why do we need this one shot previous lookup result? I am struggling to see >

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 461729. ayzhao marked 2 inline comments as done. ayzhao added a comment. remove PrevLookupResult + put Declarator(...) and ~Declarator() definitions back in the header files to reduce the diff since we're no longer overloading the constructor. Repository:

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 461699. ayzhao added a comment. rebase + clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked an inline comment as done. ayzhao added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:3377-3379 // FIXME: This is not quite correct recovery as we don't transform SS // into the corresponding dependent form (and we don't diagnose

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-19 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 461403. ayzhao added a comment. remove extra blank line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-19 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 461401. ayzhao added a comment. fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-16 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:3377-3379 // FIXME: This is not quite correct recovery as we don't transform SS // into the corresponding dependent form (and we don't diagnose missing // 'template' keywords within SS

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-15 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 460514. ayzhao added a comment. hacky fix for the test CXX/module/module.interface/p2-2.cpp If anyone has a better idea on how to fix this test, feedback is **very** welcome. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-15 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:362 +// allow this as an extension. +if (AllowImplicitTypename == ImplicitTypenameContext::No && +!isClassName && !IsCtorOrDtorName) ayzhao wrote: > Status update:

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added subscribers: ChuanqiXu, cor3ntin. cor3ntin added a comment. Maybe @ChuanqiXu Can help as it seems module related Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-15 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:362 +// allow this as an extension. +if (AllowImplicitTypename == ImplicitTypenameContext::No && +!isClassName && !IsCtorOrDtorName) Status update: This line is

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-09 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 459205. ayzhao added a comment. Fix typename-specifier-3.cpp test Things done: - the warning should also include a check that C++20 is required - the warning should only show up for precxx17, as %std_cxx17- translates to -std=c++2b Repository: rG LLVM

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-08 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 458930. ayzhao marked 2 inline comments as done. ayzhao added a comment. p5.cpp -> p4.cpp, removed debug statements haven't yet fully grokked this patch. still looking into fixing test failures and PrevLookupResult. Repository: rG LLVM Github Monorepo

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-08 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked an inline comment as done. ayzhao added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:4321 + isCXXDeclarationSpecifier(ITC_Never, TPResult::True) != + TPResult::True) || +(!getLangOpts().CPlusPlus &&

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-08 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 458901. ayzhao added a comment. remove obsolete FIXME Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-08 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 458900. ayzhao added a comment. Fix failing test in p5.cpp where typename should be required for enum-base (N.B. due to https://github.com/llvm/llvm-project/commit/c90e198107431f64b73686bdce31c293e3380ac7, the correct error should now be missing 'typename'

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-07 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Maybe I missed it but I don't see a test that covers temp.res p5 e.g.: template void f(int i) { T::x * i; // This will be assumed to be the expression // T::x multiplied by i // Not a

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-07 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked an inline comment as done. ayzhao added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:5100-5101 bool IsConstructor = false; - if (isDeclarationSpecifier()) + if (isDeclarationSpecifier(ITC_Never)) IsConstructor = true; else if

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-07 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 458580. ayzhao marked 12 inline comments as done. ayzhao added a comment. address code review comments from shafik@ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-07 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. First set of comments. Comment at: clang/include/clang/Parse/Parser.h:2418 +DS, TemplateInfo, AS, DSC, LateAttrs, +(ImplicitTypenameContext)isImplicitTypenameContext(DSC)); + } Why don't we just have

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-07 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. >> Also, do you know if having posted this patch is agreement for licensing >> this code? Or do we need to get explicit agreement from the original author >> before committing a version of this? > > I've never seen that be an issue before, and I don't see enough in >

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-06 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 458329. ayzhao added a comment. Update commit with contributions from @royjacobson Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files:

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-02 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. In D53847#3745415 , @royjacobson wrote: > I looked at this a bit about a week ago and got it down to 3-4 tests failing, > but I'm not sure how much time I'll have to continue working on it. If one of > you wants to take over I'll

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-08-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a subscriber: tstellar. erichkeane added a comment. In D53847#3745415 , @royjacobson wrote: > I looked at this a bit about a week ago and got it down to 3-4 tests failing, > but I'm not sure how much time I'll have to continue working on

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-08-24 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. I looked at this a bit about a week ago and got it down to 3-4 tests failing, but I'm not sure how much time I'll have to continue working on it. If one of you wants to take over I'll be happy to send you what I've currently got. @erichkeane @ilya-biryukov Also,

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-08-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D53847#3735758 , @erichkeane wrote: > In D53847#3735738 , @ilya-biryukov > wrote: > >> In D53847#3735704 , @erichkeane >> wrote: >> >>> Note

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-08-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D53847#3735738 , @ilya-biryukov wrote: > In D53847#3735704 , @erichkeane > wrote: > >> Note that this would also let us mark P2324 >> as complete

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-08-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D53847#3735704 , @erichkeane wrote: > Note that this would also let us mark P2324 > as complete as well. @ilya-biryukov : Since there is no response, I suspect > the answer here is

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-08-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D53847#3706965 , @ilya-biryukov wrote: > Hey! Also wondering what's the status of this. > @Rakete do you plan to finish the patch? Or would it be ok if someone > takes it over? Note that this would also let us mark

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-08-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Hey! Also wondering what's the status of this. @Rakete do you plan to finish the patch? Or would it be ok if someone takes it over? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-03-02 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Herald added a project: All. In D53847#3252460 , @cjdb wrote: > What's the status of this patch? It appears to me that the 'delta' right now is a couple of cases where this patch doesn't properly diagnose/warn (see the convo

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-01-18 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. What's the status of this patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2019-06-24 Thread Vivek Pandya via Phabricator via cfe-commits
vivekvpandya added a comment. Minor suggestion, you may want to update http://clang.llvm.org/cxx_status.html page for "typename optional in more contexts" with in this change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2019-05-27 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete marked an inline comment as done. Rakete added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:3377-3379 // FIXME: This is not quite correct recovery as we don't transform SS // into the corresponding dependent form (and we don't

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2019-05-22 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith marked 2 inline comments as done. rsmith added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:4321 + isCXXDeclarationSpecifier(ITC_Never, TPResult::True) != + TPResult::True) || +(!getLangOpts().CPlusPlus &&

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2019-05-22 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:4321 + isCXXDeclarationSpecifier(ITC_Never, TPResult::True) != + TPResult::True) || +(!getLangOpts().CPlusPlus && !isDeclarationSpecifier(ITC_Yes))) {

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2019-05-22 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 200767. Rakete marked 11 inline comments as done. Rakete added a comment. - rebased - addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2019-05-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:1753-1758 +// Describes whether the current context is a context where an implicit +// typename is allowed (C++2a [temp.res]p5]). +enum ImplicitTypenameContext { + ITC_Never, + ITC_Yes, +};

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2019-05-21 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 200440. Rakete added a comment. Add support for implicit typenames of the form T::template U Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files:

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2019-05-21 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete marked an inline comment as done. Rakete added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:4859 // recurse to handle whatever we get. -if (TryAnnotateTypeOrScopeToken()) +if

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2019-05-21 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 200423. Rakete marked 10 inline comments as done. Rakete added a comment. - Addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files:

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2019-05-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/Sema/Sema.h:1784 bool IsClassTemplateDeductionContext = true, + bool AllowImplicitTypename = false, IdentifierInfo **CorrectedII = nullptr);

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2019-05-04 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 198139. Rakete added a comment. Don't leak memory and friendly ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files:

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2019-03-10 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 190013. Rakete added a comment. Don't relookup the qualified-id and use the cached one instead if possible. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2019-03-10 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. rsmith: > Some thoughts on this: > > - Can this be unified with the lookup code in HandleDeclarator? This is > really the same lookup, repeated in two places. What I wrote: > I don't think so, because HandleDeclarator is called after having already > parsed the

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2019-03-10 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 190012. Rakete added a comment. Herald added a subscriber: jdoerfert. Herald added a project: clang. Fix a bug where `T::value` inside a functional cast in a template argument would be interpreted as a function type. Also added the missing test file

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-12-14 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 178289. Rakete added a comment. @rsmith do you have any more comments? ping/rebase. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files:

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-12-04 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 176554. Rakete added a comment. Rebase + friendly ping :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-11-27 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 175553. Rakete added a comment. Rebase and friendly ping! :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-11-14 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: include/clang/Parse/Parser.h:2119 DeclSpecContext DSC = DeclSpecContext::DSC_normal, - LateParsedAttrList *LateAttrs = nullptr); + LateParsedAttrList *LateAttrs = nullptr) { +return ParseDeclarationSpecifiers(DS,

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-11-14 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Sema/Sema.cpp:2006-2019 +bool Sema::isDeclaratorFunctionLike(const Declarator ) { + assert(D.getCXXScopeSpec().isSet() && + "can only be called for qualified names"); + LookupResult LR(*this, D.getIdentifier(),

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-11-14 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 174158. Rakete marked 11 inline comments as done. Rakete added a comment. Addressed review comments :) Repository: rC Clang https://reviews.llvm.org/D53847 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Parse/Parser.h

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-11-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thank you, this is looking really good. Comment at: include/clang/Parse/Parser.h:2054 +case DeclSpecContext::DSC_template_param: +case DeclSpecContext::DSC_template_type_arg: +case DeclSpecContext::DSC_normal: Rakete

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-11-07 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete marked 9 inline comments as done. Rakete added a comment. I also found another diagnostic regression: template T::type(); The previous error message was something with "nested name specifier does not refer to class ...". Now, the T::type part is interpreted as type and so

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-11-07 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 173056. Rakete added a comment. Addressed review comments! :) Repository: rC Clang https://reviews.llvm.org/D53847 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Parse/Parser.h include/clang/Sema/Sema.h

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-11-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:4462-4463 + DefaultIgnore; +def ext_implicit_typename : ExtWarn<"implicit 'typename' is a C++2a extension">, + InGroup; Please make the start of this diagnostic match the

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-11-01 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 172218. Rakete added a comment. I'm pretty sure I implemented the rules correctly now :) Repository: rC Clang https://reviews.llvm.org/D53847 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Parse/Parser.h

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-11-01 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: test/SemaCXX/unknown-type-name.cpp:50 template -void f(T::type) { } // expected-error{{missing 'typename'}} +void f(T::type) { } // expected-warning {{implicit 'typename' is a C++2a extension}} rsmith wrote: >

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-11-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: test/SemaCXX/unknown-type-name.cpp:50 template -void f(T::type) { } // expected-error{{missing 'typename'}} +void f(T::type) { } // expected-warning {{implicit 'typename' is a C++2a extension}} Rakete wrote: >

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-11-01 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 172147. Rakete marked an inline comment as done. Rakete added a comment. Remove spaces to be consistent. Repository: rC Clang https://reviews.llvm.org/D53847 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Parse/Parser.h

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-11-01 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete marked 7 inline comments as done. Rakete added inline comments. Comment at: lib/Parse/Parser.cpp:1778 +/*IsClassTemplateDeductionContext*/true, +/*AllowImplicitTypename*/false)) { SourceLocation BeginLoc = Tok.getLocation();

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-11-01 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 172146. Rakete marked 6 inline comments as done. Rakete added a comment. Addressed review comments! :) Repository: rC Clang https://reviews.llvm.org/D53847 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Parse/Parser.h

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-10-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: test/SemaCXX/unknown-type-name.cpp:1 -// RUN: %clang_cc1 -fsyntax-only -verify %s -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s +// RUN: %clang_cc1 -Wc++2a-compat

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-10-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Parse/ParseDecl.cpp:3105 + isClassTemplateDeductionContext(DSContext), + /*AllowImplicitTypename=*/true); This looks overly broad: shouldn't this depend on

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-10-29 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 171612. Rakete added a comment. Fix easy errors in tests that I missed by adding explicit template instantations. Repository: rC Clang https://reviews.llvm.org/D53847 Files: include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-10-29 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 171609. Rakete added a comment. Remove unneeded -Wc++2a-compat flag in tests. Repository: rC Clang https://reviews.llvm.org/D53847 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Parse/ParseDecl.cpp

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-10-29 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: test/CXX/temp/temp.res/p5.cpp:71 + +// FIXME: This is ok. +template I think the below is well-formed according to the quote above, but I'm not sure I understand it correctly. Repository: rC Clang

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-10-29 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete created this revision. Rakete added a reviewer: rsmith. This patch implements P0634r3 that removes the need for 'typename' in certain contexts. For example, template using foo = T::type; // ok This is also allowed in previous language versions as an extension, because I