[PATCH] D28226: threading_support: introduce __libcpp_recursive_mutex_t

2017-01-02 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: include/__threading_support:82 +typename = typename _VSTD::enable_if::value>::type> + _LIBCPP_CONSTEXPR indentation looks a bit strange Repository: rL LLVM https://reviews.llvm.org/D28226 _

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: include/__threading_support:46 +inline _LIBCPP_INLINE_VISIBILITY +int __libcpp_recursive_mutex_init(__libcpp_mutex_t *__m); + EricWF wrote: > The forward declarations of the `__libcpp_` threading wrapper should be > sh

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82846. compnerd added a comment. add more context Repository: rL LLVM https://reviews.llvm.org/D28220 Files: include/__config include/__threading_support Index: include/__threading_support ===

[PATCH] D28226: threading_support: introduce __libcpp_recursive_mutex_t

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82845. compnerd added a comment. add more context Repository: rL LLVM https://reviews.llvm.org/D28226 Files: include/__threading_support include/mutex Index: include/mutex === --- incl

[PATCH] D28226: threading_support: introduce __libcpp_recursive_mutex_t

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: EricWF, mclow.lists. compnerd added subscribers: majnemer, smeenai, kastiglione, cfe-commits. compnerd set the repository for this revision to rL LLVM. Introduce the new `__libcpp_recursive_mutex_t` which differentiates between a recursive

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82843. compnerd added a comment. update for separation of mutex and recursive_mutex. Repository: rL LLVM https://reviews.llvm.org/D28220 Files: include/__config include/__threading_support Index: include/__threading_support

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/__threading_support:44 +#define WIN32_LEAN_AND_MEAN +#define VC_EXTRA_LEAN +#include Do these definitions have any affect when `` has already been included? Also are these definitions required before including t

Re: [libcxx] r290856 - build: remove now unused UNIX_CAT

2017-01-02 Thread Eric Fiselier via cfe-commits
Woops. Thanks for cleaning up that dead code. On Mon, Jan 2, 2017 at 9:23 PM, Saleem Abdulrasool via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: compnerd > Date: Mon Jan 2 22:23:50 2017 > New Revision: 290856 > > URL: http://llvm.org/viewvc/llvm-project?rev=290856&view=rev > Log:

[PATCH] D28224: [libcxx, regex] Throw exception after too many steps.

2017-01-02 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. I defined and exported a macro _LIBCPP_REGEX_COMPLEXITY_FACTOR in the hope that even when the library is shipped to the user, and when the user finds the factor to be inappropriate, they can override it. I'm not aware of and exported macro policy though, please advice.

[PATCH] D28224: [libcxx, regex] Throw exception after too many steps.

2017-01-02 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 82840. timshen added a comment. Detect user defined _LIBCPP_REGEX_COMPLEXITY_FACTOR first. https://reviews.llvm.org/D28224 Files: libcxx/include/regex libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp libcxx/test/std/re/re.alg/re.alg.search/

[PATCH] D28224: [libcxx, regex] Throw exception after too many steps.

2017-01-02 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added a reviewer: mclow.lists. timshen added a subscriber: cfe-commits. Herald added a reviewer: EricWF. This prevents the backtracking regex engines from "hanging forever" under certain input. https://reviews.llvm.org/D28224 Files: libcxx/include/regex

[PATCH] D28223: clean up use of _WIN32

2017-01-02 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Sweet. Comment at: include/__config:158 +#if defined(_WIN32) +# define _LIBCPP_WIN32 1 # define _LIBCPP_LITTLE_ENDIAN 1 Perhaps `_LIBCPP_WIN32API` instead, to be clear that this is specific to the usage of Win32 APIs, rather

[PATCH] D28223: clean up use of _WIN32

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: EricWF, mclow.lists, smeenai. compnerd added a subscriber: cfe-commits. compnerd set the repository for this revision to rL LLVM. Replace the use of `_WIN32` in libc++. Replace most use with a C runtime check `_LIBCPP_MSVCRT` or the new `

LLVM buildmaster will be restarted in few minutes

2017-01-02 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be updated and restarted in few minutes. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: include/__threading_support:300-305 +int __libcpp_recursive_mutex_init(__libcpp_mutex_t *__m) +{ + InitializeSRWLock(__m); + return 0; +} + majnemer wrote: > compnerd wrote: > > majnemer wrote: > > > I don't think you

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: include/__threading_support:83 +} __libcpp_mutex_t; +#define _LIBCPP_MUTEX_INITIALIZER {{0}, SRWLOCK_INIT, 0} + Why not a tagged union? Repository: rL LLVM https://reviews.llvm.org/D28220

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: include/__threading_support:300-305 +int __libcpp_recursive_mutex_init(__libcpp_mutex_t *__m) +{ + InitializeSRWLock(__m); + return 0; +} + compnerd wrote: > majnemer wrote: > > I don't think you can use slim rw locks

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Could you upload this patch with more context? Repository: rL LLVM https://reviews.llvm.org/D28220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82834. compnerd added a comment. switch between a CRITICAL_SECTION and SRWLOCK Repository: rL LLVM https://reviews.llvm.org/D28220 Files: include/__config include/__threading_support Index: include/__threading_support ==

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: include/__threading_support:300-305 +int __libcpp_recursive_mutex_init(__libcpp_mutex_t *__m) +{ + InitializeSRWLock(__m); + return 0; +} + majnemer wrote: > I don't think you can use slim rw locks for recursive locks

[libcxx] r290856 - build: remove now unused UNIX_CAT

2017-01-02 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Jan 2 22:23:50 2017 New Revision: 290856 URL: http://llvm.org/viewvc/llvm-project?rev=290856&view=rev Log: build: remove now unused UNIX_CAT THe previous change replaced the use of `cat` or `type` with a custom python script. Remove the now unused command determining.

[libcxx] r290857 - clang-format: tweak configuration

2017-01-02 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Jan 2 22:23:52 2017 New Revision: 290857 URL: http://llvm.org/viewvc/llvm-project?rev=290857&view=rev Log: clang-format: tweak configuration Update the configuration to reflect the style more accurately. Pointers are tied to the left. Braces are split on classes/stru

[PATCH] D28222: [libcxx] Re-implement LWG 2770 again: Fix tuple_size to work with structured bindings

2017-01-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 82832. EricWF added a comment. Use the correct patch file this time. https://reviews.llvm.org/D28222 Files: include/__tuple test/libcxx/test/config.py test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp test/std/utiliti

[PATCH] D28222: [libcxx] Re-implement LWG 2770 again: Fix tuple_size to work with structured bindings

2017-01-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: mclow.lists, rsmith. EricWF added a subscriber: cfe-commits. This patch attempts to re-implement a fix for LWG 2770, but not the actual specified PR. The PR for 2770 specifies tuple_size as only conditionally providing a `::value` member. Ho

[PATCH] D28081: Make GetStyle return Expected instead of FormatStyle

2017-01-02 Thread Antonio Maiorano via Phabricator via cfe-commits
amaiorano updated this revision to Diff 82831. amaiorano added a comment. More changes as suggested by @ioeric. I asked a question earlier about clang-tools-extras and understanding how not to break the build bots. If you can shed some light on that, I'd appreciate it, thanks :) https://review

[libcxx] r290853 - Fix creating __generated_config on Windows

2017-01-02 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jan 2 21:55:29 2017 New Revision: 290853 URL: http://llvm.org/viewvc/llvm-project?rev=290853&view=rev Log: Fix creating __generated_config on Windows Added: libcxx/trunk/utils/cat_files.py (with props) Modified: libcxx/trunk/include/CMakeLists.txt Modified: li

[PATCH] D28081: Make GetStyle return Expected instead of FormatStyle

2017-01-02 Thread Antonio Maiorano via Phabricator via cfe-commits
amaiorano added inline comments. Comment at: unittests/Format/FormatTestObjC.cpp:72 TEST_F(FormatTestObjC, DetectsObjCInHeaders) { - Style = getStyle("LLVM", "a.h", "none", "@interface\n" + Style = *getStyle("LLVM", "a.h", "none", "@interface\n"

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: include/__threading_support:300-305 +int __libcpp_recursive_mutex_init(__libcpp_mutex_t *__m) +{ + InitializeSRWLock(__m); + return 0; +} + I don't think you can use slim rw locks for recursive locks. I think we will

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82826. compnerd added a comment. Use SRW locks, rebase for avoid redeclaration of interfaces, remove static initialization check removals. Repository: rL LLVM https://reviews.llvm.org/D28220 Files: include/__config include/__threading_support Inde

Fix for Visual Studio 2017

2017-01-02 Thread Hamza Sood via cfe-commits
Visual Studio 2017 changes the layout of its compiler tools (described here: https://blogs.msdn.microsoft.com/vcblog/2016/10/07/compiler-tools-layout-in-visual-studio-15/). If there are no other Visual Studio versions installed, Clang will be unable to find link.exe and hence will fail at the lin

[libcxx] r290850 - threading_support: refactor for Win32 threading

2017-01-02 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Jan 2 20:00:31 2017 New Revision: 290850 URL: http://llvm.org/viewvc/llvm-project?rev=290850&view=rev Log: threading_support: refactor for Win32 threading Refactor the header to allow us to implement alternate threading models with alternate data structures. Take the

[libcxx] r290851 - system_error: provide a thread safe stringification for Windows

2017-01-02 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Jan 2 20:00:33 2017 New Revision: 290851 URL: http://llvm.org/viewvc/llvm-project?rev=290851&view=rev Log: system_error: provide a thread safe stringification for Windows Provide a strerror_r replacement for Windows. This is needed to build libc++ for Windows with thr

[PATCH] D28166: Properly merge K&R functions that have attributes

2017-01-02 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D28166#633621, @aaron.ballman wrote: > Do you think this patch should be gated on (or perhaps combined with) a fix > for the lowering bug, or do you think this patch is reasonable on its own? > Given that it turns working code into UB, I think

[PATCH] D28212: typeinfo: provide a partial implementation for Win32

2017-01-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF removed rL LLVM as the repository for this revision. EricWF updated this revision to Diff 82825. EricWF added a comment. Update with the prefered style changes. @compnerd please still this revision back when ready. https://reviews.llvm.org/D28212 Files: include/typeinfo src/typeinfo

[PATCH] D28212: typeinfo: provide a partial implementation for Win32

2017-01-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF commandeered this revision. EricWF edited reviewers, added: compnerd; removed: EricWF. EricWF added a comment. Stealing this revision to update with the requested style changes: @compnerd please steal this back. Repository: rL LLVM https://reviews.llvm.org/D28212 __

[libcxx] r290849 - Recommit r290839 - Fix configuring and building libc++ w/o an ABI library.

2017-01-02 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jan 2 19:18:48 2017 New Revision: 290849 URL: http://llvm.org/viewvc/llvm-project?rev=290849&view=rev Log: Recommit r290839 - Fix configuring and building libc++ w/o an ABI library. This patch re-commits a previous attempt to support building libc++ w/o an ABI library. T

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked 3 inline comments as done. compnerd added a comment. The SRW initializers avoid the initializer changes, so its one less set of changes that is necessary. Comment at: include/__threading_support:33 #include <__external_threading> +#elif defined(_WIN32) && defi

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D28220#633622, @compnerd wrote: > @majnemer Im using the Fls* APIs since they provide the thread termination > callback, which Tls* doesn't. Good point about the SRW. Those are newer, > but, we can always provide a fallback later. I don'

[PATCH] D28212: typeinfo: provide a partial implementation for Win32

2017-01-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I would really rather see a single definition of the `typeinfo` class between all platforms, but I see how that could get messy. How about instead of declaring a new one we use the existing class definition, but move all of the method definitions out-of-line and then def

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @majnemer Im using the Fls* APIs since they provide the thread termination callback, which Tls* doesn't. Good point about the SRW. Those are newer, but, we can always provide a fallback later. Repository: rL LLVM https://reviews.llvm.org/D28220 ___

[PATCH] D28166: Properly merge K&R functions that have attributes

2017-01-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D28166#633595, @rsmith wrote: > The test failure in test/CodeGen/microsoft-call-conv-x64.c definitely > indicates a problem. The code has defined behavior, but the IR you say we now > produce has undefined behavior due to a type mismatc

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Added inline comments. The main issue is that this patch needs to use the same `<__threading_support>` forward declarations as every other supported threading API; Only new definitions should be provided. Comment at: include/__threading_support:33 #i

[libcxxabi] r290847 - Fix new/delete exception specifications to match libc++ after r290845

2017-01-02 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jan 2 18:16:18 2017 New Revision: 290847 URL: http://llvm.org/viewvc/llvm-project?rev=290847&view=rev Log: Fix new/delete exception specifications to match libc++ after r290845 Modified: libcxxabi/trunk/src/cxa_new_delete.cpp Modified: libcxxabi/trunk/src/cxa_new_de

[libcxx] r290846 - Re-implement LWG 2770 - Fix tuple_size with structured bindings.

2017-01-02 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jan 2 17:54:13 2017 New Revision: 290846 URL: http://llvm.org/viewvc/llvm-project?rev=290846&view=rev Log: Re-implement LWG 2770 - Fix tuple_size with structured bindings. This patch implements the correct PR for LWG 2770. It also makes the primary tuple_size template in

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. slim reader-writer locks are faster than critical sections, I'd recommend your implementation switch to those. Also, why do you use Fls instead of Tls? Repository: rL LLVM https://reviews.llvm.org/D28220 ___ cfe-commit

[libcxx] r290845 - Fix use of throw(...) spec with GCC in C++17

2017-01-02 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jan 2 17:27:42 2017 New Revision: 290845 URL: http://llvm.org/viewvc/llvm-project?rev=290845&view=rev Log: Fix use of throw(...) spec with GCC in C++17 Modified: libcxx/trunk/include/new Modified: libcxx/trunk/include/new URL: http://llvm.org/viewvc/llvm-project/li

[PATCH] D28166: Properly merge K&R functions that have attributes

2017-01-02 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. The test failure in test/CodeGen/microsoft-call-conv-x64.c definitely indicates a problem. The code has defined behavior, but the IR you say we now produce has undefined behavior due to a type mismatch between the call and the callee. It looks to me like unprototyped `__

[PATCH] D28081: Make GetStyle return Expected instead of FormatStyle

2017-01-02 Thread Antonio Maiorano via Phabricator via cfe-commits
amaiorano added a comment. In https://reviews.llvm.org/D28081#633521, @ioeric wrote: > Some nits. Some is almost good :) > > BTW, do you have clang-tools-extra in your source tree? There are also some > references in the subtree to the changed interface. It would be nice if you > could also fix

r290843 - Add testcase for the regression introduced in r290808.

2017-01-02 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Jan 2 17:00:32 2017 New Revision: 290843 URL: http://llvm.org/viewvc/llvm-project?rev=290843&view=rev Log: Add testcase for the regression introduced in r290808. Modified: cfe/trunk/test/SemaTemplate/deduction.cpp Modified: cfe/trunk/test/SemaTemplate/deduction.cpp

r290842 - Remove isIgnored()-test that is more expensive than the analysis behind it

2017-01-02 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Jan 2 16:55:45 2017 New Revision: 290842 URL: http://llvm.org/viewvc/llvm-project?rev=290842&view=rev Log: Remove isIgnored()-test that is more expensive than the analysis behind it In many translation units I have tried, the calls to isIgnored() removed in this patch a

[PATCH] D28189: Extend documentation of how to test clang-tidy checks.

2017-01-02 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: docs/clang-tidy/index.rst:565 +An additional check enabled by ``check_clang_tidy.py`` ensures that +if `CHECK-MESSAGES:` is used in a file then every warning or error +must have an associated CHECK in that file. Looks lik

Re: [libcxx] r290840 - Introduce _LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR ABI option.

2017-01-02 Thread Eric Fiselier via cfe-commits
It already is. When the macro is defined the old definition is enabled, and only ABI v1 defines the macro. On Mon, Jan 2, 2017 at 3:41 PM, Saleem Abdulrasool wrote: > Do we want to enable this by default on other targets under > `LIBCXX_ABI_UNSTABLE` as well? > > On Mon, Jan 2, 2017 at 2:17 PM,

[PATCH] D28207: Add second fast path for DiagnosticsEngine::GetDiagStatePointForLoc

2017-01-02 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Basic/Diagnostic.cpp:179 + + // 2nd most frequent case: L is before the first diag state change. + FullSourceLoc FirstStateChangePos = DiagStatePoints[1].Loc; It's surprising to me that this would be particularly fr

[PATCH] D28218: Small optimizations for SourceManager::getFileID()

2017-01-02 Thread Daniel Jasper via Phabricator via cfe-commits
djasper created this revision. djasper added a reviewer: rsmith. djasper added a subscriber: cfe-commits. Specifically: - Separate one-entry cache for loaded and local files - Use bound that can be deduced from that cache for LessIndex - Address FIXME to use a faster alternative to isOffsetInFile

Re: [libcxx] r290840 - Introduce _LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR ABI option.

2017-01-02 Thread Saleem Abdulrasool via cfe-commits
Do we want to enable this by default on other targets under `LIBCXX_ABI_UNSTABLE` as well? On Mon, Jan 2, 2017 at 2:17 PM, Eric Fiselier via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: ericwf > Date: Mon Jan 2 16:17:51 2017 > New Revision: 290840 > > URL: http://llvm.org/viewvc/ll

[PATCH] D28210: system_error: inline error_category ctor on Win32

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd abandoned this revision. compnerd added a comment. WFM, that seems like a nicer option. Repository: rL LLVM https://reviews.llvm.org/D28210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[libcxx] r290841 - Revert r290839 - Fix configuring and building libc++ w/o an ABI library

2017-01-02 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jan 2 16:27:45 2017 New Revision: 290841 URL: http://llvm.org/viewvc/llvm-project?rev=290841&view=rev Log: Revert r290839 - Fix configuring and building libc++ w/o an ABI library Modified: libcxx/trunk/CMakeLists.txt libcxx/trunk/cmake/Modules/HandleLibCXXABI.cma

[PATCH] D28210: system_error: inline error_category ctor on Win32

2017-01-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I committed a different fix for this patch in r290840. Instead of just fixing this on Windows it makes the removal of this definition an ABI option, which it then disables on Windows by default. Repository: rL LLVM https://reviews.llvm.org/D28210 _

[libcxx] r290840 - Introduce _LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR ABI option.

2017-01-02 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jan 2 16:17:51 2017 New Revision: 290840 URL: http://llvm.org/viewvc/llvm-project?rev=290840&view=rev Log: Introduce _LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR ABI option. Currently libc++ compiles a special version of error_category() into the dylib. Thi

[PATCH] D28211: typeinfo: provide a destructor for type_info

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd abandoned this revision. compnerd added a comment. Thanks! Repository: rL LLVM https://reviews.llvm.org/D28211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28211: typeinfo: provide a destructor for type_info

2017-01-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I committed the fix needed for this as part of a larger change in r290839. Please abandon this revision. Repository: rL LLVM https://reviews.llvm.org/D28211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[libcxx] r290839 - Fix configuring and building libc++ w/o an ABI library.

2017-01-02 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jan 2 15:58:06 2017 New Revision: 290839 URL: http://llvm.org/viewvc/llvm-project?rev=290839&view=rev Log: Fix configuring and building libc++ w/o an ABI library. Typically libc++ uses libc++abi or libcxxrt to provide the ABI and runtime bits of the C++ STL. However we a

[clang-tools-extra] r290838 - Extend documentation of how to test clang-tidy checks.

2017-01-02 Thread James Dennett via cfe-commits
Author: jdennett Date: Mon Jan 2 15:45:34 2017 New Revision: 290838 URL: http://llvm.org/viewvc/llvm-project?rev=290838&view=rev Log: Extend documentation of how to test clang-tidy checks. Summary: The documentation assumed expertise with FileCheck; many clang-tidy check authors may not have sig

[PATCH] D28166: Properly merge K&R functions that have attributes

2017-01-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 82816. aaron.ballman added a comment. I've updated the patch to not hard code the type adjustments, but instead added `Type::getAsAdjusted()` and `TypeLoc::getAsAdjusted()`. This patch has one broken test case, but I do not think the test case was bein

[PATCH] D28189: Extend documentation of how to test clang-tidy checks.

2017-01-02 Thread James Dennett via Phabricator via cfe-commits
jdennett updated this revision to Diff 82818. jdennett added a comment. Addressed review comments: double-backtick quoting, underscores for references to FileCheck, and change "matcher tests" to "clang-tidy tests". https://reviews.llvm.org/D28189 Files: docs/clang-tidy/index.rst Index: docs

[libcxx] r290837 - build: tweak macros for Windows build

2017-01-02 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Jan 2 15:40:17 2017 New Revision: 290837 URL: http://llvm.org/viewvc/llvm-project?rev=290837&view=rev Log: build: tweak macros for Windows build Move the windows specific macro definitions for compiling c++ into the target. Add a number of newer options that are neces

[PATCH] D28189: Extend documentation of how to test clang-tidy checks.

2017-01-02 Thread James Dennett via Phabricator via cfe-commits
jdennett marked 2 inline comments as done. jdennett added a comment. Thanks for the review. I've address your comments, and will check over the (presumed-final) diff before submitting. Comment at: docs/clang-tidy/index.rst:558 +typically the basic `CHECK` forms (`CHECK-MESSAG

[PATCH] D28081: Make GetStyle return Expected instead of FormatStyle

2017-01-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Oops, sorry about the typo. I mean, code is almost good! :) https://reviews.llvm.org/D28081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28081: Make GetStyle return Expected instead of FormatStyle

2017-01-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Some nits. Some is almost good :) BTW, do you have clang-tools-extra in your source tree? There are also some references in the subtree to the changed interface. It would be nice if you could also fix them in a separate patch and commit these two patches together (I mea

[PATCH] D28212: typeinfo: provide a partial implementation for Win32

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82815. compnerd added a comment. Add suffixes Repository: rL LLVM https://reviews.llvm.org/D28212 Files: include/typeinfo src/typeinfo.cpp Index: src/typeinfo.cpp === --- src/typeinfo.

[PATCH] D28212: typeinfo: provide a partial implementation for Win32

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked an inline comment as done. compnerd added inline comments. Comment at: src/typeinfo.cpp:28-32 + static constexpr const size_t fnv_offset_basis = 14695981039346656037; + static constexpr const size_t fnv_prime = 10995116282110; +#else + static constexpr const si

[libcxx] r290836 - build: make cross-compiling to Windows work on Linux

2017-01-02 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Jan 2 15:09:19 2017 New Revision: 290836 URL: http://llvm.org/viewvc/llvm-project?rev=290836&view=rev Log: build: make cross-compiling to Windows work on Linux Disable the manifest bundling on Windows when cross-compiling on not-Windows. With this, it is possible to e

[libcxx] r290835 - win32: temporarily disable setting locale on 14+

2017-01-02 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Jan 2 15:09:16 2017 New Revision: 290835 URL: http://llvm.org/viewvc/llvm-project?rev=290835&view=rev Log: win32: temporarily disable setting locale on 14+ The locale structures have been made opaque in CRT 14+. This currently prevents building libc++ for Windows. We

[PATCH] D28148: [Sema] Suppress warnings for C's zero initializer

2017-01-02 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. Looks good to go once Daniel's and my comments are addressed. Thank you. Comment at: lib/AST/Expr.cpp:1887 +bool InitListExpr::isIdiomaticZeroInitializer(const LangOptions &LangOpts) const { + assert(!getSyntacticForm() && "only test syntactic form as

[PATCH] D28081: Make GetStyle return Expected instead of FormatStyle

2017-01-02 Thread Antonio Maiorano via Phabricator via cfe-commits
amaiorano updated this revision to Diff 82814. amaiorano added a comment. Reverted the FallbackStyle code and added a FIXME as @ioeric suggested. I'll fix the fallback style "none" bug in a separate change. https://reviews.llvm.org/D28081 Files: include/clang/Format/Format.h lib/Format/For

[libcxx] r290831 - Rework fix for PR19460 - Use explicit bool as an extension instead.

2017-01-02 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jan 2 14:15:33 2017 New Revision: 290831 URL: http://llvm.org/viewvc/llvm-project?rev=290831&view=rev Log: Rework fix for PR19460 - Use explicit bool as an extension instead. In the previous fix I used a PMF type as a semi-safe bool type in C++03. However immediately aft

[PATCH] D28148: [Sema] Suppress warnings for C's zero initializer

2017-01-02 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. Thanks for working on these. imo these are false positives. Comment at: lib/AST/Expr.cpp:1893 + + const IntegerLiteral *lit = dyn_cast(getInit(0)); + if (!lit) { I would recommend capital first letter for this variable =

Re: r290808 - DR1391: Check for implicit conversion sequences for non-dependent function

2017-01-02 Thread Richard Smith via cfe-commits
On 2 Jan 2017 3:27 am, "Renato Golin" wrote: On 2 January 2017 at 02:42, Richard Smith via cfe-commits wrote: > Author: rsmith > Date: Sun Jan 1 20:42:17 2017 > New Revision: 290808 > > URL: http://llvm.org/viewvc/llvm-project?rev=290808&view=rev > Log: > DR1391: Check for implicit conversion s

[libcxx] r290824 - chrono: correct the units for the epoch bias

2017-01-02 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Jan 2 12:41:50 2017 New Revision: 290824 URL: http://llvm.org/viewvc/llvm-project?rev=290824&view=rev Log: chrono: correct the units for the epoch bias As pointed out by Howard, this is actually 134774 days (* 24 * 3600), and therefore seconds, not 100ns units. Adjust

[libcxx] r290823 - locale: update ctype access for MSVC CRT 14+

2017-01-02 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Jan 2 12:41:48 2017 New Revision: 290823 URL: http://llvm.org/viewvc/llvm-project?rev=290823&view=rev Log: locale: update ctype access for MSVC CRT 14+ Visual C++ 14 and newer split msvcrt into msvcrt and ucrt with flavours of the ucrt for different environments. This

r290813 - [OpenMP] Add test cases for the proc_bind and schedule clauses with 'teams distribute parallel for' pragma.

2017-01-02 Thread Kelvin Li via cfe-commits
Author: kli Date: Mon Jan 2 10:42:11 2017 New Revision: 290813 URL: http://llvm.org/viewvc/llvm-project?rev=290813&view=rev Log: [OpenMP] Add test cases for the proc_bind and schedule clauses with 'teams distribute parallel for' pragma. https://reviews.llvm.org/D28205 Added: cfe/trunk/test

[PATCH] D28217: [libc++] Overallocation of am_pm array in locale.cpp

2017-01-02 Thread Daniel C. Dillon via Phabricator via cfe-commits
dcdillon created this revision. dcdillon added a reviewer: howard.hinnant. dcdillon added a subscriber: cfe-commits. Herald added a reviewer: EricWF. Changed array size from 24 to 2 in init_am_pm() and init_wam_pm() https://reviews.llvm.org/D28217 Files: src/locale.cpp Index: src/locale.cpp

[PATCH] D27673: [clang-move] Only move used helper declarations.

2017-01-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Awesome! Let's ship it! https://reviews.llvm.org/D27673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D21298: [Clang-tidy] delete null check

2017-01-02 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. One more late comment (I should really add a check-list for new checks): this check lacks tests with macros and templates with multiple instantiations. Incorrect handling of templates will likely not manifest in the current state of the check, it's brittle, since it reli

[PATCH] D27673: [clang-move] Only move used helper declarations.

2017-01-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 82804. hokein marked 3 inline comments as done. hokein added a comment. Add more test cases. https://reviews.llvm.org/D27673 Files: clang-move/CMakeLists.txt clang-move/ClangMove.cpp clang-move/ClangMove.h clang-move/HelperDeclRefGraph.cpp clang-mo

[PATCH] D26244: [Driver] Prefer libraries installed next to Clang over those from GCC

2017-01-02 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a reviewer: chandlerc. Hahnfeld added a comment. Ping. Looks like Chandler originally added this logic... https://reviews.llvm.org/D26244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D22452: [libcxx] Fix last_write_time tests for filesystems that don't support negative and very large times.

2017-01-02 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld updated this revision to Diff 82803. Hahnfeld added a comment. Resolve errors because of recently enabled warnings https://reviews.llvm.org/D22452 Files: test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp Index: test/std/experimental/filesys

[PATCH] D28145: [OpenMP] Basic support for a parallel directive in a target region on an NVPTX device.

2017-01-02 Thread Arpith Jacob via Phabricator via cfe-commits
arpith-jacob added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:539-542 +llvm::Value *EndArgs[] = {emitUpdateLocation(CGF, Loc), ThreadID}; +CGF.EmitRuntimeCall( +createNVPTXRuntimeFunction(OMPRTL_NVPTX__kmpc_end_serialized_parallel), +

Re: r290808 - DR1391: Check for implicit conversion sequences for non-dependent function

2017-01-02 Thread Renato Golin via cfe-commits
On 2 January 2017 at 02:42, Richard Smith via cfe-commits wrote: > Author: rsmith > Date: Sun Jan 1 20:42:17 2017 > New Revision: 290808 > > URL: http://llvm.org/viewvc/llvm-project?rev=290808&view=rev > Log: > DR1391: Check for implicit conversion sequences for non-dependent function > template

r290811 - Revert "DR1391: Check for implicit conversion sequences for non-dependent function template parameters between deduction and substitution. The idea is to accept as many cases as possible, on

2017-01-02 Thread Renato Golin via cfe-commits
Author: rengolin Date: Mon Jan 2 05:15:42 2017 New Revision: 290811 URL: http://llvm.org/viewvc/llvm-project?rev=290811&view=rev Log: Revert "DR1391: Check for implicit conversion sequences for non-dependent function template parameters between deduction and substitution. The idea is to accept

r290810 - AlignConsecutiveDeclarations type mismatch in documentation

2017-01-02 Thread FIXED-TERM Kammel Fabian (ETAS-PSC/EPE) via cfe-commits
As discussed on the cfe-dev mailing list [1] there is a type mismatch in the AlignConsecutiveDeclarations documentation. Best regards Fabian [1] - http://lists.llvm.org/pipermail/cfe-dev/2016-December/051977.html ClangCheck.rst.diff Description: ClangCheck.rst.diff

[PATCH] D28081: Make GetStyle return Expected instead of FormatStyle

2017-01-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D28081#633103, @amaiorano wrote: > Hello everyone, so after a few more tests, I've uncovered a bug and perhaps a > different meaning for fallback style. First, the bug: if you set fallback > style to "none", clang-format will perform no replac

[PATCH] D28145: [OpenMP] Basic support for a parallel directive in a target region on an NVPTX device.

2017-01-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:539-542 +llvm::Value *EndArgs[] = {emitUpdateLocation(CGF, Loc), ThreadID}; +CGF.EmitRuntimeCall( +createNVPTXRuntimeFunction(OMPRTL_NVPTX__kmpc_end_serialized_parallel), +EndA

[PATCH] D28202: [OpenMP] Sema and parsing for 'target teams distribute parallel for simd' pragma

2017-01-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D28202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D25208: [libc++] Make _LIBCPP_TYPE_VIS export members

2017-01-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Yeah, that sounds good. I want to do more investigation into this as well. https://reviews.llvm.org/D25208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25208: [libc++] Make _LIBCPP_TYPE_VIS export members

2017-01-02 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Not gonna submit this till https://reviews.llvm.org/D27430 has been submitted (will address comments on that one after holidays). https://reviews.llvm.org/D25208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http: