[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 diagnose

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

2019-05-22 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 diagnose

[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/ https://reviews.llvm.org/D5384

[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: clang/inclu

[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 (TryAnnotateTypeOrScopeToken(!getCurScope()->isTemplateParamSco

[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] D36357: Added a better diagnostic when using the delete operator with lambdas

2019-05-19 Thread Nicolas Lesser via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL361119: Added a better diagnostic when using the delete operator with lambdas (authored by Rakete, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2019-05-15 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 199565. Rakete added a comment. - Fix crash with invalid postfix expr - Don't emit FixIt when using < Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36357/new/ https://reviews.llvm.org/D36357 Files: cl

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2019-05-15 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 199566. Rakete added a comment. - Use TryConsumeToken Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36357/new/ https://reviews.llvm.org/D36357 Files: clang/include/clang/Basic/DiagnosticParseKinds.td

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2019-05-14 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 199528. Rakete marked an inline comment as done. Rakete added a comment. Nevermind, seems to be working fine even with. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36357/new/ https://reviews.llvm.o

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2019-05-14 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete marked 2 inline comments as done. Rakete added a comment. In D36357#1501961 , @rsmith wrote: > In D36357#1500949 , @Rakete > wrote: > > > How should I do this? Do I just skip to the next `}`, or

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2019-05-14 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 199380. Rakete added a comment. - Addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36357/new/ https://reviews.llvm.org/D36357 Files: clang/include/clang/Basic/DiagnosticParseKin

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2019-05-14 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete marked 3 inline comments as done. Rakete added a comment. > we could perform a tentative parse and skip to the } of the lambda. How should I do this? Do I just skip to the next `}`, or also take into account any additional scopes? Also does this mean that I skip and then revert,

[PATCH] D60934: [clang] adding explicit(bool) from c++2a

2019-05-06 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. @Tyker This broke the Chromium build, could you investigate please? http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190506/270340.html Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60934/new/ https://reviews.llvm.org/D60934

[PATCH] D61556: [clang] fixing -ast-print for variadic parameter pack in lambda capture

2019-05-05 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. You might want to consider getting commit access . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61556/new/ https://reviews.llvm.org/D61556 ___

[PATCH] D61556: [clang] fixing -ast-print for variadic parameter pack in lambda capture

2019-05-05 Thread Nicolas Lesser via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC359980: [clang] fixing -ast-print for variadic parameter pack in lambda capture (authored by Rakete, committed by ). Changed prior to commit: https://reviews.llvm.org/D61556?vs=198155&id=198172#toc

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2019-05-05 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. Is this also okay? main.cpp:2:9: warning: lambda expressions are incompatible with C++98 [-Wc++98-compat] delete[] { return new int; } ^ main.cpp:2:3: error: '[]' after delete interpreted as 'delete[]'; add parentheses to treat this as a lambda-expr

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2019-05-05 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. @rsmith One last question: The fixit diagnostic seems to be inconsistent with the rest? main.cpp:2:3: error: '[]' after delete interpreted as 'delete[]' delete[] { return new int; } ^~~~ ( ) Shouldn't the `^~~` be start

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2019-05-04 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 198142. Rakete added a comment. friendly ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36357/new/ https://reviews.llvm.org/D36357 Files: clang/include/clang/Basic/DiagnosticParseKinds.td cla

[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: clang/include/clang/Basic/Diagnos

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-03 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. Can you add tests for the bugs you fixed? thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61522/new/ https://reviews.llvm.org/D61522 ___ cfe-commits mailing list cfe-co

[PATCH] D60934: [clang] adding explicit(bool) from c++2a

2019-05-01 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: clang/include/clang/AST/DeclCXX.h:2579 +assert( +!ES.getExpr() || +CXXConstructorDeclBits.HasTrailingExplicitSpecifier && Tyker wrote: > Rakete wrote: > > Your or needs parens or the disambigua

[PATCH] D60934: [clang] adding explicit(bool) from c++2a

2019-04-30 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: clang/include/clang/AST/DeclCXX.h:2579 +assert( +!ES.getExpr() || +CXXConstructorDeclBits.HasTrailingExplicitSpecifier && Your or needs parens or the disambiguation is wrong. Com

[PATCH] D60934: [clang] adding explicit(bool) from c++2a

2019-04-25 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. Thanks for working on this! :) Comment at: clang/lib/Parse/ParseDecl.cpp:3533 + if (ExplicitExpr.isInvalid()) { +Diag(ParenLoc, diag::note_explicit_bool_breaking_change_cxx2a) +<< FixItHint::CreateReplacement( ---

[PATCH] D59900: [Sema] Fix a crash when nonnull checking

2019-03-28 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete accepted this revision. Rakete added a comment. This revision is now accepted and ready to land. Otherwise LGTM. Comment at: clang/test/SemaTemplate/decltype.cpp:1 +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s +// no crash & no diag tes

[PATCH] D59754: [Sema] Add c++2a designated initializer warnings

2019-03-26 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:2044 + : std::distance(RD->field_begin(), RD->field_end()); + if (VerifyOnly && (LastIdx >= NextIdx || HasNonDesignatedInit) && + SemaRef.getLangOpts().CPlusPlus2a) ---

[PATCH] D59754: [Sema] Add c++2a designated initializer warnings

2019-03-25 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:30 +// out of order designators +A a1 = {.y = 1, .x = 2}; // expected-warning {{designated initializers are a C99 feature}} + hintonda wrote: > lebedev.ri wrote: >

[PATCH] D59754: [Sema] Add c++2a designated initializer warnings

2019-03-25 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:2017 + auto LastIdx = Field != FieldEnd + ? Field->getFieldIndex() Can `Field` ever be `FieldEnd` at this point? Comment at: clang/lib/Sema

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2019-03-13 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 190435. Rakete added a comment. Rebase + friendly ping :). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36357/new/ https://reviews.llvm.org/D36357 Files: clang/include/clang/Basic/DiagnosticParseKind

[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 Files

[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 fu

[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 t

[PATCH] D57540: [C++17] Don't crash while diagnosing different access specifier of a deduction guide.

2019-02-18 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete abandoned this revision. Rakete added a comment. Herald added a subscriber: jdoerfert. This revision has been superseded :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57540/new/ https://reviews.llvm.org/D57540

[PATCH] D57540: [C++17] Don't crash while diagnosing different access specifier of a deduction guide.

2019-02-02 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete marked an inline comment as done. Rakete added inline comments. Comment at: test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:360-361 + struct Type { +Typo(); // expected-error{{deduction guide must be declared in the same scope}} +// expected-erro

[PATCH] D57540: [C++17] Don't crash while diagnosing different access specifier of a deduction guide.

2019-01-31 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete created this revision. Rakete added a reviewer: rsmith. This fixes PR40552 by not showing the diagnostic that complains about different access specifiers, since the template does not have one. Repository: rC Clang https://reviews.llvm.org/D57540 Files: lib/Sema/SemaDeclCXX.

[PATCH] D56974: [SemaCXX] Fix ICE with structure bindings to members of template

2019-01-27 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. Backporting to 8.0.0 is possibly possible, you'll need to ping Hans. I don't know about previous versions though. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56974/new/ https://reviews.llvm.org/D56974 _

[PATCH] D56974: [SemaCXX] Fix ICE with structure bindings to members of template

2019-01-27 Thread Nicolas Lesser via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL352323: [SemaCXX] Fix ICE with structure bindings to members of template (authored by Rakete, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.o

[PATCH] D56974: [SemaCXX] Fix ICE with structure bindings to members of template

2019-01-20 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. Yeah, seems like we don't instantiate `pair` at all in that specific case. LGTM but you might want to wait for someone else to confirm. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56974/new/ https://reviews.llvm.org/D56974 __

[PATCH] D50766: Fix false positive unsequenced access and modification warning in array subscript expression.

2019-01-10 Thread Nicolas Lesser via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC350874: Fix false positive unsequenced access and modification warning in array… (authored by Rakete, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D5076

[PATCH] D55039: [sema] Warn of mangling change if function parameters are noexcept.

2018-12-18 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. Apart from the comments I think your patch LGTM, but I'll let someone else hav the final say. Comment at: lib/Sema/SemaDecl.cpp:10266 auto *FPT = NewFD->getType()->castAs(); - bool AnyNoexcept = HasNoexcept(FPT->getReturnType()); -

[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: include/clang/Basic/DiagnosticSema

[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 include/clang/Pa

[PATCH] D55039: [sema] Warn of mangling change if function parameters are noexcept.

2018-12-03 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Sema/SemaDecl.cpp:9933 +llvm::any_of(FPT->param_types(), + [](QualType Q) { return hasNoexcept(Q); })) + return true; You don't need this lambda. Comment at: lib

[PATCH] D55039: [sema] Warn of mangling change if function parameters are noexcept.

2018-11-28 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. You're missing the case of the function return type of a parameter. void f(void (*g())() noexcept); // no warning with trunk nor with your patch CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55039/new/ https://reviews.llvm.org/D55039 ___

[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 include/clang

[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 &D) { + assert(D.getCXXScopeSpec().isSet() && + "can only be called for qualified names"); + LookupResult LR(*this, D.getIdentifier(), D.getBe

[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 in

[PATCH] D54414: [Sema] Make sure we substitute an instantiation-dependent default template parameter

2018-11-12 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete accepted this revision. Rakete added a comment. This revision is now accepted and ready to land. LGTM, thanks :) Comment at: clang/test/SemaCXX/alias-template.cpp:188 +template > +int sfinae_me() { return 0; } // expected-note{{candidate template ignored: substi

[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 we

[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 lib/Parse/ParseDecl

[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 include/clang/Sema/S

[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: > Rak

[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 in

[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 include/clang/Sema/Sema.h

[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 lib/Pars

[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 https://review

[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 th

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2018-10-28 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 171421. Rakete added a comment. Rebase and friendly ping :) Repository: rC Clang https://reviews.llvm.org/D36357 Files: include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseExprCXX.cpp test/FixIt/fixit-cxx0x.cpp test/Parser/cxx0x-lam

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-25 Thread Nicolas Lesser via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC345308: [C++17] Reject shadowing of capture by parameter in lambda (authored by Rakete, committed by ). Repository: rC Clang https://reviews.llvm.org/D53595 Files: include/clang/Basic/Diagnostic

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-25 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 171174. Rakete added a comment. Update DR list. https://reviews.llvm.org/D53595 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaLambda.cpp test/CXX/drs/dr22xx.cpp test/SemaCXX/warn-shadow-in-lambdas.

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-25 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. In https://reviews.llvm.org/D53595#1276330, @rsmith wrote: > In https://reviews.llvm.org/D53595#1273848, @Rakete wrote: > > > Addresed review comments :) > > > > I updated the dr status file but a lot of unrelated changes made it in. Is > > this okay? > > > Please

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-24 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 170828. Rakete added a comment. Addresed review comments :) I updated the dr status file but a lot of unrelated changes made it in. Is this okay? Repository: rC Clang https://reviews.llvm.org/D53595 Files: include/clang/Basic/DiagnosticSemaKin

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-23 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 170757. Rakete added a comment. Use correct clang and version spelling. Repository: rC Clang https://reviews.llvm.org/D53595 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaLambda.cpp test/SemaCXX/w

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-23 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 170748. Rakete added a comment. Addressed review comments! :) Thanks Repository: rC Clang https://reviews.llvm.org/D53595 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaLambda.cpp test/SemaCXX/warn

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-23 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Sema/SemaLambda.cpp:510 +for (const auto &Capture: Captures) { + if (Capture.Id && Capture.Id->getName() == Param->getName()) { +Error = true; erik.pilkington wrote: > You should compa

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-23 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete created this revision. Rakete added a reviewer: rsmith. This change rejects the shadowing of a capture by a parameter in lambdas in C++17. int main() { int a; auto f = [a](int a) { return a; }; } results in: main.cpp:3:20: error: a lambda parameter cannot shadow an

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-12 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. In https://reviews.llvm.org/D52750#1263466, @xbolva00 wrote: > In https://reviews.llvm.org/D52750#1263461, @Rakete wrote: > > > This doesn't produce a warning in C++11 and up. > > > But see Richard's comment: https://reviews.llvm.org/D52750#125175 so I am not > su

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-12 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. This doesn't produce a warning in C++11 and up. https://reviews.llvm.org/D52750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-11 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. Nah, you don't even need to call `EvaluateForOverflow` I believe. :) Have a look overflow evaluation is done. https://reviews.llvm.org/D52750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-11 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. The array size is still evaluated twice. Try to incorporate the check in `Sema::VerifyIntegerConstantExpression`. https://reviews.llvm.org/D52750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D50766: Fix false positive unsequenced access and modification warning in array subscript expression.

2018-10-11 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: test/SemaCXX/warn-unsequenced-cxx17.cpp:1 +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 -Wno-unused %s + lebedev.ri wrote: > One last-minute thought: this is only a positive test. > You don't test what happens

[PATCH] D50766: Fix false positive unsequenced access and modification warning in array subscript expression.

2018-10-10 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete accepted this revision. Rakete added a comment. This revision is now accepted and ready to land. Nevermind my last comment, I was tired. LGTM https://reviews.llvm.org/D50766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D50766: Fix false positive unsequenced access and modification warning in array subscript expression.

2018-10-10 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. Sorry, for some reason I didn't see your updates. Can you add a test for C++17? Then your patch is good to go! :) https://reviews.llvm.org/D50766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-06 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Sema/SemaType.cpp:2232 + + if (isa(ArraySize)) +ArraySize->EvaluateForOverflow(Context); What's up with this statement? Why is it needed? This won't handle overflows for unary expression for example.

[PATCH] D52791: [Diagnostics] Check for misleading pointer declarations

2018-10-03 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. There's a false positive. int **A, *B; // false positive: declaring a variable of type 'int *'; did you mean to declare a pointer? And IMO this should also warn: int **A, B; // no warning currently https://reviews.llvm.org/D52791 ___

[PATCH] D50766: Fix false positive unsequenced access and modification warning in array subscript expression.

2018-08-26 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. > What do you think? Good idea! Comment at: test/SemaCXX/warn-unsequenced-cxx17.cpp:7 + // expected-no-diagnostics + p[(long long unsigned)(p = 0)] // ok +} Oh no, you forgot a semicolon there! :) https://reviews.llvm.org/D50766

[PATCH] D41284: [Concepts] Associated constraints infrastructure.

2018-08-18 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: test/CXX/concepts-ts/temp/temp.constr/temp.constr.decl/var-template-decl.cpp:10 + +template requires bool(U()) +int B::A = int(U()); Quuxplusone wrote: > saar.raz wrote: > > Quuxplusone wrote: > > > For my own edifi

[PATCH] D50766: Fix false positive unsequenced access and modification warning in array subscript expression.

2018-08-16 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete requested changes to this revision. Rakete added a comment. This revision now requires changes to proceed. Your patch breaks a lot of stuff in the test suite. For example: void f() { int A = 0; (A++, A) = 1; // warning from this patch, but this is perfectly valid since f

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-08-16 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. It would be nice to be able to diagnose `X`: template struct Foo { struct [[trivially_relocatable]] X { // no warning X(X &&) = delete; }; }; Foo f; // no warning static_assert(!__is_trivially_relocatable(Foo::X)); // ok But otherwise, you

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2018-08-08 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 159832. Rakete added a comment. Rebase + friendly ping :) Repository: rC Clang https://reviews.llvm.org/D36357 Files: include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseExprCXX.cpp test/FixIt/fixit-cxx0x.cpp test/Parser/cxx0x-lambd

[PATCH] D50291: [C++] Delay checking of constexpr-ness for special members.

2018-08-03 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 159160. Rakete added a comment. Add missing test cases. :) Repository: rC Clang https://reviews.llvm.org/D50291 Files: include/clang/Sema/Sema.h lib/Sema/SemaDeclCXX.cpp test/CXX/special/class.copy/p10.cpp Index: test/CXX/special/class.copy

[PATCH] D50291: [C++] Delay checking of constexpr-ness for special members.

2018-08-03 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete created this revision. Rakete added a reviewer: rsmith. Specific class layouts meant that the constexpr-ness of a special member could only be decided after every special member was seen. However, this was at odds with the implementation, which checked the constexpr-ness for each

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-08-02 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a reviewer: Rakete. Rakete added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:6091 + for (auto *F : Record->fields()) { +if (F->isMutable()) { Quuxplusone wrote: > Rakete wrote: > > Can you move this in `ActOnFields`?

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-08-02 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:6174 + Record->hasAttr() && + !isTemplateInstantiation(Record->getTemplateSpecializationKind())) { +if (Record->getDefinition() && !Record->isDependentContext() && The call to `i

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-08-02 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:6187 +Record->dropAttr(); + } else if (Record->needsImplicitMoveConstructor() && + Record->defaultedMoveConstructorIsDeleted()) { Rakete wrote: > Quuxplusone w

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-08-02 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:6187 +Record->dropAttr(); + } else if (Record->needsImplicitMoveConstructor() && + Record->defaultedMoveConstructorIsDeleted()) { Quuxplusone wrote: > Rakete w

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-08-01 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: compiler-explorer-llvm-commit.sh:1 +# This is the commit of LLVM that we're currently based on. +git reset --hard 1fa19f68007cd126a04448093c171f40e556087e What's this file? A mistake? Comment at: in

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-08-01 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. - There's a bug in your implementation: struct X { X &operator=(X &&); }; static_assert(__is_trivially_relocatable(X)); // oops, fires! `X` has a move constructor and a destructor, so it is trivially relocatable. - Please run your code through clang-format.

[PATCH] D49848: Parse a possible trailing postfix expression suffix after a fold expression

2018-07-27 Thread Nicolas Lesser via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338170: Parse a possible trailing postfix expression suffix after a fold expression (authored by Rakete, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews

[PATCH] D49848: Parse a possible trailing postfix expression suffix after a fold expression

2018-07-27 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 157759. Rakete added a comment. Addressed review comments :) Repository: rC Clang https://reviews.llvm.org/D49848 Files: include/clang/Parse/Parser.h lib/Parse/ParseExpr.cpp test/Parser/cxx1z-fold-expressions.cpp Index: test/Parser/cxx1z-fo

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2018-07-26 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 157642. Rakete added a comment. Addressed review comments. Note that clang doesn't support the fourth kind of lambda yet ([]<>), because https://reviews.llvm.org/D36527 hasn't been merged yet, so I didn't add a test case for that one. Repository:

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2018-07-26 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 157611. Rakete added a comment. Rebased + friendly ping Repository: rC Clang https://reviews.llvm.org/D36357 Files: include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseExprCXX.cpp test/Parser/cxx0x-lambda-expressions.cpp test/SemaCX

[PATCH] D49848: Parse a possible trailing postfix expression suffix after a fold expression

2018-07-26 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 157580. Rakete added a comment. Add a test without any casts. Repository: rC Clang https://reviews.llvm.org/D49848 Files: include/clang/Parse/Parser.h lib/Parse/ParseExpr.cpp test/Parser/cxx1z-fold-expressions.cpp Index: test/Parser/cxx1z-

[PATCH] D49848: Parse a possible trailing postfix expression suffix after a fold expression

2018-07-26 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 157578. Rakete added a comment. @rsmith you're right, it should. But it doesn't, because the the fold expression is considered to be a cast expression by ParseParenExpression and which parses any postfix pieces immediately after a cast, but it doesn't

[PATCH] D49848: Parse a possible trailing postsfix expression suffix after a fold expression

2018-07-26 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete created this revision. Rakete added a reviewer: rsmith. This patch allows the parsing of a postfix expression involving a fold expression, which is legal as a fold-expression is a primary-expression. See also https://llvm.org/pr38282 Repository: rC Clang https://reviews.llvm.

[PATCH] D38075: Fix PR34668 - P0704R1 implementation is too permissive

2018-07-13 Thread Nicolas Lesser via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337017: Fix PR34668 - P0704R1 implementation is too permissive (authored by Rakete, committed by ). Changed prior to commit: https://reviews.llvm.org/D38075?vs=155410&id=155412#toc Repository: rC

  1   2   >