[PATCH] D30035: Add const to function parameters

2017-02-16 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 change is ABI breaking because these functions are exported using explicit template instantiations, and because changing their signature changes the mangling. Can you explain w

[PATCH] D29818: [libcxx] Threading support: Attempt to externalize system_clock::now() and steady_clock::now() implementations

2017-02-16 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 really don't like this change (and https://reviews.llvm.org/D29757) because they start to include a ton of extra headers, and because they lift complex configuration logic into wha

[PATCH] D29757: [libcxx] Threading support: Externalize hardware_concurrency()

2017-02-16 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. Same comment as https://reviews.llvm.org/D29818 I really don't like this change (and https://reviews.llvm.org/D29818) because they start to include a ton of extra headers, and becaus

[PATCH] D29157: [libc++] Make _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS export members

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/string:1100 template +inline _LIBCPP_INLINE_VISIBILITY typename enable_if Why `inline _LIBCPP_INLINE_VISIBILITY` here but `_LIBCPP_HIDDEN` everywhere else? https://reviews.llvm.org/D29157

[PATCH] D29157: [libc++] Make _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS export members

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I applied `inline` to most of the functions changed in `basic_string`, and updated the ABI lists accordingly. Please update this patch so it merges with trunk. Note you can add `_LIBCPP_HIDDEN` to the functions in `basic_string` as well if you want, however the `inline`

[PATCH] D29157: [libc++] Make _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS export members

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/locale:626 template +_LIBCPP_HIDDEN iter_type __do_get_floating_point After applying the changes to `__config` but not this header `check-cxx-abilist` didn't report any changes to these symbols. Wh

[PATCH] D30045: Remove `std::random_shuffle` in C++17

2017-02-16 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 fixing inline comments. Comment at: include/algorithm:3029 +#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE) class _LIBCPP_TYP

[PATCH] D28172: [libcxx] Remove unexpected handlers in C++17

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88843. EricWF added a comment. - Update so that it merges with master. - add `_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES` macro for re-enabling all removed C++17 features. https://reviews.llvm.org/D28172 Files: docs/UsingLibcxx.rst include/__config includ

[PATCH] D30045: Remove `std::random_shuffle` in C++17

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @mclow.lists A couple of additional things: - Add `_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE` to the `_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES` list in `__config`. - Add a test for that in `test/libcxx/depr/enable_removed_cpp17_features.pass.cpp` Comme

[PATCH] D26316: [coroutines] Build and pass coroutine_handle to await_suspend.

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88852. EricWF added a comment. - Update so that it merges with https://reviews.llvm.org/D26057 https://reviews.llvm.org/D26316 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaCoroutine.cpp lib/Sema/SemaExprMember.cpp test/CodeGenCorout

[PATCH] D30082: Fix assertion when generating debug information for deduced template specialization types.

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Herald added a subscriber: aprantl. Currently the following code hits an `llvm_unreachable` in `CGDebugInfo::CreateTypeNode` because `DeducedTemplateSpecialization` isn't handled. // clang++ -std=c++1z -g test.cpp template struct S { S(T) {} }; S s(42); Th

[PATCH] D30082: Fix assertion when generating debug information for deduced template specialization types.

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88859. EricWF added a comment. Remove unintentional changes. https://reviews.llvm.org/D30082 Files: lib/CodeGen/CGDebugInfo.cpp test/CodeGenCXX/debug-info-template-deduction-guide.cpp Index: test/CodeGenCXX/debug-info-template-deduction-guide.cpp =

[PATCH] D30082: Fix assertion when generating debug information for deduced template specialization types.

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:2479 +case Type::DeducedTemplateSpecialization: { + QualType DT = dyn_cast(T)->getDeducedType(); + assert(!DT.isNull() && "Undeduced types shouldn't reach

[PATCH] D30082: Fix assertion when generating debug information for deduced template specialization types.

2017-02-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88861. EricWF marked an inline comment as done. EricWF added a comment. Address @majnemer's comments. https://reviews.llvm.org/D30082 Files: lib/CodeGen/CGDebugInfo.cpp test/CodeGenCXX/debug-info-template-deduction-guide.cpp Index: test/CodeGenCXX/debu

[PATCH] D30082: Fix assertion when generating debug information for deduced template specialization types.

2017-02-17 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:2478 break; +case Type::DeducedTemplateSpecialization: { + QualType DT = cast(T)->getDeducedType(); I'll put this in alphabetical order before committing. https://reviews.llv

[PATCH] D30082: Fix assertion when generating debug information for deduced template specialization types.

2017-02-17 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88943. EricWF marked 2 inline comments as done. EricWF added a comment. Address @rsmith's review comments. https://reviews.llvm.org/D30082 Files: lib/CodeGen/CGDebugInfo.cpp test/CodeGenCXX/debug-info-template-deduction-guide.cpp Index: test/CodeGenCXX

[PATCH] D30339: [libcxxabi] Disable calls to fprintf when building for baremetal targets in release mode

2017-02-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. isn't this incorrect because `config.h` always defines LIBCXX_BAREMETAL? Repository: rL LLVM https://reviews.llvm.org/D30339 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D30343: [libcxxabi] Fix condition typo in rL296136

2017-02-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. This works for me, but the idiomatic macro usage in libc++, and (hopefully) libc++abi should always use `defined(FOO)` as opposed to `!FOO`. I'll clean this up in the next week if nobody else wants to. Repository: rL LLVM https://reviews.llvm.org/D30343 __

[PATCH] D30339: [libcxxabi] Disable calls to fprintf when building for baremetal targets in release mode

2017-02-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D30339#685921, @jroelofs wrote: > In https://reviews.llvm.org/D30339#685919, @rmaprath wrote: > > > Perhaps change `config.h` and remove the definition there and adjust other > > places accordingly? > > > > The current form is very easy to trip

[PATCH] D29157: [libc++] Make _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS export members

2017-02-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. LGTM, but with a macro other than `_LIBCPP_HIDDEN`. Also could you please add doc explaining the rational for this new macro in depth. I think the summary for this revision would be sufficient

[PATCH] D29157: [libc++] Make _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS export members

2017-02-28 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/string:1100 template +inline _LIBCPP_INLINE_VISIBILITY typename enable_if smeenai wrote: > EricWF wrote: > > Why `inline _LIBCPP_INLINE_VISIBILITY` here but `_LIBCPP_HIDDEN` everywhere > > e

[PATCH] D26949: [libc++abi] Clean up visibility

2017-02-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. LGTM minus inline comments. @smeenai confirmed that this patch doesn't change the ABI list for `libc++abi.dylib` using `sym_check.py`. Comment at: src/abort_message.h:19

[PATCH] D27387: [libc++] Add a key function for bad_function_call

2017-02-28 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/functional:1393 +public: +virtual ~bad_function_call() _NOEXCEPT; + What's the rationale for making the dtor out-of-line? Couldn't we just use `what()` as the key function? Comment at: lib/

[PATCH] D30268: Avoid copy of __atoms when char_type is char

2017-02-28 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. `__num_get` is externally instantiated. Adding non-template methods or changing method signatures is ABI breaking (As shown by the `check-cxx-abilist` rule output

[PATCH] D30459: [libcxxabi] Clean up macro usage

2017-02-28 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I renamed `LIBCXXABI_ARM_EHABI` to `_LIBCXXABI_ARM_EHABI` so you'll have to merge this change with that. Other than that this LGTM. https://reviews.llvm.org/D30459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D27387: [libc++] Add a key function for bad_function_call

2017-02-28 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/functional:1393 +public: +virtual ~bad_function_call() _NOEXCEPT; + smeenai wrote: > EricWF wrote: > > What's the rationale for making the dtor out-of-line? Couldn't we just use > > `what()` as the key functi

[PATCH] D30516: [libc++] Add option to disable new/delete overloads when libc++abi provides them.

2017-03-01 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Currently both libc++ and libc++abi provide definitions for operator new/delete. However I believe this is incorrect and that one or the other should offer them. This patch adds the CMake option `-DLIBCXX_ENABLE_NEW_DELETE_DEFINITIONS` which defaults no `ON` unles

[PATCH] D30517: [libc++abi] Add option to enable definitions for the new/delete overloads.

2017-03-01 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Currently both libc++ and libc++abi provide definitions for operator new/delete. However I believe this is incorrect and that one or the other should offer them. This patch adds the CMake option `-DLIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS` which defaults to `OFF` u

[PATCH] D30214: [Driver] Search for libc++ headers in ResourceDir

2017-03-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D30214#690774, @jroelofs wrote: > In https://reviews.llvm.org/D30214#690375, @Hahnfeld wrote: > > > In https://reviews.llvm.org/D30214#690010, @jroelofs wrote: > > > > > libc++ headers should not be installed in the resource dir. > > > > > > The

[PATCH] D30517: [libc++abi] Add option to enable definitions for the new/delete overloads.

2017-03-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D30517#690328, @mehdi_amini wrote: > LGTM. Comment at: CMakeLists.txt:416 +set(LIBCXXABI_HAS_UNDEFINED_SYMBOLS ((NOT LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS) +OR (LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY AND LIBCXXABI_

[PATCH] D30597: [libc++] Attempt to improve diagnostics about Hash requirement violations

2017-03-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This is my attempt to improve the diagnostic messages emitted from the unordered containers when the supplied hash doesn't meet the `Hash` requirements. Unfortunately producing reasonable diagnostics is tricky and it requires a bunch of meta-programming to get rig

[PATCH] D25417: [libcxxabi] Fix alignment of allocated exceptions in 32 bit builds

2017-03-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 90561. EricWF added a comment. Merge with master https://reviews.llvm.org/D25417 Files: src/cxa_exception.cpp src/fallback_malloc.cpp src/fallback_malloc.h test/test_exception_address_alignment.pass.cpp Index: test/test_exception_address_alignment.p

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

2017-03-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 90752. EricWF marked an inline comment as done. EricWF added a comment. - Address @rsmith's final review comments. https://reviews.llvm.org/D26057 Files: include/clang/AST/ExprCXX.h include/clang/AST/RecursiveASTVisitor.h include/clang/AST/Stmt.h inc

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

2017-03-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/clang/Sema/ScopeInfo.h:138-140 + /// \brief Whether this function has already built, or tried to build, the + /// the initial and final coroutine suspend points. + bool NeedsCoroutineSuspends : 1; rsmith wrote:

[PATCH] D26316: [coroutines] Build and pass coroutine_handle to await_suspend.

2017-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. This LGTM, but I don't know enough Clang to be 100% on it. Perhaps somebody else could give it a quick second look? Comment at: lib/Sema/SemaCoroutine.cpp:157 + if (S.RequireCompleteType(Loc, CoroHandleType, +diag::err_corou

[PATCH] D26316: [coroutines] Build and pass coroutine_handle to await_suspend.

2017-03-08 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. On second thought if @rsmith already reviewed most of this offline then I feel comfortable giving it the thumbs up. https://reviews.llvm.org/D26316

[PATCH] D26316: [coroutines] Build and pass coroutine_handle to await_suspend.

2017-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @GorNishanov You forgot to update `test/SemaCXX/coreturn.cpp`. https://reviews.llvm.org/D26316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30764: Disable unsigned integer sanitizer for basic_string::replace()

2017-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/string:2559 // replace +// __sz += __n2 - __n1; in the two functions below can cause unsigned integer overflow, +// but this is a safe operation, so we disable the check. Please put this comment inside one of th

[PATCH] D30764: Disable unsigned integer sanitizer for basic_string::replace()

2017-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Side note: There are plenty of tests in the test-suite that trigger this overflow, so no new tests are needed. When I have time I'm going to enable `-fsanitize=unsigned-integer-overflow` once I have time to clean up any existing failures. https://reviews.llvm.org/D3076

[PATCH] D30764: Disable unsigned integer sanitizer for basic_string::replace()

2017-03-08 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. @Tom Do you have commit acces or would you like me to commit this for you? https://reviews.llvm.org/D30764 ___ cfe-commits mailing list cfe-commi

[PATCH] D30764: Disable unsigned integer sanitizer for basic_string::replace()

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

[PATCH] D30772: [coroutines] Fix assertion in DependentCoawaitExpr when the argument is non-dependent.

2017-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Herald added a subscriber: mehdi_amini. A `co_await arg` expression has a dependent type whenever the promise type is still dependent, even if the argument to co_await is not. This is because we cannot attempt the `await_transform()` until after we know the promise

[PATCH] D30773: Make git-clang-format python 3 compatible

2017-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch attempts to make `git-clang-format` both python2 and python3 compatible. Currently it only works in python2. https://reviews.llvm.org/D30773 Files: tools/clang-format/git-clang-format Index: tools/clang-format/git-clang-format ===

[PATCH] D30773: Make git-clang-format python 3 compatible

2017-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF planned changes to this revision. EricWF added a comment. There seem to be a couple cases where it's non-trivial to convert the output from `bytes` to `str`. I'll look into this further and update. https://reviews.llvm.org/D30773 ___ cfe-com

[PATCH] D30773: Make git-clang-format python 3 compatible

2017-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D30773#696349, @mgorny wrote: > In https://reviews.llvm.org/D30773#696301, @EricWF wrote: > > > There seem to be a couple cases where it's non-trivial to convert the > > output from `bytes` to `str`. I'll look into this further and update. > >

[PATCH] D30776: [coroutines] Fix diagnostics depending on the first coroutine statement.

2017-03-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Herald added a subscriber: mehdi_amini. Some coroutine diagnostics need to point to the location of the first coroutine keyword in the function, like when diagnosing a `return` inside a coroutine. Previously we did this by storing each *valid* coroutine statement in

[PATCH] D30773: Make git-clang-format python 3 compatible

2017-03-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 4 inline comments as done. EricWF added inline comments. Comment at: tools/clang-format/git-clang-format:323 allowed_extensions = frozenset(allowed_extensions) - for filename in dictionary.keys(): + for filename in list(dictionary.keys()): base_ext = filen

[PATCH] D30773: Make git-clang-format python 3 compatible

2017-03-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 2 inline comments as done. EricWF added inline comments. Comment at: tools/clang-format/git-clang-format:323 allowed_extensions = frozenset(allowed_extensions) - for filename in dictionary.keys(): + for filename in list(dictionary.keys()): base_ext = filen

[PATCH] D30773: Make git-clang-format python 3 compatible

2017-03-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 91145. EricWF added a comment. This still isn't working in python3 due to more bytes vs str issues, but this is my progress so far. https://reviews.llvm.org/D30773 Files: tools/clang-format/git-clang-format Index: tools/clang-format/git-clang-format

[PATCH] D30776: [coroutines] Fix diagnostics depending on the first coroutine statement.

2017-03-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Good to know. I'll update this tomorrow. https://reviews.llvm.org/D30776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30837: [libcxx] Support for shared_ptr

2017-03-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. We can't just use an arbitrary allocator type for a number of reasons: - You just changed the type of the control block. That's ABI breaking. - `allocator` allocates ints, nothing els

[PATCH] D30776: [coroutines] Fix diagnostics depending on the first coroutine statement.

2017-03-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D30776#697258, @GorNishanov wrote: > In https://reviews.llvm.org/D30776#697233, @EricWF wrote: > > > Good to know. I'll update this tomorrow. > > > Well, that is just the thought. Possibly we can check for the types of > await_ready and await_s

[PATCH] D30775: [coroutines] Refactor SuspendExpr to create just one OpaqueValue (almost NFC)

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

[PATCH] D30776: [coroutines] Fix diagnostics depending on the first coroutine statement.

2017-03-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 91447. EricWF added a comment. Merge with master. https://reviews.llvm.org/D30776 Files: include/clang/Sema/ScopeInfo.h lib/Sema/ScopeInfo.cpp lib/Sema/SemaCoroutine.cpp lib/Sema/TreeTransform.h test/SemaCXX/coroutines.cpp Index: test/SemaCXX/coro

[PATCH] D30773: Make git-clang-format python 3 compatible

2017-03-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 91449. EricWF added a comment. Add complete implementation. As far as I've tested this works perfectly in both python2 and python3. https://reviews.llvm.org/D30773 Files: tools/clang-format/git-clang-format Index: tools/clang-format/git-clang-format

[PATCH] D30773: Make git-clang-format python 3 compatible

2017-03-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 4 inline comments as done. EricWF added inline comments. Comment at: tools/clang-format/git-clang-format:293 +def to_bytes(str): +# Encode to UTF-8 to get binary data. These functions are all lifted directly from `lit/util.py` ==

[PATCH] D30773: Make git-clang-format python 3 compatible

2017-03-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 91452. EricWF marked an inline comment as done. EricWF added a comment. - rename variables so they don't conflict with type names. https://reviews.llvm.org/D30773 Files: tools/clang-format/git-clang-format Index: tools/clang-format/git-clang-format ==

[PATCH] D30773: Make git-clang-format python 3 compatible

2017-03-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: tools/clang-format/git-clang-format:306 +try: +return to_string(bytes.decode('utf-8')) +except AttributeError: # 'str' object has no attribute 'decode'. mgorny wrote: > EricWF wrote: > > mgorny wrote: > >

[PATCH] D30773: Make git-clang-format python 3 compatible

2017-03-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 91456. EricWF added a comment. - Rewrite `to_string` for clarities sake. https://reviews.llvm.org/D30773 Files: tools/clang-format/git-clang-format Index: tools/clang-format/git-clang-format

[PATCH] D30859: [coroutines] Implement unhandled_exception changes.

2017-03-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Herald added a subscriber: mehdi_amini. This patch adopts the recent changes that renamed `set_exception(exception_pointer)` to `unhandled_exception()`. Additionally `unhandled_exception()` is now required, and so an error is emitted when exceptions are enabled but

[PATCH] D30859: [coroutines] Implement unhandled_exception changes.

2017-03-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 91468. EricWF added a comment. - Remove unused diagnostics about `set_exception` and `current_exception`. https://reviews.llvm.org/D30859 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaCoroutine.c

[PATCH] D27005: [lit] Support custom parsers in parseIntegratedTestScript

2016-12-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 80168. EricWF added a comment. - Add unit tests as requested. This patch is ready to go. If there are no objections in the next day or two I'll commit it. https://reviews.llvm.org/D27005 Files: utils/lit/lit/TestRunner.py utils/lit/tests/Inputs/testrun

[PATCH] D26896: [libcxx] Make constexpr char_traits and char_traits

2016-12-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. FYI there is a relevent GCC bug here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71537 https://reviews.llvm.org/D26896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D27310: Handle tests for noexcept that expect a false value

2016-12-02 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. Have you tested this against GCC which has different noexcept semantics? If so this LGTM minus possibly addressing the inline comments. Comment at: test/libcxx/strings/itera

[PATCH] D27268: [libcxx] [test] Fix MSVC x64 warning C4267 "conversion from 'size_t' to 'int' [or 'unsigned int'], possible loss of data", part 2/4.

2016-12-02 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 nix inline comments. Please fix `MemCounter` to use `size_t` instead. Comment at: test/support/count_new.hpp:62 int delete_called; int last_new_size; ---

[PATCH] D27021: [libcxx] [test] Fix MSVC warning C4389 "signed/unsigned mismatch", part 8/12.

2016-12-02 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/D27021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D27022: [libcxx] [test] Fix MSVC warning C4389 "signed/unsigned mismatch", part 9/12.

2016-12-02 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 may have considered doing the cast to `ptrdiff_t` for the other operand instead of the `size_t` cast, but IDK which is better. https://reviews.llvm.org/D27022

[PATCH] D27023: [libcxx] [test] Fix MSVC warning C4389 "signed/unsigned mismatch", part 10/12.

2016-12-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. LGTM. Feel free to address the inline comments or not. Comment at: test/std/containers/sequences/deque/deque.capacity/access.pass.cpp:55 std::deque c = make >(10); for (unsigned i = 0; i < 10; ++i) +assert(c[i] == static_c

[PATCH] D27267: [libcxx] [test] Fix MSVC x64 warning C4267 "conversion from 'size_t' to 'int' [or 'unsigned int'], possible loss of data", part 1/4.

2016-12-02 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. Random thought: It would be nice for C++ to have a `non_truncating_cast(value)` which generated an error when the conversion performs a truncation. This seems like the behavior we want

[PATCH] D27269: [libcxx] [test] Fix MSVC x64 warning C4267 "conversion from 'size_t' to 'int' [or 'unsigned int'], possible loss of data", part 3/4.

2016-12-02 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/D27269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D27384: [libclang] Restore clang_getNumTemplateArguments/clang_getTemplateArgumentAsType functionality

2016-12-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Sorry about Herald adding me as a reviewer. I need to fix my filters. https://reviews.llvm.org/D27384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27387: [libc++] Add a key function for bad_function_call

2016-12-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I wonder if we should consider this a breaking ABI change and control it using a `_LIBCPP_ABI` macro. @mclow.lists thoughts? https://reviews.llvm.org/D27387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

[PATCH] D27387: [libc++] Add a key function for bad_function_call

2016-12-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: src/functional.cpp:1 +//===--- functional.cpp ---===// +// smeenai wrote: > Should I clang-format new files? I based the style of this file on the > existing source files,

[PATCH] D27402: [libc++] Implement pmr::monotonic_buffer_resource

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added a reviewer: mclow.lists. EricWF added a subscriber: cfe-commits. Implemented from the LFTS v2 spec here: https://rawgit.com/cplusplus/fundamentals-ts/v2/main.html#memory.resource.monotonic.buffer. This patch could use some finishing touches, but for the

[PATCH] D27387: [libc++] Add a key function for bad_function_call

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a reviewer: dexonsmith. EricWF added a subscriber: dexonsmith. EricWF added a comment. In https://reviews.llvm.org/D27387#613071, @smeenai wrote: > In https://reviews.llvm.org/D27387#612975, @EricWF wrote: > > > I wonder if we should consider this a breaking ABI change and control it

[PATCH] D27277: Make _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR user-settable

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @dim Do you still need this to fix the chromium bug? https://reviews.llvm.org/D27277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26934: [libc++] Add _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS

2016-12-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. In https://reviews.llvm.org/D26934#604325, @smeenai wrote: > I'd prefer `#error`; that way we can eventually just drop the macro. Ideally > there wouldn't be too many users to begin with, sinc

[PATCH] D27167: [libc++] Support multibyte decimal_point and thousands_sep

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Huh, I thought I had already fixed this but apparently I forgot to commit the patch. You can find my fix here: https://reviews.llvm.org/D24218 https://reviews.llvm.org/D27167 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D27204: [libcxxabi] Introduce an externally threaded libc++abi variant

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. My main issue with this patch (and https://reviews.llvm.org/D27206) is that there are now two different CMake options for building two different external threading libraries. I would much prefer having libc++abi use libc++'s `__threading_support` header and `cxx_external

[PATCH] D27153: [libc++] Make __num_get_float hidden

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D27153#606296, @smeenai wrote: > I'm having some second thoughts about this. Visibility for template functions > makes my head spin :/ Is there a general policy we've been following for > these? I didn't find much just scanning through other d

[PATCH] D27310: Handle tests for noexcept that expect a false value

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Please address the inline comments before committing. Comment at: test/libcxx/strings/iterators.exceptions.pass.cpp:29 +#ifndef TEST_HAS_NO_EXCEPTIONS +constexpr bool expected = false; +#else We can't use constexpr because these tests ru

[PATCH] D26896: [libcxx] Make constexpr char_traits and char_traits

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. The tests LGTM. The implementation still needs some tweaks. Thanks for working on this. Comment at: include/__config:925 +#if !__has_builtin(__builtin_memcpy) +#define _LIBCPP_HAS_NO_BUILTIN_MEMCPY AntonBikineev wrote: > EricWF wrote:

[PATCH] D27162: Support relaxed constexpr on chrono::duration operations

2016-12-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 as well. https://reviews.llvm.org/D27162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D27310: Handle tests for noexcept that expect a false value

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: test/libcxx/strings/iterators.exceptions.pass.cpp:29 +#ifndef TEST_HAS_NO_EXCEPTIONS +constexpr bool expected = false; +#else rogfer01 wrote: > EricWF wrote: > > We can't use constexpr because these tests run in C++03. Ho

[PATCH] D27204: [libcxxabi] Introduce an externally threaded libc++abi variant

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D27204#613172, @rmaprath wrote: > In https://reviews.llvm.org/D27204#613122, @EricWF wrote: > > > My main issue with this patch (and https://reviews.llvm.org/D27206) is that > > there are now two different CMake options for building two differe

[PATCH] D27068: Improve string::find

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @mclow.lists I'm going to leave this review up to you. I don't see any immediate issues. https://reviews.llvm.org/D27068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D26376: Undef stdatomic.h macro definitions that are defining functions provided in libc++

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Yeah this seems like a configuration that simply can't be supported. I'm not sure if this patch is a great idea. https://reviews.llvm.org/D26376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D27439: [libcxx][modules] Fix 's module definition

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: rsmith, manmanren, bruno. EricWF added subscribers: cfe-commits, rsmith. Currently libc++'s `stddef.h` is treated as a textual header by the module map, and technically this is correct because the header is non-modular (at least during normal

[PATCH] D27436: [libcxx] [test] std::get<0>([std::variant constant expression]) *is* noexcept

2016-12-05 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/variant/variant.get/get_index.pass.cpp:39 constexpr V v(42); -ASSERT_NOT_NOEXCEPT(std::get<0>(v)); +#ifndef __clang__ +ASSERT_

[PATCH] D27424: Add the diagnose_if attribute to clang.

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Awesome, this is exactly what I was hoping for! Thanks for working on this! I'm a bit surprised that the attribute fails to evaluate the condition as a constant expression during the evaluation of constexpr functions. Ex: #define DIAG(...) __attribute__((diagnose_if(_

[PATCH] D27434: [libc++abi] Disable failing test on Darwin

2016-12-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. If this caused by a bug it should be marked `XFAIL` and have a comment explaining why it fails and links to the relevant PR's. Feel free to commit after making those changes. https://reviews

[PATCH] D25417: [libcxxabi] Fix alignment of allocated exceptions in 32 bit builds

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 80658. EricWF added a comment. - Use `_aligned_malloc` on windows. - Ensure `posix_memalign` isn't called with a size of `0`. I'm 99% sure that's currently impossible but we might as well handle it. I'll commit after testing on OS X. https://reviews.llvm.or

[PATCH] D25417: [libcxxabi] Fix alignment of allocated exceptions in 32 bit builds

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I ran into some test failures on OS X while attempting to commit this. The `unwind.h` header provided on OS X hasn't upstreamed the libunwind fix from r276215 , meaning `__cxa_exception` is still under-aligned and therefore so is the exc

[PATCH] D27564: [libcxx] Fix __compressed_pair so it doesn't copy the argument multiple times

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added a reviewer: mclow.lists. EricWF added subscribers: cfe-commits, loladiro. __compressed_pair takes and passes it's constructor arguments by value. This causes arguments to be moved 3 times instead of once. This patch addresses that issue and fixes `const

[PATCH] D27564: [libcxx] Fix __compressed_pair so it doesn't copy the argument multiple times

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Ideally I would like to re-write `__compressed_pair` so that it doesn't need 4 complete specializations but I'm not sure the change would be non-ABI breaking. https://reviews.llvm.org/D27564 ___ cfe-commits mailing list cfe-

[PATCH] D27565: [libcxx] Alternative fix for compressed pair

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added a reviewer: mclow.lists. EricWF added a subscriber: cfe-commits. I would rather have this fix than https://reviews.llvm.org/D27564, but I'm not yet sure it isn't ABI breaking. https://reviews.llvm.org/D27565 Files: include/__hash_table include/mem

[PATCH] D27565: [libcxx] Alternative fix for compressed pair

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 80715. EricWF added a comment. Remove ever more dead code. https://reviews.llvm.org/D27565 Files: include/__hash_table include/memory include/string test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.fail.cpp

[PATCH] D27565: [libcxx] Alternative fix for compressed pair

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Grr... OK so this is currently ABI breaking because it re-arranges the layout of `__compressed_pair` when `T2` is empty but `T1` is not. I might be able to work around this with some metaprogramming. https://reviews.llvm.org/D27565 ___

[PATCH] D27566: Fix PR30323: numeric_limits::max_digits10 when using 16 bit ints.

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added a reviewer: mclow.lists. EricWF added a subscriber: cfe-commits. Also see https://llvm.org/bugs/show_bug.cgi?id=30323 https://reviews.llvm.org/D27566 Files: include/limits Index: include/limits ==

[PATCH] D27429: [Chrono][Darwin] On Darwin use CLOCK_UPTIME_RAW instead of CLOCK_MONOTONIC

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I'm not sure `CLOCK_UPTIME_RAW` meets the requirements of `steady_clock`. The manpage for `clock_gettime` on OS X specifies `CLOCK_UPTIME_RAW` as: > CLOCK_UPTIME_RAW clock that increments monotonically, in the same manner as > CLOCK_MONOTONIC_RAW, but that does not in

<    5   6   7   8   9   10   11   >