[PATCH] D109800: [clang] don't mark as Elidable CXXConstruct expressions used in NRVO

2021-09-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 372846. mizvekov added a comment. typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109800/new/ https://reviews.llvm.org/D109800 Files: clang/include/clang/Sema/Initialization.h clang/lib/CodeGen/CGExprC

[PATCH] D109800: [clang] don't mark as Elidable CXXConstruct expressions used in NRVO

2021-09-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 372849. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109800/new/ https://reviews.llvm.org/D109800 Files: clang/include/clang/Sema/Initialization.h clang/lib/CodeGen/CGExprCXX.

[PATCH] D109800: [clang] don't mark as Elidable CXXConstruct expressions used in NRVO

2021-09-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 372852. mizvekov added a comment. add another FIXME. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109800/new/ https://reviews.llvm.org/D109800 Files: clang/include/clang/Sema/Initialization.h clang/lib/C

[PATCH] D109800: [clang] don't mark as Elidable CXXConstruct expressions used in NRVO

2021-09-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D109800#3004288 , @Quuxplusone wrote: > Getting rid of that extra bool parameter throughout //looks// awesome, > though. :) It will come back later, this patch is just a quick thing we need in order to ship clang-13. But p

[PATCH] D109800: [clang] don't mark as Elidable CXXConstruct expressions used in NRVO

2021-09-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 373323. mizvekov edited the summary of this revision. mizvekov added a comment. add a couple more FIXMEs and a couple of asserts in the constexpr path for rvalue copy elision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D109800: [clang] don't mark as Elidable CXXConstruct expressions used in NRVO

2021-09-20 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 373618. mizvekov added a comment. typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109800/new/ https://reviews.llvm.org/D109800 Files: clang/include/clang/Sema/Initialization.h clang/lib/AST/ExprConsta

[PATCH] D109800: [clang] don't mark as Elidable CXXConstruct expressions used in NRVO

2021-09-21 Thread Matheus Izvekov 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 rGd9308aa39b23: [clang] don't mark as Elidable CXXConstruct expressions used in NRVO (authored by mizvekov). Repository: rG LLVM Github Monorepo CH

[PATCH] D110210: [clang] NFC: include non friendly types and missing sugar in test expectations

2021-09-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov edited the summary of this revision. mizvekov published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. The dump of all diagnostics of all tests under `clang/test/{CXX,SemaCXX,SemaTemplate}` was analyzed , a

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-09-23 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added a subscriber: jdoerfert. mizvekov updated this revision to Diff 374246. mizvekov added a comment. mizvekov updated this revision to Diff 374365. Herald added subscribers: kbarton, nemanjai. mizvekov updated this revision to Diff 374395. Herald added subs

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-09-23 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 374625. mizvekov added a comment. adjust column number on cert-static-object-exception test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110216/new/ https://reviews.llvm.org/D110216 Files: clang-tools-extr

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-09-23 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D110216#3019070 , @sammccall wrote: > A few comments on the behavior & clangd changes. I can't say I understand > enough about how deduction is implemented to give a proper review of the guts > :-( Thanks! > In general eli

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-09-23 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:495 + const QualType &Type, + bool Underlying = false) { const auto &SM = AST.getSourceManager();

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-09-24 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 374921. mizvekov added a comment. update print-type.cpp test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110216/new/ https://reviews.llvm.org/D110216 Files: clang-tools-extra/clang-tidy/cppcoreguidelines

[PATCH] D110460: [clang] set templates as invalid when any of the parameters are invalid

2021-09-24 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. See PR51872 for the original repro. This fixes a crash when converting a templated constructor into a deduction guide, in case any of the template pa

[PATCH] D110460: [clang] set templates as invalid when any of the parameters are invalid

2021-09-24 Thread Matheus Izvekov 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 rG37adc4f957c2: [clang] set templates as invalid when any of the parameters are invalid (authored by mizvekov). Repository: rG LLVM Github Monorepo

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-09-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked an inline comment as done. mizvekov added inline comments. Comment at: clang-tools-extra/clangd/unittests/InlayHintTests.cpp:470 + ExpectedHint{": S1", "x"}, + ExpectedHint{": S2::Inner", "y"}); } nridge wrote: >

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-09-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. FYI I just realized some other tests I never run locally relied on the former behavior of the ElaboratedType printer. I will see what looks more reasonable, but I think the defaults are tuned so the type printer will output code that looks close to what it was as writt

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-09-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked an inline comment as not done. mizvekov added inline comments. Comment at: clang-tools-extra/clangd/unittests/InlayHintTests.cpp:470 + ExpectedHint{": S1", "x"}, + ExpectedHint{": S2::Inner", "y"}); } mizvekov wr

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-09-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang-tools-extra/clangd/unittests/InlayHintTests.cpp:470 + ExpectedHint{": S1", "x"}, + ExpectedHint{": S2::Inner", "y"}); } nridge wrote: > mizvekov wrote: > > mizvekov wrote: > > >

[PATCH] D110726: [clang] NFC: remove duplicated code around type constraint and templ arg subst

2021-09-29 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: Matheus Izvekov Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D110726 Files: clang/include/clang/AST/DeclTempla

[PATCH] D110727: [clang] don't instantiate templates with injected arguments

2021-09-29 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added a subscriber: kristof.beyls. mizvekov updated this revision to Diff 375937. mizvekov added a comment. mizvekov updated this revision to Diff 375943. mizvekov published this revision for review. Herald added a project: clang. Herald added a subscriber: cf

[PATCH] D110726: [clang] NFC: remove duplicated code around type constraint and templ arg subst

2021-09-29 Thread Matheus Izvekov 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 rG1f6458cb1944: [clang] NFC: remove duplicated code around type constraint and templ arg subst (authored by mizvekov). Repository: rG LLVM Github Mo

[PATCH] D110727: [clang] don't instantiate templates with injected arguments

2021-09-29 Thread Matheus Izvekov 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 rGaf10d6f350ff: [clang] don't instantiate templates with injected arguments (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D109496: [clang] deprecate frelaxed-template-template-args, make it on by default

2021-09-29 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 376046. mizvekov added a comment. - Clarify that P0522 was implemented in Clang 4, explain in footnote. - Add DR link. - C++17 section goes all green, so we fold it! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-09-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D110216#3032626 , @v.g.vassilev wrote: > Thanks for working on this!How hard would it be to support: > > using size_t = __SIZE_TYPE__; > template struct Id { typedef T type; }; > int main() { > struct S {} s; >

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-09-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:1643 - return Param == Arg? Sema::TDK_Success : Sema::TDK_NonDeducedMismatch; + return ParDesug == ArgDesug ? Sema::TDK_Success + : Sema::TDK_NonDeduc

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-09-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:1643 - return Param == Arg? Sema::TDK_Success : Sema::TDK_NonDeducedMismatch; + return ParDesug == ArgDesug ? Sema::TDK_Success + : Sema::TDK_NonDeduc

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-10-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked 12 inline comments as done. mizvekov added inline comments. Comment at: clang-tools-extra/clangd/unittests/ASTTests.cpp:180 )cpp", - // FIXME: it'd be nice if this resolved to the alias instead - "struct Foo", + // It's so nic

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-10-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D110216#3038797 , @v.g.vassilev wrote: > Over the years we had some interest from people but never actually got > implemented. Here > were some > ideas @rs

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-10-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked an inline comment as done. mizvekov added a comment. In D110216#3040748 , @craig.topper wrote: > Looks like this fixes PR51282. Okay, interesting. This could be just papering over the bug. Do you still lose this alignment if it goes thro

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-10-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D110216#3040748 , @craig.topper wrote: > Looks like this fixes PR51282. I guess it does fix it, but the underlying implementation of alignment is very fragile. The alignment is stored in `AttributedType` nodes, which are al

[PATCH] D95409: [clang] implicitly delete space ship operator with function pointers

2021-02-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Ping. By the way I realize I may not have put the new tests in the appropriate place. Any guidance there welcome. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95409/new/ https://reviews.llvm.org/D95409

[PATCH] D103720: [clang] NFC: Rename rvalue to prvalue

2021-06-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 350006. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103720/new/ https://reviews.llvm.org/D103720 Files: clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp clang

[PATCH] D100733: [clang] NFC: change uses of `Expr->getValueKind` into `is?Value`

2021-06-05 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. I created a DR which proposes the renaming as rsmith suggested: https://reviews.llvm.org/D103720 In D100733#2773944 , @aaronpuchert wrote: > A new value category feels like a global change for a local problem. We can > explai

[PATCH] D99696: [clang] NRVO: Improvements and handling of more cases.

2021-06-05 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99696/new/ https://reviews.llvm.org/D99696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D103760: [clang] use correct builtin type for defaulted comparison analyzer

2021-06-05 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added subscribers: manas, steakhal, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes PR50591. When analyzing

[PATCH] D103760: [clang] use correct builtin type for defaulted comparison analyzer

2021-06-05 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Since we can still crash with user defined conversion operators for any builtin types not supported by `getComparisonCategoryForBuiltinCmp` (many others), I will make a follow up patch to just replace that assert with a deleted result. Repository: rG LLVM Github Mon

[PATCH] D103760: [clang] use correct builtin type for defaulted comparison analyzer

2021-06-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. @rsmith what do you think of the following strategy as a follow up to this patch: - First step we replace the assert at line 7866 with a `deleted` result. I don't really think it's sustainable to keep returning incorrect results / crashing for builtin types that are

[PATCH] D103850: [clang] diagnose instead of assert for defaulted comparison return type deduction.

2021-06-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When deducing the return type of defaulted three-way comparison, instead of asserting in the case of unsupported builtin types, just diagnose it. For

[PATCH] D103855: [clang] Exclude function pointers on DefaultedComparisonAnalyzer

2021-06-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added subscribers: manas, steakhal, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This implements a more compreh

[PATCH] D103850: [clang] diagnose instead of assert for defaulted comparison return type deduction.

2021-06-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:7876 + diag:: + err_defaulted_comparison_cannot_deduce_unsupported_builtin_type) + << Subobj.Kind << Subobj.Decl << T; I think this

[PATCH] D103720: [clang] NFC: Rename rvalue to prvalue

2021-06-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D103720#2806147 , @aaron.ballman wrote: > (esp if someone in the future wants to add `Expr::isRValue()` with the C++ > meaning of prvalue || xvalue). @rsmith actually suggested we add `isRValue` as a second step here, and I

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-06-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3226-3227 +CopyElisionSemanticsKind CESK = CES_Strict; +if (getLangOpts().CPlusPlus20) { + CESK = CES_ImplicitlyMovableCXX20; +} else if (getLangOpts().CPlusPlus11) { Quuxplu

[PATCH] D103720: [clang] NFC: Rename rvalue to prvalue

2021-06-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 350729. mizvekov added a comment. Implement rsmith's suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103720/new/ https://reviews.llvm.org/D103720 Files: clang-tools-extra/clang-tidy/misc/Uniquept

[PATCH] D103933: [clang] NFC: rename SK_CastDerivedToBaseRValue to SK_CastDerivedToBasePRValue

2021-06-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is a follow up to the "rvalue-to-prvalue" rename at D103720 . Signed-off-by: Matheus Izvekov Depends on D103

[PATCH] D103720: [clang] NFC: Rename rvalue to prvalue

2021-06-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked an inline comment as done. mizvekov added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:3588 + case VK_PRValue: +S.Kind = SK_CastDerivedToBaseRValue; +break; rsmith wrote: > Would be nice to rename this `SK_` enumerator as a fo

[PATCH] D103720: [clang] NFC: Rename rvalue to prvalue

2021-06-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked an inline comment as done. mizvekov added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:5662 switch (ET) { case ET_IsLValueExpr: return E->isLValue(); + case ET_IsRValueExpr: rsmith wrote: > Hm, I wonder if this it's correct t

[PATCH] D103720: [clang] NFC: Rename rvalue to prvalue

2021-06-09 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaef5d8fdc7d0: [clang] NFC: Rename rvalue to prvalue (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103720/new/ https://reviews.llvm.o

[PATCH] D103933: [clang] NFC: rename SK_CastDerivedToBaseRValue to SK_CastDerivedToBasePRValue

2021-06-09 Thread Matheus Izvekov 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 rGc25572bf2993: [clang] NFC: rename SK_CastDerivedToBaseRValue to SK_CastDerivedToBasePRValue (authored by mizvekov). Repository: rG LLVM Github Mon

[PATCH] D99696: [clang] NRVO: Improvements and handling of more cases.

2021-06-09 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D99696#2808592 , @Quuxplusone wrote: > @mizvekov, my understanding is: > > - D99696 was temporarily blocked on D103720 > , but now D103720 >

[PATCH] D100713: [clang] NFC: refactor usage of getDecltypeForParenthesizedExpr

2021-06-09 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 350998. mizvekov added a comment. rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100713/new/ https://reviews.llvm.org/D100713 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/Sema/Se

[PATCH] D100733: [clang] NFC: change uses of `Expr->getValueKind` into `is?Value`

2021-06-10 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 351123. mizvekov added a comment. Rebase. Now that we have isPRValue, this is hopefully less controversial now :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100733/new/ https://reviews.llvm.org/D100733 Fi

[PATCH] D100733: [clang] NFC: change uses of `Expr->getValueKind` into `is?Value`

2021-06-10 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Also by the way D100713 is not really a dependency here, this DR can land on it's own if that is not clear. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100733/new/ https://reviews.llvm

[PATCH] D99696: [clang] NRVO: Improvements and handling of more cases.

2021-06-10 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG667fbcdd0b2e: [clang] NRVO: Improvements and handling of more cases. (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99696/new/ https:

[PATCH] D99005: [clang] Implement P2266 Simpler implicit move

2021-06-10 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 351274. mizvekov added a comment. rerun pipeline. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/new/ https://reviews.llvm.org/D99005 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaCorouti

[PATCH] D99005: [clang] Implement P2266 Simpler implicit move

2021-06-10 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Actually we can land it now. @rsmith gave me the go ahead in private. The windows pipeline passes. The latest debian build failure is some random fortran thing, so we are good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D99005: [clang] Implement P2266 Simpler implicit move

2021-06-10 Thread Matheus Izvekov 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 rGcbd0054b9eb1: [clang] Implement P2266 Simpler implicit move (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D99696: [clang] NRVO: Improvements and handling of more cases.

2021-06-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov reopened this revision. mizvekov added a comment. This revision is now accepted and ready to land. Thank you @stella.stamenova and @aeubanks for reporting and reverting this. Turns out was a silly mistake where we were not digging down through AttributedType nodes in order to get the fu

[PATCH] D99696: [clang] NRVO: Improvements and handling of more cases.

2021-06-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 351462. mizvekov added a comment. Look through AttributedType when obtaining FunctionDecl return type. Adds a couple more test cases to cover this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99696/new/ htt

[PATCH] D99696: [clang] NRVO: Improvements and handling of more cases.

2021-06-12 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1e50c3d785f4: [clang] NRVO: Improvements and handling of more cases. (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99696/new/ https:

[PATCH] D99005: [clang] Implement P2266 Simpler implicit move

2021-06-13 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbf2063178218: [clang] Implement P2266 Simpler implicit move (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/new/ https://reviews

[PATCH] D99696: [clang] NRVO: Improvements and handling of more cases.

2021-06-14 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D99696#2817126 , @rjmccall wrote: > When `__block` variables get moved to the heap, they're supposed to be moved > if possible, not copied. It looks like PerformMoveOrCopyInitialization > requires NRVO info to be passed in t

[PATCH] D99005: [clang] Implement P2266 Simpler implicit move

2021-06-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D99005#2818606 , @sberg wrote: > (In a build prior to > https://reviews.llvm.org/rGc60dd3b2626a4d9eefd9f82f9a406b0d28d3fd72 "Revert > '[clang] NRVO: Improvements and handling of more cases.'") I see the > following (reduced

[PATCH] D99696: [clang] NRVO: Improvements and handling of more cases.

2021-06-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 352271. mizvekov added a comment. -bugs +tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99696/new/ https://reviews.llvm.org/D99696 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/Sema.cpp cla

[PATCH] D99696: [clang] NRVO: Improvements and handling of more cases.

2021-06-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. @rjmccall Added some tests covering these semantics: clang/test/SemaObjCXX/block-capture.mm and also some extra documentation to checkEscapingByref. Not sure if I got the terminology right here.. @Quuxplusone any other interesting corner cases for these new tests? Rep

[PATCH] D103850: [clang] diagnose instead of assert for defaulted comparison return type deduction.

2021-06-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/CXX/class/class.compare/class.spaceship/p2.cpp:200 + struct b3 { +auto operator<=>(b3 const &) const = default; // expected-error {{cannot be deduced because three-way comparison for member 'f' would compare as builtin

[PATCH] D103855: [clang] Exclude function pointers on DefaultedComparisonAnalyzer

2021-06-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. I see. I can change this patch so it just implicitly deletes the operator in case we decide to pick function pointers, without the hard error introduced by the previous patch. And if the comitee decides to stop providing relational operators for function pointers, we c

[PATCH] D99696: [clang] NRVO: Improvements and handling of more cases.

2021-06-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 352566. mizvekov added a comment. Fix Arthur's nits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99696/new/ https://reviews.llvm.org/D99696 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/Sema.cpp

[PATCH] D99696: [clang] NRVO: Improvements and handling of more cases.

2021-06-16 Thread Matheus Izvekov 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 rG12c90e2e25df: [clang] NRVO: Improvements and handling of more cases. (authored by mizvekov). Changed prior to commit: https://reviews.llvm.org/D99

[PATCH] D103760: [clang] use correct builtin type for defaulted comparison analyzer

2021-06-16 Thread Matheus Izvekov 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 rGb88eb855b531: [clang] use correct builtin type for defaulted comparison analyzer (authored by mizvekov). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D103855: [clang] Exclude function pointers on DefaultedComparisonAnalyzer

2021-06-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 352667. mizvekov added a comment. Instead of excluding function pointers from the overload set, just implicitly delete with new diagnostic in case we end up selecting it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D99005: [clang] Implement P2266 Simpler implicit move

2021-06-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 352818. mizvekov added a comment. - Change block capture NRVO semantics to match P2266 in C++2b mode. - Update cxx_status. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/n

[PATCH] D99005: [clang] Implement P2266 Simpler implicit move

2021-06-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 352821. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/new/ https://reviews.llvm.org/D99005 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/Sema.cpp clang/lib/Sema

[PATCH] D104500: DRAFT: [clang] Apply P1825 as DR for all modes below C++20.

2021-06-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: Matheus Izvekov Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D104500 Files: clang/include/clang/Sema/Sema.h c

[PATCH] D104500: DRAFT: [clang] Apply P1825 as DR for all modes below C++20.

2021-06-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 352894. mizvekov added a comment. set parent revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/Sema

[PATCH] D103855: [clang] Exclude function pointers on DefaultedComparisonAnalyzer

2021-06-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 352957. mizvekov added a comment. rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103855/new/ https://reviews.llvm.org/D103855 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/

[PATCH] D103855: [clang] Exclude function pointers on DefaultedComparisonAnalyzer

2021-06-18 Thread Matheus Izvekov 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 rG7ddd15cd5dea: [clang] Exclude function pointers on DefaultedComparisonAnalyzer (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D99005: [clang] Implement P2266 Simpler implicit move

2021-06-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 352985. mizvekov added a comment. fix ctidy warning. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/new/ https://reviews.llvm.org/D99005 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/Sema.cpp

[PATCH] D99005: [clang] Implement P2266 Simpler implicit move

2021-06-18 Thread Matheus Izvekov 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 rGced6b204d18e: [clang] Implement P2266 Simpler implicit move (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D104500: DRAFT: [clang] Apply P1825 as DR for all modes below C++20.

2021-06-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353009. mizvekov added a comment. rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaStmt.cpp cl

[PATCH] D104500: DRAFT: [clang] Apply P1825 as DR for all modes below C++20.

2021-06-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D104500#2827629 , @lebedev.ri wrote: > Patch is missing description Yes sorry for the noise, I do that sometimes just to let the bots test my patch before it is fully ready for review. If you have any tips for me so I can u

[PATCH] D104500: DRAFT: [clang] Apply P1825 as DR for all modes below C++20.

2021-06-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353127. mizvekov added a comment. rip out warn_return_std_move completely. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files: clang/include/clang/Basic/Diagnos

[PATCH] D104500: [clang] Apply P1825 as Defect Report for all C++ standards up to C++20.

2021-06-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353132. mizvekov added a comment. lint. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/cla

[PATCH] D104500: [clang] Apply P1825 as Defect Report for all C++ standards up to C++20.

2021-06-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/CXX/class/class.init/class.copy.elision/p3.cpp:58-60 A1 test1(A1 &&a) { - return a; // cxx11_17-error {{call to deleted constructor of 'test_implicitly_movable_rvalue_ref::A1'}} + return a; } mizvekov wr

[PATCH] D104500: [clang] Apply P1825 as Defect Report for all C++ standards from C++11 up to C++20.

2021-06-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353151. mizvekov added a comment. Don't apply implicit moves to C++98, and add tests which demonstrate incompatibilities this would cause. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://rev

[PATCH] D104500: [clang] Apply P1825 as Defect Report for all C++ standards from C++11 up to C++20.

2021-06-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353155. mizvekov added a comment. format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/c

[PATCH] D104500: [clang] Apply P1825 as Defect Report for all C++ standards from C++11 up to C++20.

2021-06-19 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353215. mizvekov added a comment. tests: improve consistency of expcted messages.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files: clang/include/clang/Basic

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-06-20 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353240. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/clang/S

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-06-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353320. mizvekov added a comment. remove unnecessary qualification. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files: clang/include/clang/Basic/DiagnosticSema

[PATCH] D104680: [clang] Eliminate relational function pointer comparisons in all C++ modes

2021-06-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Word on the grapevine is that the committee recently had an unanimous vote on eliminating relational function pointer comparisons. There isn't any word

[PATCH] D104680: [clang] Eliminate relational function pointer comparisons in all C++ modes

2021-06-22 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353596. mizvekov added a comment. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. - Update more tests. - Slightly improved error recovery: deduce type for non-three-way relational comparisons. Repository: rG LLVM Github Monorep

[PATCH] D104680: [clang] Eliminate relational function pointer comparisons in all C++ modes

2021-06-22 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353651. mizvekov added a comment. - Add one more test case. - Formating Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104680/new/ https://reviews.llvm.org/D104680 Files: clang/include/clang/Basic/Diagnostic

[PATCH] D104680: [clang] Eliminate relational function pointer comparisons in all C++ modes

2021-06-22 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/Parser/cxx-template-argument.cpp:28 +(void)(&t==p);// expected-error {{use '> ='}} +(void)(&t>=p);// expected-error {{use '> >'}} expected-error {{ordered comparison of function pointers}} +(void)(&t>>=p)

[PATCH] D104680: [clang] Eliminate relational function pointer comparisons in all C++ modes

2021-06-22 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:11815 +if (IsError) + return Opc != BO_Cmp ? Context.getLogicalOperationType() : QualType(); + } Quuxplusone wrote: > Peanut gallery says: Is `QualType()` the right "placeholder" to

[PATCH] D104680: [clang] Eliminate relational function pointer comparisons in all C++ modes

2021-06-22 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353805. mizvekov added a comment. Implement 2/3 of Arthur's suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104680/new/ https://reviews.llvm.org/D104680 Files: clang/include/clang/Basic/Diagnosti

[PATCH] D104680: [clang] Eliminate relational function pointer comparisons in all C++ modes

2021-06-22 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/SemaTemplate/resolve-single-template-id.cpp:73-75 + oneT < oneT; // expected-warning {{self-comparison always evaluates to false}} \ + // expected-warning {{relational comparison result unused}}

[PATCH] D104680: [clang] Eliminate relational function pointer comparisons in all C++ modes

2021-06-24 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D104680#2839309 , @rsmith wrote: > I would prefer to split this into two changes: > ... > Does that sound reasonable? Yeah that is fine, totally understand ;) Comment at: clang/lib/Sema/SemaExpr.cpp:11815

[PATCH] D107311: [clang] fix canonicalization of nested name specifiers

2021-08-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 363710. mizvekov edited the summary of this revision. mizvekov added a comment. mizvekov updated this revision to Diff 363719. mizvekov updated this revision to Diff 363722. mizvekov

[PATCH] D107311: [clang] fix canonicalization of nested name specifiers

2021-08-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 363725. mizvekov edited the summary of this revision. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107311/new/ https://reviews.llvm.org/D107311 Files: clang/include/clang/Sema/S

[PATCH] D107311: [clang] fix canonicalization of nested name specifiers

2021-08-03 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG219790c1f536: [clang] fix canonicalization of nested name specifiers (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107311/new/ https

<    1   2   3   4   5   6   7   8   9   10   >