[PATCH] D49718: [CodeGen][ObjC] Make block copy/dispose helper function exception-safe.

2018-07-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D49718#1174281, @ahatanak wrote: > Merge pushBlockObjectRelease and enterByrefCleanup. > > In https://reviews.llvm.org/D49718#1174113, @rjmccall wrote: > > > Heh, okay. It looks like the runtime doesn't do anything different, but I > >

[PATCH] D49774: [libc++] Use __int128_t to represent file_time_type.

2018-07-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D49774#1174565, @mclow.lists wrote: > I haven't reviewed this closely, but you might want to look at > http://wg21.link/P0355, where we added a `file_clock` and `file_time` types. Thanks for the information. It doesn't look to have too much

[PATCH] D49765: [CMake] Use LIBCXXABI_LIBDIR_SUFFIX in libc++abi build

2018-07-24 Thread Michał Górny via Phabricator via cfe-commits
mgorny accepted this revision. mgorny added a comment. This revision is now accepted and ready to land. Looks good, thanks! Repository: rCXXA libc++abi https://reviews.llvm.org/D49765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[libcxx] r337888 - Fix bugs in create_directory implementation.

2018-07-24 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Jul 24 21:46:32 2018 New Revision: 337888 URL: http://llvm.org/viewvc/llvm-project?rev=337888=rev Log: Fix bugs in create_directory implementation. Libc++ was incorrectly reporting an error when the target of create_directory already exists, but was not a directory. This

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-24 Thread JF Bastien via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337887: CodeGen: use non-zero memset when possible for automatic variables (authored by jfb, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

r337887 - CodeGen: use non-zero memset when possible for automatic variables

2018-07-24 Thread JF Bastien via cfe-commits
Author: jfb Date: Tue Jul 24 21:29:03 2018 New Revision: 337887 URL: http://llvm.org/viewvc/llvm-project?rev=337887=rev Log: CodeGen: use non-zero memset when possible for automatic variables Summary: Right now automatic variables are either initialized with bzero followed by a few stores, or

[PATCH] D49774: [libc++] Use __int128_t to represent file_time_type.

2018-07-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I haven't reviewed this closely, but you might want to look at http://wg21.link/P0355, where we added a `file_clock` and `file_time` types. Repository: rCXX libc++ https://reviews.llvm.org/D49774 ___ cfe-commits

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-24 Thread JF Bastien via Phabricator via cfe-commits
jfb marked an inline comment as done. jfb added a comment. Addressed all comments. Comment at: lib/CodeGen/CGDecl.cpp:956-957 +class BytePattern { + uint8_t Val; + enum class ValueType { Specific, Any, None } Type; + BytePattern(ValueType Type) : Type(Type) {}

[PATCH] D49773: Add new file test/support/test_comparisons.h

2018-07-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Committed as 337885 after changing `constexpr` -> `TEST_CONSTEXPR_CXX14` https://reviews.llvm.org/D49773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-24 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 157191. jfb marked 2 inline comments as done. jfb added a comment. - Use short to test padding between array elements. - Define enum class storage type; swap order of if / else to make it more readable. Repository: rC Clang https://reviews.llvm.org/D49771

[libcxx] r337885 - New test support for comparisons. Reviewed as https://reviews.llvm.org/D49773

2018-07-24 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue Jul 24 21:21:21 2018 New Revision: 337885 URL: http://llvm.org/viewvc/llvm-project?rev=337885=rev Log: New test support for comparisons. Reviewed as https://reviews.llvm.org/D49773 Added: libcxx/trunk/test/support/test_comparisons.h Added:

[libcxx] r337886 - Fix missing includes in format_string.hpp helper

2018-07-24 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Jul 24 21:21:59 2018 New Revision: 337886 URL: http://llvm.org/viewvc/llvm-project?rev=337886=rev Log: Fix missing includes in format_string.hpp helper Modified: libcxx/trunk/test/support/format_string.hpp Modified: libcxx/trunk/test/support/format_string.hpp URL:

[PATCH] D49773: Add new file test/support/test_comparisons.h

2018-07-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. Otherwise, I'm quite happy with this patch. The only downside I see is if `testComparisons6` fails, it will report the source of the failure as being in the header, and not provide

[libcxx] r337884 - Make explicitly require C++11.

2018-07-24 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Jul 24 20:41:31 2018 New Revision: 337884 URL: http://llvm.org/viewvc/llvm-project?rev=337884=rev Log: Make explicitly require C++11. Previously the didn't guard its contents in any dialect. However, the implementation implicitly requires at least C++11, and the tests

[libcxx] r337883 - Ensure path::iterator and PathParser share the same enumeration values.

2018-07-24 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Jul 24 20:31:48 2018 New Revision: 337883 URL: http://llvm.org/viewvc/llvm-project?rev=337883=rev Log: Ensure path::iterator and PathParser share the same enumeration values. To avoid exposing implementation details, path::iterator and PathParser both implicitly used the

[PATCH] D49773: Add new file test/support/test_comparisons.h

2018-07-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > Can they be non-constexpr in C++11 and still function? Sure. I'll fix that. https://reviews.llvm.org/D49773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D49774: [libc++] Use __int128_t to represent file_time_type.

2018-07-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. This is the final change I need to land before adding ``, so I don't plan to let this review linger long. If you have any strong objections, please speak now or forever hold your peace (or at least until the next ABI break, whichever comes first). Repository: rCXX

[PATCH] D49773: Add new file test/support/test_comparisons.h

2018-07-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Some of this stuff is marked `constexpr` despite it requiring C++14 constexpr semantics. Can they be non-constexpr in C++11 and still function? Or should the header explicitly require C++14 to be included? https://reviews.llvm.org/D49773

r337881 - [profile] Support profiling runtime on Fuchsia

2018-07-24 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Jul 24 20:01:35 2018 New Revision: 337881 URL: http://llvm.org/viewvc/llvm-project?rev=337881=rev Log: [profile] Support profiling runtime on Fuchsia This ports the profiling runtime on Fuchsia and enables the instrumentation. Unlike on other platforms, Fuchsia doesn't

[PATCH] D49774: [libc++] Use __int128_t to represent file_time_type.

2018-07-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: mclow.lists, ldionne, joerg, arthur.j.odwyer. Herald added subscribers: cfe-commits, christof. The ``file_time_type`` time point is used to represent the write times for files. Its job is to act as part of a C++ wrapper for less ideal system

[libcxx] r337880 - Add design docs for upcoming file_time_type change.

2018-07-24 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Jul 24 19:53:53 2018 New Revision: 337880 URL: http://llvm.org/viewvc/llvm-project?rev=337880=rev Log: Add design docs for upcoming file_time_type change. In upcoming changes to filesystem I plan to change file_time_type to use __int128_t as its underlying

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-24 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 157187. 0x8000- added a comment. Update links in documentation Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 Files: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/readability/CMakeLists.txt

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/readability-magic-numbers.rst:56 +By default only `0`, `1` and `-1` integer values are accepted without a warning. +This can be overridden with the 'IgnoredIntegerValues' option. In addition, +the `0.0`

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-24 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 157186. 0x8000- added a comment. Fix a few typos Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 Files: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/readability/CMakeLists.txt

[PATCH] D49773: Add new file test/support/test_comparisons.h

2018-07-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Usage looks like this: AssertComparisons6AreNoexcept(); AssertComparisons6ReturnBool(); static_assert(testComparisons6Values( 5U, 5U), ""); static_assert(testComparisons6Values( 5U, 10U), ""); static_assert(testComparisons6Values(10U, 5U), "");

[PATCH] D49773: Add new file test/support/test_comparisons.h

2018-07-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added reviewers: ldionne, EricWF. As I've been plowing through the `` stuff, I found myself writing tests to make sure that the comparisons for a bunch of different types are "sane". So I factored them out into something that can be used over and

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.h:42 +return false; + }; + bool isSyntheticValue(const clang::SourceManager *SourceManager, Unnecessary semicolon. Please also add empty line after.

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-24 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. @aaron.ballman , @JonasToth , @Eugene.Zelenko - would you be so kind to do one more review pass and let me know if there are any blockers or if this is ready to merge? I do not have commit privileges, so if it is alright, feel free to merge it. Repository:

[libcxx] r337879 - Mark as complete

2018-07-24 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue Jul 24 18:55:25 2018 New Revision: 337879 URL: http://llvm.org/viewvc/llvm-project?rev=337879=rev Log: Mark as complete Modified: libcxx/trunk/www/cxx2a_status.html Modified: libcxx/trunk/www/cxx2a_status.html URL:

[PATCH] D49628: [CMake] Link static libunwind and libc++abi into libc++ in Fuchsia toolchain

2018-07-24 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337877: [CMake] Link static libunwind and libc++abi into libc++ in Fuchsia toolchain (authored by phosek, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r337877 - [CMake] Link static libunwind and libc++abi into libc++ in Fuchsia toolchain

2018-07-24 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Jul 24 18:44:22 2018 New Revision: 337877 URL: http://llvm.org/viewvc/llvm-project?rev=337877=rev Log: [CMake] Link static libunwind and libc++abi into libc++ in Fuchsia toolchain When building libc++ for Fuchsia, we want to distribute shared libc++, libc++abi and

[PATCH] D49628: [CMake] Link static libunwind and libc++abi into libc++ in Fuchsia toolchain

2018-07-24 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 157182. Repository: rC Clang https://reviews.llvm.org/D49628 Files: clang/cmake/caches/Fuchsia-stage2.cmake Index: clang/cmake/caches/Fuchsia-stage2.cmake === ---

[PATCH] D49528: [analyzer] Syntactic matcher for leaks associated with run loop and autoreleasepool

2018-07-24 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337876: [analyzer] Syntactic matcher for leaks associated with run loop and… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit:

r337876 - [analyzer] Syntactic matcher for leaks associated with run loop and autoreleasepool

2018-07-24 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Jul 24 18:27:15 2018 New Revision: 337876 URL: http://llvm.org/viewvc/llvm-project?rev=337876=rev Log: [analyzer] Syntactic matcher for leaks associated with run loop and autoreleasepool A checker for detecting leaks resulting from allocating temporary

[PATCH] D49518: [VFS] Emit an error when a file isn't located in any directory.

2018-07-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D49518#1168038, @bruno wrote: > Hi Volodymyr, thanks for improving this. > > > Need to double check what tests we have when using relative path names at > > the root level. > > Another interesting place to look at is >

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-24 Thread Justin Bogner via Phabricator via cfe-commits
bogner accepted this revision. bogner added a comment. This revision is now accepted and ready to land. Seems straightforward and correct to me. Comment at: lib/CodeGen/CGDecl.cpp:956-957 +class BytePattern { + uint8_t Val; + enum class ValueType { Specific, Any, None }

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-24 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:190 + builder.setMCJITMemoryManager( + std::unique_ptr(RTDyldMM)); + builder.setOptLevel(OLvl); emmettneyman wrote: > morehouse wrote: > > These 3 lines can

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-24 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: test/CodeGen/init.c:202 + union U { char c; int i; }; + struct S { union U u; int i; }; + struct S arr[5] = { { {0xF0}, 0xF0F0F0F0 }, { {0xF0}, 0xF0F0F0F0 }, { {0xF0}, 0xF0F0F0F0 }, { {0xF0}, 0xF0F0F0F0 }, { {0xF0}, 0xF0F0F0F0

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-24 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:190 + builder.setMCJITMemoryManager( + std::unique_ptr(RTDyldMM)); + builder.setOptLevel(OLvl); morehouse wrote: > These 3 lines can be combined to

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-24 Thread JF Bastien via Phabricator via cfe-commits
jfb created this revision. jfb added a reviewer: dexonsmith. Herald added a subscriber: cfe-commits. Right now automatic variables are either initialized with bzero followed by a few stores, or memcpy'd from a synthesized global. We end up encountering a fair amount of code where memcpy of

[PATCH] D49763: [CUDA] Call atexit() for CUDA destructor early on.

2018-07-24 Thread Artem Belevich via Phabricator via cfe-commits
tra planned changes to this revision. tra added a comment. Ugh. Apparently moving this code up just disabled module destructor. :-( That explains why we no longer crash. https://reviews.llvm.org/D49763 ___ cfe-commits mailing list

[PATCH] D49736: [Basic] Emit warning flag suggestion only in case there's existing flag *similar* to the unknown one

2018-07-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks for working on this! It looks like we only have one client of `getNearestOption`. Wouldn't it make sense to fold the check into the function itself? Repository: rC Clang https://reviews.llvm.org/D49736 ___

[libunwind] r337868 - [CMake] Include CMakeDependentOption in libunwind

2018-07-24 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Jul 24 16:42:51 2018 New Revision: 337868 URL: http://llvm.org/viewvc/llvm-project?rev=337868=rev Log: [CMake] Include CMakeDependentOption in libunwind This should resolve the breakage introduced in r337867 which introduced the use of cmake_dependent_option without

[PATCH] D49770: [ARM64] [Windows] Follow MS X86_64 C++ ABI when passing structs

2018-07-24 Thread Sanjin Sijaric via Phabricator via cfe-commits
ssijaric created this revision. ssijaric added reviewers: rnk, mstorsjo, TomTan, haripul. Herald added a reviewer: javed.absar. Herald added subscribers: cfe-commits, chrib, kristof.beyls. Microsoft's C++ object model for ARM64 is the same as that for X86_64. For example, small structs with

[PATCH] D49573: [CMake] Option to control whether shared/static library is installed

2018-07-24 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX337867: [CMake] Option to control whether shared/static library is installed (authored by phosek, committed by ). Changed prior to commit: https://reviews.llvm.org/D49573?vs=156382=157170#toc

[libcxx] r337867 - [CMake] Option to control whether shared/static library is installed

2018-07-24 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Jul 24 16:27:51 2018 New Revision: 337867 URL: http://llvm.org/viewvc/llvm-project?rev=337867=rev Log: [CMake] Option to control whether shared/static library is installed Currently it's only possible to control whether shared or static library build of libc++, libc++abi

[libunwind] r337867 - [CMake] Option to control whether shared/static library is installed

2018-07-24 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Jul 24 16:27:51 2018 New Revision: 337867 URL: http://llvm.org/viewvc/llvm-project?rev=337867=rev Log: [CMake] Option to control whether shared/static library is installed Currently it's only possible to control whether shared or static library build of libc++, libc++abi

[libcxxabi] r337867 - [CMake] Option to control whether shared/static library is installed

2018-07-24 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Jul 24 16:27:51 2018 New Revision: 337867 URL: http://llvm.org/viewvc/llvm-project?rev=337867=rev Log: [CMake] Option to control whether shared/static library is installed Currently it's only possible to control whether shared or static library build of libc++, libc++abi

[PATCH] D49763: [CUDA] Call atexit() for CUDA destructor early on.

2018-07-24 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Depends a bit on the platform, __cxa_atexit on most modern ELF systems, fallback to atexit. If the global dtor is run too late, it smells like a missing library dependency. They are executed in topological order after all. https://reviews.llvm.org/D49763

r337866 - Revert "[analyzer] Extend NoStoreFuncVisitor to insert a note on IVars"

2018-07-24 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Jul 24 16:23:33 2018 New Revision: 337866 URL: http://llvm.org/viewvc/llvm-project?rev=337866=rev Log: Revert "[analyzer] Extend NoStoreFuncVisitor to insert a note on IVars" This reverts commit a9e21bd727112cd69eabc1af648c5da6b773d06e. Reverted because the

r337864 - [analyzer] Extend NoStoreFuncVisitor to insert a note on IVars

2018-07-24 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Jul 24 16:14:29 2018 New Revision: 337864 URL: http://llvm.org/viewvc/llvm-project?rev=337864=rev Log: [analyzer] Extend NoStoreFuncVisitor to insert a note on IVars The note is added in the following situation: - We are throwing a nullability-related warning

[PATCH] D49763: [CUDA] Call atexit() for CUDA destructor early on.

2018-07-24 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In https://reviews.llvm.org/D49763#1174283, @joerg wrote: > Can this ever end up in a shared library? If yes, please use the normal logic > for creating a global destructor. atexit is not very friendly to dlopen... Yes, it can end up in a shared library. What would be the

[PATCH] D49766: Fix a crash when an error occurs in Template and the initializer is a nullptr for C++17

2018-07-24 Thread Balaji Iyer via Phabricator via cfe-commits
bviyer created this revision. bviyer added reviewers: arphaman, erik.pilkington, dexonsmith. Herald added a subscriber: cfe-commits. When the error has occurred for one of the variables inside a template, the Loc function will try to find the end-location of the final item. If this variable is

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-24 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt:17 -# Depend on LLVM IR intrinsic generation. +# Depend on LLVM IR instrinsic generation. set(handle_llvm_deps intrinsics_gen) Typo introduced here.

[PATCH] D49765: [CMake] Use LIBCXXABI_LIBDIR_SUFFIX in libc++abi build

2018-07-24 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: mgorny, EricWF. Herald added subscribers: cfe-commits, ldionne, christof. This was changed unintentionally in r335809. Repository: rCXXA libc++abi https://reviews.llvm.org/D49765 Files: libcxxabi/CMakeLists.txt Index:

[PATCH] D49763: [CUDA] Call atexit() for CUDA destructor early on.

2018-07-24 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Can this ever end up in a shared library? If yes, please use the normal logic for creating a global destructor. atexit is not very friendly to dlopen... https://reviews.llvm.org/D49763 ___ cfe-commits mailing list

[PATCH] D49718: [CodeGen][ObjC] Make block copy/dispose helper function exception-safe.

2018-07-24 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 157149. ahatanak added a comment. Merge pushBlockObjectRelease and enterByrefCleanup. In https://reviews.llvm.org/D49718#1174113, @rjmccall wrote: > Heh, okay. It looks like the runtime doesn't do anything different, but I > think it's probably more

r337862 - [Sema] Destroy tokens in DeclaratorChunk params

2018-07-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Jul 24 15:47:16 2018 New Revision: 337862 URL: http://llvm.org/viewvc/llvm-project?rev=337862=rev Log: [Sema] Destroy tokens in DeclaratorChunk params Otherwise this leaks in some edge cases. Modified: cfe/trunk/include/clang/Sema/DeclSpec.h Modified:

[PATCH] D49763: [CUDA] Call atexit() for CUDA destructor early on.

2018-07-24 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/CodeGen/CGCUDANV.cpp:379 + // Create destructor and register it with atexit() the way NVCC does it. Doing + // it during regular destructor

[PATCH] D46652: [clang-cl, PCH] Implement support for MS-style PCH through headers

2018-07-24 Thread Mike Rice via Phabricator via cfe-commits
mikerice added a comment. In https://reviews.llvm.org/D46652#1164010, @thakis wrote: > Also, were you planning on also adding support for the (filename-less version > of) hdrstop pragma? After this change, that should probably be fairly > straightforward. Thanks for taking a look. I'll be

[PATCH] D49763: [CUDA] Call atexit() for CUDA destructor early on.

2018-07-24 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added reviewers: jlebar, timshen. Herald added subscribers: bixia, sanjoy. There's apparently a race between fatbin destructors registered by us and some internal calls registered by CUDA runtime from cudaRegisterFatbin. Moving fatbin de-registration to atexit() was

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-24 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/CodeGen/CodeGenFunction.h:380 + /// True if sanitizer checks for current pointer value are generated. + bool PointerChecksAreEmitted = false; + rjmccall wrote: > sepavloff wrote: > > rjmccall wrote: > > > I don't

[PATCH] D49752: [CMake] Don't install c++abi headers in standalone libc++ build

2018-07-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. With this change, only one copy of the c++abi headers gets copied - into `include/c++/v1/`. LGTM. Repository: rCXX libc++ https://reviews.llvm.org/D49752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-24 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 157138. emmettneyman added a comment. Cleaned up code Tried to get rid of ParseCommandLineOptions() call but could not figure out how to initialize a PassInfo object without it. Repository: rC Clang https://reviews.llvm.org/D49526 Files:

[PATCH] D49760: [clang:sema] de-duplicate getDepthAndIndex helpers

2018-07-24 Thread Vedant Kumar via Phabricator via cfe-commits
vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D49760#1174141, @nickdesaulniers wrote: > Thanks for the review. Today is my first day committing to clang! Welcome :). LGTM. Feel free to commit this yourself once

[clang-tools-extra] r337860 - [clangd] Guard fuzzer against empty inputs.

2018-07-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Jul 24 14:50:06 2018 New Revision: 337860 URL: http://llvm.org/viewvc/llvm-project?rev=337860=rev Log: [clangd] Guard fuzzer against empty inputs. Modified: clang-tools-extra/trunk/clangd/fuzzer/ClangdFuzzer.cpp Modified:

[PATCH] D49760: [clang:sema] de-duplicate getDepthAndIndex helpers

2018-07-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 157134. nickdesaulniers added a comment. - prefer auto when type is specified on RHS of assignment. Repository: rC Clang https://reviews.llvm.org/D49760 Files: include/clang/Sema/SemaInternal.h lib/Sema/SemaTemplateDeduction.cpp

[PATCH] D49760: [clang:sema] de-duplicate getDepthAndIndex helpers

2018-07-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers marked an inline comment as done. nickdesaulniers added a comment. Thanks for the review. Today is my first day committing to clang! Repository: rC Clang https://reviews.llvm.org/D49760 ___ cfe-commits mailing list

LLVM buildmaster will be restarted tonight

2018-07-24 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be updated and restarted after 6PM Pacific time today. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49760: [clang:sema] de-duplicate getDepthAndIndex helpers

2018-07-24 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Thanks for doing this! Comment at: include/clang/Sema/SemaInternal.h:120 + if (const TemplateTypeParmType *TTP = + UPP.first.dyn_cast()) +return std::make_pair(TTP->getDepth(), TTP->getIndex()); Perhaps 'const auto *TTP =

[PATCH] D49760: [clang:sema] de-duplicate getDepthAndIndex helpers

2018-07-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: srhines, pirama. Herald added a subscriber: cfe-commits. Continuing off of: https://reviews.llvm.org/D38382 Fixes: https://bugs.llvm.org/show_bug.cgi?id=12176 Repository: rC Clang https://reviews.llvm.org/D49760 Files:

[PATCH] D49718: [CodeGen][ObjC] Make block copy/dispose helper function exception-safe.

2018-07-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D49718#1173883, @ahatanak wrote: > Address review comments. > > I think I should be able to merge pushBlockObjectRelease and > enterByrefCleanup, but the BlockFieldFlags that are passed are different. We > set BLOCK_FIELD_IS_WEAK in

r337857 - Don't lifetime-extend or track lifetime problems through the LHS of '->*'.

2018-07-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 24 14:18:30 2018 New Revision: 337857 URL: http://llvm.org/viewvc/llvm-project?rev=337857=rev Log: Don't lifetime-extend or track lifetime problems through the LHS of '->*'. Fixes a false-positive warning found by selfhost. Modified: cfe/trunk/lib/AST/Expr.cpp

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CodeGenFunction.h:380 + /// True if sanitizer checks for current pointer value are generated. + bool PointerChecksAreEmitted = false; + sepavloff wrote: > rjmccall wrote: > > I don't think this is a good

[PATCH] D49523: [clangd] Add support for per-file override compilation command

2018-07-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D49523#1171484, @ilya-biryukov wrote: > The extensions itself seems like a reasonable way to provide compile commands > for the individual files. In case didChangeConfiguration does not work for > you for some reason, happy to take a look

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: malaperle-ericsson, ilya-biryukov, sammccall, jkorous. arphaman added a project: clang-tools-extra. Herald added subscribers: dexonsmith, MaskRay, ioeric. This patch is based on https://reviews.llvm.org/D49523. It extends the

[PATCH] D49100: Avoid returning an invalid end source loc

2018-07-24 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 157116. steveire retitled this revision from "Inline DeclarationNameInfo::getLocEnd into callers" to "Avoid returning an invalid end source loc". steveire edited the summary of this revision. Repository: rC Clang https://reviews.llvm.org/D49100 Files:

r337850 - Revert "[VFS] Cleanups to VFS interfaces."

2018-07-24 Thread Jordan Rupprecht via cfe-commits
Author: rupprecht Date: Tue Jul 24 13:28:07 2018 New Revision: 337850 URL: http://llvm.org/viewvc/llvm-project?rev=337850=rev Log: Revert "[VFS] Cleanups to VFS interfaces." This reverts commit r337834 due to test failures. Modified: cfe/trunk/include/clang/Basic/VirtualFileSystem.h

[PATCH] D49754: Add -m(no-)spe, and e500 CPU definitions and support to clang

2018-07-24 Thread Justin Hibbits via Phabricator via cfe-commits
jhibbits created this revision. Herald added subscribers: cfe-commits, kbarton, nemanjai. r337347 added support for the Signal Processing Engine (SPE) to LLVM. This follows that up with the clang side. Repository: rC Clang https://reviews.llvm.org/D49754 Files:

[PATCH] D49724: [VFS] Cleanups to VFS interfaces.

2018-07-24 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. Looks like this caused some test failures (http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/14441/steps/ninja%20check%201), e.g.: [ RUN ] GoToInclude.All

[PATCH] D49752: [CMake] Don't install c++abi headers in standalone libc++ build

2018-07-24 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. This was pointed out by @mclow.lists on IRC in our discussion related to https://reviews.llvm.org/D49711, I believe this change should resolve that issue. Repository: rCXX libc++ https://reviews.llvm.org/D49752 ___

[PATCH] D49752: [CMake] Don't install c++abi headers in standalone libc++ build

2018-07-24 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: mclow.lists, EricWF, ldionne. Herald added subscribers: cfe-commits, christof, mgorny. This is a refinement on r337833. Previously we were installing two copies of c++abi headers in libc++ build directory, one in include/c++build and another

[PATCH] D49749: [analyzer] Admit that we can't simplify the newly produced mixed Loc/NonLoc expressions.

2018-07-24 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added inline comments. This revision now requires changes to proceed. Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:1300 + Loc::isLocType(S->getRHS()->getType())) { +SVal V =

[PATCH] D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets

2018-07-24 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 157106. mgrang added a comment. Thanks @rsmith. I have addressed your comments. https://reviews.llvm.org/D48862 Files: lib/Driver/ToolChains/Gnu.cpp lib/Driver/ToolChains/Linux.cpp

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: lib/CodeGen/CodeGenFunction.h:380 + /// True if sanitizer checks for current pointer value are generated. + bool PointerChecksAreEmitted = false; + rjmccall wrote: > I don't think this is a good way of doing this.

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D48958#1173860, @vsk wrote: > LGTM, although I think it'd be helpful to have another +1 just to be safe. Thank you for the review! It would indeed be great if someone else could take a look, especially since we are **so** close to the

[PATCH] D49749: [analyzer] Admit that we can't simplify the newly produced mixed Loc/NonLoc expressions.

2018-07-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs, mikhail.ramalho. Herald added subscribers: cfe-commits, baloghadamsoftware. Add one more defensive check to prevent crashes on trying to simplify a `SymSymExpr` with different

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 157102. sepavloff added a comment. Updated patch - Modified check generation. Now for each 'new' expression compiler tries to generate the checks. It solves problem of 'nested' new expressions, which appear when 'new' is used in default arguments. -

[PATCH] D49715: [analyzer] CallEvent: Add partially working methods for obtaining the callee stack frame.

2018-07-24 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. Minor nits mostly. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:411 + /// for bad reasons, returning null, even in

[PATCH] D49718: [CodeGen][ObjC] Make block copy/dispose helper function exception-safe.

2018-07-24 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:1905 +case BlockCaptureEntityKind::None: + llvm_unreachable("unexpected BlockCaptureEntityKind"); } rjmccall wrote: > These two switches differ only in (1) what kind of cleanup

[PATCH] D49718: [CodeGen][ObjC] Make block copy/dispose helper function exception-safe.

2018-07-24 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 157095. ahatanak marked 2 inline comments as done. ahatanak added a comment. Address review comments. I think I should be able to merge pushBlockObjectRelease and enterByrefCleanup, but the BlockFieldFlags that are passed are different. We set

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-24 Thread Vedant Kumar via Phabricator via cfe-commits
vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. LGTM, although I think it'd be helpful to have another +1 just to be safe. I did two small experiments with this using a Stage1 Rel+Asserts compiler: Stage2 Rel+Asserts build of llvm-tblgen: ninja

[PATCH] D45898: [SemaCXX] Mark destructor as referenced

2018-07-24 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Does this check destructors of nested aggregate initializations in the case where brace elision occurs? I don't think just checking the top level of the SK_ListInitialization is enough. Perhaps it would make more sense to mark the dtors used from InitListChecker (in

[PATCH] D49745: Generate fundamental type info with weak linkage

2018-07-24 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc requested changes to this revision. pcc added a comment. This revision now requires changes to proceed. As I mentioned in https://bugs.llvm.org/show_bug.cgi?id=38281 I don't see a good reason to do this. Also extern_weak is not an appropriate linkage for definitions, only declarations.

[PATCH] D49745: Generate fundamental type info with weak linkage

2018-07-24 Thread Tom Anderson via Phabricator via cfe-commits
thomasanderson created this revision. thomasanderson added a reviewer: pcc. https://reviews.llvm.org/D49745 Files: lib/CodeGen/ItaniumCXXABI.cpp test/CodeGenCXX/rtti-fundamental.cpp test/CodeGenCXX/windows-itanium-type-info.cpp Index: test/CodeGenCXX/windows-itanium-type-info.cpp

[PATCH] D49734: [AST][4/4] Move the bit-fields from ObjCMethodDecl and ObjCContainerDecl into DeclContext

2018-07-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Same comment as the other 3. Comment at: include/clang/AST/DeclObjC.h:190 + /// InvalidObjCMethodFamily cast into an ObjCMethodFamily. + ObjCMethodFamily getFamilyImpl() const { +return static_cast(ObjCMethodDeclBits.Family);

[PATCH] D49733: [AST][3/4] Move the bit-fields from BlockDecl, LinkageSpecDecl and OMPDeclareReductionDecl into DeclContext

2018-07-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Another one in need of clang-format, but generally seems pretty mechanical. Comment at: include/clang/AST/DeclCXX.h:2844 + + bool hasBracesImpl() const { return LinkageSpecDeclBits.HasBraces; } + void setBracesImpl(bool B = true) {

[PATCH] D49732: [AST][2/4] Move the bit-fields from FunctionDecl and CXXConstructorDecl into DeclContext

2018-07-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Anotherone in need of clang-format, otherwise seems alright to me. Comment at: include/clang/AST/Decl.h:1809 + // and setMultiVersion do not simply set/read the corresponding bit. + void setPureImpl(bool isPure) { FunctionDeclBits.IsPure = isPure;

[PATCH] D49267: [clangd] Watch for changes in compile_commands.json

2018-07-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. > if/when we have a native implementation, supporting multiple mechanisms with > different layering requirements to get at most a 2x win in watcher resource > usage seems like a dubious way to spend our complexity budget. I guess the only think that might force

[PATCH] D49729: [AST][1/4] Move the bit-fields from TagDecl, EnumDecl and RecordDecl into DeclContext

2018-07-24 Thread Bruno Ricci via Phabricator via cfe-commits
bricci updated this revision to Diff 157063. bricci added a comment. - removed some unrelated change - add a comment about why uint64_t instead of unsigned Repository: rC Clang https://reviews.llvm.org/D49729 Files: include/clang/AST/Decl.h include/clang/AST/DeclBase.h

  1   2   >