[PATCH] D128750: [c++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-07-03 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson requested changes to this revision. royjacobson added a comment. This revision now requires changes to proceed. Thanks for working on this! I like the approach, but two comments: I would like more tests for the different forms of template argument deduction. Some suggestions for thin

[PATCH] D129170: [Sema] Add deprecation warnings for some compiler provided __has_* type traits

2022-07-05 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson created this revision. Herald added a project: All. royjacobson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Some compiler provided type traits like __has_trivial_constructor have been documented as deprecated for quite some

[PATCH] D129170: [Sema] Add deprecation warnings for some compiler provided __has_* type traits

2022-07-06 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 442680. royjacobson added a comment. Address CR comments. Make the switch case slightly more concise. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129170/new/ https://reviews.llvm.org/D129170 Files: cla

[PATCH] D129170: [Sema] Add deprecation warnings for some compiler provided __has_* type traits

2022-07-06 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson marked 9 inline comments as done and 2 inline comments as done. royjacobson added inline comments. Comment at: clang/include/clang/Basic/DiagnosticGroups.td:190 : DiagGroup<"deprecated-dynamic-exception-spec">; +def DeprecatedHasBuiltins : DiagGroup<"deprecated-h

[PATCH] D129170: [Sema] Add deprecation warnings for some compiler provided __has_* type traits

2022-07-07 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson marked 3 inline comments as done. royjacobson added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:5400-5401 +SourceLocation KWLoc) { + if (!S.getLangOpts().CPlusPlus11) +return; + erichkea

[PATCH] D129170: [Sema] Add deprecation warnings for some compiler provided __has_* type traits

2022-07-08 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:5400-5401 +SourceLocation KWLoc) { + if (!S.getLangOpts().CPlusPlus11) +return; + aaron.ballman wrote: > erichkeane wrote: > > royjacobs

[PATCH] D129170: [Sema] Add deprecation warnings for some compiler provided __has_* type traits

2022-07-11 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 443742. royjacobson added a comment. Warn on <=C++03 as well, warn on __has_trivial_destructor. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129170/new/ https://reviews.llvm.org/D129170 Files: clang/doc

[PATCH] D129170: [Sema] Add deprecation warnings for some compiler provided __has_* type traits

2022-07-11 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:5400-5401 +SourceLocation KWLoc) { + if (!S.getLangOpts().CPlusPlus11) +return; + aaron.ballman wrote: > royjacobson wrote: > > aaron.ba

[PATCH] D129170: [Sema] Add deprecation warnings for some compiler provided __has_* type traits

2022-07-12 Thread Roy Jacobson 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 rG0b89d1d59f82: [Sema] Add deprecation warnings for some compiler provided __has_* type traits (authored by royjacobson). Repository: rG LLVM Github

[PATCH] D129583: [DOC] Add DR1734 and DR1496 Clang's cxx_dr_status as not implemented

2022-07-12 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson created this revision. Herald added a project: All. royjacobson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Those two DRs about the (copy) triviality of types with deleted special member functions are not implemented in MSV

[PATCH] D129583: [DOC] Add DR1734 and DR1496 Clang's cxx_dr_status as not implemented

2022-07-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 22. royjacobson added a comment. Update comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129583/new/ https://reviews.llvm.org/D129583 Files: clang/test/CXX/drs/dr14xx.cpp clang/test/CXX/drs/d

[PATCH] D129583: [DOC] Add DR1734 and DR1496 Clang's cxx_dr_status as not implemented

2022-07-13 Thread Roy Jacobson 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 rG202b327f5d29: [DOC] Add DR1734 and DR1496 Clang's cxx_dr_status as not implemented (authored by royjacobson). Repository: rG LLVM Github Monorepo

[PATCH] D129583: [DOC] Add DR1734 and DR1496 Clang's cxx_dr_status as not implemented

2022-07-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. Thanks for the suggestions and for the quick review! @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129583/new/ https://reviews.llvm.org/D129583 ___ cfe-commits

[PATCH] D129170: [Sema] Add deprecation warnings for some compiler provided __has_* type traits

2022-07-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. In D129170#3650618 , @glandium wrote: > From the commit message: > >> This patch adds deprecation warnings for the usage of those builtins, except >> for __has_trivial_destructor which doesn't have a GCC alternative. > > The

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-14 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson created this revision. Herald added a project: All. royjacobson updated this revision to Diff 444173. royjacobson added a comment. royjacobson updated this revision to Diff 19. royjacobson retitled this revision from "[WIP][Clang] Implement P0848 (Conditionally Trivial Special Memb

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-15 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 445044. royjacobson edited the summary of this revision. royjacobson added a comment. Address Corentin's feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-15 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson marked 4 inline comments as done and an inline comment as not done. royjacobson added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:17960-17961 +} +if (AnotherMethodIsMoreConstrained) + break; + } cor3ntin wrot

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-15 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson marked an inline comment as done. royjacobson added inline comments. Comment at: clang/test/AST/conditionally-trivial-smfs.cpp:39 + +template struct DefaultConstructorCheck<2>; +// CHECK: "kind": "ClassTemplateSpecializationDecl", BRevzin

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-17 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 445350. royjacobson marked an inline comment as not done. royjacobson added a comment. Add a test case with more subsumption Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.or

[PATCH] D128750: [c++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-07-19 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. In D128750#3661576 , @ychen wrote: > ... > There is *no* way to reorder the template parameters list again (to get two > or more reordering) and the resulted template still works, because of the > *positionally correspond* r

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-20 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:17870 +/// parameter type and the same cv-qualifiers and ref-qualifier, if any. +bool AreSpecialMemberFunctionsSameKind(CXXMethodDecl *M1, CXXMethodDecl *M2, + Sema::CXXSpecialMember

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-20 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 446172. royjacobson added a comment. Fixed the tests, fixed the type comparison checks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619 Files: clang/docs/Releas

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-20 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:17899 + ConstraintSatisfaction Satisfaction; + if (S.CheckFunctionConstraints(Method, Satisfaction)) +SatisfactionStatus.push_back(false); erichkeane wrote: > cor3ntin wr

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-20 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:17899 + ConstraintSatisfaction Satisfaction; + if (S.CheckFunctionConstraints(Method, Satisfaction)) +SatisfactionStatus.push_back(false); erichkeane wrote: > royjacobson

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-20 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 446264. royjacobson added a comment. Add a test for the CRTP constraints timings Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619 Files: clang/docs/ReleaseNotes.

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-20 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:17899 + ConstraintSatisfaction Satisfaction; + if (S.CheckFunctionConstraints(Method, Satisfaction)) +SatisfactionStatus.push_back(false); cor3ntin wrote: > erichkeane wr

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-22 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/test/SemaCXX/constrained-special-member-functions.cpp:103 +// FIXME: DR1734. +static_assert(__is_trivially_copyable(CopyAssignmentChecker<1>)); +static_assert(!__is_trivially_copyable(CopyAssignmentChecker<2>)); ---

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-23 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:17875 +return true; + if (!Context.hasSameType(M1->getParamDecl(0)->getType(), + M2->getParamDecl(0)->getType())) shafik wrote: > What happens if we have fur

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 447425. royjacobson marked an inline comment as done. royjacobson added a comment. Rebase on main and slightly update docs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. @erichkeane @cor3ntin If you have time for review right now, I think it's reasonably ready and I would still like to merge it this week so it can land in Clang15. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/ne

[PATCH] D128750: [c++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-07-26 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. In D128750#3663161 , @ychen wrote: > In D128750#3662898 , @royjacobson > wrote: > >> but in your example with T/U/V we have 3 template parameters that we could >> reorder in 6 differ

[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

2022-07-27 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:2420 + constexpr E1 x2 = static_cast(8); // expected-error {{must be initialized by a constant expression}} + // expected-note@-1 {{integer value 8 is outside the valid range of val

[PATCH] D135341: [clang] adds `__reference_constructs_from_temporary`

2022-10-11 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/docs/LanguageExtensions.rst:1476 is false. Note this trait will also return false when the initialization of ``T`` from ``U`` is ill-formed. +* ``__reference_constructs_from_temporary(T, U)`` (C++) royjac

[PATCH] D135557: Add needsImplicitDefaultConstructor and friends

2022-10-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/bindings/python/clang/cindex.py:1530 + +def record_needs_implicit_default_constructor(self): +"""Returns True if the cursor refers to a C++ record declaration aaron.ballman wrote: > aaron.ballman wr

[PATCH] D135557: Add needsImplicitDefaultConstructor and friends

2022-10-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/bindings/python/clang/cindex.py:1530 + +def record_needs_implicit_default_constructor(self): +"""Returns True if the cursor refers to a C++ record declaration anderslanglands wrote: > royjacobson wr

[PATCH] D135557: Add needsImplicitDefaultConstructor and friends

2022-10-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/bindings/python/clang/cindex.py:1530 + +def record_needs_implicit_default_constructor(self): +"""Returns True if the cursor refers to a C++ record declaration anderslanglands wrote: > royjacobson wr

[PATCH] D135557: Add needsImplicitDefaultConstructor and friends

2022-10-18 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/bindings/python/clang/cindex.py:1530 + +def record_needs_implicit_default_constructor(self): +"""Returns True if the cursor refers to a C++ record declaration anderslanglands wrote: > dblaikie wrote

[PATCH] D135557: Add needsImplicitDefaultConstructor and friends

2022-10-20 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. I would be more comfortable with exposing something like `clang_CXXRecord_hasAnyNonDeletedDefaultConstructor`. It's better than the confusing `clang_CXXRecord_needsImplicitDefaultConstructor` but it would still be different from the usual type traits in a subtle way

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-21 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. Thanks for working on it! It looks really good. Please remember to update the feature test macro (__cpp_aggregate_paren_init). Also, I think there's no test coverage for the ASTReader/Writer changes? I would like to see some as well. Comment at:

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-21 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/test/SemaCXX/P0960R3.cpp:54 +} + +void foo() { Could you add test that this works with variadic templates? Something like ``` template T construct(Args... args) { return T(args...); } ``` Similar to the int

[PATCH] D135404: [clang-tidy] Add a checker for converting into C++17 variable template type traits

2022-10-22 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. friendly ping @njames93 FWIW I ran this over the LLVM codebase and have seen no crashes or false positives. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135404/new/ https://reviews.llvm.org/D135404 __

[PATCH] D136545: [Clang] use non-template function declaration for constraints partial ordering

2022-10-23 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson accepted this revision. royjacobson added a comment. This revision is now accepted and ready to land. LGTM, thanks for picking it up! I wonder how much effect this has on compilation times given that `SubsumptionCache` caches subsumption by the `Decl *` pair... One Q - do you think

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-17 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 453411. royjacobson added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/DeclCXX.cpp cla

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-17 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/docs/ReleaseNotes.rst:494-497 +- Implemented "Conditionally Trivial Special Member Functions" (`P0848 `_). + Note: The handling of deleted functions is not yet compliant, as Clang + does not implem

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-18 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 453712. royjacobson added a comment. Add disclaimer to cxx_status about the standing DRs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619 Files: clang/docs/Rele

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-18 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/docs/ReleaseNotes.rst:494-497 +- Implemented "Conditionally Trivial Special Member Functions" (`P0848 `_). + Note: The handling of deleted functions is not yet compliant, as Clang + does not implem

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-21 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 454338. royjacobson added a comment. Address Aaron's comments, add the consteval test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619 Files: clang/docs/Release

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-21 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson marked 11 inline comments as done. royjacobson added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:677 //Builder.defineMacro("__cpp_aggregate_paren_init", "201902L"); -Builder.defineMacro("__cpp_concepts", "201907L"); +Builder.defin

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-22 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:677 //Builder.defineMacro("__cpp_aggregate_paren_init", "201902L"); -Builder.defineMacro("__cpp_concepts", "201907L"); +Builder.defineMacro("__cpp_concepts", "202002L"); Build

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-22 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 454567. royjacobson added a comment. Remove the __cpp_concepts version bump. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619 Files: clang/docs/ReleaseNotes.rst

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-22 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:677 //Builder.defineMacro("__cpp_aggregate_paren_init", "201902L"); -Builder.defineMacro("__cpp_concepts", "201907L"); +Builder.defineMacro("__cpp_concepts", "202002L"); Build

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-22 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 454577. royjacobson added a comment. Clarify ambiguous doc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/D

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-23 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 454913. royjacobson added a comment. Rebase on main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/DeclCXX.

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-23 Thread Roy Jacobson 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 rG717161509914: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions) (authored by royjacobson). Repository: rG LLVM Github Monor

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

2022-08-24 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. I looked at this a bit about a week ago and got it down to 3-4 tests failing, but I'm not sure how much time I'll have to continue working on it. If one of you wants to take over I'll be happy to send you what I've currently got. @erichkeane @ilya-biryukov Also, do

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 455686. royjacobson added a comment. Default constructors can be template functions. Update patch to handle them correctly, and add asserts to LookupSpecialMember that can catch similar problems. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. I added handling of FunctionTemplateDecls in SemaDecl because they can be default constructors. This caused errors with std::pair for example - it has two enable_ifs constructors to control explicit/implicit construction. I will try committing again if the pre-commi

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 455689. royjacobson added a comment. Rename file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/DeclCXX.cpp

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 455696. royjacobson added a comment. We call LookupSpecialMember before we compute eligibility, so the assert fails. Remove it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llv

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 455721. royjacobson added a comment. Formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/DeclCXX.cpp

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-25 Thread Roy Jacobson 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 rGb1c960fc6dc2: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions) (authored by royjacobson). Repository: rG LLVM Github Monor

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-30 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. I looked at the new `Concept auto` changes, they seem fine. Thanks a LOT @ychen for working on this, it's been a very interesting patch to me :) I'll let @mizvekov accept since he is much more experienced than me in those areas. Repository: rG LLVM Github Monore

[PATCH] D133044: [Frontend] Restore Preprocessor::getPredefines()

2022-08-31 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson created this revision. Herald added a subscriber: kristof.beyls. Herald added a project: All. royjacobson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. A patch from May removed Preprocessor::getPredefines() from Clang's API,

[PATCH] D133044: [Frontend] Restore Preprocessor::getPredefines()

2022-08-31 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 457070. royjacobson edited the summary of this revision. royjacobson added a comment. Add a link to github issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133044/new/ https://reviews.llvm.org/D133044

[PATCH] D133044: [Frontend] Restore Preprocessor::getPredefines()

2022-08-31 Thread Roy Jacobson 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 rGbb9dedce5d01: [Frontend] Restore Preprocessor::getPredefines() (authored by royjacobson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D133262: [clang] Represent __make_integer_seq as alias template in the AST

2022-09-03 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. There are some known bugs about how we handle this built-in in the AST- #42102, #51928, #54993. Is it possible that your patch solves them? It would be great if it does, I hit one of them in the wild a while back. Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D145047: Fix broken link on Clang documentation page

2023-03-02 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson accepted this revision. royjacobson added a comment. Thanks! Do you need me to land this for you? If so, could you please provide name + email to sign the commit with? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145047/new/ https://r

[PATCH] D145047: Fix broken link on Clang documentation page

2023-03-04 Thread Roy Jacobson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfc10715f9bb3: Fix broken link on Clang documentation page (authored by tupaschoal, committed by royjacobson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-03-10 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. In D140996#4185795 , @bolshakov-a wrote: > @royjacobson, I've added some test cases for using the new NTTP arguments in > clang modules. It uses serialization, in principle. Or more specialized tests > are still needed? No

[PATCH] D145851: [Clang][Sema] Fix incorrect deletion of default constructors for some unions

2023-03-11 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson created this revision. Herald added a project: All. royjacobson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If a union has explicit initializers for some members, we shouldn't delete its default constructor. Fixes https://gi

[PATCH] D145852: [Clang][AST] Fix __has_unique_object_representations computation for unnamed bitfields.

2023-03-11 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson created this revision. Herald added a project: All. royjacobson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As pointed out in https://github.com/llvm/llvm-project/issues/61336, objects with unnamed bitfields aren't be uniqu

[PATCH] D145852: [Clang][AST] Fix __has_unique_object_representations computation for unnamed bitfields.

2023-03-11 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 504376. royjacobson added a comment. Change to a simpler fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145852/new/ https://reviews.llvm.org/D145852 Files: clang/docs/ReleaseNotes.rst clang/lib/AST

[PATCH] D145852: [Clang][AST] Fix __has_unique_object_representations computation for unnamed bitfields.

2023-03-11 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 504390. royjacobson added a comment. Handle 0-length unnamed bit fields as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145852/new/ https://reviews.llvm.org/D145852 Files: clang/docs/ReleaseNotes.

[PATCH] D145851: [Clang][Sema] Fix incorrect deletion of default constructors for some unions

2023-03-11 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 504391. royjacobson added a comment. Small cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145851/new/ https://reviews.llvm.org/D145851 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaDeclC

[PATCH] D145851: [Clang][Sema] Fix incorrect deletion of default constructors for some unions

2023-03-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 504724. royjacobson added a comment. Add more tests, small nit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145851/new/ https://reviews.llvm.org/D145851 Files: clang/docs/ReleaseNotes.rst clang/lib/S

[PATCH] D145851: [Clang][Sema] Fix incorrect deletion of default constructors for some unions

2023-03-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson marked 2 inline comments as done. royjacobson added a comment. In D145851#4189158 , @erichkeane wrote: > Generally looks good to me. Do we do anything special if there are multiple > initializers? Also, can we have a codegen test that vali

[PATCH] D145852: [Clang][AST] Fix __has_unique_object_representations computation for unnamed bitfields.

2023-03-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 504736. royjacobson added a comment. Add a test case, slightly simpler modeling. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145852/new/ https://reviews.llvm.org/D145852 Files: clang/docs/ReleaseNotes.

[PATCH] D145852: [Clang][AST] Fix __has_unique_object_representations computation for unnamed bitfields.

2023-03-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson marked 2 inline comments as done. royjacobson added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:2817 +// unique representation. +if (Field->isUnnamedBitfield() && BitfieldSize > 0) + return std::nullopt; aaron.ballman wrote:

[PATCH] D145851: [Clang][Sema] Fix incorrect deletion of default constructors for some unions

2023-03-14 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 505216. royjacobson added a comment. Fix the codegen test, add a standard ref to the comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145851/new/ https://reviews.llvm.org/D145851 Files: clang/docs/

[PATCH] D145851: [Clang][Sema] Fix incorrect deletion of default constructors for some unions

2023-03-14 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. Oops, sorry for the bad codegen test and thanks for the comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145851/new/ https://reviews.llvm.org/D145851 ___ cfe-commits m

[PATCH] D145851: [Clang][Sema] Fix incorrect deletion of default constructors for some unions

2023-03-14 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson marked 2 inline comments as done. royjacobson added inline comments. Comment at: clang/test/CodeGen/union-non-trivial-member.cpp:30 +// CHECK-NEXT: +// CHECK-NEXT: define linkonce_odr dso_local void @_ZN2UnionIntC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %t

[PATCH] D145852: [Clang][AST] Fix __has_unique_object_representations computation for unnamed bitfields.

2023-03-15 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson marked an inline comment as done. royjacobson added inline comments. Comment at: clang/test/SemaCXX/type-traits.cpp:2886-2889 +struct UnnamedEmptyBitfield { + int named; + int : 0; +}; shafik wrote: > aaron.ballman wrote: > > I think there's one mor

[PATCH] D145851: [Clang][Sema] Fix incorrect deletion of default constructors for some unions

2023-03-15 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 505620. royjacobson marked an inline comment as done. royjacobson added a comment. slimmer codegen test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145851/new/ https://reviews.llvm.org/D145851 Files: c

[PATCH] D146168: [Sema] Stop stripping CV quals from *this captures in lambdas

2023-03-15 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson created this revision. Herald added a project: All. royjacobson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D146168 Files: clang/lib/Sema/SemaExprCXX.cpp c

[PATCH] D146168: [Sema] Stop stripping CV quals from *this captures in lambdas

2023-03-15 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 505624. royjacobson added a comment. rebase + release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146168/new/ https://reviews.llvm.org/D146168 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema

[PATCH] D145851: [Clang][Sema] Fix incorrect deletion of default constructors for some unions

2023-03-15 Thread Roy Jacobson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG765d8a192180: [Clang][Sema] Fix incorrect deletion of default constructors for some unions (authored by royjacobson). Changed prior to commit: https://reviews.llvm.org/D145851?vs=505620&id=505635#toc R

[PATCH] D146168: [Sema] Stop stripping CV quals from *this captures in lambdas

2023-03-18 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 506295. royjacobson added a comment. Add the test case from the GH issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146168/new/ https://reviews.llvm.org/D146168 Files: clang/docs/ReleaseNotes.rst c

[PATCH] D146329: [Clang] Fix defaulted equality operator so that it does not attempt to compare unnamed bit-fields

2023-03-20 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. In D146329#4203174 , @shafik wrote: > I would have loved to test the case from > https://github.com/llvm/llvm-project/issues/61335 directly but I think in > order to do it nicely I need `__builtin_memset` to be usable in a c

[PATCH] D145852: [Clang][AST] Fix __has_unique_object_representations computation for unnamed bitfields.

2023-03-23 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/test/SemaCXX/type-traits.cpp:2886-2889 +struct UnnamedEmptyBitfield { + int named; + int : 0; +}; royjacobson wrote: > shafik wrote: > > aaron.ballman wrote: > > > I think there's one more test to add: > > >

[PATCH] D145852: [Clang][AST] Fix __has_unique_object_representations computation for unnamed bitfields.

2023-03-29 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 509298. royjacobson added a comment. Add some ((packed)) tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145852/new/ https://reviews.llvm.org/D145852 Files: clang/docs/ReleaseNotes.rst clang/lib/AS

[PATCH] D146168: [Sema] Stop stripping CV quals from *this captures in lambdas

2023-03-29 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 509436. royjacobson added a comment. fix unintended indentation & rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146168/new/ https://reviews.llvm.org/D146168 Files: clang/docs/ReleaseNotes.rst cl

[PATCH] D146168: [Sema] Stop stripping CV quals from *this captures in lambdas

2023-03-29 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson marked an inline comment as done. royjacobson added a comment. In D146168#4231457 , @aaron.ballman wrote: > LGTM aside from a minor nit, though I have some minor concerns that we may > silently break people's code by calling different overlo

[PATCH] D146168: [Sema] Stop stripping CV quals from *this captures in lambdas

2023-03-29 Thread Roy Jacobson via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. royjacobson marked an inline comment as done. Closed by commit rG0eb06cb3aa27: [Sema] Stop stripping CV quals from *this captures in lambdas (authored by royjacobson).

[PATCH] D147288: [clang][NFC] updates cxx_status for P2113R0

2023-03-31 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. There was some discussion of this last year in this review: https://reviews.llvm.org/D128750 It's such an edge case that I don't think we should lose sleep about it until/unless the committee finds time to clarify the issue. Repository: rG LLVM Github Monorepo

[PATCH] D145852: [Clang][AST] Fix __has_unique_object_representations computation for unnamed bitfields.

2023-04-01 Thread Roy Jacobson 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 rG1d4d21e2e095: [Clang][AST] Fix __has_unique_object_representations computation for unnamed… (authored by royjacobson). Changed prior to commit: h

[PATCH] D147655: Implement mangling rules for C++20 concepts and requires-expressions.

2023-04-06 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. I agree it doesn't affect too much code, but people do instantiate templates manually sometimes. IIUC, linking against shared libraries would break if that library does explicit instantiations of constrained functions. That concerns me a bit. Also, do you know if G

[PATCH] D147655: Implement mangling rules for C++20 concepts and requires-expressions.

2023-04-07 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. In D147655#4250056 , @rsmith wrote: > There has not been any stable ABI from any compiler targeting the Itanium C++ > ABI for constrained templates prior to this change. I don't think we need to > worry too much about people

[PATCH] D147904: [Clang] Fix cast to BigIntType in hasUniqueObjectRepresentations

2023-04-09 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson created this revision. royjacobson added reviewers: shafik, cjdb. Herald added a subscriber: kristof.beyls. Herald added a project: All. royjacobson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. A bad QualType cast caused us n

[PATCH] D147904: [Clang] Fix cast to BigIntType in hasUniqueObjectRepresentations

2023-04-10 Thread Roy Jacobson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG016970d079c4: [Clang] Fix cast to BigIntType in hasUniqueObjectRepresentations (authored by royjacobson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D14790

[PATCH] D141775: [Clang] Export CanPassInRegisters as a type trait

2023-04-10 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. In D141775#4255923 , @philnik wrote: > Is this essentially "is_trivial_for_the_purposes_of_abi"? I'd say so. Are you asking for a potential libc++ use case? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

  1   2   3   4   >