r275466 - [arcmt/objcmt] Fix ParentMap crash with invalid code.

2016-07-14 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Thu Jul 14 15:21:16 2016 New Revision: 275466 URL: http://llvm.org/viewvc/llvm-project?rev=275466&view=rev Log: [arcmt/objcmt] Fix ParentMap crash with invalid code. rdar://22489560 Added: cfe/trunk/test/ARCMT/objcmt-invalid-code.mm cfe/trunk/test/ARCMT/objcmt-in

[PATCH] D22381: cppcoreguidelines-pro-bounds-constant-array-index: ignore implicit constructor

2016-07-14 Thread Matthias Gehre via cfe-commits
mgehre created this revision. mgehre added reviewers: alexfh, aaron.ballman. mgehre added a subscriber: cfe-commits. Herald added subscribers: nemanjai, aemerson. The code struct A { int x[3]; }; gets an compiler-generated copy constructor that uses ArraySubscriptExpr (see below). Previ

Re: [PATCH] D22069: clang-tidy modernize-loop-convert: preserve type of alias declaration (bug 28341)

2016-07-14 Thread Matthias Gehre via cfe-commits
mgehre added a comment. I additionally have run the check on blender and ITK and the assert did not fire. https://reviews.llvm.org/D22069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Richard Smith via cfe-commits
On Thu, Jul 14, 2016 at 10:15 AM, Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi, > > this fires on (at least) usrsctplib [1]: > > FAILED: obj/third_party/usrsctp/usrsctp/sctp_input.o > ../../third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c:1708:15: > error: tak

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Nico Weber via cfe-commits
On Thu, Jul 14, 2016 at 5:07 PM, Richard Smith wrote: > On Thu, Jul 14, 2016 at 10:15 AM, Nico Weber via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Hi, >> >> this fires on (at least) usrsctplib [1]: >> >> FAILED: obj/third_party/usrsctp/usrsctp/sctp_input.o >> ../../third_party/usrsc

Re: [PATCH] D21545: CodeGen: Replace ThinLTO backend implementation with a client of LTO/Resolution.

2016-07-14 Thread Peter Collingbourne via cfe-commits
pcc updated this revision to Diff 64043. pcc added a comment. - Add a FIXME https://reviews.llvm.org/D21545 Files: lib/CodeGen/BackendUtil.cpp lib/CodeGen/CMakeLists.txt Index: lib/CodeGen/CMakeLists.txt === --- lib/CodeGen/CM

Re: [PATCH] D21545: CodeGen: Replace ThinLTO backend implementation with a client of LTO/Resolution.

2016-07-14 Thread Peter Collingbourne via cfe-commits
pcc marked an inline comment as done. pcc added a comment. https://reviews.llvm.org/D21545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21545: CodeGen: Replace ThinLTO backend implementation with a client of LTO/Resolution.

2016-07-14 Thread Mehdi AMINI via cfe-commits
mehdi_amini accepted this revision. mehdi_amini added a comment. (I didn't mark it as accepted because Teresa did, but in case you're waiting for me, don't) https://reviews.llvm.org/D21545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Roger Ferrer Ibanez via cfe-commits
Hi Nico, yes, it should be clearly stated in the documentation. I will try to find some time to contribute a change in the docs. I forgot that fact in my first answer to your original question. So, I think that the warning should fire in this case. Actually, I analysed precisely this case in

Re: [PATCH] D19322: Concepts: Create space for requires-clause in TemplateParameterList; NFC

2016-07-14 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: lib/AST/ASTImporter.cpp:2253-2254 @@ +2252,4 @@ + return nullptr; + } + else { +ToRequiresClause = nullptr; `else` on same line as `}` please. https://reviews.

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Nico Weber via cfe-commits
I mean clang's diagnostic could say this too. For example, it could have a note pointing at the attribute(packed) saying "struct alignment set to 1 here" or some such. On Thu, Jul 14, 2016 at 5:25 PM, Roger Ferrer Ibanez < roger.ferreriba...@arm.com> wrote: > Hi Nico, > > > yes, it should be clea

[PATCH] D22384: [OpenMP] add check for both simdlen and safelen clauses specified

2016-07-14 Thread Kelvin Li via cfe-commits
kkwli0 created this revision. kkwli0 added reviewers: ABataev, sfantao, carlo.bertolli, arpith-jacob, hfinkel. kkwli0 added a subscriber: cfe-commits. This patch adds the check for specifying both simdlen and safelen clauses on the 'distribute simd' or 'distribute parallel for simd' constructs.

Re: r275464 - Attempt to workaround Windows bots after my previous commit

2016-07-14 Thread Vitaly Buka via cfe-commits
The patch breaks this test: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/14659/steps/check-clang%20msan/logs/stdio On Thu, Jul 14, 2016 at 1:16 PM Ben Langmuir via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: benlangmuir > Date: Thu Jul 14 15:08:43 2016 > New

Re: [PATCH] D21537: Frontend: Simplify ownership model for clang's output streams.

2016-07-14 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Yeah, I think this makes sense on balance, even though it does create a weird situation for the `ASTPrinter` case, where we don't really want to transfer ownership of the stream. ===

r275481 - [modules] Don't pass interesting decls to the consumer for a module file that's

2016-07-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jul 14 16:50:09 2016 New Revision: 275481 URL: http://llvm.org/viewvc/llvm-project?rev=275481&view=rev Log: [modules] Don't pass interesting decls to the consumer for a module file that's passed on the command line but never actually used. We consider a (top-level) module

Re: [PATCH] D22113: C does not have inline variables

2016-07-14 Thread Paul Robinson via cfe-commits
probinson marked an inline comment as done. Comment at: lib/Sema/SemaDecl.cpp:6189-6191 @@ -6188,2 +6188,5 @@ << FixItHint::CreateRemoval(D.getDeclSpec().getInlineSpecLoc()); +} else if (!getLangOpts().CPlusPlus) { + Diag(D.getDeclSpec().getInlineSpecLoc(), diag:

Re: [PATCH] D22113: C does not have inline variables

2016-07-14 Thread Paul Robinson via cfe-commits
probinson updated this revision to Diff 64053. probinson marked an inline comment as done. probinson added a comment. Reorder the checks. I didn't see any tests for the adjacent (C++) diagnostics so I added some. https://reviews.llvm.org/D22113 Files: lib/Sema/SemaDecl.cpp test/Sema/inlin

r275490 - Add test inputs missed by r275481.

2016-07-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jul 14 17:15:06 2016 New Revision: 275490 URL: http://llvm.org/viewvc/llvm-project?rev=275490&view=rev Log: Add test inputs missed by r275481. Added: cfe/trunk/test/Modules/Inputs/unused-global-init/ cfe/trunk/test/Modules/Inputs/unused-global-init/init.h cfe/

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-07-14 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Other than adding expected notes for the path notes to the test, this looks good to me. Thanks Ádám! Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1698 @@ +1697,3 @@ +PathDiagnosticPiece * +CXXSelfAssignmentBRVisitor::VisitNode(const Exp

Re: [PATCH] D22113: C does not have inline variables

2016-07-14 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. Thanks! https://reviews.llvm.org/D22113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r275493 - C does not have inline variables.

2016-07-14 Thread Paul Robinson via cfe-commits
Author: probinson Date: Thu Jul 14 17:22:58 2016 New Revision: 275493 URL: http://llvm.org/viewvc/llvm-project?rev=275493&view=rev Log: C does not have inline variables. Add a few missing tests for related C++ diagnostics. Differential Revision: http://reviews.llvm.org/D22113 Modified: cfe/t

Re: [PATCH] D22113: C does not have inline variables

2016-07-14 Thread Paul Robinson via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL275493: C does not have inline variables. (authored by probinson). Changed prior to commit: https://reviews.llvm.org/D22113?vs=64053&id=64057#toc Repository: rL LLVM https://reviews.llvm.org/D22113

Re: [PATCH] D22190: cppcoreguidelines-pro-bounds-constant-array-index: crash for value dependent index in c++03 mode

2016-07-14 Thread Richard Smith via cfe-commits
rsmith added a comment. It's not meaningful to ask whether a value-dependent expression is an integral constant expression. The answer is not knowable, so the function asserting doesn't seem unreasonable. Any value we returned from that function would be a lie. Repository: rL LLVM https://

Re: [PATCH] D21823: [Driver] Add flags for enabling both types of PGO Instrumentation

2016-07-14 Thread Jake VanAdrighem via cfe-commits
jakev updated this revision to Diff 64056. jakev marked 3 inline comments as done. jakev added a comment. Add a couple notes to the docs and a fixme to a test. We can more thoroughly fix up the docs in a separate patch. Repository: rL LLVM https://reviews.llvm.org/D21823 Files: docs/Users

Re: [PATCH] D21823: [Driver] Add flags for enabling both types of PGO Instrumentation

2016-07-14 Thread Jake VanAdrighem via cfe-commits
jakev added inline comments. Comment at: test/Profile/gcc-flag-compatibility.c:10 @@ -9,3 +9,3 @@ -// Check that -fprofile-generate uses the runtime default profile file. +// Check that -fprofile-generate overrides the default profraw. // RUN: %clang %s -c -S -o - -emit-llvm -f

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Reid Kleckner via cfe-commits
Why did we upgrade the unaligned reference binding from a warning to an error? That will make it hard to roll this change out across many codebases. On Thu, Jul 14, 2016 at 7:10 AM, Roger Ferrer Ibanez via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rogfer01 > Date: Thu Jul 14 09:1

r275496 - Remove the new module cache from the index-module test

2016-07-14 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Thu Jul 14 17:53:23 2016 New Revision: 275496 URL: http://llvm.org/viewvc/llvm-project?rev=275496&view=rev Log: Remove the new module cache from the index-module test Forgot to add the new cache to the `rm -rf` line. This broke some bots when trying to load a module buil

Re: r275464 - Attempt to workaround Windows bots after my previous commit

2016-07-14 Thread Ben Langmuir via cfe-commits
Thanks! it was actually my earlier commit that broke it, it just didn’t turn up until a second build happened. Fixed in r275496 > On Jul 14, 2016, at 2:55 PM, Vitaly Buka wrote: > > The patch breaks this test: > http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/14659/steps

Re: r275464 - Attempt to workaround Windows bots after my previous commit

2016-07-14 Thread Vitaly Buka via cfe-commits
Thank you. On Thu, Jul 14, 2016 at 4:00 PM Ben Langmuir wrote: > Thanks! it was actually my earlier commit that broke it, it just didn’t > turn up until a second build happened. > > Fixed in r275496 > > > > On Jul 14, 2016, at 2:55 PM, Vitaly Buka wrote: > > The patch breaks this test: > http:/

Re: [PATCH] D22096: [OpenMP] Sema and parsing for 'target parallel for simd' pragma

2016-07-14 Thread Paul Robinson via cfe-commits
probinson added a subscriber: probinson. probinson added a comment. I'm seeing a different set of diagnostics in two of these tests, because we default to C+11, which makes them fail for us. Ideally you'd conditionalize the tests on the value of `__cplusplus` (like Charles Li has been doing for

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Richard Smith via cfe-commits
On Thu, Jul 14, 2016 at 3:52 PM, Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Why did we upgrade the unaligned reference binding from a warning to an > error? That will make it hard to roll this change out across many codebases. > GCC has given an error on this since versi

Re: [PATCH] D21753: Comprehensive Static Instrumentation (2/2): Clang flag

2016-07-14 Thread Derek Bruening via cfe-commits
bruening added inline comments. Comment at: docs/CSI.rst:30 @@ +29,3 @@ +To create a CSI tool, add ``#include `` at the top of the tool source +and implement function bodies for the hooks relevant to the tool. + Are there any constraints on what libraries the tool

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Reid Kleckner via cfe-commits
I wonder if GCC accepts this: In file included from ../../net/tools/quic/quic_epoll_clock_test.cc:7: In file included from ../../net/tools/quic/test_tools/mock_epoll_server.h:16: In file included from ../../net/tools/epoll_server/epoll_server.h:41: ../../build/linux/debian_wheezy_amd64-sysroot/usr

Re: [PATCH] D18510: [cxx1z-constexpr-lambda] Make conversion function constexpr

2016-07-14 Thread Richard Smith via cfe-commits
rsmith added a comment. I don't see how this approach can work; the fact that we happened to ask the expression evaluator to evaluate an expression is not sufficient reason for us to issue this warning. For instance: auto a = []{}; void (*p)() = a; ... will ask the evaluator to evaluate th

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Richard Smith via cfe-commits
It appears that GCC accepts that case. More generally, it looks like GCC suppresses the warning when the reference is a function parameter (any function, not just a copy constructor or similar). I'm not sure if that's an intentional feature or a bug, but it should be pretty easy for us to be compat

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Richard Smith via cfe-commits
OK, actually, GCC is doing something a lot more clever here. Here's what seems to really be going on: Packed members are modeled somewhat like bitfield members: a packed member lvalue is a different kind of lvalue to which a reference cannot be bound (like a bitfield). An attempt to bind a const

[libcxxabi] r275505 - libc++abi: add a top level option for using CompilerRT

2016-07-14 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Thu Jul 14 19:49:42 2016 New Revision: 275505 URL: http://llvm.org/viewvc/llvm-project?rev=275505&view=rev Log: libc++abi: add a top level option for using CompilerRT Add an option to opt into compiler-rt instead of libgcc. This option defaults to OFF to avoid a behaviour

[PATCH] D22391: [Sema] Add warning for implicitly casting a null constant to a non null pointer type

2016-07-14 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: doug.gregor. ahatanak added a subscriber: cfe-commits. This patch makes clang issue a warning when a null constant is used in a context where a non null expression is expected. For example: ``` int * _Nonnull p0 = 0; // warning expected

r275507 - Frontend: Simplify ownership model for clang's output streams.

2016-07-14 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Thu Jul 14 19:55:40 2016 New Revision: 275507 URL: http://llvm.org/viewvc/llvm-project?rev=275507&view=rev Log: Frontend: Simplify ownership model for clang's output streams. This changes the CompilerInstance::createOutputFile function to return a std::unique_ptr, rather than an

Re: [PATCH] D21537: Frontend: Simplify ownership model for clang's output streams.

2016-07-14 Thread Peter Collingbourne via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL275507: Frontend: Simplify ownership model for clang's output streams. (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D21537?vs=61317&id=64071#toc Repository: rL LLVM https://r

Re: [PATCH] D19544: Pass for translating math intrinsics to math library calls.

2016-07-14 Thread Hal Finkel via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D19544#484439, @spatel wrote: > Hi Matt - > > This looks like the right first step in the path that Hal suggested, except I > think we need a test case for each function that you want to enable. Please > see test/Transforms/LoopVectorize/X86/

[PATCH] D22392: [Sema] Fix an invalid nullability warning for binary conditional operators

2016-07-14 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: doug.gregor. ahatanak added a subscriber: cfe-commits. Currently clang issues a warning when the following code using a shorthand form of the conditional operator is compiled: $ cat test1.c ``` void foo() { int * _Nullable p0; int *

Re: [PATCH] D21954: [PM] Add some internal options for testing out the new PM.

2016-07-14 Thread Sean Silva via cfe-commits
silvas added a comment. Ping. https://reviews.llvm.org/D21954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22392: [Sema] Fix an invalid nullability warning for binary conditional operators

2016-07-14 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 64077. ahatanak added a comment. Remove unused variable. https://reviews.llvm.org/D22392 Files: lib/Sema/SemaExpr.cpp test/Sema/nullability.c Index: test/Sema/nullability.c === --- test/S

Re: [PATCH] D22384: [OpenMP] add check for both simdlen and safelen clauses specified

2016-07-14 Thread Alexey Bataev 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/D22384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

Re: [PATCH] D22096: [OpenMP] Sema and parsing for 'target parallel for simd' pragma

2016-07-14 Thread Alexey Bataev via cfe-commits
Hi Paul, Could you provide a little bit more info about diagnostic you see? Maybe the tests just need to be fixed Best regards, Alexey Bataev = Software Engineer Intel Compiler Team 15.07.2016 2:09, Paul Robinson пишет: > probinson added a subscriber: probinson. > probinson added a c

Re: [PATCH] D22391: [Sema] Add warning for implicitly casting a null constant to a non null pointer type

2016-07-14 Thread Doug Gregor via cfe-commits
doug.gregor added a comment. I think this check should go into SemaChecking.cpp https://reviews.llvm.org/D22391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21954: [PM] Add some internal options for testing out the new PM.

2016-07-14 Thread Chandler Carruth via cfe-commits
chandlerc added a comment. I'd like someone more active on the Clang side to comment about this, but here is my 2 cents... It seems like it'd be nice to not populate or run or otherwise build up the legacy pass managers when using this option. I guess I would expect something to more split ear

Re: [PATCH] D22392: [Sema] Fix an invalid nullability warning for binary conditional operators

2016-07-14 Thread Doug Gregor via cfe-commits
doug.gregor added a comment. A bunch of comments above. This needs much more extensive testing, because there are numerous paths through the ternary operator code and the results need to be symmetric. Comment at: lib/Sema/SemaExpr.cpp:7007 @@ +7006,3 @@ +/// expression. +stati

Re: [PATCH] D18639: Use __builtin_isnan/isinf/isfinite in complex

2016-07-14 Thread Hal Finkel via cfe-commits
hfinkel added a comment. Ping. https://reviews.llvm.org/D18639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22248: [Sema] Create a separate group for incompatible function pointer warning

2016-07-14 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D22248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

r275529 - [OpenMP] add check for both simdlen and safelen clauses specified

2016-07-14 Thread Kelvin Li via cfe-commits
Author: kli Date: Thu Jul 14 23:39:07 2016 New Revision: 275529 URL: http://llvm.org/viewvc/llvm-project?rev=275529&view=rev Log: [OpenMP] add check for both simdlen and safelen clauses specified This patch adds the check for specifying both simdlen and safelen clauses on the 'distribute simd' o

Re: [PATCH] D22384: [OpenMP] add check for both simdlen and safelen clauses specified

2016-07-14 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL275529: [OpenMP] add check for both simdlen and safelen clauses specified (authored by kli). Changed prior to commit: https://reviews.llvm.org/D22384?vs=64048&id=64087#toc Repository: rL LLVM https:

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Roger Ferrer Ibanez via cfe-commits
Hi Richard, may I suggest to handle the reference binding to unaligned fields in another change rather than trying to get it in the current change (which was originally intended for address taking of such fields)? After your message, it looks to me that references will require a different stra

RE: [PATCH] D22096: [OpenMP] Sema and parsing for 'target parallel for simd' pragma

2016-07-14 Thread Robinson, Paul via cfe-commits
> -Original Message- > From: Alexey Bataev [mailto:a.bat...@hotmail.com] > Sent: Thursday, July 14, 2016 7:51 PM > To: reviews+d22096+public+4c00789034d62...@reviews.llvm.org > Cc: cfe-commits@lists.llvm.org; kkw...@gmail.com; cber...@us.ibm.com; > sfan...@us.ibm.com; hfin...@anl.gov; acj

Re: [PATCH] D22096: [OpenMP] Sema and parsing for 'target parallel for simd' pragma

2016-07-14 Thread Alexey Bataev via cfe-commits
Kelvin, Please look at these messages and fix the tests. Or tell me and I will fix them Best regards, Alexey Bataev = Software Engineer Intel Compiler Team 15.07.2016 9:23, Robinson, Paul пишет: > >> -Original Message- >> From: Alexey Bataev [mailto:a.bat...@hotmail.com] >> S

<    1   2