[PATCH] D107399: [clang] fix crash on template instantiation of invalid requires expressions

2021-08-03 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 PR48656. The implementation of the template instantiation of requires expression was incorrectly trying to get

[PATCH] D107399: [clang] fix crash on template instantiation of invalid requires expressions

2021-08-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 rGe64e6924b8ae: [clang] fix crash on template instantiation of invalid requires expressions (authored by mizvekov). Changed prior to commit: https:/

[PATCH] D99732: [AST] Pick last tentative definition as the acting definition

2021-08-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Do you need help merging this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99732/new/ https://reviews.llvm.org/D99732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D107595: [clang] fix transformation of template arguments for concept specializations

2021-08-05 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 PR50864. This fixes error caused by substitution failures on template arguments for concept specializations. W

[PATCH] D107595: [clang] fix transformation of template arguments for concept specializations

2021-08-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 364742. mizvekov added a comment. - Better naming - Stop casting `SmallString` to `StringRef`, use `.str()` method instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107595/new/ https://reviews.llvm.org/D1

[PATCH] D104892: [clang] Stop providing builtin overload candidate for relational function pointer comparisons

2021-06-24 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov requested review of this revision. Herald added projects: clang, Sanitizers. Herald added subscribers: Sanitizers, cfe-commits. Word on the grapevine was that the committee had some discussion that ended with unanimous agreement on eliminating relational fu

[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. First part of the split implemented at: https://reviews.llvm.org/D104892 I will reuse this DR for the second part. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104680/new/ https://reviews.llvm.org/D104680 ___

[PATCH] D104892: [clang] Stop providing builtin overload candidate for relational function pointer comparisons

2021-06-25 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 354595. mizvekov added a comment. - Make it a regular warning. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104892/new/ https://reviews.llvm.org/D104892 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D104892: [clang] Stop providing builtin overload candidate for relational function pointer comparisons

2021-06-25 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 354607. mizvekov added a comment. - Restore tests. - Reimplement fixit in terms of variable template (needs -Wno-c++14-extensions). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104892/new/ https://reviews.llv

[PATCH] D104892: [clang] Stop providing builtin overload candidate for relational function pointer comparisons

2021-06-25 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 rGad14b5b008e2: [clang] Stop providing builtin overload candidate for relational function… (authored by mizvekov). Changed prior to commit: https://

[PATCH] D104984: [clang] add C++ feature test macro for P2266 simpler implicit move

2021-06-26 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. The feature was implemented in D99005 , but we forgot to add the test macro. Repository: rG LLVM Github Monorepo

[PATCH] D104984: [clang] add C++ feature test macro for P2266 simpler implicit move

2021-06-26 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D104984#2842656 , @Quuxplusone wrote: > LGTM. I assume we pick the integer value `202011` for everything > C++2b-related until the standard ships with a real value in it, and then we > update our integer to match. Yeah tha

[PATCH] D104984: [clang] add C++ feature test macro for P2266 simpler implicit move

2021-06-26 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 rGd6144c30fb6a: [clang] add C++ feature test macro for P2266 simpler implicit move (authored by mizvekov). Repository: rG LLVM Github Monorepo CHAN

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

2021-06-26 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 354715. mizvekov added a comment. Simplify checking first overload reslution result. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files: clang/include/clang/Bas

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

2021-06-26 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3478-3481 +// Check that overload resolution selected a conversion operator +// taking an rvalue reference. +if (cast(FD)->getRefQualifier() != RQ_RValue) + break; ---

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

2021-06-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 354773. mizvekov added a comment. This introduces two new test cases that cover the bug fixed by the previous diff: - The one suggested by rsmith in the comments above. - Another one that shows that when both const and non-const lvref conversion operators

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

2021-06-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked 2 inline comments as done. mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3544 -// taking an rvalue reference. -if (cast(FD)->getRefQualifier() != RQ_RValue) - break; If there was a `IsDiagnosticsC

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

2021-06-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 354776. 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/cl

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

2021-06-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Thank you again @sberg. I have talked to the MSVC STL maintainers. They would be open to a pull request for fixing this. The repo can be found at https://github.com/microsoft/STL Be my guest if you want to submit that fix yourself. If not, I can probably do it in the ne

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

2021-06-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D99005#2844332 , @zahiraam wrote: > This change has made this snippet fail. > https://godbolt.org/z/3ehK784hY Pass > https://godbolt.org/z/9q48WvsP7 fails. Hello! That is expected breakage from the changes proposed in P2266 <

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

2021-06-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 354920. mizvekov added a comment. - Rebase after split. - Add tests which I had forgotten, covering the builtin candidates for the relational operators other than spaceship. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

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

2021-06-28 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 354924. mizvekov added a comment. - Fix missing period as pointed by rsmith. 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/Diagn

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

2021-06-29 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 355393. mizvekov added a comment. Patch now in workable state. Is Missing a few cleanups in the implementation. Updates coroutine implicit move tests, as now they can finally match C++20 behavior and don't need P2266 retroac

[PATCH] D105127: Implement P1401R5

2021-06-29 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:3930 + ExprResult E = PerformContextuallyConvertToBool(CondExpr); + if (!IsConstexpr || CondExpr->isValueDependent()) +return E; Minor nit: I think it would be a tiny bit clearer if

[PATCH] D105127: Implement P1401R5

2021-06-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Thanks! Just some nits and some minor points on the tests. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:1491 +def err_constexpr_if_condition_expression_is_not_constant : Error< + "constexpr if condition is not a constant expression con

[PATCH] D105127: Implement P1401R5

2021-06-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov requested changes to this revision. mizvekov added a comment. This revision now requires changes to proceed. So I read the paper, downloaded this patch, played around with it a little bit, tried some different tests, like expressions with dependent types, classes with regular/explicit us

[PATCH] D105127: Implement P1401R5

2021-06-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Its unfortunate the buildbot does not have debug symbols. If you have not managed to reproduce it locally, here is the backtrace I got: FAIL: Clang :: CXX/except/except.spec/p1.cpp (1 of 1) TEST 'Clang :: CXX/except/except.spec/p1.cpp' FAILED *

[PATCH] D105127: Implement P1401R5

2021-06-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. LGTM! Since you submitted this quite recently, I would wait some more time before landing, for any other people who might want to review this. Maybe wait for it to be a week old, ping anyone else you might want to get a review from, and wait a couple of days for them t

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

2021-06-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 355714. mizvekov added a comment. - fix test diagnostic expectation using regular expressions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files: clang/include

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

2021-07-01 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7d2d5a3a6d7a: [clang] Apply P1825 as Defect Report from C++11 up to C++20. (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/

[PATCH] D105127: Implement P1401R5

2021-07-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/SemaCXX/static-assert.cpp:202 +static_assert(constexprNotBool, "message"); // expected-error {{value of type 'const NotBool' is not contextually convertible to 'bool'}} \ No newline at end of file Missing n

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

2021-07-02 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D99696#2856285 , @anhtuyen wrote: > Hi Matheus @mizvekov, > The commit 12c90e2e25dfd1d38250055efc21acb42d158912 > from > this patch seems to cause a regres

[PATCH] D105380: DRAFT: [clang] fixes named return of variables with dependent alignment

2021-07-02 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/D105380 Files: clang/lib/Sema/SemaStmt.cpp Index

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

2021-07-02 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. @anhtuyen I pushed a DR with a preliminary fix for it: https://reviews.llvm.org/D105380 This is not ready to merge, still have to add test cases and also decide between a pointed fix like this, or improving the ergonomics of `getDeclAlign` by returning possible failur

[PATCH] D105380: DRAFT: [clang] fixes named return of variables with dependent alignment

2021-07-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 356401. mizvekov added a comment. - Add tests. - Refactor common users of this new utility. - Use std::any_of. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105380/new/ https://reviews.llvm.org/D105380 Files:

[PATCH] D105380: [clang] fixes named return of variables with dependent alignment

2021-07-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 356403. mizvekov added a comment. - Rename predicate variable from `I` to `AA`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105380/new/ https://reviews.llvm.org/D105380 Files: clang/include/clang/Sema/Sem

[PATCH] D105380: [clang] fixes named return of variables with dependent alignment

2021-07-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked 2 inline comments as done. mizvekov added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:13317 + std::any_of(range.begin(), range.end(), [](const AlignedAttr *I) { + return I->isAlignmentDependent(); + }); Quuxp

[PATCH] D105380: [clang] fixes named return of variables with dependent alignment

2021-07-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 356409. mizvekov marked an inline comment as done. mizvekov added a comment. format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105380/new/ https://reviews.llvm.org/D105380 Files: clang/include/clang/Sem

[PATCH] D105380: [clang] fixes named return of variables with dependent alignment

2021-07-05 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D105380#2858638 , @aaronpuchert wrote: > I tend to follow the rule that if it's just used once I keep it local, but > you might have good reasons for making it public. Well it is used twice. Notice how I replaced a pre-exis

[PATCH] D105380: [clang] fixes named return of variables with dependent alignment

2021-07-05 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 356568. mizvekov added a comment. - Use llvm::any_of. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105380/new/ https://reviews.llvm.org/D105380 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaD

[PATCH] D105446: [clang] fix constexpr code generation for user conversions.

2021-07-05 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 building the member call to a user conversion function during an implicit cast, the expression was not being checked for immediate invocation, so

[PATCH] D105380: [clang] fixes named return of variables with dependent alignment

2021-07-05 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 356576. mizvekov added a comment. - Move it to VarDecl. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105380/new/ https://reviews.llvm.org/D105380 Files: clang/include/clang/AST/Decl.h clang/lib/AST/Decl.

[PATCH] D105380: [clang] fixes named return of variables with dependent alignment

2021-07-05 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG21106388eb96: [clang] fixes named return of variables with dependent alignment (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105380/n

[PATCH] D105380: [clang] fixes named return of variables with dependent alignment

2021-07-06 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. Thanks for reporting that one! Yeah looking if the type is dependent is not enough, a non-deduced auto type is not considered dependent. I will work on a patch for it later today. Reposit

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

2021-07-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D99005#2859476 , @aaron.ballman wrote: > https://godbolt.org/z/dvEbv7GKo > > I'm not certain if this is as expected of an issue, though. In the original > example, `C` carried state that was set up after initialization but wa

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

2021-07-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D99005#2860021 , @aaron.ballman wrote: > I would argue it gives the committee valuable implementation experience > feedback: the change breaks at least one popular system header. But we already knew that :-) Reverting the ch

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

2021-07-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D99005#2860598 , @Quuxplusone wrote: > I have no strong/well-informed opinions here. I have an idea to offer, //if// > there is precedent for it. My idea is, keep it as an error if the rvalue > resolution finds nothing, but (

[PATCH] D105380: [clang] fixes named return of variables with dependent alignment

2021-07-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 356833. mizvekov added a comment. - hasDependentAlignment now returns true for VarDecls with undeduced auto types. - Add couple of tests that cover these kinds of VarDecls appearing: - Valid code with a range for loop in dependent context. - Error recover

[PATCH] D105380: [clang] fixes named return of variables with dependent alignment

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

[PATCH] D105518: [clang] disable P2266 simpler implicit moves under -fms-compatibility

2021-07-06 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. The Microsoft STL currently has some issues with P2266 . We disable it for now in that mode, but we might come back la

[PATCH] D105518: [clang] disable P2266 simpler implicit moves under -fms-compatibility

2021-07-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 356844. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105518/new/ https://reviews.llvm.org/D105518 Files: clang/lib/Frontend/InitPreprocessor.cpp clang/lib/Sema/SemaStmt.cpp

[PATCH] D105380: [clang] fixes named return of variables with dependent alignment

2021-07-06 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf2d5fce86e81: [clang] fixes named return of variables with dependent alignment (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105380/n

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

2021-07-06 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. @aaron.ballman I created a DR for the option of temporarily disabling the effects of this change under "-fms-compatibility". https://reviews.llvm.org/D105518 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/new/ https:

[PATCH] D105518: [clang] disable P2266 simpler implicit moves under -fms-compatibility

2021-07-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. @aaron.ballman Yeah don't worry, having dinner, my hobby shift is starting soon though :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105518/new/ https://reviews.llvm.org/D105518 __

[PATCH] D105518: [clang] disable P2266 simpler implicit moves under -fms-compatibility

2021-07-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 357078. mizvekov added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105518/new/ https://reviews.llvm.org/D105518 Files: clang/lib/Frontend/InitPreprocessor.cpp clang/l

[PATCH] D105518: [clang] disable P2266 simpler implicit moves under -fms-compatibility

2021-07-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked an inline comment as done. mizvekov added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:602 +if (!LangOpts.MSVCCompat) + Builder.defineMacro("__cpp_implicit_move", "202011L"); Builder.defineMacro("__cpp_size_t_suffix", "202011L

[PATCH] D105518: [clang] disable P2266 simpler implicit moves under -fms-compatibility

2021-07-07 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. mizvekov marked an inline comment as done. Closed by commit rG2c60d2261032: [clang] disable P2266 simpler implicit moves under -fms-compatibility (authored by mizvekov). Changed prior to commit: https://reviews.llvm.org/D

[PATCH] D105446: DRAFT: [clang] fix constexpr code generation for user conversions.

2021-07-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 357260. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105446/new/ https://reviews.llvm.org/D105446 Files: clang/lib/AST/Expr.cpp clang/lib/Sema/SemaExprCXX.cpp clang/test/Cod

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

2021-07-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D104500#2863368 , @jyknight wrote: > This commit seems to have broken libc++ in C++98 mode, as it appears to have > depended upon the implicit-move extension. > > The root cause appears to be that libc++ emulates unique_ptr i

[PATCH] D105446: [clang] fix constexpr code generation for user conversions.

2021-07-08 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5a1c50410ccc: [clang] fix constexpr code generation for user conversions. (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105446/new/

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

2021-07-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D104500#2865849 , @Quuxplusone wrote: > @mizvekov, I don't understand what you mean by "yet another" mechanism. This > is just asking to restore Clang's C++98/03 extension (that supports move > constructors even in C++03).

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

2021-07-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D104500#2866079 , @rsmith wrote: > I wonder if we can restore the extension behavior for the types that want it, > while still using the C++98 rules for the rest of the cases? Perhaps we could > use the new C++11-to-C++20 lo

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

2021-07-10 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov edited the summary of this revision. mizvekov edited the summary of this revision. mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 357688. mizvekov added a comment. mizvekov updated this revision to Diff 357692. mizvekov

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

2021-07-10 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D104500#2867404 , @ldionne wrote: > I don't know what the state of those extensions is from Clang's perspective, > however one thing is clear - we use those extensions in libc++ very heavily. > If any such extension is remov

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

2021-07-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 358224. mizvekov edited the summary of this revision. mizvekov added a comment. - Fix minor nits. - Please Dijkstra. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105756/new/ https://reviews.llvm.org/D105756

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

2021-07-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/SemaObjCXX/block-capture.mm:40 }; -TEST(CopyNoMove); // cxx11_2b-error {{call to deleted constructor}} +TEST(CopyNoMove); // cxx98_2b-error {{call to deleted constructor}} Quuxplusone wrote: > `cxx98_2b` i

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

2021-07-13 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG03282f2fe14e: [clang] C++98 implicit moves are back with a vengeance (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105756/new/ https

[PATCH] D105951: [clang] P2266 implicit moves STL workaround

2021-07-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov updated this revision to Diff 358468. mizvekov added a comment. mizvekov updated this revision to Diff 358483. mizvekov published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. . mizvekov added a comment.

[PATCH] D105951: [clang] P2266 implicit moves STL workaround

2021-07-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 358488. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105951/new/ https://reviews.llvm.org/D105951 Files: clang/lib/Frontend/InitPreprocessor.cpp clang/lib/Sema/SemaStmt.cpp

[PATCH] D101441: Update libstdc++ hack comment

2021-07-14 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Here are my findings around this issue: https://godbolt.org/z/TE9rdxae8 So GCC started parsing this correctly from 9.4 to 10.1. It does not look like they have a workaround for their own older libstdc++. It seems to me this HACK is ready for removal. Is there something

[PATCH] D105951: [clang] P2266 implicit moves STL workaround

2021-07-14 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3314 +return false; + const Decl *D = E.getReferencedDeclOfCallee(); + if (!S.SourceMgr.isInSystemHeader(D->getLocation())) aaron.ballman wrote: > This can return `nullptr`, so we shoul

[PATCH] D105951: [clang] P2266 implicit moves STL workaround

2021-07-14 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 358702. mizvekov added a comment. - Small simplification to implementation, don't need to cast to NamespaceDecl. - Simplification to tests: Use some evil prep hackery to avoid needing multipe files. - Verify result of getReferencedDeclOfCallee is non-null.

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

2021-10-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 382762. mizvekov added a comment. rebase, one last CI run. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109496/new/ https://reviews.llvm.org/D109496 Files: clang/include/clang/Basic/DiagnosticDriverKinds.t

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

2021-10-27 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2d7fba5f95f0: [clang] deprecate frelaxed-template-template-args, make it on by default (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

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

2021-10-27 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG086e111216bc: [clang] NFC: include non friendly types and missing sugar in test expectations (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

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

2021-10-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:3285 } - if (const TypedefType *TypedefT = - dyn_cast(FromFPT->getReturnType())) { -TypedefNameDecl *TD = TypedefT->getDecl(); + if (const auto *TypedefT = dyn_cast(FromFPT->getReturnType(

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

2021-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 383653. 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/Type

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

2021-10-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 383656. mizvekov added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111509/new/ https://reviews.llvm.org/D111509 Files: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-narro

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

2021-11-02 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Thanks for reporting this! This change in the standard was worked a long time ago, and there was some expectation that there would be follow up work to add new partial ordering rules so that reasonable code would keep working. But the person behind that effort stopped

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

2021-11-02 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Feel free to revert it if this is blocking you. I don't seem to find a way to do it via web interface, so I need more time to have access to a machine that can do it Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109496/ne

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

2021-11-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 384873. mizvekov edited the summary of this revision. mizvekov added a comment. This revision is now accepted and ready to land. Implement workaround. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109496/new/

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

2021-11-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 384929. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109496/new/ https://reviews.llvm.org/D109496 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang

[PATCH] D113664: [cmake] use project relative paths when generating ASTNodeAPI.json

2021-11-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added a subscriber: mgorny. mizvekov published this revision for review. mizvekov added reviewers: steveire, phosek. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: Matheus Izvekov Repository: rG LLVM Github Monorepo

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

2021-11-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/SemaTemplateDeduction.cpp:559 + // Get the resolved template arguments from the canonical type. + // FIXME: Handle the as-written arguments so the sugar is not lost. + ArrayRe

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

2021-11-12 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a subscriber: ldionne. mizvekov added a comment. Exactly what Aaron said :-) Though might be a complication here if libcxx tests this with both ToT and stable clang, so could be perhaps this needs to be changed in a way that works in both. I will check this much later today, hav

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

2021-02-25 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 326514. mizvekov added a comment. Updated comment and moved tests to correct places. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95409/new/ https://reviews.llvm.org/D95409 Files: clang/lib/Sema/SemaDeclCX

[PATCH] D97990: [clang] Always provide relevant subobject for 'no viable comparison'

2021-03-04 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. Diagnostics for defaulted no viable not-equal and relational operators where not providing relevant subobject in diagnostics, unlike the cases for equa

[PATCH] D98087: [clang] Fix constrained decltype(auto) deduction

2021-03-05 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. Prior to this fix, constrained decltype(auto) behaves exactly the same as constrained regular auto. This fixes it so it deduces like decltype(auto). S

[PATCH] D98087: [clang] Fix constrained decltype(auto) deduction

2021-03-05 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 328689. mizvekov added a comment. Added new tests as suggested by rsmith. By the way, I still need help commiting this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98087/new/ https://reviews.llvm.org/D98087

[PATCH] D98087: [clang] Fix constrained decltype(auto) deduction

2021-03-05 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 328711. mizvekov added a comment. Turns out someone had already reported this bug. This change puts "PR48384" in the new tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98087/new/ https://reviews.llvm.or

[PATCH] D98095: [clang] Fix ICE on invalid type parameters for concepts

2021-03-05 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. See PR48593. Constraints with invalid type parameters were causing a null pointer dereference. Signed-off-by: Matheus Izvekov Repository: rG LLV

[PATCH] D98160: [clang] Use decltype((E)) for compound requirement type constraint

2021-03-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. Compound requirement type constraints were using decltype(E) instead of decltype((E)), as per `[expr.prim.req]p1.3.3`. Signed-off-by: Matheus Izvekov

[PATCH] D98095: [clang] Fix ICE on invalid type parameters for concepts

2021-03-07 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 328919. mizvekov added a comment. Repush, no changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98095/new/ https://reviews.llvm.org/D98095 Files: clang/lib/Sema/SemaType.cpp clang/test/CXX/dcl/dcl.spe

[PATCH] D98160: [clang] Use decltype((E)) for compound requirement type constraint

2021-03-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 329124. mizvekov added a comment. Addressing Arthur's concerns: - Changed `getBaseDecltypeForExpr` to `getDecltypeForParenthesizedExpr`. - Changed `ImplicitParens` to `Parenthesized`. - Clarified comment. Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D98160: [clang] Use decltype((E)) for compound requirement type constraint

2021-03-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:5446 // Build a new, canonical decltype(expr) type. Canon = new (*this, TypeAlignment) DependentDecltypeType(*this, e); DependentDecltypeTypes.InsertNode(Canon, InsertPos); -

[PATCH] D98095: [clang] Fix ICE on invalid type parameters for concepts

2021-03-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:5947-5948 TL.setNameLoc(DS.getTypeSpecTypeLoc()); if (!DS.isConstrainedAuto()) return; if (DS.getTypeSpecScope().isNotEmpty()) rsmith wrote: > Given that we reco

[PATCH] D98095: [clang] Fix ICE on invalid type parameters for concepts

2021-03-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 329149. mizvekov added a comment. Addressed rsmith's concerns. Fixed test type name to avoid picking up suggestions from other tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98095/new/ https://reviews.ll

[PATCH] D97990: [clang] Always provide relevant subobject for 'no viable comparison'

2021-03-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 329178. mizvekov added a comment. Now this a patch just about improving the diagnostic as rsmith suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97990/new/ https://reviews.llvm.org/D97990 Files: cl

[PATCH] D97990: [clang] Improve diagnostics on implicitly deleted defaulted comparisons

2021-03-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. You are absolutely right, my bad!! So we stealth fix this revision to improve the message :D Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97990/new/ https://reviews.llvm.org/D97990 __

[PATCH] D97990: [clang] Improve diagnostics on implicitly deleted defaulted comparisons

2021-03-09 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 329289. mizvekov added a comment. Change to simpler way to do it: For CompleteObject Kind, just fill in the declaration for the complete object. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97990/new/ https:/

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