[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-12-12 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D138210#3989385 , @luken-google wrote: > committed at afd800fc5679ccfe6f32b097586c658628500867 > For future reference it's handy to include the "Differen

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-12-12 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google closed this revision. luken-google added a comment. committed at afd800fc5679ccfe6f32b097586c658628500867 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138210/new/

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-11-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for the explanation. LGTM! And thanks for adding an assert. It's interesting that recovery for classes seems to be a bit better here: template struct invalid {}; int a = invalid(10); // there is no error: undefined

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-11-25 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 478019. luken-google added a comment. Strengthen assert. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138210/new/ https://reviews.llvm.org/D138210 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/Se

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-11-25 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. There is logic in the template expansion that returns an error state if the template parameter pack was not at the end of the template parameter list. It returns `true` but does not generate any diagnostics, but the outer code error machinery assumes that diagnosti

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-11-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. E.g. gcc actually accepts the concept definition, but later fails with "wrong number of template arguments". I wonder why Clang has not been doing the latter before this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-11-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. The error itself makes sense, but I don't quite understand why usages of `invalid` did not produce errors before. Any idea why that happened? Are there some other bugs hiding? It seems that at some point when parsing this code: static_assert(invalid also here ;

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-11-18 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 476462. luken-google added a comment. Adding release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138210/new/ https://reviews.llvm.org/D138210 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-11-17 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google created this revision. Herald added a project: All. luken-google requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes GH48182. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D138210 Files: clang/lib/Sema/