[PATCH] D69062: Resolve LWG issue 2426

2023-09-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF commandeered this revision. EricWF edited reviewers, added: zoecarver; removed: EricWF. EricWF added a comment. Herald added a reviewer: libc++. Herald added a project: All. In D69062#1711610 , @ldionne wrote: > If we want to mark the LWG issue as b

[PATCH] D61364: [libcxx] [test] Fix incorrect allocator::construct assertions in associative container tests

2023-09-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF commandeered this revision. EricWF edited reviewers, added: BillyONeal; removed: EricWF. EricWF added a comment. Herald added a project: All. Fixing this requires a bunch of container overall in the containers that I don't have the time for right now. So I'm going to go ahead and close thi

[PATCH] D97411: [DebugInfo] Add an attribute to force type info to be emitted for types that are required to be complete.

2021-03-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Due to some complexities libc++ has dealing with the allocator, as well some optimizations it would be a serious undertaking to restructure libc++ to properly construct the types in the hash containers, This change would be greatly simpler and much appreciated. Reposito

[PATCH] D78323: [clang] Fix invalid comparator in tablegen

2020-04-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF closed this revision. EricWF added a comment. af2968e37f4c95846ffe287b64a4fcd72c765bee Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78323/new/ https://reviews.llvm.org/D

[PATCH] D78323: [clang] Fix invalid comparator in tablegen

2020-04-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In D78323#1987596 , @sdesmalen wrote: > LGTM, did this comparison introduce any non-determinism? Potentially, but I observed the issue using libc++'s debug mode. I'm unsure if the current inputs would have caused libc++ to read pa

[PATCH] D78323: [clang] Fix invalid comparator in tablegen

2020-04-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: fowles, bkramer, sdesmalen. Herald added a project: clang. The current version of the comparator does not introduce a strict weak ordering. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D78323 Files: clang/utils/TableGen/

[PATCH] D78223: [clang-tidy] performance-range-for-copy only for copy.

2020-04-15 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: fowles, shuaiwang. EricWF added a project: clang-tools-extra. Herald added subscribers: mgehre, xazax.hun. Currently the range-for-copy incorrectly suggests changing a by-value loop var to a reference to avoid copies even when: (1) A co

[PATCH] D72282: [clang-tidy] Add `bugprone-unintended-adl`

2020-03-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF requested changes to this revision. EricWF added a comment. This revision now requires changes to proceed. - This check should suggest fixes. It knows what function is actually being resolved, and it has enough information to create a minimally qualified name that resolves it. - This ch

[PATCH] D72282: [clang-tidy] Add `bugprone-unintended-adl`

2020-03-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I'll be picking this up seriously this week. I'm currently getting an internal version of this clang-tidy reviewed, and my plan was to submit it upstream after because I didn't see this patch until now (bad email filters). I think we can unify the two checks, Thanks for w

[PATCH] D73245: Depend stddef.h to provide max_align_t for C++11 and provide better fallback in

2020-03-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF requested changes to this revision. EricWF added a comment. This revision now requires changes to proceed. I've already stated my disapproval of this patch. Libc++ has never and will never provide nor value C++03 conformance. Moving backwards to C++03 is inconsistent with the libraries gen

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2020-03-01 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In D41223#1899394 , @jtbandes wrote: > The lack of `_LIBCPP_CONSTEXPR_AFTER_CXX14` on the `array` > specialization's `begin()`, `end()`, and other methods seems to be a bug: > https://stackoverflow.com/questions/60462569/empty-std

[PATCH] D67052: Add reference type transformation builtins

2020-03-01 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. LGTM once all of the inline comments are addressed. After that, this is ready to land. Comment at: clang/lib/AST/ItaniumMangle.cpp:3412 break; + case UnaryTransformType::RemoveReferenceType: +Out << "3err"; zoecarv

[PATCH] D73245: Depend stddef.h to provide max_align_t for C++11 and provide better fallback in

2020-02-26 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a subscriber: ldionne. EricWF added a comment. @ldionne Since this has the possibility of breaking existing users of `std::max_align_t`, can you test this against your c++03 codebases? @joerg I still don't understand why you need this change. Why can't we provide the name in C++03

[PATCH] D74871: Fix interaction between -fdiscard-value-names and LLVM Bitcode

2020-02-19 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. This seems wrong to me. Discarding value names is the default and has been forever in non-assert builds. Why is this not a bug in w/e is handling the IR? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74871/new/ https://revi

[PATCH] D73245: Depend stddef.h to provide max_align_t for C++11 and provide better fallback in

2020-02-19 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: libcxx/include/new:229-237 +#if !defined(_LIBCPP_CXX03_LANG) +using __libcpp_max_align_t = max_align_t; +#else +union __libcpp_max_align_t { + void * __f1; + long long int __f2; + long double __f3; rsmith wrote: > Is t

[PATCH] D67588: Add builtin trait for add/remove cv (and similar)

2020-02-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. LGTM other than the inline comments. I'll take a second pass at this once they're addressed. Let's land the patch this week! Comment at: clang/include/clang/Sema/DeclSpec.h:419 static bool isTypeRep(TST T) { return (T == TST_typename || T == TST

[PATCH] D73245: Don't define std::max_align_t if not used in C++03 mode

2020-01-22 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF requested changes to this revision. EricWF added a comment. This revision now requires changes to proceed. the library has never had a C++03 mode, and I am against adding one now. I want libc++ to move away from C++03, not towards it CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D72484: [clang-tidy] Fix check for Abseil internal namespace access

2020-01-21 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF closed this revision. EricWF added a comment. Committed in 020ed6713d889a95f8c98d7725c87b458d99f6b3 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72484/new/ https://reviews.llvm.org/D72484

[PATCH] D72484: [clang-tidy] Fix check for Abseil internal namespace access

2020-01-17 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. The weird template test case might is derived from an old failure that I believe was addressed in Clang, but regression tests are fine by me. The macro expansion fix is correct and corre

[PATCH] D68756: [libc++][test] Change IsSmallObject's calculation for std::any's small object buffer

2019-10-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added inline comments. This revision is now accepted and ready to land. Comment at: libcxx/test/support/any_helpers.h:30 {}; template bool containsType(std::any const& a) { LGTM. Repository: rG LLVM Github Monorepo

[PATCH] D67052: Add reference type transformation builtins

2019-09-19 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: clang/lib/Parse/ParseDeclCXX.cpp:1099 + +void Parser::ParseAddReferenceTypeSpecifier(DeclSpec &DS) { + DeclSpec::TST ReferenceTransformTST = ReferenceTransformTokToDeclSpec(); I think this should be generalized and merge

[PATCH] D67052: Add reference type transformation builtins

2019-09-19 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: clang/include/clang/AST/Type.h:4353 +RemoveReferenceType, +AddRValueType, +AddLValueType This should say ref in the name. Comment at: clang/lib/Parse/ParseDeclCXX.cpp:1094 +return DeclSp

[PATCH] D66836: [libc++] Add `__truncating_cast` for safely casting float types to integers

2019-08-30 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 218149. EricWF marked an inline comment as done. EricWF added a comment. Address review comments. - Document that NaN isn't a supported input. - Fix spelling mistake. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66836/new/ https://reviews.llvm.org/

[PATCH] D66836: [libc++] Add `__truncating_cast` for safely casting float types to integers

2019-08-28 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added inline comments. Comment at: include/math.h:1573 + enum { _Bits = numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits }; + static const _IntT value = numeric_limits<_IntT>::max() >> _Bits << _Bits; +}; -

[PATCH] D66836: [libc++] Add `__truncating_cast` for safely casting float types to integers

2019-08-28 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 217700. EricWF added a comment. Address review comments. I think this is good to go. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66836/new/ https://reviews.llvm.org/D66836 Files: include/math.h test/libcxx/numerics/clamp_to_integral.pass.cpp

[PATCH] D66836: [libc++] Add `__truncating_cast` for safely casting float types to integers

2019-08-28 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 10 inline comments as done. EricWF added inline comments. Comment at: include/math.h:1556 +_LIBCPP_BEGIN_NAMESPACE_STD +template Seems odd this is the only thing in this file inside the standard namespace. > Are we moving towards writing `std::__helper` instead

[PATCH] D66836: [libc++] Add `__truncating_cast` for safely casting float types to integers

2019-08-27 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: mclow.lists, ldionne. Herald added subscribers: libcxx-commits, dexonsmith, christof. This is needed anytime we need to clamp an arbitrary floating point value to an integer type. Repository: rCXX libc++ https://reviews.llvm.org/D66836 F

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-07-29 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF closed this revision. EricWF added a comment. Committed in r367263. Thanks for the change, sorry about the delay. I'll go watch the bots now. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62977/new/ https://reviews.llvm.org/D62977 _

[PATCH] D51262: Implement P0553 and P0556

2019-07-01 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added inline comments. This revision is now accepted and ready to land. Comment at: libcxx/include/bit:240 +else if constexpr (sizeof(_Tp) <= sizeof(unsigned long)) +return __clz(static_cast(__t)) + - (numeric_limits:

[PATCH] D51262: Implement P0553 and P0556

2019-07-01 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I would like to see a version of this after the inline comments are addressed. Comment at: libcxx/include/bit:193 + is_unsigned_v<_Tp> && +!is_same_v, bool> && +!is_same_v, char> && `_IsNotSame` is faster and bett

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-28 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. I don't have any other comments. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62977/new/ https://reviews.llvm.org/D62977 ___ cfe

[PATCH] D48680: Add missing visibility annotation for __base

2019-06-25 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. You have an ODR violation. You can't compile one TU with `-fno-rtti -fno-exceptions` and another without. You give the definitions of `__base` different vtables. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48680/new/ https://reviews

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp:30 #include "UnnamedNamespaceInHeaderCheck.h" #include "UsingNamespaceDirectiveCheck.h" Just tried building this. I think you're missing an include for `Upgrad

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Generally this LGTM. I'll take another pass after the comments are addressed. Comment at: clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp:19 + +static const llvm::StringRef CheckMessage = +"Googletest APIs named with 'case' are de

[PATCH] D51262: Implement P0553 and P0556

2019-06-13 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Herald added a subscriber: dexonsmith. Please use Clang format on these changes. Otherwise the implementation looks great, I've left some nits. Comment at: include/bit:190 +template +struct __bitop_unsigned_integer +: public integral_constant && +

[PATCH] D44865: [libc++] Implement P0608R3 - A sane variant converting constructor

2019-06-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/variant:1128 +template +struct __overload +: __overload_bool<__overload<_Types...>, bool const volatile> {}; Do we even support volatile types in variant? Repository: rCXX libc++ CHANGES SINCE LAST ACTIO

[PATCH] D62429: Fix linkage of _ZTS strings for types involving incomplete classes to match the Itanium ABI rules.

2019-05-27 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I think this is llvm.org/PR37398 I tried fixing this a while back in r332028 but the fix got reverted for causing llvm.org/PR37545. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62429/new/ https://reviews.llvm.org/D62429 _

[PATCH] D37035: Implement __builtin_LINE() et. al. to support source location capture.

2019-05-16 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC360937: Implement __builtin_LINE() et. al. to support source location capture. (authored by EricWF, committed by ). Herald added a subscriber: kristina. Herald added a project: clang. Repository: rC Cla

[PATCH] D37035: Implement __builtin_LINE() et. al. to support source location capture.

2019-05-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 199893. EricWF marked an inline comment as done. EricWF added a comment. Merge with upstream. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D37035/new/ https://reviews.llvm.org/D37035 Files: docs/LanguageExtensions.rst include/clang/AST/ASTContex

[PATCH] D37035: Implement __builtin_LINE() et. al. to support source location capture.

2019-05-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 14 inline comments as done. EricWF added a comment. Address review comments. Comment at: lib/AST/ExprConstant.cpp:3370-3371 + + assert((!Base || !isa(Base)) && + "Base should have already been transformed into a StringLiteral"); + rsmith

[PATCH] D61364: [libcxx] [test] Fix incorrect allocator::construct assertions in associative container tests

2019-05-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: test/std/containers/map_allocator_requirement_test_templates.h:236 const ValueTp v(42, 1); -cc->expect(); +cc->expect(); It ret = c.insert(c.end(), std::move(v)); I really think the current behavior libc

[PATCH] D61364: [libcxx] [test] Fix incorrect allocator::construct assertions in associative container tests

2019-05-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. From Billy and my last discussion, I think we came to the agreement that it's not clear exactly what the "standard behavior" is. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61364/new/ https://reviews.llvm.org/D61364 _

[PATCH] D61365: [libcxx] [test] Suppress float->int narrowing warning in vector range-construction test.

2019-05-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. This LGTM after correctly wrapping it as Casey mentionse. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61365/new/ https://reviews.llvm.org/D61365 _

[PATCH] D61366: [libcxx] [test] Don't assert that moved-from containers with non-POCMA allocators are empty.

2019-05-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. I'm not sure I agree with your design decision, but this patch LGTM. Are you not allowed to move the containers elements in this case? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61

[PATCH] D50860: [libc++][test] Remove non-portable assumption that thread's constructor allocates with ::new

2019-04-27 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM minus inline comments. Comment at: test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp:171 #ifndef TEST_HAS_NO_EXCEPTIONS -{ +if

[PATCH] D48292: use modern type trait implementations when available

2019-04-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. This patch is OK to land as-is. Doing the cleanup separately makes sense. Comment at: include/type_traits:3683 + +#elif __has_feature(has_trivial_destructor) || (_GNUC_VER >= 403) + rsmith wrote: > EricWF wrote: > > We don't support any

[PATCH] D48292: use modern type trait implementations when available

2019-04-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. Herald added subscribers: libcxx-commits, miyuki, jfb, ldionne. LGTM minus nits. Comment at: include/type_traits:3683 + +#elif __has_feature(has_trivial_destructor) || (_GNUC

[PATCH] D55500: [Builtins] Implement __builtin_is_constant_evaluated for use in C++2a

2019-04-23 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC359067: [Builtins] Implement __builtin_is_constant_evaluated for use in C++2a (authored by EricWF, committed by ). Herald added a project: clang. Repository: rC Clang CHANGES SINCE LAST ACTION https:

[PATCH] D55500: [Builtins] Implement __builtin_is_constant_evaluated for use in C++2a

2019-04-23 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 196368. EricWF added a comment. - Merge with master. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55500/new/ https://reviews.llvm.org/D55500 Files: include/clang/Basic/Builtins.def lib/AST/ExprConstant.cpp lib/Basic/Builtins.cpp lib/CodeGen

[PATCH] D57645: [C++2a] Fix PR40576: Turn destroying delete off prior to C++2a. Add -fdestroying-delete

2019-03-18 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF abandoned this revision. EricWF added a comment. Herald added a subscriber: jdoerfert. This is the wrong approach. Abandoning. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57645/new/ https://reviews.llvm.org/D57645 _

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2019-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF closed this revision. EricWF added a comment. Committed as rr355763 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D47344/new/ https://reviews.llvm.org/D47344 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2019-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @Quuxplusone Since the LLVM license has changed since you created this, I need you to confirm that you accept LLVM's new license. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D47344/new/ https://reviews.llvm.org/D47344

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside template arguments, enumerators, case statements, and the enable_if attribute.

2019-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC355743: [8.0 Regression] Fix handling of `__builtin_constant_p` inside template… (authored by EricWF, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59038/ne

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside template arguments, enumerators, case statements, and the enable_if attribute.

2019-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 189930. EricWF retitled this revision from "[8.0 Regression] Fix handling of `__builtin_constant_p` inside the enable_if attribute." to "[8.0 Regression] Fix handling of `__builtin_constant_p` inside template arguments, enumerators, case statements, and the e

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside the enable_if attribute.

2019-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 189927. EricWF added a comment. Add more tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59038/new/ https://reviews.llvm.org/D59038 Files: lib/AST/ExprConstant.cpp test/SemaCXX/constant-expression-cxx1y.cpp test/SemaCXX/enable_if.cpp In

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside the enable_if attribute.

2019-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In D59038#1422905 , @hans wrote: > In D59038#1422890 , @rsmith wrote: > > > LGTM, and I think this is safe enough to take for Clang 8. > > > Do you think the severity is high enough to spin a

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside the enable_if attribute.

2019-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 189888. EricWF added a comment. - Fix regressions inside template parameters, case statements, and enumerators. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59038/new/ https://reviews.llvm.org/D59038 Files: lib/AST/ExprConstant.cpp test/SemaCXX

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside the enable_if attribute.

2019-03-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In D59038#1421310 , @hans wrote: > I think I'll have to defer to Richard for reviewing this, since I'm not > familiar with the code. Since it's a regression we probably want to merge it > to clang 8. Can you give any guidance to h

[PATCH] D59076: [coroutines][PR40978] Emit error for co_yield within catch block

2019-03-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/Sema/SemaCoroutine.cpp:675 + // Second emphasis of [expr.await]p2: must be outside of an exception handler. + if (S.getCurScope()->getFlags() & Scope::CatchScope) { +S.Diag(Loc, diag::err_coroutine_within_handler) << Keyword; -

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2019-03-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: src/experimental/memory_resource.cpp:29 -public: -~__new_delete_memory_resource_imp() = default; - Quuxplusone wrote: > EricWF wrote: > > Why are you removing this? > Just removing unnecessary cruft. Same reason I add

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2019-03-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM other than removing the destructor. Comment at: src/experimental/memory_resource.cpp:29 -public: -~__new_delete_memory_resource_imp() = default; - W

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside the enable_if attribute.

2019-03-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: rsmith, hans, sbenza. Herald added a subscriber: kristina. Herald added a project: clang. The following code is accepted by Clang 7 and prior but rejected by the upcoming 8 release and in trunk [1] // error {{never produces a constant expre

[PATCH] D57645: [C++2a] Fix PR40576: Turn destroying delete off prior to C++2a. Add -fdestroying-delete

2019-02-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: ckennelly, rsmith. Herald added a project: clang. Defining new names in namespace `std` is technically a non-conforming extensions. This makes it difficult for libc++ to backport C++20 destroying delete. This patch should make it easier for l

[PATCH] D55500: [Builtins] Implement __builtin_is_constant_evaluated for use in C++2a

2019-01-23 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 183248. EricWF marked 2 inline comments as done. EricWF added a comment. - Add or correct tests as requested. - Fix code gen for initializers of reference types to correctly evaluate the initializer as a constant expression. CHANGES SINCE LAST ACTION https

[PATCH] D55500: [Builtins] Implement __builtin_is_constant_evaluated for use in C++2a

2019-01-23 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 6 inline comments as done. EricWF added inline comments. Comment at: test/CodeGenCXX/builtin-is-constant-evaluated.cpp:41-42 + +// CHECK-STATIC-DAG: @p = global i32 26, +CONSTINIT int p = f(); // f().m == 13; initialized to 26 + rsmith wrote: > Do w

[PATCH] D56731: Add -Wctad-maybe-unsupported to diagnose CTAD on types with no user defined deduction guides.

2019-01-17 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC351484: Add -Wctad-maybe-unsupported to diagnose CTAD on types with no user defined… (authored by EricWF, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D5673

[PATCH] D56731: Add -Wimplicit-ctad warning to diagnose CTAD on types with no user defined deduction guides.

2019-01-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2129 +def warn_class_template_argument_deduction_no_user_defined_guides : Warning< + "using class template argument deduction for %0 that has no user-defined deduction guides" >, + InGroup, De

[PATCH] D56731: Add -Wimplicit-ctad warning to diagnose CTAD on types with no user defined deduction guides.

2019-01-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 182206. EricWF marked 3 inline comments as done. EricWF added a comment. address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56731/new/ https://reviews.llvm.org/D56731 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basi

[PATCH] D55500: [Builtins] Implement __builtin_is_constant_evaluated for use in C++2a

2019-01-15 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 181974. EricWF added a comment. Add the requested tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55500/new/ https://reviews.llvm.org/D55500 Files: include/clang/Basic/Builtins.def lib/AST/ExprConstant.cpp lib/Basic/Builtins.cpp test/Co

[PATCH] D56731: Add -Wimplicit-ctad warning to diagnose CTAD on types with no user defined deduction guides.

2019-01-15 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 181972. EricWF added a comment. Address review comments. - Use "%0 maybe not intend to support ctad" like warning text. - Add note about suppression. - Rename `-Wimplicit-ctad` -> `-Wctad-maybe-unsupported` (Perhaps it should be `-Wctad-maybe-unintended`?) A

[PATCH] D56731: Add -Wimplicit-ctad warning to diagnose CTAD on types with no user defined deduction guides.

2019-01-15 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 10 inline comments as done. EricWF added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2129 +def warn_class_template_argument_deduction_no_user_defined_guides : Warning< + "using class template argument deduction for %0 that has no user-de

[PATCH] D56731: Add -Wimplicit-ctad warning to diagnose CTAD on types with no user defined deduction guides.

2019-01-15 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 181829. EricWF marked an inline comment as done. EricWF added a comment. Address inline comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56731/new/ https://reviews.llvm.org/D56731 Files: include/clang/Basic/DiagnosticGroups.td include/cla

[PATCH] D56731: Add -Wimplicit-ctad warning to diagnose CTAD on types with no user defined deduction guides.

2019-01-15 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 6 inline comments as done. EricWF added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2129 +def warn_class_template_argument_deduction_no_user_defined_guides : Warning< + "class template argument deduction for %0 that has no user defined d

[PATCH] D56731: Add -Wimplicit-ctad warning to diagnose CTAD on types with no user defined deduction guides.

2019-01-15 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: rsmith, james.dennett, gromer. Some style guides want to allow using CTAD only on types that "opt-in"; i.e. on types that are designed to support it and not just types that *happen* to work with it. This patch implements the `-Wimplicit-ctad

[PATCH] D50106: [libc++] Fix tuple assignment from type derived from a tuple-like

2019-01-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF requested changes to this revision. EricWF added a comment. This revision now requires changes to proceed. Our constructors still have the same bug,. Are you planning on fixing those as well? Doing so will require a metric butt-tonne of overloads. If you're not planning on fixing the const

[PATCH] D37035: Implement __builtin_LINE() et. al. to support source location capture.

2019-01-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 18 inline comments as done. EricWF added a comment. Mark more review comments as done. Comment at: lib/AST/Expr.cpp:2026-2027 + // human readable name. + if (IdentifierInfo *II = FD->getDeclName().getAsIdentifierInfo()) +return MkStr(II->getNameS

[PATCH] D37035: Implement __builtin_LINE() et. al. to support source location capture.

2019-01-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 180597. EricWF marked 4 inline comments as done. EricWF added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D37035/new/ https://reviews.llvm.org/D37035 Files: docs/LanguageExtensions.rst include/clang/AST/ASTCo

[PATCH] D37035: Implement __builtin_LINE() et. al. to support source location capture.

2019-01-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 13 inline comments as done. EricWF added a comment. Address review comments. Updated patch coming shortly. Comment at: include/clang/AST/Expr.h:4147 + SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; } + SourceLocation getEndLoc() const LLVM

[PATCH] D55500: [Builtins] Implement __builtin_is_constant_evaluated for use in C++2a

2019-01-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added a comment. Ping! I would like to land this before the next release. @rsmith, what sorts of additional tests are needed? Comment at: include/clang/Basic/Builtins.def:759 +// Random C++ builtins. +LANGBUILTIN(__builtin_is_con

[PATCH] D37035: Implement __builtin_LINE() et. al. to support source location capture.

2019-01-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Ping! I would like to land this before the next release. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D37035/new/ https://reviews.llvm.org/D37035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D37035: Implement __builtin_LINE() et. al. to support source location capture.

2018-12-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 179211. EricWF added a comment. Herald added a reviewer: shafik. Merge with upstream. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D37035/new/ https://reviews.llvm.org/D37035 Files: docs/LanguageExtensions.rst include/clang/AST/ASTContext.h in

[PATCH] D40218: [Clang] Add __builtin_launder

2018-12-14 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349195: [Clang] Add __builtin_launder (authored by EricWF, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D40218/new/ https://reviews.llvm.org/D40218 Files:

[PATCH] D40218: [Clang] Add __builtin_launder

2018-12-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 178267. EricWF added a comment. Merging with upstream. Preparing to commit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D40218/new/ https://reviews.llvm.org/D40218 Files: include/clang/Basic/Builtins.def include/clang/Basic/DiagnosticSemaKinds.

[PATCH] D55044: [clang-tidy] check for Abseil make_unique

2018-12-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added a comment. I'm not sure how you're building this, but it doesn't link for me. We need to add a dependency on `clangTidyModernizeModule` since we're deriving from its `MakeSmartPtrCheck`. Comment at: clang-tidy/abseil/MakeU

[PATCH] D55044: [clang-tidy] check for Abseil make_unique

2018-12-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: clang-tidy/abseil/MakeUniqueCheck.cpp:28 + recordType(hasDeclaration(classTemplateSpecializationDecl( + hasName("::std::unique_ptr"), templateArgumentCountIs(2), + hasTemplateArgument( Does this cat

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-12 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348977: [AST] Store "UsesADL" information in CallExpr. (authored by EricWF, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55534/new/ https://reviews.llvm.o

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 177907. EricWF marked an inline comment as done. EricWF added a comment. Address final review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55534/new/ https://reviews.llvm.org/D55534 Files: docs/LibASTMatchersReference.html include/cla

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added inline comments. Comment at: docs/LibASTMatchersReference.html:2579-2581 +y(x); Matches +NS::y(x); Doesn't match +y(42); Doesn't match. aaron.ballman wrote: > EricWF wrote: > > aaron.ballman wrote:

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added a comment. I think this is good to go. Any more comments? Comment at: include/clang/Sema/Sema.h:2758 bool AllowExplicit = false, +bool IsADLCandidate = false,

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 177752. EricWF marked 3 inline comments as done. EricWF added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55534/new/ https://reviews.llvm.org/D55534 Files: docs/LibASTMatchersReference.html include/clang/AST

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 13 inline comments as done. EricWF added inline comments. Comment at: include/clang/Sema/Sema.h:2758 bool AllowExplicit = false, +bool IsADLCandidate = false, ConversionSequenceLis

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 3 inline comments as done. EricWF added a comment. Address more inline comments. Comment at: docs/LibASTMatchersReference.html:2579-2581 +y(x); Matches +NS::y(x); Doesn't match +y(42); Doesn't match. aaron.ballman wrote: > This is not

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 177720. EricWF marked 2 inline comments as done. EricWF added a comment. Register matcher and regenerate docs. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55534/new/ https://reviews.llvm.org/D55534 Files: docs/LibASTMatchersReference.html incl

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 177716. EricWF added a comment. More tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55534/new/ https://reviews.llvm.org/D55534 Files: include/clang/AST/Expr.h include/clang/AST/ExprCXX.h include/clang/AST/Stmt.h include/clang/ASTMatche

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 177705. EricWF marked an inline comment as done. EricWF added a comment. Update with fixes for review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55534/new/ https://reviews.llvm.org/D55534 Files: include/clang/AST/Expr.h include/clan

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 12 inline comments as done. EricWF added a comment. Address more review comments. Update incoming. Comment at: include/clang/AST/Expr.h:2425 CallExpr(const ASTContext &C, StmtClass SC, unsigned NumPreArgs, - unsigned NumArgs, EmptyShell Empty); +

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 14 inline comments as done. EricWF added a comment. Address review comments. Fixes incoming. Comment at: include/clang/AST/ExprCXX.h:218 + SourceLocation RP, unsigned MinNumArgs = 0, + bool UsesADL = false) : CallExpr

[PATCH] D55500: [Builtins] Implement __builtin_is_constant_evaluated for use in C++2a

2018-12-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 2 inline comments as done. EricWF added a comment. Sorry for the delayed response. My email filters were incorrect. Comment at: include/clang/Basic/Builtins.def:759 +// Random C++ builtins. +LANGBUILTIN(__builtin_is_constant_evaluated, "b", "ncu", CXX_LANG) +

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: fowles, rsmith, klimek. Herald added a reviewer: shafik. Currently the Clang AST doesn't store information about how the callee of a CallExpr was found. Specifically if it was found using ADL. However, this information is invaluable to toolin

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2018-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF requested changes to this revision. EricWF added a comment. This revision now requires changes to proceed. I don't think this patch is correct or desirable any longer. I think what we should do is throw an exception right away if `__is_overaligned_for_new(align)`, and not even try to allo

  1   2   3   4   5   6   7   8   9   10   >