[PATCH] D28938: Implement P0513R0 - "Poisoning the Hash"

2017-01-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 85172. EricWF added a comment. - Fix bitset test that was overflowing the stack. - Add tests that basic_string_view hashes to the same value as an equivalent basic_string. https://reviews.llvm.org/D28938 Files: include/__functional_base include/function

[PATCH] D28938: Implement P0513R0 - "Poisoning the Hash"

2017-01-20 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 feel comfortable with this in its current state. https://reviews.llvm.org/D28938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D28785: Split exception.cpp and new.cpp implementation into different files for different runtimes

2017-01-21 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D28785#651156, @EricWF wrote: > In https://reviews.llvm.org/D28785#650101, @compnerd wrote: > > > While I love this direction (the original version really was an > > unintelligible pile of code), I really think that this change may be taking >

[PATCH] D26110: Add a check for GCC to the _LIBCPP_EXPLICIT define

2017-01-23 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I think I may have committed these changes as part of another change set. https://reviews.llvm.org/D26110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28520: Disable -Wthread-safety-analysis for some functions in __thread_support

2017-01-23 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @dim I would really rather just suppress these warnings if we want them merged into 4.0. https://reviews.llvm.org/D28520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D29063: [libcxx] Never use within libc++

2017-01-23 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Herald added a subscriber: mgorny. It is my opinion that libc++ should never use ``, including in the `dylib`. This patch remove all uses of `assert` from within libc++ and replaces most of them with `_LIBCPP_ASSERT` instead. Additionally this patch turn `LIBCXX_EN

[PATCH] D29063: [libcxx] Never use within libc++

2017-01-23 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/__config:827 # endif +# if !defined(_LIBCPP_BUILDING_LIBRARY) # define _LIBCPP_EXTERN_TEMPLATE(...) mclow.lists wrote: > Does this belong here? > Yeah, so `-DLIBCXX_ENABLE_ASSERTIONS=ON` now define `-D_LIBC

[PATCH] D28981: Use GNU-style attributes for several __throw_XXX() functions

2017-01-23 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF resigned from this revision. EricWF added a comment. I think we've agreed that this change shouldn't proceed. Resigning as reviewer. https://reviews.llvm.org/D28981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D29063: [libcxx] Never use within libc++

2017-01-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. It seems like weird usages of `_LIBCPP_ASSERT` in `` are causing this problem. Specifically the usages in `` attempt to use `_LIBCPP_ASSERT` in C++11 constexpr functions and this currently does not work. For now I've reverted this change in r292923. https://reviews.llv

[PATCH] D29550: Diagnose when "future_error(error_code)" constructor is called by user code

2017-02-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. The constructor `future_error(error_code)` isn't part of the C++ standard, but libc++ provides it in order to construct `future_error`'s before C++17. However since it's non-standard we probably shouldn't be providing it all. We could make the constructor private bu

[PATCH] D29135: [libcxx] [test] Fix Clang -Wunused-local-typedef, part 1/3.

2017-02-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Since all of these changes are for libc++ specific tests I would much rather see changes of this form: #if defined(_LIBCPP_VERSION) { typedef foo bar; static_assert(baz, ""); } #endif I think that's a lot nicer than wrapping every statement in the block i

[PATCH] D29137: [libcxx] [test] Fix Clang -Wunused-local-typedef, part 3/3.

2017-02-04 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: test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp:52 using P2 = std::pair; -static_assert(!std::is_default_constructible::value, "

[PATCH] D29557: [clang-tools-extra] Fix pthread link

2017-02-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Herald added a subscriber: mgorny. This patch contains the clang-tools-extra changes required by https://reviews.llvm.org/D29555 https://reviews.llvm.org/D29557 Files: include-fixer/plugin/CMakeLists.txt Index: include-fixer/plugin/CMakeLists.txt =

[PATCH] D29209: Use copy.deepcopy instead of doing it manually.

2017-02-05 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. Repository: rL LLVM https://reviews.llvm.org/D29209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D29630: [libcxx] Threading support: externalize sleep_for()

2017-02-07 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. @joerg has raised some legitimate concerns about the Windows implementation. However that shouldn't hold this cleanup up, since the implementation is preexisting. Com

[PATCH] D29630: [libcxx] Threading support: externalize sleep_for()

2017-02-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D29630#670873, @rmaprath wrote: > Sorry for the delay, I've updated the patch with all the comments addressed. > > @EricWF: Got one question before I commit: The `sleep_for` function in the > dylib (`thread.cpp`) is now quite small. Is there a

[PATCH] D28478: Check for musl-libc's max_align_t in addition to other variants.

2017-02-09 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. https://reviews.llvm.org/D28478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D28478: Check for musl-libc's max_align_t in addition to other variants.

2017-02-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. IDK how to meaningly test this though. https://reviews.llvm.org/D28478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29557: [clang-tools-extra] Fix pthread link

2017-02-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF closed this revision. EricWF added a comment. Committed as r294690. https://reviews.llvm.org/D29557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34170: [libcxx] Moving compiler specific test infrastructure to compiler.py

2017-07-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I'll try and get to this tonight. https://reviews.llvm.org/D34170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34536: [libcxx] [test] Fix Clang -Wunused-local-typedef warnings.

2017-07-05 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. @STL_MSFT This seems like you could commit it without review. You're a professional STL developer after all, if you can't get this right may God have mercy on your users. https://revie

[PATCH] D35038: [libunwind] Add a test harness

2017-07-05 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. I'm assuming it works but we can iron out the kinks once it lands. We should probably add builders that run the tests as well. Comment at: test/lit.cfg:46 +li

[PATCH] D34649: Remove addtional parameters in function std::next() and std::prev()

2017-07-05 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. > Creating a function pointer with proper parameters pointing to std::next() or > std::prev() should work. Actually, according to the standard taking the address of a STL function is UB, and

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2017-07-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @dexonsmith Mind if I hijack this and check in your changes to `` with my tests? Comment at: libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp:1 +//===-

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2017-07-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. @dexonsmith I'm not sure it's sane to allow reentrant behavior. Could you explain why you think it is? Should the copy assignment operator allow reentrancy as well? However there is

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2017-07-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. > However there is another bug here. operator=(function&&) doesn't correctly > call the destructor of the functor. I'll fix that as a separate commit. Woops, I misread the diff. There is no existing bug W.R.T. missing destructor calls. https://reviews.llvm.org/D34331

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. This patch causes `test_demangle.pass.cpp` to fail with UBSan. Standard Error: -- /home/eric/workspace/libcxxabi/src/cxa_demangle.cpp:113:44: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/string.h:47:14: note: no

[PATCH] D35046: [coroutines] Include "this" type when looking up coroutine_traits

2017-07-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 think the test could be improved. First could you add the test within `test/SemaCXX/coroutines.cpp`? Second could you add some negative tests that check the diagnostics generated w

[PATCH] D32385: [libcxx] optional: Implement LWG 2900 and P0602

2017-07-09 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. I'll deal with ensuring all vendors are willing to take this ABI break (or that they avoid it). https://reviews.llvm.org/D32385 ___ cfe-co

[PATCH] D35174: [libc++] Fix unrepresentable enum for clang-cl unstable ABI

2017-07-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Maybe using a static const variable instead of an enum would work better? `__long_mask` should never actually be ODR used so a definition for it should never actually be needed. https://reviews.llvm.org/D35174 ___ cfe-commi

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2017-07-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D34331#803105, @dexonsmith wrote: > In https://reviews.llvm.org/D34331#802747, @EricWF wrote: > > > @dexonsmith Mind if I hijack this and check in your changes to > > `` with my tests? > > > Not at all. > > In https://reviews.llvm.org/D34331#80

[PATCH] D35174: [libc++] Fix unrepresentable enum for clang-cl unstable ABI

2017-07-11 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. https://reviews.llvm.org/D35174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D34225: [clang-format] Teach clang-format how to handle C++ coroutines

2017-07-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 106135. EricWF marked an inline comment as done. EricWF added a comment. - Address most review comments except those about `spaceBreakBetween` and `spaceBreakBefore`. https://reviews.llvm.org/D34225 Files: lib/Format/Format.cpp lib/Format/TokenAnnotator

[PATCH] D34225: [clang-format] Teach clang-format how to handle C++ coroutines

2017-07-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added a comment. @alexfh Thanks for correcting the reviewers. I had no idea who to add so I used something like `git-suggest-reviewers`. Comment at: lib/Format/Format.cpp:1958 LangOpts.DeclSpecKeyword = 1; // To get __declspec

[PATCH] D35297: [Sema] Fix operator lookup to consider local extern declarations.

2017-07-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Previously Clang was not considering operator declarations that occur at function scope. This is incorrect according to [over.match.oper]p3 > The set of non-member candidates is the result of the unqualified lookup of > operator@ in the context of the expression ac

[PATCH] D35297: [Sema] Fix operator lookup to consider local extern declarations.

2017-07-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 106166. EricWF added a comment. Add more appropriate test. https://reviews.llvm.org/D35297 Files: lib/Sema/SemaLookup.cpp test/SemaCXX/overloaded-operator.cpp Index: test/SemaCXX/overloaded-operator.cpp =

[PATCH] D35297: [Sema] Fix operator lookup to consider local extern declarations.

2017-07-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 106168. EricWF edited the summary of this revision. https://reviews.llvm.org/D35297 Files: lib/Sema/SemaLookup.cpp test/SemaCXX/overloaded-operator.cpp Index: test/SemaCXX/overloaded-operator.cpp ==

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. +1 for moving this file to LLVM's internal style. Comment at: src/cxa_demangle.cpp:44 +class string_ref +{ dexonsmith wrote: > mehdi_amini wrote: > > dexonsmith wrote: > > > erik.pilkington wrote: > > > > mehdi_amini wrote: > > > > > I

[PATCH] D35038: [libunwind] Add a test harness

2017-07-18 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. > Checking out libcxx should not be a requirement since libunwind should be > usable independently on libcxx. Nope, Sorry. As jroelofs said the code duplication is not worth it. Unfortunately you'll need the libc++ sources, and I also don't think that's a bug. https:/

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp:86 + +TEST_CHECK(fs::remove_all(p) == 0); +TEST_CHECK(!ec); This test is incorrect. `ec` isn't passed to the

[PATCH] D41746: Make std::get_temporary_buffer respect overaligned types when possible

2018-01-11 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 minus nits. Is there a LWG issue or paper that specifies this change? or is it just a general bug fix? Comment at: include/memory:2007 +#if !defined(_LIBCPP_HAS_N

[PATCH] D29930: Add `__reference_binds_to_temporary` trait for checking safe reference initialization.

2018-01-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 3 inline comments as done. EricWF added a comment. @rsmith The trait is already documented in `LanguageExtensions.rst`, so I'll assumed you missed that and are not trying to suggest more documentation is needed. Comment at: include/clang/Basic/TypeTraits.h:91 +/

[PATCH] D29930: Add `__reference_binds_to_temporary` trait for checking safe reference initialization.

2018-01-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 129544. EricWF marked an inline comment as done. EricWF added a comment. Address inline comments. https://reviews.llvm.org/D29930 Files: docs/LanguageExtensions.rst include/clang/Basic/TokenKinds.def include/clang/Basic/TypeTraits.h lib/Sema/SemaExpr

[PATCH] D41958: Create a deduction guide for basic_string

2018-01-11 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 inline comments. Comment at: include/string:1491 +#if _LIBCPP_STD_VER > 14 +templatehttps://reviews.llvm.org/D41958 _

[PATCH] D29930: Add `__reference_binds_to_temporary` trait for checking safe reference initialization.

2018-01-11 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322334: Add `__reference_binds_to_temporary` trait for checking safe reference… (authored by EricWF, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llv

[PATCH] D41820: [coroutines] Pass coro func args to promise ctor

2018-01-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Is this behavior specified somewhere? Or are we simply adding an extension to Clang? If so I would really prefer to add my `co_promise` solution (but I need to write a paper in favor of it first). Repository: rC Clang https://reviews.llvm.org/D41820 __

[PATCH] D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: rsmith, mclow.lists. See https://bugs.llvm.org/show_bug.cgi?id=20855 Libc++ goes out of it's way to diagnose `std::tuple` constructions which are UB due to lifetime bugs caused by reference creation. For example: // The 'const std::string&

[PATCH] D40218: [Clang] Add __builtin_launder

2018-01-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 2 inline comments as done. EricWF added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1674 +Value *Ptr = EmitScalarExpr(E->getArg(0)); +Ptr = Builder.CreateInvariantGroupBarrier(Ptr); +return RValue::get(Ptr); rsmith wrote: > It

[PATCH] D40218: [Clang] Add __builtin_launder

2018-01-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 129740. EricWF marked an inline comment as done. EricWF added a comment. - Address inline comments about missing diagnostics for void pointers and function pointers. - Address inline comments about only enabling when `-fstrict-vtable-pointers` is specified, a

[PATCH] D40218: [Clang] Add __builtin_launder

2018-01-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 129742. EricWF added a comment. - Improve diagnostic handling. https://reviews.llvm.org/D40218 Files: include/clang/Basic/Builtins.def include/clang/Basic/DiagnosticSemaKinds.td lib/AST/ExprConstant.cpp lib/CodeGen/CGBuiltin.cpp lib/Sema/SemaChecki

[PATCH] D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D41977#975403, @rsmith wrote: > This will still diagnose valid and reasonable programs, such as: > > struct ConvertToRef { operator int&(); }; > std::tuple t = {ConvertToRef()}; > > > ... on compilers that don't provide the trait. You could

[PATCH] D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 129744. EricWF added a comment. - Address @rsmith's comments by removing the fallback implementation of the diagnostics. https://reviews.llvm.org/D41977 Files: include/tuple test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp t

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

2018-01-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 129746. EricWF added a comment. - Introduce `SourceLocExprScope.h` to help reduce code duplication. - Merge with upstream. https://reviews.llvm.org/D37035 Files: docs/LanguageExtensions.rst include/clang/AST/Expr.h include/clang/AST/ExprCXX.h include

[PATCH] D42343: [coroutines] Fix application of NRVO to Coroutine "Gro" or return object.

2018-01-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: rsmith, GorNishanov, nicholas. Fix NRVO for Gro variable. Previously, we only marked the GRO declaration as an NRVO variable when its QualType and the function return's QualType matched exactly (using operator==). However, this was inc

[PATCH] D42344: [libc++] Use multi-key tree search for {map, set}::{count, equal_range}

2018-01-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Could you provide tests that demonstrate the previously incorrect behavior? Repository: rCXX libc++ https://reviews.llvm.org/D42344 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D42344: [libc++] Use multi-key tree search for {map, set}::{count, equal_range}

2018-01-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @rsmith Yes. I agree this should only be applied in that case Repository: rCXX libc++ https://reviews.llvm.org/D42344 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D42343: [coroutines] Fix application of NRVO to Coroutine "Gro" or return object.

2018-01-21 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added inline comments. Comment at: test/CodeGenCoroutines/coro-gro-nrvo.cpp:17 +using SizeT = decltype(sizeof(int)); +void* operator new(SizeT __sz, const std::nothrow_t&) noexcept; +void operator delete(void* __p, const std::nothr

[PATCH] D42343: [coroutines] Fix application of NRVO to Coroutine "Gro" or return object.

2018-01-21 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 130801. EricWF marked an inline comment as done. EricWF added a comment. - Address inline comments in test. https://reviews.llvm.org/D42343 Files: lib/Sema/SemaCoroutine.cpp test/CodeGenCoroutines/coro-alloc.cpp test/CodeGenCoroutines/coro-gro-nrvo.cpp

[PATCH] D42343: [coroutines] Fix application of NRVO to Coroutine "Gro" or return object.

2018-01-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 131334. EricWF edited the summary of this revision. EricWF added a comment. - Use a better formulation for detecting when the Gro should be an NRVO variable. https://reviews.llvm.org/D42343 Files: lib/Sema/SemaCoroutine.cpp test/CodeGenCoroutines/coro-a

[PATCH] D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-24 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX323380: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding… (authored by EricWF, committed by ). Repository: rCXX libc++ https://reviews.llvm.org/D41977 Files: include/

[PATCH] D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 131348. EricWF added a comment. - Improve diagnostic as per @rsmiths suggestion. https://reviews.llvm.org/D41977 Files: include/tuple test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp test/libcxx/utilities/tuple/tuple.tuple/di

[PATCH] D40259: [libcxx] LWG2993: reference_wrapper

2018-01-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. LGTM after addressing inline comments. Do you have commit access? If not, I'll commit once updated. Comment at: test/std/utilities/function.objects/refwrap/refwrap.const/ty

[PATCH] D42343: [coroutines] Fix application of NRVO to Coroutine "Gro" or return object.

2018-01-29 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC323712: [coroutines] Fix application of NRVO to Coroutine "Gro" or return object. (authored by EricWF, committed by ). Repository: rC Clang https://reviews.llvm.org/D42343 Files: lib/Sema/SemaCorout

[PATCH] D42343: [coroutines] Fix application of NRVO to Coroutine "Gro" or return object.

2018-02-01 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 132495. EricWF added a comment. I had to revert due to failing tests when using a non-assert Clang build. This change fixes those tests to no longer depend on label names. https://reviews.llvm.org/D42343 Files: lib/Sema/SemaCoroutine.cpp test/CodeGenCor

[PATCH] D42829: Emit label names according to -discard-value-names.

2018-02-01 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: erichkeane, aaron.ballman, majnemer. Previously, Clang only emitted label names in assert builds. However there is a CC1 option -discard-value-names that should have been used to control emission instead. This patch removes the NDEBUG

[PATCH] D42829: Emit label names according to -discard-value-names.

2018-02-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added inline comments. Comment at: test/CodeGenCXX/discard-name-values.cpp:7 -// CHECK: ret i32 %bar -// DISCARDVALUE: ret i32 %0 +extern "C" void branch(); + aaron.ballman wrote: > Indentation is a bit off here.

[PATCH] D42829: Emit label names according to -discard-value-names.

2018-02-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 132648. EricWF marked an inline comment as done. EricWF added a comment. - Address inline comments. https://reviews.llvm.org/D42829 Files: lib/CodeGen/CodeGenFunction.h test/CodeGenCXX/discard-name-values.cpp Index: test/CodeGenCXX/discard-name-values.

[PATCH] D42829: Emit label names according to -discard-value-names.

2018-02-02 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC324127: Emit label names according to -discard-value-names. (authored by EricWF, committed by ). Repository: rC Clang https://reviews.llvm.org/D42829 Files: lib/CodeGen/CodeGenFunction.h test/Cod

[PATCH] D42863: Make __has_unique_object_representations reject empty union types.

2018-02-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: erichkeane, rsmith, aaron.ballman, majnemer. Clang incorrectly reports empty unions as having a unique object representation. However, this is not correct since `sizeof(EmptyUnion) == 1` AKA it has 8 bits of padding. Therefore it should be tr

[PATCH] D42863: Make __has_unique_object_representations reject empty union types.

2018-02-02 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC324134: Make __has_unique_object_representations reject empty union types. (authored by EricWF, committed by ). Repository: rL LLVM https://reviews.llvm.org/D42863 Files: lib/AST/ASTContext.cpp te

[PATCH] D42863: Make __has_unique_object_representations reject empty union types.

2018-02-02 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL324134: Make __has_unique_object_representations reject empty union types. (authored by EricWF, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org

[PATCH] D42887: [Driver] Add option to manually control discarding value names in LLVM IR.

2018-02-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: erichkeane, aaron.ballman, lebedev.ri. Currently, assertion-disabled Clang builds emit value names when generating LLVM IR. This is controlled by the `NDEBUG` macro, and is not easily overridable. In order to get IR output containing names fr

[PATCH] D42887: [Driver] Add option to manually control discarding value names in LLVM IR.

2018-02-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:3269 -// Disable the verification pass in -asserts builds. + const bool IsAssertBuild = #ifdef NDEBUG lebedev.ri wrote: > This logic seems sidew

[PATCH] D42887: [Driver] Add option to manually control discarding value names in LLVM IR.

2018-02-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 132752. EricWF marked an inline comment as done. EricWF added a comment. - Address really really really dumb mistake. https://reviews.llvm.org/D42887 Files: docs/UsersManual.rst include/clang/Driver/Options.td lib/Driver/ToolChains/Clang.cpp test/Dri

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

2018-02-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D41223#957308, @mclow.lists wrote: > I'm wondering if it's not a better idea to have an explicit specialization > for size == 0 > > template > class array { > // and so on. > }; I think that's probably more work than it's worth. I th

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

2018-02-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D41223#997264, @EricWF wrote: > > and also test `{{}}` cases. > > I don't agree those cases are valid. That initialization syntax suggests > there is something in the zero-sized array which is default constructible - > or that users should be

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

2018-02-03 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX324182: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default… (authored by EricWF, committed by ). Repository: rCXX libc++ https://reviews.llvm.org/D41223 Files: include/ar

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

2018-02-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 132758. EricWF added a comment. - Address review comments. - Add initialization tests. https://reviews.llvm.org/D41223 Files: include/array test/std/containers/sequences/array/array.cons/default.pass.cpp test/std/containers/sequences/array/array.data/d

[PATCH] D29804: Fully qualify (preprend ::) calls to math functions from libc

2017-02-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. This LGTM. Although IDK how far we should go to tolerate collisions with imported namespace names, especially since `libc` can't (since they can't add the ::qualifier). I've wrote tests for this change here

[PATCH] D28785: Split exception.cpp and new.cpp implementation into different files for different runtimes

2017-02-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 87944. EricWF added a comment. Merge with upstream. https://reviews.llvm.org/D28785 Files: CMakeLists.txt include/exception include/new include/typeinfo src/exception.cpp src/new.cpp src/support/runtime/exception_fallback.ipp src/support/runt

[PATCH] D28785: Split exception.cpp and new.cpp implementation into different files for different runtimes

2017-02-09 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. Accepting before committing. I wasn't able to split out the MSVC only changes in a fruitful way, so I'm going to commit this patch as-is. https://reviews.llvm.org/D28785 _

[PATCH] D28785: Split exception.cpp and new.cpp implementation into different files for different runtimes

2017-02-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF closed this revision. EricWF added a comment. Committed in r294707. https://reviews.llvm.org/D28785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28785: Split exception.cpp and new.cpp implementation into different files for different runtimes

2017-02-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D28785#673227, @smeenai wrote: > Still not a fan of the amount of vcruntime dependencies this is taking on, > but I guess that can be followed up on. Neither am I. However this gets the debug build working, and fixes RTTI, which in turn gets

[PATCH] D28835: [coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction.

2017-02-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. This currently segfaults on my machine. Here is the full output of running `SemaCXX/coroutines.cpp`. https://gist.github.com/EricWF/81dc332e21c3e5c6bdc024cda87b846f I'm not sure exac

[PATCH] D28835: [coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction.

2017-02-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. This LGTM after applying the fixes. Comment at: lib/Sema/SemaCoroutine.cpp:719 + + if (!PromiseRecordDecl) +return true; I figured out what's going on. `PromiseRecordDecl` doesn't get initialized to null when `IsPromiseDependentTyp

[PATCH] D29863: [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types.

2017-02-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch fixes http://llvm.org/PR31938. The description below is copy/pasted from the bug: The standard says: template, class Allocator = allocator> class basic_string { using value_type = typename traits::char_type; // ... basic_string(const charT* s,

[PATCH] D29863: [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types.

2017-02-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/string:782 _LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s, size_type __n); _LIBCPP_INLINE_VISIBILITY rsmith wrote: > Did you skip this one intentionally? Yes. `size_type` is a typedef

[PATCH] D29863: [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types.

2017-02-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88088. EricWF added a comment. - Fix the initializer list constructors. - Add tests for almost every constructor. The following two examples still do not work: std::basic_string s1("hello world", 2); // deduces Allocator = int std::basic_string s2("hello

[PATCH] D29863: [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types.

2017-02-13 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/string:782 _LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s, size_type __n); _LIBCPP_INLINE_VISIBILITY rsmith wrote: > EricWF wrote: > > rsmith wrote: > > > Did you skip this one intenti

[PATCH] D26057: [coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.

2017-02-13 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88300. EricWF marked 6 inline comments as done. EricWF added a comment. Merge with upstream and address almost all inline comments. The only comment left te address is @rsmith's comment about renaming `BuildDependentCoawaitExpr`. https://reviews.llvm.org/D2

[PATCH] D26057: [coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.

2017-02-13 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88304. EricWF added a comment. Re-add tests that got lost in the merge. https://reviews.llvm.org/D26057 Files: include/clang/AST/ExprCXX.h include/clang/AST/RecursiveASTVisitor.h include/clang/AST/Stmt.h include/clang/AST/StmtCXX.h include/clang/Ba

[PATCH] D26057: [coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.

2017-02-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88319. EricWF added a comment. - More cleanup - Rename `BuildCoawaitExpr` -> `BuildResolvedCoawaitExpr` and `BuildDependentCoawaitExpr` -> `BuildUnresolvedCoawaitExpr`. https://reviews.llvm.org/D26057 Files: include/clang/AST/ExprCXX.h include/clang/AST

[PATCH] D26057: [coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.

2017-02-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88325. EricWF added a comment. Add more tests. https://reviews.llvm.org/D26057 Files: include/clang/AST/ExprCXX.h include/clang/AST/RecursiveASTVisitor.h include/clang/AST/Stmt.h include/clang/AST/StmtCXX.h include/clang/Basic/DiagnosticSemaKinds.t

[PATCH] D29930: Add `__is_direct_constructible` trait for checking safe reference initialization.

2017-02-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. The STL types `std::pair` and `std::tuple` can both store reference types. However their constructors cannot adequately check if the initialization of reference types is safe. For example: std::tuple const&> t = 42; // The stored reference is already dangling.

[PATCH] D29930: Add `__is_direct_constructible` trait for checking safe reference initialization.

2017-02-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D29930#676858, @rsmith wrote: > I don't like this name; it sounds too much like you're asking whether a > certain direct-initialization is possible, which is what `__is_constructible` > does. I also don't like the idea of combining an "is this

[PATCH] D29930: Add `__reference_binds_to_temporary` trait for checking safe reference initialization.

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88794. EricWF retitled this revision from "Add `__is_direct_constructible` trait for checking safe reference initialization." to "Add `__reference_binds_to_temporary` trait for checking safe reference initialization.". EricWF edited the summary of this revisi

[PATCH] D29930: Add `__reference_binds_to_temporary` trait for checking safe reference initialization.

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88795. EricWF added a comment. Remove test code that snuck in. https://reviews.llvm.org/D29930 Files: docs/LanguageExtensions.rst include/clang/Basic/TokenKinds.def include/clang/Basic/TypeTraits.h lib/Parse/ParseDeclCXX.cpp lib/Parse/ParseExpr.cpp

[PATCH] D29863: [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types.

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88803. EricWF added a comment. - Enumerate and test each constructor. https://reviews.llvm.org/D29863 Files: include/string test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp utils/libcxx/test/config.py Index: utils/libcxx/te

[PATCH] D29863: [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types.

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp:57 + { // Testing (2) +// FIXME: (2) doesn't work with implicit deduction. +// const test_allocator alloc{}; rsmith wrote: > I think t

[PATCH] D29863: [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types.

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88812. EricWF added a comment. - Clarify comments about conforming constructors that still don't support guides. https://reviews.llvm.org/D29863 Files: include/string test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp test/su

<    4   5   6   7   8   9   10   11   >