Page MenuHomePhabricator
Feed Advanced Search

Today

mizvekov committed rGb88eb855b531: [clang] use correct builtin type for defaulted comparison analyzer (authored by mizvekov).
[clang] use correct builtin type for defaulted comparison analyzer
Wed, Jun 16, 5:09 PM
mizvekov closed D103760: [clang] use correct builtin type for defaulted comparison analyzer.
Wed, Jun 16, 5:08 PM · Restricted Project
mizvekov committed rG12c90e2e25df: [clang] NRVO: Improvements and handling of more cases. (authored by mizvekov).
[clang] NRVO: Improvements and handling of more cases.
Wed, Jun 16, 4:57 PM
mizvekov closed D99696: [clang] NRVO: Improvements and handling of more cases..
Wed, Jun 16, 4:56 PM · Restricted Project
mizvekov updated the diff for D99696: [clang] NRVO: Improvements and handling of more cases..

Fix Arthur's nits.

Wed, Jun 16, 3:03 PM · Restricted Project
mizvekov added a comment to D103855: [clang] Exclude function pointers on DefaultedComparisonAnalyzer.

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 can revisit this.

Wed, Jun 16, 11:10 AM · Restricted Project
mizvekov added inline comments to D103850: [clang] diagnose instead of assert for defaulted comparison return type deduction..
Wed, Jun 16, 10:53 AM · Restricted Project

Yesterday

mizvekov added a comment to D99696: [clang] NRVO: Improvements and handling of more cases..

@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?

Tue, Jun 15, 5:38 PM · Restricted Project
mizvekov updated the diff for D99696: [clang] NRVO: Improvements and handling of more cases..

-bugs
+tests

Tue, Jun 15, 3:24 PM · Restricted Project
mizvekov added a comment to D99005: [clang] Implement P2266 Simpler implicit move.

(In a build prior to https://reviews.llvm.org/rGc60dd3b2626a4d9eefd9f82f9a406b0d28d3fd72 "Revert '[clang] NRVO: Improvements and handling of more cases.'") I see the following (reduced from https://git.libreoffice.org/core/+/649313625b94e6b879848fc19b607b74375100bf/o3tl/qa/compile-temporary.cxx) started to fail under -std=c++2b with this change (and continues to compile fine with -std=c++20):
It is not clear to me whether that is an intended change in behavior according to http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2266r1.html "Simpler implicit move", or whether it is a bug in this implementation.

Tue, Jun 15, 4:09 AM · Restricted Project

Mon, Jun 14

mizvekov added a comment to D99696: [clang] NRVO: Improvements and handling of more cases..

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 to ever do a move. Maybe it's being passed in wrong when building __block copy expressions in some situation.

Found the culprit, that functionality was implemented in checkEscapingByref, and it was a bit of a shocker that such a thing was just hiding in a function with such an unassuming name :)
Also surprising to find here another user of the two-step overload resolution, that also escaped our radar.
There is a C++ proposal (P2266) to replace that mechanism with something much simpler.

Mon, Jun 14, 3:17 PM · Restricted Project
mizvekov reopened D99005: [clang] Implement P2266 Simpler implicit move.
Mon, Jun 14, 2:03 PM · Restricted Project
mizvekov reopened D99696: [clang] NRVO: Improvements and handling of more cases..
Mon, Jun 14, 1:43 PM · Restricted Project

Sun, Jun 13

mizvekov committed rGbf2063178218: [clang] Implement P2266 Simpler implicit move (authored by mizvekov).
[clang] Implement P2266 Simpler implicit move
Sun, Jun 13, 3:11 AM
mizvekov closed D99005: [clang] Implement P2266 Simpler implicit move.
Sun, Jun 13, 3:11 AM · Restricted Project

Sat, Jun 12

mizvekov committed rG1e50c3d785f4: [clang] NRVO: Improvements and handling of more cases. (authored by mizvekov).
[clang] NRVO: Improvements and handling of more cases.
Sat, Jun 12, 7:44 AM
mizvekov closed D99696: [clang] NRVO: Improvements and handling of more cases..
Sat, Jun 12, 7:43 AM · Restricted Project

Fri, Jun 11

mizvekov reopened D99005: [clang] Implement P2266 Simpler implicit move.
Fri, Jun 11, 8:50 AM · Restricted Project
mizvekov updated the diff for D99696: [clang] NRVO: Improvements and handling of more cases..

Look through AttributedType when obtaining FunctionDecl return type.

Fri, Jun 11, 8:45 AM · Restricted Project
mizvekov reopened D99696: [clang] NRVO: Improvements and handling of more cases..

Thank you @stella.stamenova and @aeubanks for reporting and reverting this.

Fri, Jun 11, 8:42 AM · Restricted Project

Thu, Jun 10

mizvekov committed rGcbd0054b9eb1: [clang] Implement P2266 Simpler implicit move (authored by mizvekov).
[clang] Implement P2266 Simpler implicit move
Thu, Jun 10, 3:56 PM
mizvekov closed D99005: [clang] Implement P2266 Simpler implicit move.
Thu, Jun 10, 3:56 PM · Restricted Project
mizvekov added a comment to D99005: [clang] Implement P2266 Simpler implicit move.

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.

Thu, Jun 10, 3:51 PM · Restricted Project
mizvekov updated the diff for D99005: [clang] Implement P2266 Simpler implicit move.

rerun pipeline.

Thu, Jun 10, 2:50 PM · Restricted Project
mizvekov committed rG667fbcdd0b2e: [clang] NRVO: Improvements and handling of more cases. (authored by mizvekov).
[clang] NRVO: Improvements and handling of more cases.
Thu, Jun 10, 2:03 PM
mizvekov closed D99696: [clang] NRVO: Improvements and handling of more cases..
Thu, Jun 10, 2:03 PM · Restricted Project
mizvekov added a comment to D100733: [clang] NFC: change uses of `Expr->getValueKind` into `is?Value`.

Also by the way D100713 is not really a dependency here, this DR can land on it's own if that is not clear.

Thu, Jun 10, 4:06 AM · Restricted Project
mizvekov added a reviewer for D100713: [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr: rsmith.
Thu, Jun 10, 3:59 AM · Restricted Project
mizvekov updated the diff for D100733: [clang] NFC: change uses of `Expr->getValueKind` into `is?Value`.

Now that we have isPRValue, this is hopefully less controversial now :)

Thu, Jun 10, 3:58 AM · Restricted Project

Wed, Jun 9

mizvekov retitled D100713: [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr from [clang] NFC: refactor usage of getDecltypeForParenthesizedExpr to [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr.
Wed, Jun 9, 2:52 PM · Restricted Project
mizvekov updated the diff for D100713: [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr.

rebase.

Wed, Jun 9, 2:42 PM · Restricted Project
mizvekov added a comment to D99696: [clang] NRVO: Improvements and handling of more cases..

@mizvekov, my understanding is:

IMHO we should just plow ahead here. @aaronpuchert what's your take on D99696 at this point; is it good to go or still unresolved issues?

Wed, Jun 9, 2:04 PM · Restricted Project
mizvekov committed rGc25572bf2993: [clang] NFC: rename SK_CastDerivedToBaseRValue to SK_CastDerivedToBasePRValue (authored by mizvekov).
[clang] NFC: rename SK_CastDerivedToBaseRValue to SK_CastDerivedToBasePRValue
Wed, Jun 9, 3:39 AM
mizvekov closed D103933: [clang] NFC: rename SK_CastDerivedToBaseRValue to SK_CastDerivedToBasePRValue.
Wed, Jun 9, 3:39 AM · Restricted Project
mizvekov committed rGaef5d8fdc7d0: [clang] NFC: Rename rvalue to prvalue (authored by mizvekov).
[clang] NFC: Rename rvalue to prvalue
Wed, Jun 9, 3:27 AM
mizvekov closed D103720: [clang] NFC: Rename rvalue to prvalue.
Wed, Jun 9, 3:27 AM · Restricted Project, Restricted Project

Tue, Jun 8

mizvekov added inline comments to D103720: [clang] NFC: Rename rvalue to prvalue.
Tue, Jun 8, 4:38 PM · Restricted Project, Restricted Project
mizvekov added inline comments to D103720: [clang] NFC: Rename rvalue to prvalue.
Tue, Jun 8, 4:09 PM · Restricted Project, Restricted Project
mizvekov added a reviewer for D103933: [clang] NFC: rename SK_CastDerivedToBaseRValue to SK_CastDerivedToBasePRValue: rsmith.
Tue, Jun 8, 4:06 PM · Restricted Project
mizvekov requested review of D103933: [clang] NFC: rename SK_CastDerivedToBaseRValue to SK_CastDerivedToBasePRValue.
Tue, Jun 8, 4:05 PM · Restricted Project
mizvekov updated the diff for D103720: [clang] NFC: Rename rvalue to prvalue.

Implement rsmith's suggestions.

Tue, Jun 8, 3:51 PM · Restricted Project, Restricted Project
mizvekov added inline comments to D88220: [C++20] P1825R0: More implicit moves.
Tue, Jun 8, 1:28 PM · Restricted Project
mizvekov updated the summary of D103720: [clang] NFC: Rename rvalue to prvalue.
Tue, Jun 8, 12:38 PM · Restricted Project, Restricted Project
mizvekov added a comment to D103720: [clang] NFC: Rename rvalue to prvalue.

(esp if someone in the future wants to add Expr::isRValue() with the C++ meaning of prvalue || xvalue).

Tue, Jun 8, 12:22 PM · Restricted Project, Restricted Project

Mon, Jun 7

mizvekov added a reviewer for D103855: [clang] Exclude function pointers on DefaultedComparisonAnalyzer: rsmith.
Mon, Jun 7, 5:08 PM · Restricted Project
mizvekov added inline comments to D103850: [clang] diagnose instead of assert for defaulted comparison return type deduction..
Mon, Jun 7, 5:04 PM · Restricted Project
mizvekov requested review of D103855: [clang] Exclude function pointers on DefaultedComparisonAnalyzer.
Mon, Jun 7, 4:51 PM · Restricted Project
mizvekov added a reviewer for D103850: [clang] diagnose instead of assert for defaulted comparison return type deduction.: rsmith.
Mon, Jun 7, 3:33 PM · Restricted Project
mizvekov requested review of D103850: [clang] diagnose instead of assert for defaulted comparison return type deduction..
Mon, Jun 7, 3:30 PM · Restricted Project
mizvekov added a comment to D103760: [clang] use correct builtin type for defaulted comparison analyzer.

@rsmith what do you think of the following strategy as a follow up to this patch:

Mon, Jun 7, 2:31 PM · Restricted Project

Sat, Jun 5

mizvekov added a comment to D103760: [clang] use correct builtin type for defaulted comparison analyzer.

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.

Sat, Jun 5, 7:37 PM · Restricted Project
mizvekov added a reviewer for D103760: [clang] use correct builtin type for defaulted comparison analyzer: rsmith.
Sat, Jun 5, 7:29 PM · Restricted Project
mizvekov requested review of D103760: [clang] use correct builtin type for defaulted comparison analyzer.
Sat, Jun 5, 6:33 PM · Restricted Project
mizvekov added a comment to D99696: [clang] NRVO: Improvements and handling of more cases..

Ping.

Sat, Jun 5, 5:25 PM · Restricted Project
mizvekov added a comment to D100733: [clang] NFC: change uses of `Expr->getValueKind` into `is?Value`.

I created a DR which proposes the renaming as rsmith suggested: https://reviews.llvm.org/D103720

Sat, Jun 5, 9:12 AM · Restricted Project
mizvekov updated the summary of D103720: [clang] NFC: Rename rvalue to prvalue.
Sat, Jun 5, 8:54 AM · Restricted Project, Restricted Project

Fri, Jun 4

mizvekov updated the diff for D103720: [clang] NFC: Rename rvalue to prvalue.

.

Fri, Jun 4, 7:23 PM · Restricted Project, Restricted Project
mizvekov updated the diff for D103720: [clang] NFC: Rename rvalue to prvalue.

.

Fri, Jun 4, 4:44 PM · Restricted Project, Restricted Project
mizvekov updated the diff for D103720: [clang] NFC: Rename rvalue to prvalue.

rebase
some small comment changes
apply format patch to tests

Fri, Jun 4, 4:09 PM · Restricted Project, Restricted Project
mizvekov requested review of D103720: [clang] NFC: Rename rvalue to prvalue.
Fri, Jun 4, 2:40 PM · Restricted Project, Restricted Project

May 14 2021

mizvekov added a comment to D100733: [clang] NFC: change uses of `Expr->getValueKind` into `is?Value`.

What do we think about renaming isRValue() to isPRValue() and renaming VK_RValue to VK_PRValue, adding a "real" isRValue(), and then performing this cleanup? I think the current state of treating "rvalue" as sometimes meaning rvalue and sometimes meaning "prvalue" is unhelpful and confusing, and this change makes it worse because isRValue *could* be checking for an rvalue whereas a comparison against VK_RValue more clearly is only looking for one specific value category rather than two.

May 14 2021, 5:27 PM · Restricted Project
mizvekov added a comment to D100733: [clang] NFC: change uses of `Expr->getValueKind` into `is?Value`.

Not sure how to feel about this, the value categories are already hard to grasp for most C++ programmers. To solve the implicit move concerns with a new value category seems like cracking a nut with a sledgehammer. But that's not directly related to this change, we can discuss this when the change is there.

May 14 2021, 3:07 PM · Restricted Project
mizvekov added a comment to D100713: [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr.

Again, I'm not sure if it helps to use getDecltypeForParenthesizedExpr where we don't actually have the decltype of a parenthesized expression.

It's probably not entirely coincidental, but things aren't defined this way.

May 14 2021, 2:38 PM · Restricted Project

Apr 21 2021

mizvekov updated the diff for D100000: [clang] WIP: Implement simpler alternative to two-phase lookup for NRVO.

.

Apr 21 2021, 12:32 PM · Restricted Project

Apr 20 2021

mizvekov updated the diff for D100000: [clang] WIP: Implement simpler alternative to two-phase lookup for NRVO.

Initial implementation, still WIP.

Apr 20 2021, 4:24 PM · Restricted Project

Apr 18 2021

mizvekov added a comment to D100733: [clang] NFC: change uses of `Expr->getValueKind` into `is?Value`.

The change seems to be correct, but I'm wondering if x.getValueKind() == VK_*Value doesn't have one advantage over x.is*Value(): it's obvious that this is exclusive with the other values. Especially with isRValue() it might not be so obvious, because Clang doesn't follow the C++11 terminology with this.

But it's admittedly shorter, so I'd be willing to approve this.

Apr 18 2021, 4:29 PM · Restricted Project
mizvekov requested review of D100733: [clang] NFC: change uses of `Expr->getValueKind` into `is?Value`.
Apr 18 2021, 1:41 PM · Restricted Project
mizvekov retitled D100713: [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr from [clang] NFC: refactor usage of getDecltypeForParenthesizedExpr and getValueKind to [clang] NFC: refactor usage of getDecltypeForParenthesizedExpr.
Apr 18 2021, 1:22 PM · Restricted Project
mizvekov updated the diff for D100713: [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr.

Split 'getValueKind' cleanup into a separate patch.

Apr 18 2021, 1:22 PM · Restricted Project

Apr 17 2021

mizvekov added inline comments to D100713: [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr.
Apr 17 2021, 7:35 PM · Restricted Project
mizvekov updated the diff for D100713: [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr.

.

Apr 17 2021, 7:16 PM · Restricted Project
mizvekov updated the summary of D100713: [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr.
Apr 17 2021, 6:54 PM · Restricted Project
mizvekov requested review of D100713: [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr.
Apr 17 2021, 6:51 PM · Restricted Project

Apr 16 2021

mizvekov updated the diff for D99005: [clang] Implement P2266 Simpler implicit move.

rebase

Apr 16 2021, 5:52 PM · Restricted Project

Apr 15 2021

mizvekov updated the diff for D99696: [clang] NRVO: Improvements and handling of more cases..
  • Added doc to disallowNRVO
  • Also detect implicit return type for blocks.
Apr 15 2021, 2:31 PM · Restricted Project

Apr 13 2021

mizvekov added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 13 2021, 4:29 PM · Restricted Project
mizvekov updated the diff for D99696: [clang] NRVO: Improvements and handling of more cases..
  • Changed the downgrade* function name to disallowNRVO, given second thought, I think it's appropriate name.
  • Change to one variable declaration per statement as per Arthur's review.
Apr 13 2021, 3:02 PM · Restricted Project
mizvekov added a comment to D99696: [clang] NRVO: Improvements and handling of more cases..

Actually, there is still something not quite right with this patch that I have to finish investigating.

Apr 13 2021, 2:50 PM · Restricted Project
mizvekov added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 13 2021, 2:27 PM · Restricted Project
mizvekov added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 13 2021, 2:20 PM · Restricted Project
mizvekov added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 13 2021, 1:35 PM · Restricted Project
mizvekov added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 13 2021, 1:33 PM · Restricted Project
mizvekov updated the diff for D99696: [clang] NRVO: Improvements and handling of more cases..
  • Address rsmith review comments.
Apr 13 2021, 1:31 PM · Restricted Project

Apr 12 2021

mizvekov added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 12 2021, 8:08 PM · Restricted Project
mizvekov added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 12 2021, 7:20 PM · Restricted Project
mizvekov updated the diff for D99005: [clang] Implement P2266 Simpler implicit move.

rebase

Apr 12 2021, 6:04 PM · Restricted Project

Apr 11 2021

mizvekov added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 11 2021, 8:30 PM · Restricted Project
mizvekov updated the diff for D99696: [clang] NRVO: Improvements and handling of more cases..
  • Removes code that tried to allow copy elision for functions with dependent 'auto' return types. The reason is explained in new comments. Will try to address these in future work.
  • Addresses aaronpuchert's review points.
Apr 11 2021, 8:27 PM · Restricted Project

Apr 10 2021

mizvekov added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 10 2021, 8:02 PM · Restricted Project
mizvekov added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 10 2021, 12:03 PM · Restricted Project
mizvekov updated the diff for D99696: [clang] NRVO: Improvements and handling of more cases..
  • Addresses aaronpuchert's review points.
Apr 10 2021, 11:59 AM · Restricted Project
mizvekov added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 10 2021, 9:31 AM · Restricted Project

Apr 9 2021

mizvekov added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 9 2021, 7:47 PM · Restricted Project
mizvekov added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 9 2021, 7:43 PM · Restricted Project
mizvekov added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 9 2021, 7:41 PM · Restricted Project
mizvekov committed rG18192228602c: [clang] tests: cleanup, update and add some new ones (authored by mizvekov).
[clang] tests: cleanup, update and add some new ones
Apr 9 2021, 8:24 AM
mizvekov closed D99225: [clang] tests: cleanup, update and add some new ones.
Apr 9 2021, 8:24 AM · Restricted Project

Apr 6 2021

mizvekov updated the diff for D100000: [clang] WIP: Implement simpler alternative to two-phase lookup for NRVO.

.

Apr 6 2021, 6:10 PM · Restricted Project
mizvekov updated the diff for D100000: [clang] WIP: Implement simpler alternative to two-phase lookup for NRVO.

.

Apr 6 2021, 6:02 PM · Restricted Project
mizvekov retitled D100000: [clang] WIP: Implement simpler alternative to two-phase lookup for NRVO from [clang] WIP: Implement simpler alternative to two-phase lookup for NRVO WIP, not ready for review. to [clang] WIP: Implement simpler alternative to two-phase lookup for NRVO.
Apr 6 2021, 5:31 PM · Restricted Project