[PATCH] D99225: [clang] tests: cleanup, update and add some new ones

2021-04-02 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 335055. mizvekov added a comment. Just rebased, removing trailing whitespace noise. Other review points to be addressed later. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99225/new/ https://reviews.llvm.org

[PATCH] D99225: [clang] tests: cleanup, update and add some new ones

2021-04-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/SemaCXX/conversion-function.cpp:160 + return "Hello"; // cxx98_14-error {{calling a private constructor}} #if __cplusplus <= 199711L // expected-warning@-2 {{an accessible copy constructor}} mizvekov wro

[PATCH] D99225: [clang] tests: cleanup, update and add some new ones

2021-04-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 335121. mizvekov added a comment. - Addresses most of Arthur's points. - Re-adds test coverage for `conversion-function.cpp` and `temp.mem/p5.cpp` with no C++ version specified. - Adds a couple more tests on nrvo-tracking for blocks returning references. R

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

2021-04-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 335122. mizvekov added a comment. Rebased. 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 clang/l

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

2021-04-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 335124. mizvekov added a comment. . 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 clang/lib/Sema

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

2021-04-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 335532. mizvekov added a comment. - small Doxygen fix. 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.c

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

2021-04-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 335542. mizvekov added a comment. - Rebased on top of D99696 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/new/ https://reviews.llvm.org/D99005 Files: clang/include/

[PATCH] D99225: [clang] tests: cleanup, update and add some new ones

2021-04-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/SemaCXX/coroutine-rvo.cpp:41-45 struct MoveOnly { - MoveOnly() {}; + MoveOnly() = default; MoveOnly(const MoveOnly&) = delete; - MoveOnly(MoveOnly&&) noexcept {}; - ~MoveOnly() {}; + MoveOnly(MoveOnly &&) = default;

[PATCH] D99225: [clang] tests: cleanup, update and add some new ones

2021-04-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 335599. mizvekov added a comment. - Finally addresses all of Arthur's review requests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99225/new/ https://reviews.llvm.org/D99225 Files: clang/test/CXX/class/cl

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

2021-04-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 335604. mizvekov added a comment. - test/SemaCXX/coroutine-rvo: Make MoveOnly trivial, since the temporary is not created anymore and there is no special reason to test a non-trivial type here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D100000: [clang] WIP: Implement simpler alternative to two-phase lookup for NRVO WIP, not ready for review.

2021-04-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added a subscriber: lxfind. 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/D10 Files:

[PATCH] D100000: [clang] WIP: Implement simpler alternative to two-phase lookup for NRVO

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

[PATCH] D100000: [clang] WIP: Implement simpler alternative to two-phase lookup for NRVO

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

[PATCH] D99225: [clang] tests: cleanup, update and add some new ones

2021-04-09 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG18192228602c: [clang] tests: cleanup, update and add some new ones (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99225/new/ https://

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

2021-04-09 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaCoroutine.cpp:1585-1586 InitializedEntity Entity = InitializedEntity::InitializeVariable(GroDecl); - ExprResult Res = S.PerformMoveOrCopyInitialization(Entity, nullptr, GroType, -

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

2021-04-09 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaCoroutine.cpp:1585-1586 InitializedEntity Entity = InitializedEntity::InitializeVariable(GroDecl); - ExprResult Res = S.PerformMoveOrCopyInitialization(Entity, nullptr, GroType, -

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

2021-04-09 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:854 if (Ex && !Ex->isTypeDependent()) { +NRVOResult NRVORes = IsThrownVarInScope ? getNRVOResult(Ex) : NRVOResult(); + mizvekov wrote: > aaronpuchert wrote: > > Any reason why you'v

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

2021-04-10 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaCoroutine.cpp:1585-1586 InitializedEntity Entity = InitializedEntity::InitializeVariable(GroDecl); - ExprResult Res = S.PerformMoveOrCopyInitialization(Entity, nullptr, GroType, -

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

2021-04-10 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 336626. mizvekov added a comment. - Addresses aaronpuchert's review points. 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

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

2021-04-10 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked 8 inline comments as done. mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3058 -bool Sema::isCopyElisionCandidate(QualType ReturnType, const VarDecl *VD, - CopyElisionSemanticsKind CESK) { - QualType VDT

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

2021-04-10 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3140 +/// \param ReturnType This is the return type of the function. +void Sema::updNRVOResultWithRetType(NRVOResult &Res, QualType ReturnType) { + if (!Res.Candidate) aaronpuchert wrote: >

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

2021-04-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 336736. mizvekov marked an inline comment as done. mizvekov added a comment. - 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.

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

2021-04-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked an inline comment as done. mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3140 +/// \param ReturnType This is the return type of the function. +void Sema::updNRVOResultWithRetType(NRVOResult &Res, QualType ReturnType) { + if (!Res.Candida

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

2021-04-12 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 337009. mizvekov added a comment. rebase 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/SemaCoroutine.cpp

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

2021-04-12 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3150-3153 + // If we got a non-deduced auto ReturnType, we are in a dependent context and + // there is no point in allowing copy elision since we won't have it deduced + // by the point the VardDecl is in

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

2021-04-12 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3150-3153 + // If we got a non-deduced auto ReturnType, we are in a dependent context and + // there is no point in allowing copy elision since we won't have it deduced + // by the point the VardDecl is in

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

2021-04-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 337248. mizvekov marked 7 inline comments as done. mizvekov added a comment. - Address rsmith review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99696/new/ https://reviews.llvm.org/D99696 Files:

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

2021-04-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/include/clang/Sema/Sema.h:4728 - enum CopyElisionSemanticsKind { -CES_Strict = 0, -CES_AllowParameters = 1, -CES_AllowDifferentTypes = 2, -CES_AllowExceptionVariables = 4, -CES_AllowRValueReferenceType = 8,

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

2021-04-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3290 } - -if (!getLangOpts().CPlusPlus20 && NeedSecondOverloadResolution && -!getDiagnostics().isIgnored(diag::warn_return_std_move, +if (!getDiagnostics().isIgnored(diag::warn_return_std

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

2021-04-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3066 - if (isCopyElisionCandidate(ReturnType, VD, CESK)) -return VD; - return nullptr; +static void downgradeNRVOResult(Sema::NRVOResult &Res, bool CanMove) { + Res.S = std::min(Res.S, CanMove ? Sema

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

2021-04-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3066 - if (isCopyElisionCandidate(ReturnType, VD, CESK)) -return VD; - return nullptr; +static void downgradeNRVOResult(Sema::NRVOResult &Res, bool CanMove) { + Res.S = std::min(Res.S, CanMove ? Sema

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

2021-04-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. @rsmith: Actually, there is still something not quite right with this patch that I have to finish investigating. The B5 test should not have gotten copy elision. I thought at first that we had gotten the function return type deduced durin

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

2021-04-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 337266. mizvekov added a comment. - 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. Repository: rG LLVM Github Monorepo

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

2021-04-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3066 - if (isCopyElisionCandidate(ReturnType, VD, CESK)) -return VD; - return nullptr; +static void downgradeNRVOResult(Sema::NRVOResult &Res, bool CanMove) { + Res.S = std::min(Res.S, CanMove ? Sema

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

2021-04-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 337903. mizvekov added a comment. - Added doc to disallowNRVO - Also detect implicit return type for blocks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99696/new/ https://reviews.llvm.org/D99696 Files: c

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

2021-04-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 338262. mizvekov added a comment. rebase 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/SemaCoroutine.cpp

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

2021-04-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added subscribers: lxfind, martong. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This clenaup patch: - Refactors a bunch of duplicates of getDecltypeForParenthesizedExpr into a common imp

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

2021-04-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 338352. mizvekov added a comment. . 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/Sema.h

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

2021-04-17 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:5845 + if (!To->isRValue()) { +QualType T = Self.Context.getDecltypeForParenthesizedExpr(To); InitializedEntity Entity = InitializedEntity::InitializeTemporary(T); aaronpuchert w

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

2021-04-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 338393. mizvekov added a comment. Split 'getValueKind' cleanup into a separate patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100713/new/ https://reviews.llvm.org/D100713 Files: clang/include/clang/AS

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

2021-04-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added a subscriber: lxfind. 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/D100733 Files:

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

2021-04-18 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D100733#2697537 , @aaronpuchert wrote: > 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

[PATCH] D100000: [clang] WIP: Implement simpler alternative to two-phase lookup for NRVO

2021-04-20 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 339035. mizvekov added a comment. Herald added a subscriber: dexonsmith. Initial implementation, still WIP. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D10/new/ https://reviews.llvm.org/D10 Files:

[PATCH] D100000: [clang] WIP: Implement simpler alternative to two-phase lookup for NRVO

2021-04-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 339349. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D10/new/ https://reviews.llvm.org/D10 Files: clang/include/clang/AST/Expr.h clang/include/clang/Basic/DiagnosticSem

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

2021-10-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D110216#3044102 , @aaronpuchert wrote: > Unless I'm missing something, alignment on aliases is itself fragile. Let's > say you have some template, then the instantiation with the alias is of > course the same as the instant

[PATCH] D111283: [clang] WIP: template / auto deduction deduces common sugar

2021-10-06 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. This patch implements deducing the common sugar between two types, and uses it to establish the result when checking deduced template arguments. This

[PATCH] D111283: [clang] WIP: template / auto deduction deduces common sugar

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

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

2021-10-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:250 Context.hasSameType(X.getAsType(), Y.getAsType())) return X; mizvekov wrote: > rsmith wrote: > > I wonder if we can come up with a good heuristic for determ

[PATCH] D111283: [clang] WIP: template / auto deduction deduces common sugar

2021-10-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 378054. mizvekov added a comment. - Handle almost all type classes in getCommonSugar. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111283/new/ https://reviews.llvm.org/D111283 Files: clang/include/clang/AS

[PATCH] D111283: [clang] WIP: template / auto deduction deduces common sugar

2021-10-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 378313. mizvekov edited the summary of this revision. mizvekov added a comment. - Handle all type classes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111283/new/ https://reviews.llvm.org/D111283 Files: c

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2021-10-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 378388. mizvekov retitled this revision from "[clang] WIP: template / auto deduction deduces common sugar" to "[clang] template / auto deduction deduces common sugar". mizvekov edited the summary of this revision. mizvekov added a comment. - Add missing tes

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2021-10-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 378406. mizvekov added a comment. - Tests and fix for dynamic exception spec corner case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111283/new/ https://reviews.llvm.org/D111283 Files: clang/include/clan

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2021-10-10 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 378501. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111283/new/ https://reviews.llvm.org/D111283 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Type.h

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2021-10-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 378600. mizvekov added a comment. - Handle different top level qualifiers in function parameters. - More test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111283/new/ https://reviews.llvm.org/D111283

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2021-10-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 378603. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111283/new/ https://reviews.llvm.org/D111283 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Type.h

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

2021-10-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 378832. mizvekov added a comment. rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110210/new/ https://reviews.llvm.org/D110210 Files: clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-cxx14.cpp clan

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2021-10-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 378840. mizvekov added a comment. rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111283/new/ https://reviews.llvm.org/D111283 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Typ

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2021-10-12 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D111283#3056748 , @rsmith wrote: > Do you have examples showing what this does in practice for errors in > real-world code? I'm concerned that stripping back to the common type sugar > may produce an unintuitive result in so

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2021-10-12 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 379179. mizvekov added a comment. - Introduce TDK_ALreadyDiagnosed. Addresses rsmith's review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111283/new/ https://reviews.llvm.org/D111283 Files: cla

[PATCH] D111509: [clang] use getCommonSugar in an assortment of places

2021-10-12 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov retitled this revision from "[clang] WIP: Use getCommonSugar in an assortment of places" to "[clang] WIP: use getCommonSugar in an assortment of places". mizvekov updated this revision to Diff 378694. mizvekov added a comment. mizvekov updated this revisio

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2021-10-12 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked 3 inline comments as done. mizvekov added inline comments. Comment at: clang/test/SemaCXX/sugared-auto.cpp:146 +return a; + return N(); // expected-error {{but deduced as 'SARS (*)() throw(Man, Vibrio)' (aka 'void (*)() throw(Man, Vibrio)')}} +}

[PATCH] D111830: [clang] fix typo correction not looking for candidates in base classes.

2021-10-14 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. RecordMemberExprValidator was not looking through ElaboratedType nodes when looking for candidates which occur in base classes. Signed-off-by: Matheus

[PATCH] D111830: [clang] fix typo correction not looking for candidates in base classes.

2021-10-14 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 379810. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111830/new/ https://reviews.llvm.org/D111830 Files: clang/lib/Sema/SemaExprMember.cpp clang/test/CXX/drs/dr1xx.cpp Index

[PATCH] D111830: [clang] fix typo correction not looking for candidates in base classes.

2021-10-15 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG489561d46381: [clang] fix typo correction not looking for candidates in base classes. (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D109191: [clang] fix error recovery ICE on copy elision when returing invalid variable

2021-09-02 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov published this revision for review. mizvekov added reviewers: rsmith, rtrieu. Herald added a project: clang. Herald added a subscriber: cfe-commits. See PR51708. Attempting copy elision in dependent contexts with invalid variable, such as a variable with i

[PATCH] D109191: [clang] fix error recovery ICE on copy elision when returing invalid variable

2021-09-03 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 rGd98c34f4d795: [clang] fix error recovery ICE on copy elision when returing invalid variable (authored by mizvekov). Repository: rG LLVM Github Mon

[PATCH] D109406: [clang] fix transformation of template arguments of 'auto' type constraints

2021-09-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov published this revision for review. mizvekov added a reviewer: rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. See PR48617. When assigning the new template arguments to the new TypeLoc, we were looping on the argument count o

[PATCH] D109406: [clang] fix transformation of template arguments of 'auto' type constraints

2021-09-07 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 rG68b9d8ed7abe: [clang] fix transformation of template arguments of 'auto' type constraints (authored by mizvekov). Repository: rG LLVM Github Monor

[PATCH] D105756: [clang] C++98 implicit moves are back with a vengeance

2021-09-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D105756#2988022 , @NoQ wrote: > I don't think this is intended. @mizvekov, do you think you can add more hard > checks to make sure it's constrained to C++? (Or maybe there's another, more > precise solution?) Hello! Thanks

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

2021-09-09 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added subscribers: dexonsmith, dang. mizvekov updated this revision to Diff 371538. mizvekov edited the summary of this revision. mizvekov added a comment. mizvekov updated this revision to Diff 371539. mizvekov edited the summary of this revision. mizvekov up

[PATCH] D109654: [clang] disable implicit moves when not in CPlusPLus

2021-09-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov updated this revision to Diff 372103. mizvekov added a comment. mizvekov published this revision for review. mizvekov added a reviewer: NoQ. Herald added a project: clang. Herald added a subscriber: cfe-commits. . This simplifies the AST a little bit when

[PATCH] D105756: [clang] C++98 implicit moves are back with a vengeance

2021-09-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. @NoQ I have made a DR for that change: D109654 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105756/new/ https://reviews.llvm.org/D105756 ___

[PATCH] D109654: [clang] disable implicit moves when not in CPlusPLus

2021-09-14 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 372434. mizvekov edited the summary of this revision. mizvekov added a comment. include repro for analyzer crash. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109654/new/ https://reviews.llvm.org/D109654 Fil

[PATCH] D109654: [clang] disable implicit moves when not in CPlusPLus

2021-09-14 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2d6829bbbe68: [clang] disable implicit moves when not in CPlusPLus (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109654/new/ https:/

[PATCH] D105756: [clang] C++98 implicit moves are back with a vengeance

2021-09-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D105756#3001045 , @NoQ wrote: > I guess I'm confused about the exact meaning of the AST. I'm not sure whether > it's actively incorrect or just changed meaning. I'll definitely be debugging > this further. > > My backstory h

[PATCH] D109654: [clang] disable implicit moves when not in CPlusPLus

2021-09-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D109654#3002632 , @thakis wrote: > Is it possible that this disabled this for Objective-C++ too? As far as I understand, CPlusPLus will be set on ObjectiveC++ as well, and I think we do have test coverage there, but I haven'

[PATCH] D109654: [clang] disable implicit moves when not in CPlusPLus

2021-09-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D109654#3002862 , @thakis wrote: > Yes, https://bugs.chromium.org/p/chromium/issues/detail?id=1250052 I haven't > yet verified it's definitely due to this change, but it's the most > related-looking change in the regression

[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 created this revision. mizvekov updated this revision to Diff 372616. mizvekov added a comment. mizvekov updated this revision to Diff 372828. mizvekov retitled this revision from "test commit." to "[clang] don't mark as Elidable CXXConstruct expressions used in NRVO". mizvekov edited the

[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 372841. 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.

<    5   6   7   8   9   10