Re: [PATCH] D12358: [Analyzer] Handling constant bound loops

2015-08-31 Thread Ted Kremenek via cfe-commits
krememek added a comment. In http://reviews.llvm.org/D12358#235142, @seaneveson wrote: > If I refactor this patch in its current state into a separate file and put it > behind a flag, would it then be acceptable? I would then like to take some > time to look at the invalidation improvements as

Re: [PATCH] D12471: Correct documentation for numSelectorArgs matcher

2015-08-31 Thread Dave Lee via cfe-commits
kastiglione updated this revision to Diff 33665. kastiglione added a comment. Add test case for numSelectorArgs(0) http://reviews.llvm.org/D12471 Files: include/clang/ASTMatchers/ASTMatchers.h unittests/ASTMatchers/ASTMatchersTest.cpp Index: unittests/ASTMatchers/ASTMatchersTest.cpp ==

Re: [PATCH] D12471: Correct documentation for numSelectorArgs matcher

2015-08-31 Thread Dave Lee via cfe-commits
kastiglione marked 2 inline comments as done. kastiglione added a comment. http://reviews.llvm.org/D12471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] r246528 - unwind: cleanup -Wunused-parameter

2015-08-31 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Aug 31 23:29:03 2015 New Revision: 246528 URL: http://llvm.org/viewvc/llvm-project?rev=246528&view=rev Log: unwind: cleanup -Wunused-parameter Cleanup a number of `-Wunused-parameter` warnings. NFC. Modified: libunwind/trunk/src/Registers.hpp Modified: libunwind/

Re: [PATCH] D12511: [LTO] Pass -no-zero-initialized-in-bss on linker command line

2015-08-31 Thread Rafael Espíndola via cfe-commits
On 31 August 2015 at 22:45, Akira Hatanaka wrote: > ahatanak added a comment. > > If it's important to be able to compile one file with > -fno-zero-initialized-in-bss and another without the option, we could add a > bit to GlobalVariable that indicates it shouldn't be go into the bss section. >

Re: [PATCH] D12169: Relax constexpr rules to improve __builtin_object_size's accuracy

2015-08-31 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/ExprConstant.cpp:479 @@ +478,3 @@ + /// that may occur. The intent of this mode is to determine an LValue's + /// Offset, so things not ordinarily allowed in constexprs + /// (reinterpret_casts, OOB array indices, et

Re: [PATCH] D12511: [LTO] Pass -no-zero-initialized-in-bss on linker command line

2015-08-31 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. If it's important to be able to compile one file with -fno-zero-initialized-in-bss and another without the option, we could add a bit to GlobalVariable that indicates it shouldn't be go into the bss section. Is that what you are suggesting? If we are going to take tha

r246526 - Don't use fprintf to emit this diagnostic!

2015-08-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Aug 31 21:35:58 2015 New Revision: 246526 URL: http://llvm.org/viewvc/llvm-project?rev=246526&view=rev Log: Don't use fprintf to emit this diagnostic! Added: cfe/trunk/test/PCH/datetime.c Modified: cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td

Re: [PATCH] D12512: [libcxxabi] Manually align pointers in __cxa_allocate_exception - Fixes PR24604

2015-08-31 Thread Saleem Abdulrasool via cfe-commits
compnerd added a comment. While I can see the argument you raise, the saving grace here is that this is buried in libc++abi. The only real piece of libc++abi of real use to users is `__cxa_demangle` (which is only relevant for Windows, and Darwin where you have two level namespaces). For ever

Re: [PATCH] D12512: [libcxxabi] Manually align pointers in __cxa_allocate_exception - Fixes PR24604

2015-08-31 Thread Eric Fiselier via cfe-commits
EricWF added a comment. In http://reviews.llvm.org/D12512#236988, @majnemer wrote: > In http://reviews.llvm.org/D12512#236987, @EricWF wrote: > > > In http://reviews.llvm.org/D12512#236984, @majnemer wrote: > > > > > Wouldn't this change be problematic if you threw to code which was > > > static

Re: [PATCH] D12512: [libcxxabi] Manually align pointers in __cxa_allocate_exception - Fixes PR24604

2015-08-31 Thread David Majnemer via cfe-commits
majnemer added a comment. In http://reviews.llvm.org/D12512#236987, @EricWF wrote: > In http://reviews.llvm.org/D12512#236984, @majnemer wrote: > > > Wouldn't this change be problematic if you threw to code which was > > statically linked with a prior version of libcxxabi? > > > How do you mean?

r246524 - Use a more appropriate way of writing 1.

2015-08-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Aug 31 21:02:09 2015 New Revision: 246524 URL: http://llvm.org/viewvc/llvm-project?rev=246524&view=rev Log: Use a more appropriate way of writing 1. Modified: cfe/trunk/lib/Serialization/ASTReader.cpp Modified: cfe/trunk/lib/Serialization/ASTReader.cpp URL: http://l

Re: [PATCH] D12512: [libcxxabi] Manually align pointers in __cxa_allocate_exception - Fixes PR24604

2015-08-31 Thread Eric Fiselier via cfe-commits
EricWF added a comment. In http://reviews.llvm.org/D12512#236984, @majnemer wrote: > Wouldn't this change be problematic if you threw to code which was statically > linked with a prior version of libcxxabi? How do you mean? As in you have two different versions of libc++abi linked into one ex

r246523 - [MS ABI] Cleanup get*ForUnnamedTagDecl

2015-08-31 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Aug 31 20:53:07 2015 New Revision: 246523 URL: http://llvm.org/viewvc/llvm-project?rev=246523&view=rev Log: [MS ABI] Cleanup get*ForUnnamedTagDecl Use "lookup" instead of operator[], it will not perform unnecessary insertions. No functionality change is intended. Modi

Re: [PATCH] D12512: [libcxxabi] Manually align pointers in __cxa_allocate_exception - Fixes PR24604

2015-08-31 Thread David Majnemer via cfe-commits
majnemer added a comment. Wouldn't this change be problematic if you threw to code which was statically linked with a prior version of libcxxabi? http://reviews.llvm.org/D12512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

r246521 - [modules] Preserve DeclID order when merging lookup tables to give a more

2015-08-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Aug 31 20:37:34 2015 New Revision: 246521 URL: http://llvm.org/viewvc/llvm-project?rev=246521&view=rev Log: [modules] Preserve DeclID order when merging lookup tables to give a more predictable diagnostic experience. The hash-of-DeclID order we were using before gave diffe

Re: [PATCH] D12511: [LTO] Pass -no-zero-initialized-in-bss on linker command line

2015-08-31 Thread Rafael Ávila de Espíndola via cfe-commits
rafael added a subscriber: rafael. rafael added a comment. Looks like something that should be in the bitcode, no? What happens if one compile unit has it and another one doesn't? http://reviews.llvm.org/D12511 ___ cfe-commits mailing list cfe-commi

Re: [PATCH] D12511: [LTO] Pass -no-zero-initialized-in-bss on linker command line

2015-08-31 Thread Rafael Espíndola via cfe-commits
Looks like something that should be in the bitcode, no? What happens if one compile unit has it and another one doesn't? On Aug 31, 2015 8:50 PM, "Akira Hatanaka via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > ahatanak created this revision. > ahatanak added reviewers: echristo, dexonsmith

r246520 - Fix path seperator for Windows.

2015-08-31 Thread Yaron Keren via cfe-commits
Author: yrnkrn Date: Mon Aug 31 20:29:13 2015 New Revision: 246520 URL: http://llvm.org/viewvc/llvm-project?rev=246520&view=rev Log: Fix path seperator for Windows. Modified: cfe/trunk/test/Driver/solaris-ld.c Modified: cfe/trunk/test/Driver/solaris-ld.c URL: http://llvm.org/viewvc/llvm-pr

[PATCH] D12512: [libcxxabi] Manually align pointers in __cxa_allocate_exception - Fixes PR24604

2015-08-31 Thread Eric Fiselier via cfe-commits
EricWF created this revision. EricWF added reviewers: mclow.lists, danalbert, compnerd, majnemer. EricWF added a subscriber: cfe-commits. In 32 bit builds the __cxa_exception class has an alignment requirement greater than the maximal alignment supported by malloc. If this is the case we need to

[libcxxabi] r246516 - Convert LIBCXXABI_BUILD_32_BITS to LLVM_BUILD_32_BITS.

2015-08-31 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Aug 31 20:02:06 2015 New Revision: 246516 URL: http://llvm.org/viewvc/llvm-project?rev=246516&view=rev Log: Convert LIBCXXABI_BUILD_32_BITS to LLVM_BUILD_32_BITS. Modified: libcxxabi/trunk/test/CMakeLists.txt libcxxabi/trunk/test/lit.site.cfg.in Modified: libcxxa

[PATCH] D12511: [LTO] Pass -no-zero-initialized-in-bss on linker command line

2015-08-31 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: echristo, dexonsmith. ahatanak added a subscriber: cfe-commits. Clang driver option -fno-zero-initialized-in-bss is used to prevent global variables that are initialized to zero from being placed in the bss section, but is currently ignor

Re: [PATCH] D11844: [Modules] More descriptive diagnostics for misplaced import directive

2015-08-31 Thread Sean Silva via cfe-commits
silvas added a comment. ping? http://reviews.llvm.org/D11844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-08-31 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 33654. tra marked 2 inline comments as done. tra added a comment. addressed eliben@'s comments. http://reviews.llvm.org/D12453 Files: include/clang/Basic/Builtins.h include/clang/Basic/LangOptions.def include/clang/Driver/CC1Options.td include/clang/Sem

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-08-31 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: include/clang/Sema/Sema.h:8599 @@ +8598,3 @@ +CFP_Never, // Invalid caller/callee combination. +CFP_LastResort, // same as CFP_Never or CFP_Fallback, depending on +// -fcuda-disable-target-call-checks option -

r246510 - [PowerPC] Support __builtin_ppc_get_timebase

2015-08-31 Thread Hal Finkel via cfe-commits
Author: hfinkel Date: Mon Aug 31 18:55:19 2015 New Revision: 246510 URL: http://llvm.org/viewvc/llvm-project?rev=246510&view=rev Log: [PowerPC] Support __builtin_ppc_get_timebase GCC 4.8+ has a PowerPC-specific intrinsic, __builtin_ppc_get_timebase, to do what Clang's __builtin_readcyclecounter d

[PATCH] D12508: [libcxx] Make it drastically simpler to link libc++.

2015-08-31 Thread Eric Fiselier via cfe-commits
EricWF created this revision. EricWF added reviewers: mclow.lists, danalbert, jroelofs, rsmith. EricWF added a subscriber: cfe-commits. Currently on most platforms you have to manually link the c++ abi library used with libc++ whenever you use libc++. So your typical libc++ command like invocati

Re: r246468 - Pull the target attribute parsing out of CGCall and onto TargetInfo.

2015-08-31 Thread Eric Christopher via cfe-commits
On Mon, Aug 31, 2015 at 4:34 PM Richard Smith wrote: > On Mon, Aug 31, 2015 at 11:39 AM, Eric Christopher via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: echristo >> Date: Mon Aug 31 13:39:22 2015 >> New Revision: 246468 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=24646

Re: r246468 - Pull the target attribute parsing out of CGCall and onto TargetInfo.

2015-08-31 Thread Richard Smith via cfe-commits
On Mon, Aug 31, 2015 at 11:39 AM, Eric Christopher via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: echristo > Date: Mon Aug 31 13:39:22 2015 > New Revision: 246468 > > URL: http://llvm.org/viewvc/llvm-project?rev=246468&view=rev > Log: > Pull the target attribute parsing out of CGCa

r246508 - Revert "Pull the target attribute parsing out of CGCall and onto TargetInfo."

2015-08-31 Thread Eric Christopher via cfe-commits
Author: echristo Date: Mon Aug 31 18:19:55 2015 New Revision: 246508 URL: http://llvm.org/viewvc/llvm-project?rev=246508&view=rev Log: Revert "Pull the target attribute parsing out of CGCall and onto TargetInfo." This reverts commit r246468 while we figure out what to do about Basic and AST. Mod

Re: r246468 - Pull the target attribute parsing out of CGCall and onto TargetInfo.

2015-08-31 Thread Eric Christopher via cfe-commits
Aha. This is what's causing Siva Chandra's problem. Hrm, I'll see what I can figure out. I'll revert until then or talk to Richard. -eric On Mon, Aug 31, 2015 at 4:02 PM Hans Wennborg wrote: > This change makes Basic depend on AST. > > The immediate problem I'm hitting is clang-format (which u

Re: r246229 - [X86] Conditionalize Darwin MaxVectorAlign on the presence of AVX.

2015-08-31 Thread Ahmed Bougacha via cfe-commits
On Thu, Aug 27, 2015 at 7:19 PM, Eric Christopher wrote: > Hi Ahmed, > > A quick note: I think this is going to fail in the presence of the target > attribute. I.e. if someone decorates a function with > __attribute__((target("avx512"))) this is unlikely to catch that. > You're right; any ideas

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-31 Thread Samuel Antao via cfe-commits
sfantao added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2991-3005 @@ +2990,17 @@ + +/// \brief Values for bit flags used to specify the mapping type for +/// offloading. +enum OpenMPOffloadMappingFlags { + /// \brief Allocate memory on the device and move data

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-31 Thread Samuel Antao via cfe-commits
sfantao updated this revision to Diff 33640. sfantao added a comment. Address last review comments. http://reviews.llvm.org/D11361 Files: lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGOpenMPRuntime.h lib/CodeGen/CGStmtOpenMP.cpp test/OpenMP/target_codegen.cpp Index: test/OpenMP/target_

Re: r246468 - Pull the target attribute parsing out of CGCall and onto TargetInfo.

2015-08-31 Thread Hans Wennborg via cfe-commits
This change makes Basic depend on AST. The immediate problem I'm hitting is clang-format (which uses Basic but not AST) failing to link on Windows [1], but I suspect this could cause problems elsewhere too. Is there some way to avoid this dependency? [1]. http://build.chromium.org/p/chromium.f

[PATCH] D12505: [X86] Set MaxVectorAlign for non-Darwin targets as well.

2015-08-31 Thread Ahmed Bougacha via cfe-commits
ab created this revision. ab added reviewers: echristo, rnk. ab added subscribers: alexr, dim, dschuff, tberghammer, cfe-commits. Follow-up to r246229: this isn't Darwin-specific, so let's enable it for all X86 targets. Quoting r160209, which introduced it: ``` Currently, if no aligned attribut

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-08-31 Thread Eli Bendersky via cfe-commits
eliben added inline comments. Comment at: include/clang/Sema/Sema.h:8599 @@ +8598,3 @@ +CFP_Never, // Invalid caller/callee combination. +CFP_LastResort, // same as CFP_Never or CFP_Fallback, depending on +// -fcuda-disable-target-call-checks optio

r246504 - [modules] Add some missing blockinfo records.

2015-08-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Aug 31 17:43:10 2015 New Revision: 246504 URL: http://llvm.org/viewvc/llvm-project?rev=246504&view=rev Log: [modules] Add some missing blockinfo records. Modified: cfe/trunk/include/clang/Serialization/ASTBitCodes.h cfe/trunk/lib/Serialization/ASTWriter.cpp Modif

Re: [PATCH] fix parentheses location in a CXXConstructExpr

2015-08-31 Thread Olivier Goffart via cfe-commits
On Monday 31. August 2015 08:07:58 Manuel Klimek wrote: > On Sat, Aug 29, 2015 at 12:23 PM Olivier Goffart via cfe-commits < > > cfe-commits@lists.llvm.org> wrote: > > Hi, > > > > Please review the attached patch. > > > > In Sema::BuildCXXFunctionalCastExpr, if the class has a destructor, the >

Re: [PATCH] D12471: Correct documentation for numSelectorArgs matcher

2015-08-31 Thread Dave Lee via cfe-commits
kastiglione added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:2140-2153 @@ -2139,16 +2139,16 @@ /// \brief Matches when the selector has the specified number of arguments /// -/// matcher = objCMessageExpr(numSelectorArgs(1)); +/// matcher = objCMess

r246497 - [modules] Rework serialized DeclContext lookup table management. Instead of

2015-08-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Aug 31 17:17:11 2015 New Revision: 246497 URL: http://llvm.org/viewvc/llvm-project?rev=246497&view=rev Log: [modules] Rework serialized DeclContext lookup table management. Instead of walking the loaded ModuleFiles looking for lookup tables for the context, store them all

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-31 Thread Dan Gohman via cfe-commits
sunfish updated this revision to Diff 33637. sunfish added a comment. Updated to address review comments: - added comments - simplified Triple validation code - removed -mcpu="native" code Repository: rL LLVM http://reviews.llvm.org/D12002 Files: include/clang/Basic/BuiltinsWebAssembly.de

Re: [PATCH] D12301: [PATCH] New checker for UB in handler of a function-try-block

2015-08-31 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Couple of thoughts, but LGTM. Comment at: lib/Sema/SemaExprMember.cpp:889 @@ +888,3 @@ +S = S->getParent(); + } while (S != S->getFnParent()); + return false; --

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-31 Thread Dan Gohman via cfe-commits
sunfish added a comment. Thanks for the review! Comment at: include/clang/Basic/TargetCXXABI.h:166 @@ -148,1 +165,3 @@ + /// \brief Are member functions differently aligned? + bool areMemberFunctionsAligned() const { echristo wrote: > Can you elaborate on th

Re: [PATCH] D11582: Fix assertion failure in TransformOpaqueValueExpr

2015-08-31 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Sorry for the delay, LGTM. http://reviews.llvm.org/D11582 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

Re: [PATCH] D12446: [PATCH] Enable clang-tidy misc-static-assert for C11

2015-08-31 Thread Aaron Ballman via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks! I've commit in r246494 and r246495. http://reviews.llvm.org/D12446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang-tools-extra] r246495 - Allow the static assert clang-tidy checker to run over C code.

2015-08-31 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Mon Aug 31 16:54:42 2015 New Revision: 246495 URL: http://llvm.org/viewvc/llvm-project?rev=246495&view=rev Log: Allow the static assert clang-tidy checker to run over C code. Added: clang-tools-extra/trunk/test/clang-tidy/misc-static-assert.c Modified: clang-too

[clang-tools-extra] r246494 - Help the clang-tidy helper script to understand C files better.

2015-08-31 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Mon Aug 31 16:53:55 2015 New Revision: 246494 URL: http://llvm.org/viewvc/llvm-project?rev=246494&view=rev Log: Help the clang-tidy helper script to understand C files better. Modified: clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py Modified: clang-too

r246492 - Fix CHECK directives that weren't checking.

2015-08-31 Thread Hans Wennborg via cfe-commits
Author: hans Date: Mon Aug 31 16:48:52 2015 New Revision: 246492 URL: http://llvm.org/viewvc/llvm-project?rev=246492&view=rev Log: Fix CHECK directives that weren't checking. Modified: cfe/trunk/test/CodeGen/builtin-cpu-supports.c cfe/trunk/test/CodeGen/builtins-ppc-crypto.c cfe/trunk

Re: [PATCH] D12446: [PATCH] Enable clang-tidy misc-static-assert for C11

2015-08-31 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG http://reviews.llvm.org/D12446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D11963: Create a __config_site file to capture configuration decisions.

2015-08-31 Thread Jonathan Roelofs via cfe-commits
jroelofs added a comment. Without the context of this review, this strategy probably won't make any sense. So it's probably worth capturing these notes in a comment that describes why we're doing it that way. http://reviews.llvm.org/D11963 ___ cfe

Re: [PATCH] D12087: always_inline codegen rewrite

2015-08-31 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: rnk. Comment at: lib/CodeGen/CodeGenModule.cpp:469-470 @@ +468,4 @@ + llvm::LLVMContext &Ctx = getModule().getContext(); + llvm::Function *StubFn = + llvm::Function::Create(FT, Fn->getLinkage(), Name, &getModule()); + assert(StubFn->getName() == Nam

Re: [PATCH] D11740: ABI versioning macros for libc++

2015-08-31 Thread Eric Fiselier via cfe-commits
EricWF added a comment. FYI I'm focusing on getting http://reviews.llvm.org/D11963 in so that it stops blocking this patch. http://reviews.llvm.org/D11740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

Re: [PATCH] D11740: ABI versioning macros for libc++

2015-08-31 Thread Eric Fiselier via cfe-commits
EricWF added a comment. FYI I'm focusing on getting http://reviews.llvm.org/D11963 in so that it stops blocking this patch. http://reviews.llvm.org/D11740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

Re: [PATCH] D11963: Create a __config_site file to capture configuration decisions.

2015-08-31 Thread Eric Fiselier via cfe-commits
EricWF added a comment. In http://reviews.llvm.org/D11963#236376, @jroelofs wrote: > In http://reviews.llvm.org/D11963#236045, @EricWF wrote: > > > So that's not what happens but that's because libc++ builds using the > > headers in the source directory. During the build all of the macros in the

Re: [PATCH] D11948: Add some macros to abstract marking of parameters as "not null", and use them in

2015-08-31 Thread Marshall Clow via cfe-commits
mclow.lists updated this revision to Diff 33624. mclow.lists added a comment. Fixed a typo in the patch for `strncmp`, and added a macro `_LIBCPP_HAS_NO_NONNULL` to allow people to disable these checks. Marked them as disabled for non-clang and non-gcc compilers. http://reviews.llvm.org/D11948

Re: [PATCH] D12444: [Sema] Avoid crash on tag-type mismatch (Fixes PR24610)

2015-08-31 Thread Vedant Kumar via cfe-commits
vsk updated the summary for this revision. vsk updated this revision to Diff 33623. vsk added a comment. - Keep the assert, return early if the declaration is invalid. http://reviews.llvm.org/D12444 Files: lib/Sema/SemaDecl.cpp test/Sema/enum.c Index: test/Sema/enum.c =

Re: [PATCH][Solaris] Clang/Driver, stop hardcoding GCC paths in crt/ld.so lookup

2015-08-31 Thread Rafael Espíndola via cfe-commits
r246473. On 31 August 2015 at 13:30, Xan López wrote: > Oops, missed this. Here is the updated patch. > > And yes please, commit the patch for me. > > Cheers, > > Xan > > On Mon, Aug 31, 2015 at 01:07:35PM -0400, Rafael Espíndola wrote: >> Do you have a version with the last suggestions? I lgtmed

Re: [PATCH] D12502: [libcxx] Better constain tuples constructors -- Fix PR23256 and PR22806

2015-08-31 Thread Eric Fiselier via cfe-commits
EricWF added reviewers: K-ballo, howard.hinnant. EricWF added a comment. Adding K-ballo and Howard Hinnant as reviewers. This patch could use all the eyes it could get. http://reviews.llvm.org/D12502 ___ cfe-commits mailing list cfe-commits@lists.l

Re: [PATCH] D8178: [libcxx] Fix PR22806 - Tuple incorrectly selects copy/move constructor when storing nested tuple-like types.

2015-08-31 Thread Eric Fiselier via cfe-commits
EricWF abandoned this revision. EricWF added a comment. Actually abandoning. Sorry for the spam. http://reviews.llvm.org/D8178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D8178: [libcxx] Fix PR22806 - Tuple incorrectly selects copy/move constructor when storing nested tuple-like types.

2015-08-31 Thread Eric Fiselier via cfe-commits
EricWF accepted this revision. EricWF added a reviewer: EricWF. EricWF added a comment. This revision is now accepted and ready to land. Abandoning for patch http://reviews.llvm.org/D12502. http://reviews.llvm.org/D8178 ___ cfe-commits mailing list

Re: [PATCH] D9085: Fix tuple to A conversion in SFINAE for tuple(_Up...) constructor

2015-08-31 Thread Eric Fiselier via cfe-commits
EricWF added a comment. Another possible fix up for review as http://reviews.llvm.org/D12502. Repository: rL LLVM http://reviews.llvm.org/D9085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D12502: [libcxx] Better constain tuples constructors -- Fix PR23256 and PR22806

2015-08-31 Thread Eric Fiselier via cfe-commits
EricWF created this revision. EricWF added reviewers: mclow.lists, eugenis, ldionne. EricWF added a subscriber: cfe-commits. This patch fixes the following bugs: * PR23256 tuple is_constructible attempts tuple to A conversion: * Fix this by disabling the UTypes... overloads using the `_

Re: [PATCH] D11832: [Patch] [Analyzer] false positive: Potential leak connected with memcpy (PR 22954)

2015-08-31 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. I reverted the commit until this assertion is fixed. Steps to reproduce: Download the following preprocessed file: F804743: clang_crash_7QnDaH.i Execute the analyzer on that one: clang -cc1 -analyze -analyzer-checker=core -analyzer-ch

[PATCH] D12501: [clang-format] Obj-C dictionary literals: Fixed typecast getting put on a separate line from the key

2015-08-31 Thread Kent Sutherland via cfe-commits
ksuther created this revision. ksuther added a reviewer: djasper. ksuther added a subscriber: cfe-commits. Herald added a subscriber: klimek. Fixes this bug: https://llvm.org/bugs/show_bug.cgi?id=22647 The following dictionary was getting formatted oddly: NSDictionary *query = @{ (__bridge i

Re: [PATCH] D12462: [PATCH] [clang-tidy] Add inconsistent declaration parameter name check

2015-08-31 Thread Piotr Dziwinski via cfe-commits
piotrdz marked an inline comment as done. piotrdz added a comment. Now this issue with templates is a bit difficult for me. I tried everything that seems to have made sense, but I still get output like this: /work/clang-trunk/clang-tools-extra/test/clang-tidy/readability-inconsistent-declarat

Re: [PATCH] D12462: [PATCH] [clang-tidy] Add inconsistent declaration parameter name check

2015-08-31 Thread Piotr Dziwinski via cfe-commits
piotrdz updated this revision to Diff 33619. piotrdz marked 3 inline comments as done. piotrdz added a comment. Applied fixes for most issues found in review. http://reviews.llvm.org/D12462 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/InconsistentDeclarationParameterN

r246479 - Revert r246345 until an assertion is fixed.

2015-08-31 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Mon Aug 31 15:10:35 2015 New Revision: 246479 URL: http://llvm.org/viewvc/llvm-project?rev=246479&view=rev Log: Revert r246345 until an assertion is fixed. Removed: cfe/trunk/test/Analysis/pr22954.c Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Me

Re: [PATCH] D12462: [PATCH] [clang-tidy] Add inconsistent declaration parameter name check

2015-08-31 Thread Piotr Dziwinski via cfe-commits
piotrdz marked 7 inline comments as done. Comment at: clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp:23 @@ +22,3 @@ + +struct CheckResult { + CheckResult(bool HasInconsistentParams, alexfh wrote: > Maybe use `llvm::Optional`? Or, if you don

Re: [PATCH] D12489: [clang-format] Fixed missing space between Obj-C for/in and a typecast

2015-08-31 Thread Kent Sutherland via cfe-commits
ksuther added a reviewer: djasper. ksuther added a comment. This is my first commit and I'm trying to figure out the system, hope I'm doing this right. http://reviews.llvm.org/D12489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

Re: [PATCH] D12444: [Sema] Avoid crash on tag-type mismatch (Fixes PR24610)

2015-08-31 Thread David Majnemer via cfe-commits
majnemer added a comment. I think it'd be nice if we keep the assert but make `setTagNameForLinkagePurposes` early-return if `TagFromDeclSpec->isInvalidDecl()` returns true. How does that sound to you? http://reviews.llvm.org/D12444 ___ cfe-commi

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-31 Thread Eric Christopher via cfe-commits
echristo added a subscriber: echristo. echristo added a comment. Some inline comments. Thanks! -eric Comment at: include/clang/Basic/TargetCXXABI.h:166 @@ -148,1 +165,3 @@ + /// \brief Are member functions differently aligned? + bool areMemberFunctionsAligned() const { ---

Re: [PATCH] D11832: [Patch] [Analyzer] false positive: Potential leak connected with memcpy (PR 22954)

2015-08-31 Thread inż . Piotr Zegar via cfe-commits
I also got crash with this commit: 0x00f52d4b in (anonymous namespace)::CStringChecker::InvalidateBuffer(clang::ento::CheckerContext&, llvm::IntrusiveRefCntPtr, clang::Expr const*, clang::ento::SVal, bool, clang::Expr const*) () at llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecke

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-31 Thread Dan Gohman via cfe-commits
sunfish updated this revision to Diff 33611. sunfish marked 2 inline comments as done. sunfish added a comment. Herald added a subscriber: dschuff. Minor updates to keep the patch building and working as code changes around it. Also enabled -mthread-model. Repository: rL LLVM http://reviews.

Re: [PATCH] D11815: Pass subtarget feature "force-align-stack"

2015-08-31 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In http://reviews.llvm.org/D11815#236368, @vkalintiris wrote: > In http://reviews.llvm.org/D11815#235394, @ahatanak wrote: > > > The cc1 option "-mstackrealign" now means "force stack realignment" rather > > than "allow stack realignment" and causes function attribute "

Re: [PATCH] D12359: New warning -Wnonconst-parameter when a pointer parameter can be const

2015-08-31 Thread Aaron Ballman via cfe-commits
On Mon, Aug 31, 2015 at 2:58 PM, Daniel Marjamäki wrote: > danielmarjamaki added a comment. > > In http://reviews.llvm.org/D12359#236334, @aaron.ballman wrote: > >> I have concerns about this being a frontend warning. The true positive rate >> seems rather high given the benign nature of the diag

r246473 - Stop hardcoding GCC paths in crt/ld.so lookup.

2015-08-31 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Mon Aug 31 14:17:51 2015 New Revision: 246473 URL: http://llvm.org/viewvc/llvm-project?rev=246473&view=rev Log: Stop hardcoding GCC paths in crt/ld.so lookup. This patch refactors the code to use the GCC installation detector (modified so that it works in Solaris), and uses T

Re: [PATCH] D11832: [Patch] [Analyzer] false positive: Potential leak connected with memcpy (PR 22954)

2015-08-31 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. Hi! With this patch committed I noticed a regression in the static analyzer. I analyzed openssl-1.0.0d (using the test suite in utils/analyzer/SATestBuild.py). I got the following assertion error: (lldb) bt - thread #1: tid = 0xa1fcb, 0x7fff943e50ae libsystem_ke

Re: [PATCH] D8178: [libcxx] Fix PR22806 - Tuple incorrectly selects copy/move constructor when storing nested tuple-like types.

2015-08-31 Thread Eric Fiselier via cfe-commits
EricWF added a comment. In http://reviews.llvm.org/D8178#236180, @EricWF wrote: > I think this patch is actually pretty close to correct but thinking about > tuple hurts my brain. > > @mclow.lists can you start reviewing this when you have time. @mclow.lists Nevermind I think I have a better f

Re: [PATCH] D12359: New warning -Wnonconst-parameter when a pointer parameter can be const

2015-08-31 Thread Daniel Marjamäki via cfe-commits
danielmarjamaki added a comment. In http://reviews.llvm.org/D12359#236334, @aaron.ballman wrote: > I have concerns about this being a frontend warning. The true positive rate > seems rather high given the benign nature of the diagnostic, and the false > negative rate is quite high. This seems l

r246469 - [MS ABI] Correctly mangle classes without names for linkage purposes

2015-08-31 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Aug 31 13:48:39 2015 New Revision: 246469 URL: http://llvm.org/viewvc/llvm-project?rev=246469&view=rev Log: [MS ABI] Correctly mangle classes without names for linkage purposes A class without a name for linkage purposes gets a name along the lines of where foo is eith

r246467 - Pull out the ppc incompatible features check into a separate function.

2015-08-31 Thread Eric Christopher via cfe-commits
Author: echristo Date: Mon Aug 31 13:39:16 2015 New Revision: 246467 URL: http://llvm.org/viewvc/llvm-project?rev=246467&view=rev Log: Pull out the ppc incompatible features check into a separate function. Modified: cfe/trunk/lib/Basic/Targets.cpp Modified: cfe/trunk/lib/Basic/Targets.cpp UR

r246468 - Pull the target attribute parsing out of CGCall and onto TargetInfo.

2015-08-31 Thread Eric Christopher via cfe-commits
Author: echristo Date: Mon Aug 31 13:39:22 2015 New Revision: 246468 URL: http://llvm.org/viewvc/llvm-project?rev=246468&view=rev Log: Pull the target attribute parsing out of CGCall and onto TargetInfo. Also: - Add a typedef to make working with the result easier. - Update callers to use the

Re: [PATCH][Solaris] Clang/Driver, stop hardcoding GCC paths in crt/ld.so lookup

2015-08-31 Thread Xan López via cfe-commits
Oops, missed this. Here is the updated patch. And yes please, commit the patch for me. Cheers, Xan On Mon, Aug 31, 2015 at 01:07:35PM -0400, Rafael Espíndola wrote: > Do you have a version with the last suggestions? I lgtmed it conditional on > it. Do you need someone to commit it for you? >

r246455 - [CUDA] fix codegen for __nvvm_atom_min/max_gen_u*

2015-08-31 Thread Jingyue Wu via cfe-commits
Author: jingyue Date: Mon Aug 31 12:25:51 2015 New Revision: 246455 URL: http://llvm.org/viewvc/llvm-project?rev=246455&view=rev Log: [CUDA] fix codegen for __nvvm_atom_min/max_gen_u* Summary: Clang should emit "atomicrmw umin/umax" instead of "atomicrmw min/max". Reviewers: eliben, tra Subscri

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-08-31 Thread Beren Minor via cfe-commits
berenm added a comment. Sure, no worries. http://reviews.llvm.org/D12407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12462: [PATCH] [clang-tidy] Add inconsistent declaration parameter name check

2015-08-31 Thread Piotr Dziwinski via cfe-commits
piotrdz added a comment. @alexfh: Thanks for reviewing my code. The amount of comments makes it pretty clear that it's my first contribution here :-). But no worries, I'll address each issue. > This check seems pretty similar to the check implemented in > clang-tidy/readability/NamedParameterC

Re: [PATCH] D12435: [Concepts] Add diagnostic; invalid specifier on function or variable concept declaration

2015-08-31 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 33587. nwilson added a comment. Change the wording of diagnostic message and quote the invalid specifier. Add 'friend' as an invalid specifier and diagnose function concepts when 'friend' is specified. Reorder the list of invalid specifiers and corresponding

Re: [PATCH][Solaris] Clang/Driver, stop hardcoding GCC paths in crt/ld.so lookup

2015-08-31 Thread Rafael Espíndola via cfe-commits
Do you have a version with the last suggestions? I lgtmed it conditional on it. Do you need someone to commit it for you? On Aug 23, 2015 7:07 PM, "Rafael Espíndola" wrote: > SolarisScanLibDirForGCCTriple should start with a lower case. Starting > it with "scan" would probably also be more in l

Re: r246384 - [OpenMP] Make the filetered clause iterator a real iterator and type safe.

2015-08-31 Thread David Blaikie via cfe-commits
On Mon, Aug 31, 2015 at 9:48 AM, Benjamin Kramer wrote: > > > On Mon, Aug 31, 2015 at 5:12 PM, David Blaikie wrote: > >> Any chance this would be improved/further simplified by basing it on the >> adapter_iterator helper in LLVM's STL Utilities? >> > > Fair enough, r246452. I was a bit nervous b

Re: r246384 - [OpenMP] Make the filetered clause iterator a real iterator and type safe.

2015-08-31 Thread Benjamin Kramer via cfe-commits
On Mon, Aug 31, 2015 at 5:12 PM, David Blaikie wrote: > Any chance this would be improved/further simplified by basing it on the > adapter_iterator helper in LLVM's STL Utilities? > Fair enough, r246452. I was a bit nervous because this iterator overrides operator++ but iterator_adaptor_base see

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-08-31 Thread Manuel Klimek via cfe-commits
klimek added a subscriber: klimek. klimek added a comment. I'll need to try to build / install it. I'll take a couple of days, I'm currently swamped. Hope that's ok. http://reviews.llvm.org/D12407 ___ cfe-commits mailing list cfe-commits@lists.llvm.

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-08-31 Thread Manuel Klimek via cfe-commits
I'll need to try to build / install it. I'll take a couple of days, I'm currently swamped. Hope that's ok. On Mon, Aug 31, 2015 at 6:25 PM Hans Wennborg wrote: > hans added a comment. > > I also don't know anything about how this plugin works, I just build it :) > I'm hoping Manuel can take a lo

r246452 - [OpenMP] base specific_clause_iterator on iterator_adaptor_base.

2015-08-31 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Aug 31 11:45:35 2015 New Revision: 246452 URL: http://llvm.org/viewvc/llvm-project?rev=246452&view=rev Log: [OpenMP] base specific_clause_iterator on iterator_adaptor_base. Removes some boilerplate code. No functionality change intended. Modified: cfe/trunk/include/clan

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-08-31 Thread Hans Wennborg via cfe-commits
hans added a comment. I also don't know anything about how this plugin works, I just build it :) I'm hoping Manuel can take a look. http://reviews.llvm.org/D12407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

Re: [PATCH] D12446: [PATCH] Enable clang-tidy misc-static-assert for C11

2015-08-31 Thread Aaron Ballman via cfe-commits
aaron.ballman updated this revision to Diff 33584. aaron.ballman added a comment. Only use a single test file with two RUN lines. http://reviews.llvm.org/D12446 Files: clang-tidy/misc/StaticAssertCheck.cpp test/clang-tidy/check_clang_tidy.py test/clang-tidy/misc-static-assert.c Index: te

Re: [PATCH] D12473: [clang-tidy] Add old style function check

2015-08-31 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A high-level comment: It seems that the scope of the check is artificially made too narrow. The check could actually look at any POD variables declared unnecessarily far from their initialization and usages. And here the value of the check would also be much higher, if

Re: [PATCH] D12458: [clang] add __builtin_unpredictable and convert to metadata

2015-08-31 Thread Krzysztof Parzyszek via cfe-commits
kparzysz added a comment. LGTM Comment at: lib/CodeGen/CodeGenFunction.cpp:1238 @@ -1217,3 +1237,3 @@ } - Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights); + Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights, Unpredictable); } spatel wr

Re: [PATCH] D12446: [PATCH] Enable clang-tidy misc-static-assert for C11

2015-08-31 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/misc-static-assert-c99.c:2 @@ +1,3 @@ +// RUN: %python %S/check_clang_tidy.py %s misc-static-assert %t -- -std=c99 + +void abort() {} alexfh wrote: > klimek wrote: > > aaron.ballman wrote: > > > I am

Re: [PATCH] D12446: [PATCH] Enable clang-tidy misc-static-assert for C11

2015-08-31 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: test/clang-tidy/misc-static-assert-c99.c:1 @@ +1,2 @@ +// RUN: %python %S/check_clang_tidy.py %s misc-static-assert %t -- -std=c99 + alexfh wrote: > Instead of duplicating the test, you could add a second run line in the o

  1   2   >