[PATCH] D33620: [CodeGenCXX] do not default to dllimport storage for mingw-w64

2017-05-26 Thread Martell Malone via Phabricator via cfe-commits
martell created this revision. GNU frontends don't have options like `/MT`, `/MD` etc so it makes little sense. This fixes a few link error regressions with libc++ and libc++abi Repository: rL LLVM https://reviews.llvm.org/D33620 Files: lib/CodeGen/CodeGenModule.cpp

r304056 - [OpenMP] Create COMDAT group for OpenMP offload registration code to avoid multiple copies

2017-05-26 Thread George Rokos via cfe-commits
Author: grokos Date: Fri May 26 22:03:13 2017 New Revision: 304056 URL: http://llvm.org/viewvc/llvm-project?rev=304056=rev Log: [OpenMP] Create COMDAT group for OpenMP offload registration code to avoid multiple copies Thanks to Sergey Dmitriev for submitting the patch. Differential Revision:

r304057 - Revert "[coroutines] Support "coroutines" feature in module map requires clause"

2017-05-26 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri May 26 22:04:51 2017 New Revision: 304057 URL: http://llvm.org/viewvc/llvm-project?rev=304057=rev Log: Revert "[coroutines] Support "coroutines" feature in module map requires clause" This reverts commit r304054. Removed:

[PATCH] D33509: [OpenMP] Create COMDAT group for OpenMP offload registration code to avoid multiple copies

2017-05-26 Thread George Rokos via Phabricator via cfe-commits
grokos added a comment. I committed the patch. Thanks for submitting it! Repository: rL LLVM https://reviews.llvm.org/D33509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33509: [OpenMP] Create COMDAT group for OpenMP offload registration code to avoid multiple copies

2017-05-26 Thread George Rokos via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304056: [OpenMP] Create COMDAT group for OpenMP offload registration code to avoid… (authored by grokos). Changed prior to commit: https://reviews.llvm.org/D33509?vs=100134=100518#toc Repository: rL

r304054 - [coroutines] Support "coroutines" feature in module map requires clause

2017-05-26 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri May 26 21:46:17 2017 New Revision: 304054 URL: http://llvm.org/viewvc/llvm-project?rev=304054=rev Log: [coroutines] Support "coroutines" feature in module map requires clause Summary: In order for libc++ to add `` to its module map, there has to be a feature that can be

[PATCH] D33538: [coroutines] Support "coroutines" feature in module map requires clause

2017-05-26 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Even after fixing the libc++ guards, the header still emits a #warning when it's processed when coroutines are unavailable. It seems like a useful feature test to have available. I'll commit shortly. https://reviews.llvm.org/D33538

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-26 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:913-914 +std::error_code EC; +ThinLinkOS.emplace(CodeGenOpts.ThinLinkBitcodeFile, EC, + llvm::sys::fs::F_None); +if (EC) { The clang

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-05-26 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/clang/Basic/DiagnosticGroups.td:631 // UnusedParameter, (matches GCC's behavior) +// UnusedTemplate, (clean-up libc++ before enabling) //

[PATCH] D33616: [MS] Fix _bittest* intrinsics for values bigger than 31

2017-05-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. These intrinsics are supposed to select to BT, BTS, etc instructions. Those instructions actually perform a bitwise array indexing memory operation that LLVM doesn't currently expose. This change implements the shifting and array indexing in plain C. Fixes PR33188 If

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-05-26 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D29877#766196, @EricWF wrote: > No. But I can point you to `range-v3` which uses this pattern and I think the > idiom is somewhat appealing, but that's orthogonal to Clang diagnosing it. I found this:

[PATCH] D33526: Fix spurious Wunused-lambda-capture warning

2017-05-26 Thread Yi Kong via Phabricator via cfe-commits
kongyi added inline comments. Comment at: lib/Sema/SemaLambda.cpp:1524-1526 + if (!CurContext->isDependentContext() && !IsImplicit) +if ((IsGenericLambda && !From.isNonODRUsed()) || +(!IsGenericLambda && !From.isODRUsed()))

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-05-26 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D29877#766196, @EricWF wrote: > In https://reviews.llvm.org/D29877#766176, @rsmith wrote: > > > In https://reviews.llvm.org/D29877#765968, @EricWF wrote: > > > > > I think this patch still gets the following case wrong: > > > > > > // foo.h >

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-26 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 100488. timshen added a comment. Add opt support and llvm test. https://reviews.llvm.org/D33525 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/thin_link_bitcode.c llvm/include/llvm/Transforms/IPO/ThinLTOBitcodeWriter.h

[PATCH] D33509: [OpenMP] Create COMDAT group for OpenMP offload registration code to avoid multiple copies

2017-05-26 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev added a comment. I do not have commit access yet, so I cannot commit this patch myself. Can you please check it in for me? https://reviews.llvm.org/D33509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33610: Stop asserting on constexpr explicit MS constructor calls.

2017-05-26 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover created this revision. Herald added a subscriber: mcrosier. When trying to switch to C++14 by default, some extra expressions become constexpr and this is one case we can't handle. Technically I believe weakening the assert would be enough to fix the problem, but defaulted

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-05-26 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D29877#766176, @rsmith wrote: > In https://reviews.llvm.org/D29877#765968, @EricWF wrote: > > > I think this patch still gets the following case wrong: > > > > // foo.h > > constexpr struct { > > template void operator()(T) {} // emits

[PATCH] D32817: [CMake] Build runtimes for Fuchsia targets

2017-05-26 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 100482. Repository: rL LLVM https://reviews.llvm.org/D32817 Files: cmake/caches/Fuchsia-stage2.cmake cmake/caches/Fuchsia.cmake Index: cmake/caches/Fuchsia.cmake === ---

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-05-26 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D29877#765968, @EricWF wrote: > I think this patch still gets the following case wrong: > > // foo.h > constexpr struct { > template void operator()(T) {} // emits unused template warning > } foo; > What specifically do you think

[PATCH] D33605: Provide an acccessor to get the Args of a ToolChain

2017-05-26 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. What's stopping anyone from removing this method as dead code? Repository: rL LLVM https://reviews.llvm.org/D33605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33606: [Sema] Fix a crash-on-invalid when a template parameter list has a class definition or non-reference class type

2017-05-26 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. Currently clang crashes with an assertion failure in SemaAccess.cpp ("Assertion failed: (Access == AS_private || Access == AS_protected)") when compiling the following invalid code: class C0 { public: template) {} S0 *m; template void

Re: r304017 - CodeGen: Define Swift's legal vector types for AArch64, ARM

2017-05-26 Thread Arnold Schwaighofer via cfe-commits
No, my change should have no effect on LLVM CodeGen. I don’t see how a change to clang’s CodeGen i.e different module that cannot affect an llvm test using llc. This API is only used by swift calling convention lowering. > On May 26, 2017, at 2:33 PM, Evgenii Stepanov

Re: r304017 - CodeGen: Define Swift's legal vector types for AArch64, ARM

2017-05-26 Thread Evgenii Stepanov via cfe-commits
But I do not even have this change in my local checkout. Must be something else. On Fri, May 26, 2017 at 2:33 PM, Evgenii Stepanov wrote: > I've got the same failure locally w/o MSan, in a regular > release+assertions build on linux x86_64. > > On Fri, May 26, 2017 at

[PATCH] D33305: [ubsan] Add a check for pointer overflow UB

2017-05-26 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 100475. vsk edited the summary of this revision. vsk added a comment. Ping. https://reviews.llvm.org/D33305 Files: docs/UndefinedBehaviorSanitizer.rst include/clang/Basic/Sanitizers.def lib/CodeGen/CGExpr.cpp lib/CodeGen/CGExprScalar.cpp

Re: r304017 - CodeGen: Define Swift's legal vector types for AArch64, ARM

2017-05-26 Thread Evgenii Stepanov via cfe-commits
I've got the same failure locally w/o MSan, in a regular release+assertions build on linux x86_64. On Fri, May 26, 2017 at 2:15 PM, Vitaly Buka via cfe-commits wrote: > Could this be the patch >

Re: r304017 - CodeGen: Define Swift's legal vector types for AArch64, ARM

2017-05-26 Thread Vitaly Buka via cfe-commits
Could this be the patch http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/5228/steps/check-llvm%20msan/logs/stdio FAIL: LLVM :: CodeGen/ARM/arm-shrink-wrapping.ll (5392 of 20818) TEST 'LLVM :: CodeGen/ARM/arm-shrink-wrapping.ll' FAILED

Re: [clang-tools-extra] r303977 - [clangd] Allow to use vfs::FileSystem for file accesses.

2017-05-26 Thread Vedant Kumar via cfe-commits
Hi Ilya, The unit test introduced by this commit hits an assertion failure on our bots. Could you please take a look at the issue? lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/6733 I see: [ RUN

r304033 - Resubmit r303861.

2017-05-26 Thread Konstantin Zhuravlyov via cfe-commits
Author: kzhuravl Date: Fri May 26 16:08:20 2017 New Revision: 304033 URL: http://llvm.org/viewvc/llvm-project?rev=304033=rev Log: Resubmit r303861. [AMDGPU] add __builtin_amdgcn_s_getpc Patch by Tim Corringham Modified: cfe/trunk/include/clang/Basic/BuiltinsAMDGPU.def

[PATCH] D33448: [CodeGen] Add thumb-mode to target-features for arm/thumb triples.

2017-05-26 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. In https://reviews.llvm.org/D33448#765749, @fhahn wrote: > I'll hold off merging this patch until https://reviews.llvm.org/D33436 lands, > which fixes a problem with mixed ARM/Thumb codegen OK. Commit at will :) -eric https://reviews.llvm.org/D33448

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-26 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a comment. In https://reviews.llvm.org/D33525#766050, @timshen wrote: > In https://reviews.llvm.org/D33525#764251, @chandlerc wrote: > > > (focusing on the LLVM side of this review for now) > > > > Can you add an LLVM-based test? Can you add this to > >

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-26 Thread Tim Shen via Phabricator via cfe-commits
timshen marked an inline comment as done. timshen added a comment. In https://reviews.llvm.org/D33525#764251, @chandlerc wrote: > (focusing on the LLVM side of this review for now) > > Can you add an LLVM-based test? Can you add this to > `lib/Passes/PassRegistry.def`? Talked offline. Given

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-26 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 100462. timshen added a comment. Change the test case. https://reviews.llvm.org/D33525 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/thin_link_bitcode.c llvm/include/llvm/Transforms/IPO/ThinLTOBitcodeWriter.h

[PATCH] D33588: Fix two sources of UB in __next_hash_pow2 (from __hash_table)

2017-05-26 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 100461. vsk edited the summary of this revision. vsk added a comment. Thanks @EricWF for pointing me to the right place to add a test. I've tried to follow the style used by the existing tests. PTAL. https://reviews.llvm.org/D33588 Files:

r304030 - Remove unused diagnostics. NFC.

2017-05-26 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri May 26 15:14:12 2017 New Revision: 304030 URL: http://llvm.org/viewvc/llvm-project?rev=304030=rev Log: Remove unused diagnostics. NFC. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td URL:

r304028 - Make helper functions static. NFC.

2017-05-26 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri May 26 15:08:24 2017 New Revision: 304028 URL: http://llvm.org/viewvc/llvm-project?rev=304028=rev Log: Make helper functions static. NFC. Modified: cfe/trunk/lib/AST/DeclBase.cpp cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp

[libcxxabi] r304026 - [libcxxabi] iconv is not needed for mingw-w64

2017-05-26 Thread Martell Malone via cfe-commits
Author: martell Date: Fri May 26 14:39:39 2017 New Revision: 304026 URL: http://llvm.org/viewvc/llvm-project?rev=304026=rev Log: [libcxxabi] iconv is not needed for mingw-w64 Modified: libcxxabi/trunk/cmake/config-ix.cmake Modified: libcxxabi/trunk/cmake/config-ix.cmake URL:

r304025 - [scan-build] Patch to scan-build tool to support "--target=" flag

2017-05-26 Thread Petr Hosek via cfe-commits
Author: phosek Date: Fri May 26 14:25:32 2017 New Revision: 304025 URL: http://llvm.org/viewvc/llvm-project?rev=304025=rev Log: [scan-build] Patch to scan-build tool to support "--target=" flag The scan-build script provided by clang can be used to detect defects in code in the compile time.

[PATCH] D33263: [scan-build] Patch to scan-build tool to support "--target=" flag

2017-05-26 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304025: [scan-build] Patch to scan-build tool to support "--target=" flag (authored by phosek). Changed prior to commit: https://reviews.llvm.org/D33263?vs=99219=100450#toc Repository: rL LLVM

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-05-26 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I think this patch still gets the following case wrong: // foo.h constexpr struct { template void operator()(T) {} // emits unused template warning } foo; https://reviews.llvm.org/D29877 ___ cfe-commits mailing

Re: [PATCH] D33424: Lexer: allow imaginary constants in GNU mode (only).

2017-05-26 Thread Richard Smith via cfe-commits
On 26 May 2017 at 10:34, Tim Northover via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On 24 May 2017 at 17:54, Richard Smith wrote: > > Yikes :-( Maybe libc++ *should* have that extension then. It sounds like > > we'll silently get the wrong value for any attempt

r304017 - CodeGen: Define Swift's legal vector types for AArch64, ARM

2017-05-26 Thread Arnold Schwaighofer via cfe-commits
Author: arnolds Date: Fri May 26 13:11:54 2017 New Revision: 304017 URL: http://llvm.org/viewvc/llvm-project?rev=304017=rev Log: CodeGen: Define Swift's legal vector types for AArch64, ARM rdar://32401301 Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp

[PATCH] D33082: Fix Libc++ build with MinGW64

2017-05-26 Thread Martell Malone via Phabricator via cfe-commits
martell added a comment. > ! In https://reviews.llvm.org/D33082#765898, @EricWF wrote: > I removed the section you're referring to because it's unneeded. > `<__locale>` does the exact same `#include` dance. and `` includes > `<__locale>`. > It should not have an affect on functionality. It

[PATCH] D30538: Add documentation for -fno-strict-aliasing

2017-05-26 Thread Simon Byrne via Phabricator via cfe-commits
simonbyrne updated this revision to Diff 100430. simonbyrne added a comment. Fix capitalisation. https://reviews.llvm.org/D30538 Files: docs/UsersManual.rst Index: docs/UsersManual.rst === --- docs/UsersManual.rst +++

[PATCH] D30538: Add documentation for -fno-strict-aliasing

2017-05-26 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. LGTM, though it would be nice if we implemented gcc's extension for this at some point... ;) https://reviews.llvm.org/D30538 ___ cfe-commits mailing

r304013 - Only define __SIZEOF_FLOAT128__ on x86 as intended in r304012

2017-05-26 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri May 26 12:48:01 2017 New Revision: 304013 URL: http://llvm.org/viewvc/llvm-project?rev=304013=rev Log: Only define __SIZEOF_FLOAT128__ on x86 as intended in r304012 GCC only defines it on x86. Modified: cfe/trunk/lib/Basic/Targets.cpp

Re: r304012 - Enable __float128 for mingw for GCC compatibility and define __SIZEOF_FLOAT128__ on x86

2017-05-26 Thread Martell Malone via cfe-commits
Thanks Reid for looking at this today On Fri, May 26, 2017 at 6:38 PM, Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rnk > Date: Fri May 26 12:38:15 2017 > New Revision: 304012 > > URL: http://llvm.org/viewvc/llvm-project?rev=304012=rev > Log: > Enable __float128

r304012 - Enable __float128 for mingw for GCC compatibility and define __SIZEOF_FLOAT128__ on x86

2017-05-26 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri May 26 12:38:15 2017 New Revision: 304012 URL: http://llvm.org/viewvc/llvm-project?rev=304012=rev Log: Enable __float128 for mingw for GCC compatibility and define __SIZEOF_FLOAT128__ on x86 GCC defines __FLOAT128__ on Power and __SIZEOF_FLOAT128__ on x86. We're just

Re: [PATCH] D33424: Lexer: allow imaginary constants in GNU mode (only).

2017-05-26 Thread Tim Northover via cfe-commits
On 24 May 2017 at 17:54, Richard Smith wrote: > Yikes :-( Maybe libc++ *should* have that extension then. It sounds like > we'll silently get the wrong value for any attempt at std::complex / > _Complex interop right now: That sounds like a pretty good idea whatever we

[PATCH] D33082: Fix Libc++ build with MinGW64

2017-05-26 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D33082#765644, @martell wrote: > LGTM but I can't speak for the area where you added `#include ` and > killed off the `_NEWLIB_VERSION` check > Seems in order based on > https://sourceware.org/ml/newlib-cvs/2014-q3/msg00038.html > Maybe

[PATCH] D33588: Fix two sources of UB in __next_hash_pow2 (from __hash_table)

2017-05-26 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @vsk: I would include your fuzzing test in this patch. Simply put it somewhere under `test/libcxx/containers/unordered`. https://reviews.llvm.org/D33588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r304006 - Update MS mangling EBNF, NFC

2017-05-26 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri May 26 12:11:10 2017 New Revision: 304006 URL: http://llvm.org/viewvc/llvm-project?rev=304006=rev Log: Update MS mangling EBNF, NFC Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp URL:

Re: [PATCH] D33467: Fix LLVM build errors if necent build of GCC 7 is used

2017-05-26 Thread Richard Smith via cfe-commits
This definitely looks like a GCC bug. On 26 May 2017 1:34 am, "David Abdurachmanov via Phabricator via cfe-commits" wrote: davidlt added a comment. This happens with recent GCC 7.1.1 (updated yesterday) and if compiled in C++1z mode. FAILED:

[PATCH] D33588: Fix two sources of UB in __next_hash_pow2 (from __hash_table)

2017-05-26 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D33588#765768, @mclow.lists wrote: > I can reproduce this, but I'd rather figure out why we're calling > `__next_hash_pow2(0)` or `(1)` before deciding how to fix it. It looks like we hit the UB while attempting to shrink a hash table during a

r304000 - Adding a const overload of DesignatedInitExpr::getDesignator().

2017-05-26 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri May 26 10:55:52 2017 New Revision: 304000 URL: http://llvm.org/viewvc/llvm-project?rev=304000=rev Log: Adding a const overload of DesignatedInitExpr::getDesignator(). Modified: cfe/trunk/include/clang/AST/Expr.h Modified: cfe/trunk/include/clang/AST/Expr.h

[PATCH] D33353: [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element

2017-05-26 Thread Ulrich Weigand via Phabricator via cfe-commits
uweigand added a comment. In https://reviews.llvm.org/D33353#765783, @bader wrote: > Could you revert Egor's commit, please? I see Renato Golin has already reverted the commit, thanks ... https://reviews.llvm.org/D33353 ___ cfe-commits mailing

[PATCH] D33447: clang-format: add option to merge empty function body

2017-05-26 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 100420. Typz marked 2 inline comments as done. Typz added a comment. fix indent & rename option to SplitEmptyFunctionBody https://reviews.llvm.org/D33447 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/UnwrappedLineFormatter.cpp

[PATCH] D33447: clang-format: add option to merge empty function body

2017-05-26 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: include/clang/Format/Format.h:644 +/// This option is used only if the opening brace of the function has +/// already +/// been wrapped, i.e. the `AfterFunction` brace wrapping mode is set, and Reflow the

[PATCH] D33353: [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element

2017-05-26 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. This issue probably can be fixed by setting SPIR target architecture or just enabling cl_khr_fp64 extension. Unfortunately, I can't check it today. Could you revert Egor's commit, please? https://reviews.llvm.org/D33353 ___

r303996 - Revert "[OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element"

2017-05-26 Thread Renato Golin via cfe-commits
Author: rengolin Date: Fri May 26 10:32:45 2017 New Revision: 303996 URL: http://llvm.org/viewvc/llvm-project?rev=303996=rev Log: Revert "[OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element" This reverts commit r303986 as it broke all ARM and

[PATCH] D33353: [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element

2017-05-26 Thread Ulrich Weigand via Phabricator via cfe-commits
uweigand added a comment. Looks like this causes the build bot to fail on SystemZ: http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/8741 error: 'error' diagnostics expected but not seen: File

[PATCH] D33588: Fix two sources of UB in __next_hash_pow2 (from __hash_table)

2017-05-26 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I can reproduce this, but I'd rather figure out why we're calling `__next_hash_pow2(0)` or `(1)` before deciding how to fix it. https://reviews.llvm.org/D33588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33447: clang-format: add option to merge empty function body

2017-05-26 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 100412. Typz added a comment. move option to BraceWrapping https://reviews.llvm.org/D33447 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTest.cpp Index:

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-05-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/VTableBuilder.h:160 + "GlobalDecl can be created only from virtual function"); +if (getKind() == CK_FunctionPointer) + return GlobalDecl(getFunctionDecl()); Please use an exhaustive

[PATCH] D33448: [CodeGen] Add thumb-mode to target-features for arm/thumb triples.

2017-05-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. I'll hold off merging this patch until https://reviews.llvm.org/D33436 lands, which fixes a problem with mixed ARM/Thumb codegen https://reviews.llvm.org/D33448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-05-26 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. > Ah damn. Didn't think about the precedences. What I wanted was for the > highest level to have a one char operator, e.g. > > bool a = aa // > << // > | c; > Almost, but not quite: bool a = aa // << //

[PATCH] D31830: Emit invariant.group.barrier when using union field

2017-05-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:3517 +CGM.getCodeGenOpts().StrictVTablePointers && +CGM.getCodeGenOpts().OptimizationLevel > 0) + addr = Address(Builder.CreateInvariantGroupBarrier(addr.getPointer()),

[clang-tools-extra] r303993 - [clangd] Attempt to fix tests failing on Windows

2017-05-26 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri May 26 09:34:34 2017 New Revision: 303993 URL: http://llvm.org/viewvc/llvm-project?rev=303993=rev Log: [clangd] Attempt to fix tests failing on Windows Modified: clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp Modified:

[PATCH] D33597: [OpenCL] Fix pipe size in TypeInfo.

2017-05-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/AST/ASTContext.cpp:1942 case Type::Pipe: { -TypeInfo Info = getTypeInfo(cast(T)->getElementType()); -Width = Info.Width; -Align = Info.Align; +Width = Target->getPointerWidth(0); +Align =

[PATCH] D33598: [libclang] [OpenCL] Expose CIndex functions for typedef and address space

2017-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Expose the following functions: clang_getTypedefName clang_getAddressSpace Patch by Simon Perretta! https://reviews.llvm.org/D33598 Files: bindings/python/clang/cindex.py bindings/python/tests/cindex/test_type.py include/clang-c/Index.h

[PATCH] D33597: [OpenCL] Fix pipe size in TypeInfo.

2017-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Herald added a subscriber: yaxunl. Pipes are now the size of pointers rather than the size of the type that they contain. Patch by Simon Perretta! https://reviews.llvm.org/D33597 Files: lib/AST/ASTContext.cpp test/Index/pipe-size.cl Index:

[PATCH] D33447: clang-format: add option to merge empty function body

2017-05-26 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Lets try this the other way around. I am not ok with introducing an additional top-level option for this. It simply isn't important enough. So find a way for the existing style flags to support what you need and not regress existing users. If that can't be done, I am

[PATCH] D33447: clang-format: add option to merge empty function body

2017-05-26 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D33447#765610, @djasper wrote: > I think it's just wrong that WebKit inherits this. The style guide explicitly > says that this is wrong: > > MyOtherClass::MyOtherClass() : MySuperClass() {} I think this exemple applies to constructors only.

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-05-26 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. In https://reviews.llvm.org/D32478#765642, @Typz wrote: > Nop, it's formatted like this: > > bool a = aa // > == // > && c; > > bool a = aa // > == // >+ c; > > > The current way to

[PATCH] D33082: Fix Libc++ build with MinGW64

2017-05-26 Thread Martell Malone via Phabricator via cfe-commits
martell added a comment. LGTM but I can't speak for the area where you added `#include ` and killed off the `_NEWLIB_VERSION` check Seems in order based on https://sourceware.org/ml/newlib-cvs/2014-q3/msg00038.html Maybe make a note of the minimum newlib version supported somewhere? Others may

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-05-26 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Nop, it's formatted like this: bool a = aa // == // && c; bool a = aa // == // + c; https://reviews.llvm.org/D32478 ___ cfe-commits mailing list

[PATCH] D33592: [OpenCL] Test on half immediate support.

2017-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! https://reviews.llvm.org/D33592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! https://reviews.llvm.org/D31745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33509: [OpenMP] Create COMDAT group for OpenMP offload registration code to avoid multiple copies

2017-05-26 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/D33509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r303986 - [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element

2017-05-26 Thread Egor Churaev via cfe-commits
Author: echuraev Date: Fri May 26 08:30:26 2017 New Revision: 303986 URL: http://llvm.org/viewvc/llvm-project?rev=303986=rev Log: [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element Reviewers: Anastasia Reviewed By: Anastasia Subscribers:

[PATCH] D33447: clang-format: add option to merge empty function body

2017-05-26 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. I think it's just wrong that WebKit inherits this. The style guide explicitly says that this is wrong: MyOtherClass::MyOtherClass() : MySuperClass() {} So I still think we can make this work with the existing options without regressing a behavior that anyone is

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-05-26 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. In https://reviews.llvm.org/D32478#765583, @Typz wrote: > I actually don't know how, but it still manages somehow : I rebuilt this > exact patch to ensure I gave you the correct output. > And the same behavior can be seen in the test cases, where the operator with >

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-05-26 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. I actually don't know how, but it still manages somehow : I rebuilt this exact patch to ensure I gave you the correct output. And the same behavior can be seen in the test cases, where the operator with highest precedence is aligned with the equal sign.

[PATCH] D33447: clang-format: add option to merge empty function body

2017-05-26 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 100393. Typz added a comment. update mozilla style to use empty function blocks https://reviews.llvm.org/D33447 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTest.cpp Index:

[PATCH] D33447: clang-format: add option to merge empty function body

2017-05-26 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Webkit inherits AllowShortFunctionsOnASingleLine = FormatStyle::SFS_All from LLVM style, so merging the options would introduce these explicitely-forbidden empty blocks. But the empty blocks should actually be used in code following Mozilla or Qt style.

[PATCH] D33447: clang-format: add option to merge empty function body

2017-05-26 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. I don't understand. WebKit style would not set AllowShortFunctionsOnASingleLine and so the behavior there wouldn't change, I presume? https://reviews.llvm.org/D33447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33416: [clangd] Allow to use vfs::FileSystem for file accesses.

2017-05-26 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303977: [clangd] Allow to use vfs::FileSystem for file accesses. (authored by ibiryukov). Changed prior to commit: https://reviews.llvm.org/D33416?vs=100262=100389#toc Repository: rL LLVM

[clang-tools-extra] r303977 - [clangd] Allow to use vfs::FileSystem for file accesses.

2017-05-26 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri May 26 07:26:51 2017 New Revision: 303977 URL: http://llvm.org/viewvc/llvm-project?rev=303977=rev Log: [clangd] Allow to use vfs::FileSystem for file accesses. Summary: Custom vfs::FileSystem is currently used for unit tests. This revision depends on

[PATCH] D33592: [OpenCL] Test on half immediate support.

2017-05-26 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. https://reviews.llvm.org/D33592 Files: test/CodeGenOpenCL/half.cl Index: test/CodeGenOpenCL/half.cl === --- test/CodeGenOpenCL/half.cl +++

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-05-26 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. In https://reviews.llvm.org/D32478#765548, @Typz wrote: > In https://reviews.llvm.org/D32478#765537, @djasper wrote: > > > In all honesty, I think this style isn't thought out well enough. It really > > is a special case for only "=" and "return" and even there, it has

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-05-26 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D32478#765537, @djasper wrote: > In all honesty, I think this style isn't thought out well enough. It really > is a special case for only "=" and "return" and even there, it has many cases > where it simply doesn't make sense. And then you have

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-05-26 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. In all honesty, I think this style isn't thought out well enough. It really is a special case for only "=" and "return" and even there, it has many cases where it simply doesn't make sense. And then you have cases like this: bool = aa // == // &&

Re: [PATCH] D33467: Fix LLVM build errors if necent build of GCC 7 is used

2017-05-26 Thread David Abdurachmanov via cfe-commits
Just reminder that this is in C++1z (C++17) mode, which I doubt is being widely used at this point. I was a change a few months ago that caused it, but cannot recall exact commit in GCC. david > On 26 May 2017, at 10:43, Chandler Carruth wrote: > > I kind of think this

[PATCH] D33353: [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element

2017-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! https://reviews.llvm.org/D33353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-05-26 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 100384. Typz added a comment. fix style https://reviews.llvm.org/D32478 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h lib/Format/Format.cpp unittests/Format/FormatTest.cpp

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2017-05-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 100382. baloghadamsoftware added a comment. Ignoring bad_alloc. https://reviews.llvm.org/D33537 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/ExceptionEscapeCheck.cpp clang-tidy/misc/ExceptionEscapeCheck.h

[PATCH] D33589: clang-format: consider not splitting tokens in optimization

2017-05-26 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Still some issues with the patch, I would need some feedback first: - Is this approach desirable, as a relatively easy fix? - Or should this be fixed with a complete refactoring of the way the strings/comments are split, making multiple tokens out of them to let them be

[PATCH] D33589: clang-format: consider not splitting tokens in optimization

2017-05-26 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 100379. Typz added a comment. fix indentation issues https://reviews.llvm.org/D33589 Files: lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h lib/Format/FormatToken.cpp lib/Format/FormatToken.h

[PATCH] D33589: clang-format: consider not splitting tokens in optimization

2017-05-26 Thread Francois Ferrand via Phabricator via cfe-commits
Typz created this revision. Herald added a subscriber: klimek. This patch tries to improve the optimizer a bit, to avoid splitting tokens (e.g. comments/strings) if only there are only few characters beyond the ColumnLimit. Previously, comments/strings would be split whenever they went beyond

Re: [PATCH] D33467: Fix LLVM build errors if necent build of GCC 7 is used

2017-05-26 Thread Chandler Carruth via cfe-commits
Maybe Richard would be a better one to explain what on earth is going on here then... On Fri, May 26, 2017 at 1:51 AM David Abdurachmanov < david.abdurachma...@gmail.com> wrote: > Just reminder that this is in C++1z (C++17) mode, which I doubt is being > widely used at this point. > > I was a

[PATCH] D33588: Fix two sources of UB in __next_hash_pow2 (from __hash_table)

2017-05-26 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. There are two sources of undefined behavior in __next_hash_pow2: an invalid shift (occurs when __n is 0 or 1), and an invalid call to CLZ (when __n=1). This patch corrects both issues. It's NFC for all values of __n which do not trigger UB, and leads to defined results

  1   2   >