Re: r290399 - When merging two deduced non-type template arguments for the same parameter,

2016-12-22 Thread Chandler Carruth via cfe-commits
On Thu, Dec 22, 2016 at 5:41 PM Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > == > --- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original) > +++ cfe/trunk/include/clang/Basic/Diagnostic

r290417 - Add an assert to catch improperly constructed %diff sequences in

2016-12-22 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Thu Dec 22 23:19:47 2016 New Revision: 290417 URL: http://llvm.org/viewvc/llvm-project?rev=290417&view=rev Log: Add an assert to catch improperly constructed %diff sequences in diagnostics and fix one such diagnostic. Sadly, this assert doesn't catch this bug because we ha

[PATCH] D27680: [CodeGen] Move lifetime.start of a variable when goto jumps back past its declaration

2016-12-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Ah, good idea. That sounds like a much simpler and less invasive approach. I agree that the performance impact would probably be small, and if it turns out to have a significant impact, we can reduce the number of times we move the lifetime.start (without moving it ret

r290415 - Revert changes made by r290413 until regression is fixed.

2016-12-22 Thread Anton Yartsev via cfe-commits
Author: ayartsev Date: Thu Dec 22 22:09:18 2016 New Revision: 290415 URL: http://llvm.org/viewvc/llvm-project?rev=290415&view=rev Log: Revert changes made by r290413 until regression is fixed. Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp cfe/trunk/lib/StaticAnalyzer/Core/Si

r290413 - Fix for PR15623. The patch eliminates unwanted ProgramState checker data propagation from an operand of the logical operation to operation result.

2016-12-22 Thread Anton Yartsev via cfe-commits
Author: ayartsev Date: Thu Dec 22 21:31:00 2016 New Revision: 290413 URL: http://llvm.org/viewvc/llvm-project?rev=290413&view=rev Log: Fix for PR15623. The patch eliminates unwanted ProgramState checker data propagation from an operand of the logical operation to operation result. The patch also

[PATCH] D27680: [CodeGen] Move lifetime.start of a variable when goto jumps back past its declaration

2016-12-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D27680#629182, @ahatanak wrote: > In https://reviews.llvm.org/D27680#628272, @rjmccall wrote: > > > Wouldn't it be simpler to just record an insertion point for the beginning > > of the current lexical scope and insert the lifetime.begin ther

[PATCH] D25556: [Sema] Add variable captured by a block to the enclosing lambda's potential capture list

2016-12-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 82394. ahatanak added a comment. Rebase. r286584 changed getCurLambda to optionally skip CapturedRegionScopeInfos. This patch changes it to skip BlockScopeInfos too. https://reviews.llvm.org/D25556 Files: include/clang/Sema/Sema.h lib/Sema/Sema.cpp

r290405 - Move generation of injected template arguments for a template parameter list

2016-12-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Dec 22 20:10:11 2016 New Revision: 290405 URL: http://llvm.org/viewvc/llvm-project?rev=290405&view=rev Log: Move generation of injected template arguments for a template parameter list out of an internal function and into ASTContext; this is needed in template argument ded

r290403 - Only substitute into type of non-type template parameter once, rather than

2016-12-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Dec 22 20:00:24 2016 New Revision: 290403 URL: http://llvm.org/viewvc/llvm-project?rev=290403&view=rev Log: Only substitute into type of non-type template parameter once, rather than twice, in finalization of template argument deduction. This is a re-commit of r290310 (re

r290399 - When merging two deduced non-type template arguments for the same parameter,

2016-12-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Dec 22 19:30:39 2016 New Revision: 290399 URL: http://llvm.org/viewvc/llvm-project?rev=290399&view=rev Log: When merging two deduced non-type template arguments for the same parameter, fail the merge if the arguments have different types (except if one of them was deduced

[PATCH] D28053: Cleanup the handling of noinline function attributes, -fno-inline, -fno-inline-functions, -O0, and optnone.

2016-12-22 Thread Chandler Carruth via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL290398: Cleanup the handling of noinline function attributes, -fno-inline, (authored by chandlerc). Changed prior to commit: https://reviews.llvm.org/D28053?vs=82356&id=82390#toc Repository: rL LLVM

r290398 - Cleanup the handling of noinline function attributes, -fno-inline,

2016-12-22 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Thu Dec 22 19:24:49 2016 New Revision: 290398 URL: http://llvm.org/viewvc/llvm-project?rev=290398&view=rev Log: Cleanup the handling of noinline function attributes, -fno-inline, -fno-inline-functions, -O0, and optnone. These were really, really tangled together: - We used

Re: r290169 - Revert r290149: Add the alloc_size attribute to clang.

2016-12-22 Thread George Burgess IV via cfe-commits
It looks like the root of this is that we're treating calls to `allocsize` functions as AllocLike (e.g. any allocation function type except realloc) functions, which caused us to perform invalid optimizations. For example, in ReallocFreedPointerTest, EarlyCSE DCE'd the realloc because llvm::isInstr

[PATCH] D28047: Remove the '-disable-llvm-passes' flag (which I didn't even know existed, and I suspect many others aren't aware of either) and strength '-disable-llvm-optzns' to do the same thing.

2016-12-22 Thread Chandler Carruth via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL290392: Make '-disable-llvm-optzns' an alias for '-disable-llvm-passes'. (authored by chandlerc). Changed prior to commit: https://reviews.llvm.org/D28047?vs=82313&id=82383#toc Repository: rL LLVM h

r290392 - Make '-disable-llvm-optzns' an alias for '-disable-llvm-passes'.

2016-12-22 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Thu Dec 22 18:23:01 2016 New Revision: 290392 URL: http://llvm.org/viewvc/llvm-project?rev=290392&view=rev Log: Make '-disable-llvm-optzns' an alias for '-disable-llvm-passes'. Much to my surprise, '-disable-llvm-optzns' which I thought was the magical flag I wanted to get

r290390 - Fix example: byref struct's init was incorrect, and the block literal's holder should point to it.

2016-12-22 Thread Jonathan Roelofs via cfe-commits
Author: jroelofs Date: Thu Dec 22 17:48:23 2016 New Revision: 290390 URL: http://llvm.org/viewvc/llvm-project?rev=290390&view=rev Log: Fix example: byref struct's init was incorrect, and the block literal's holder should point to it. Modified: cfe/trunk/docs/Block-ABI-Apple.rst Modified: cf

[PATCH] D28047: Remove the '-disable-llvm-passes' flag (which I didn't even know existed, and I suspect many others aren't aware of either) and strength '-disable-llvm-optzns' to do the same thing.

2016-12-22 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini accepted this revision. mehdi_amini added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D28047#629922, @chandlerc wrote: > In https://reviews.llvm.org/D28047#629892, @mehdi_amini wrote: > > > LGTM, but please wait for @rnk to confirm :) > >

[PATCH] D28048: [OpenCL] Align fake address space map with the SPIR target maps.

2016-12-22 Thread Pekka Jääskeläinen via Phabricator via cfe-commits
pekka.jaaskelainen accepted this revision. pekka.jaaskelainen added a reviewer: pekka.jaaskelainen. pekka.jaaskelainen added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D28048#629569, @Anastasia wrote: > @pekka.jaaskelainen, I think you are using x86 ta

Re: r290169 - Revert r290149: Add the alloc_size attribute to clang.

2016-12-22 Thread George Burgess IV via cfe-commits
Okay, I'm seeing this failure now if I tag my system's `realloc` declaration with `alloc_size`. (Which FreeBSD seems to do in their headers). Because all that clang does with `alloc_size` is use it to answer `__builtin_object_size` queries and lower it to LLVM's `allocsize` attribute, this is presu

[PATCH] D27180: Testbed and skeleton of a new expression parser

2016-12-22 Thread Sean Callanan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL290367: Testbed and skeleton of a new expression parser (authored by spyffe). Changed prior to commit: https://reviews.llvm.org/D27180?vs=81991&id=82360#toc Repository: rL LLVM https://reviews.llvm.

r290367 - Testbed and skeleton of a new expression parser

2016-12-22 Thread Sean Callanan via cfe-commits
Author: spyffe Date: Thu Dec 22 14:03:14 2016 New Revision: 290367 URL: http://llvm.org/viewvc/llvm-project?rev=290367&view=rev Log: Testbed and skeleton of a new expression parser Recommitted after formal approval. LLVM's JIT is now the foundation of dynamic-compilation features for many langu

[PATCH] D28053: Cleanup the handling of noinline function attributes, -fno-inline, -fno-inline-functions, -O0, and optnone.

2016-12-22 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. > That said, I agree with Reid that it is a bit surprising. After thinking > about it a lot, the reason I personally find it surprising is actually that I > find -O0 being the default surprising. But I'm OK with not changing that > here, and maybe never changing tha

Re: r290169 - Revert r290149: Add the alloc_size attribute to clang.

2016-12-22 Thread Dimitry Andric via cfe-commits
This is when running "ninja check-all", in a tree with llvm, clang and compiler-rt checked out. The first program that shows a failure is projects/compiler-rt/lib/asan/tests/default/Asan-i386-inline-Test: [==] Running 92 tests from 3 test cases. [--] Global test environment set-

[PATCH] D28053: Cleanup the handling of noinline function attributes, -fno-inline, -fno-inline-functions, -O0, and optnone.

2016-12-22 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:453 +// There is no effect at O0 when we won't inline anyways. +if (Opts.OptimizationLevel > 1) { + const Option &InlineOpt = InlineArg->getOption(); chandlerc wrote:

r290364 - [OPENMP] Fix for PR31417: assert failure when compiling trivial openmp

2016-12-22 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Dec 22 13:44:05 2016 New Revision: 290364 URL: http://llvm.org/viewvc/llvm-project?rev=290364&view=rev Log: [OPENMP] Fix for PR31417: assert failure when compiling trivial openmp program Offload related code is not quite ready yet, but some simple examples must not crash

[PATCH] D28047: Remove the '-disable-llvm-passes' flag (which I didn't even know existed, and I suspect many others aren't aware of either) and strength '-disable-llvm-optzns' to do the same thing.

2016-12-22 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a comment. In https://reviews.llvm.org/D28047#629892, @mehdi_amini wrote: > LGTM, but please wait for @rnk to confirm :) > > Also any opinion about a driver option -emit-raw-llvm as @joerg suggested? I like the idea generally, but I don't have an immediate use case and would d

[PATCH] D28053: Cleanup the handling of noinline function attributes, -fno-inline, -fno-inline-functions, -O0, and optnone.

2016-12-22 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a comment. In https://reviews.llvm.org/D28053#629834, @mehdi_amini wrote: > In https://reviews.llvm.org/D28053#629768, @rnk wrote: > > > The big change here is that `clang -O0` now applies the noinline attribute > > everywhere. I can see why someone might expect things to work th

[PATCH] D28053: Cleanup the handling of noinline function attributes, -fno-inline, -fno-inline-functions, -O0, and optnone.

2016-12-22 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc updated this revision to Diff 82356. chandlerc added a comment. Herald added a subscriber: wdng. Fix an thinko found in review, clean up comments, and clean up pass pipeline selection as that actually needs to happen in this patch as well. Also update one test using -O1 and observing th

Re: r290169 - Revert r290149: Add the alloc_size attribute to clang.

2016-12-22 Thread George Burgess IV via cfe-commits
Yes, this was reapplied in r290297 with fixes for the msan issue we caught; these asan unit test failures are news to me. Can you give me the command that you're using to run these tests, please? On Thu, Dec 22, 2016 at 11:10 AM, Dimitry Andric wrote: > On 20 Dec 2016, at 09:28, Chandler Carruth

[PATCH] D28047: Remove the '-disable-llvm-passes' flag (which I didn't even know existed, and I suspect many others aren't aware of either) and strength '-disable-llvm-optzns' to do the same thing.

2016-12-22 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D28047#629889, @chandlerc wrote: > I only have a mild preference for how we spell the name based on the fact > that i've told people to use -disable-llvm-optzns for years. If we want to go > with ...-passes, fine with me. We have some freedom t

[PATCH] D28047: Remove the '-disable-llvm-passes' flag (which I didn't even know existed, and I suspect many others aren't aware of either) and strength '-disable-llvm-optzns' to do the same thing.

2016-12-22 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. LGTM, but please wait for @rnk to confirm :) Also any opinion about a driver option -emit-raw-llvm as @joerg suggested? https://reviews.llvm.org/D28047 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D28053: Cleanup the handling of noinline function attributes, -fno-inline, -fno-inline-functions, -O0, and optnone.

2016-12-22 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a comment. In https://reviews.llvm.org/D28053#629830, @mehdi_amini wrote: > > It would be awesome if attribute sets were a bit more FileCheck friendly, > > but oh well. > > I've been wondering about that, what's the point of attribute sets in the > textual IR? > I understand th

[PATCH] D28047: Remove the '-disable-llvm-passes' flag (which I didn't even know existed, and I suspect many others aren't aware of either) and strength '-disable-llvm-optzns' to do the same thing.

2016-12-22 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a comment. In https://reviews.llvm.org/D28047#629824, @mehdi_amini wrote: > In https://reviews.llvm.org/D28047#629746, @rnk wrote: > > > How about standardizing on -disable-llvm-passes instead of > > -disable-llvm-optzns? I never liked "optzns" and can't remember how to > > spel

Re: r290169 - Revert r290149: Add the alloc_size attribute to clang.

2016-12-22 Thread Dimitry Andric via cfe-commits
On 20 Dec 2016, at 09:28, Chandler Carruth via cfe-commits wrote: > Author: chandlerc > Date: Tue Dec 20 02:28:19 2016 > New Revision: 290169 > > URL: http://llvm.org/viewvc/llvm-project?rev=290169&view=rev > Log: > Revert r290149: Add the alloc_size attribute to clang. > > This commit fails MS

r290356 - Fix warning introduced by r290297.

2016-12-22 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Dec 22 13:00:31 2016 New Revision: 290356 URL: http://llvm.org/viewvc/llvm-project?rev=290356&view=rev Log: Fix warning introduced by r290297. Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp URL: http://llvm.org/viewvc/llvm-

r290353 - Make alloc_size only applicable to Functions.

2016-12-22 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Dec 22 12:48:34 2016 New Revision: 290353 URL: http://llvm.org/viewvc/llvm-project?rev=290353&view=rev Log: Make alloc_size only applicable to Functions. I don't remember why I didn't make alloc_size only applicable to Functions a year ago, but I can't see any compelling re

[PATCH] D27898: [compiler-rt] [builtins] Implement __floattitf() & __floatuntitf()

2016-12-22 Thread Steve Canon via Phabricator via cfe-commits
scanon added inline comments. Comment at: lib/builtins/floatuntitf.c:73 +long_double_bits fb; +fb.u.high.all = (du_int)(e + 16383) << 48/* exponent */ + | ((a >> 64) & 0xLL); /* mantissa */ mgorny wrote: > ren

[PATCH] D27898: [compiler-rt] [builtins] Implement __floattitf() & __floatuntitf()

2016-12-22 Thread Michał Górny via Phabricator via cfe-commits
mgorny added inline comments. Comment at: lib/builtins/floatuntitf.c:73 +long_double_bits fb; +fb.u.high.all = (du_int)(e + 16383) << 48/* exponent */ + | ((a >> 64) & 0xLL); /* mantissa */ rengolin wrote: > r

[PATCH] D27898: [compiler-rt] [builtins] Implement __floattitf() & __floatuntitf()

2016-12-22 Thread Steve Canon via Phabricator via cfe-commits
scanon added inline comments. Comment at: lib/builtins/floattitf.c:65 +if (a & ((tu_int)1 << LDBL_MANT_DIG)) { +a >>= 1; +++e; Strictly speaking there's no need to adjust `a` here. If we rounded up into a new binade, then `a` is n

[PATCH] D28053: Cleanup the handling of noinline function attributes, -fno-inline, -fno-inline-functions, -O0, and optnone.

2016-12-22 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:453 +// There is no effect at O0 when we won't inline anyways. +if (Opts.OptimizationLevel > 1) { + const Option &InlineOpt = InlineArg->getOption(); mehdi_amini wrote

[PATCH] D27898: [compiler-rt] [builtins] Implement __floattitf() & __floatuntitf()

2016-12-22 Thread Steve Canon via Phabricator via cfe-commits
scanon added a comment. Please s/mantissa/significand/. I know that "mantissa" is used in a number of places in llvm sources, but it's incorrect terminology. Significand is the IEEE-754 nomenclature, which any new work should follow. https://reviews.llvm.org/D27898 _

[PATCH] D27898: [compiler-rt] [builtins] Implement __floattitf() & __floatuntitf()

2016-12-22 Thread Renato Golin via Phabricator via cfe-commits
rengolin added inline comments. Comment at: lib/builtins/floatuntitf.c:73 +long_double_bits fb; +fb.u.high.all = (du_int)(e + 16383) << 48/* exponent */ + | ((a >> 64) & 0xLL); /* mantissa */ rengolin wrote: >

[PATCH] D27898: [compiler-rt] [builtins] Implement __floattitf() & __floatuntitf()

2016-12-22 Thread Renato Golin via Phabricator via cfe-commits
rengolin added inline comments. Comment at: lib/builtins/floatuntitf.c:73 +long_double_bits fb; +fb.u.high.all = (du_int)(e + 16383) << 48/* exponent */ + | ((a >> 64) & 0xLL); /* mantissa */ mgorny wrote: > r

[PATCH] D28053: Cleanup the handling of noinline function attributes, -fno-inline, -fno-inline-functions, -O0, and optnone.

2016-12-22 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:453 +// There is no effect at O0 when we won't inline anyways. +if (Opts.OptimizationLevel > 1) { + const Option &InlineOpt = InlineArg->getOption(); I'd switch the tw

[PATCH] D27898: [compiler-rt] [builtins] Implement __floattitf() & __floatuntitf()

2016-12-22 Thread Michał Górny via Phabricator via cfe-commits
mgorny added inline comments. Comment at: lib/builtins/floatuntitf.c:73 +long_double_bits fb; +fb.u.high.all = (du_int)(e + 16383) << 48/* exponent */ + | ((a >> 64) & 0xLL); /* mantissa */ rengolin wrote: > n

[PATCH] D28053: Cleanup the handling of noinline function attributes, -fno-inline, -fno-inline-functions, -O0, and optnone.

2016-12-22 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D28053#629768, @rnk wrote: > The big change here is that `clang -O0` now applies the noinline attribute > everywhere. I can see why someone might expect things to work that way, but > it seems surprising to me at first glance. > > Before

r290352 - [analyzer] Update GTestChecker to tighten API detection

2016-12-22 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Dec 22 11:52:57 2016 New Revision: 290352 URL: http://llvm.org/viewvc/llvm-project?rev=290352&view=rev Log: [analyzer] Update GTestChecker to tighten API detection Update the GTestChecker to tighten up the API detection and make it cleaner in response to post-commit fe

[PATCH] D27773: [analyzer] Add checker modeling gtest APIs.

2016-12-22 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. I cleaned up the parameter detection and added more tests in r290352. https://reviews.llvm.org/D27773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28053: Cleanup the handling of noinline function attributes, -fno-inline, -fno-inline-functions, -O0, and optnone.

2016-12-22 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. > It would be awesome if attribute sets were a bit more FileCheck friendly, but > oh well. I've been wondering about that, what's the point of attribute sets in the textual IR? I understand the idea for saving space in the Bitcode, but the IR does not have to use t

[PATCH] D28047: Remove the '-disable-llvm-passes' flag (which I didn't even know existed, and I suspect many others aren't aware of either) and strength '-disable-llvm-optzns' to do the same thing.

2016-12-22 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D28047#629746, @rnk wrote: > How about standardizing on -disable-llvm-passes instead of > -disable-llvm-optzns? I never liked "optzns" and can't remember how to spell > it. Also, this flag disables LLVM instrumentation passes (ASan) as we

[PATCH] D27898: [compiler-rt] [builtins] Implement __floattitf() & __floatuntitf()

2016-12-22 Thread Renato Golin via Phabricator via cfe-commits
rengolin accepted this revision. rengolin added a comment. This revision is now accepted and ready to land. My floating-point-fu is lacking, so I'll trust you guys that this makes sense. :) I didn't see anything egregious, so LGTM with the nit inline. cheers, --renato Commen

[PATCH] D28053: Cleanup the handling of noinline function attributes, -fno-inline, -fno-inline-functions, -O0, and optnone.

2016-12-22 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. The big change here is that `clang -O0` now applies the noinline attribute everywhere. I can see why someone might expect things to work that way, but it seems surprising to me at first glance. Before this change I can imagine someone distributing a static archive of bitco

[PATCH] D28052: [change-namespace] consider namespace aliases to shorten qualified names.

2016-12-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 82345. ioeric marked 3 inline comments as done. ioeric added a comment. - addressed review comments. https://reviews.llvm.org/D28052 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h unittests/change-namespace/ChangeNamespa

[PATCH] D28047: Remove the '-disable-llvm-passes' flag (which I didn't even know existed, and I suspect many others aren't aware of either) and strength '-disable-llvm-optzns' to do the same thing.

2016-12-22 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. How about standardizing on -disable-llvm-passes instead of -disable-llvm-optzns? I never liked "optzns" and can't remember how to spell it. Also, this flag disables LLVM instrumentation passes (ASan) as well as optimization passes, so I think -disable-llvm-passes is the bet

Re: [clang-tools-extra] r290202 - [clang-tidy] Add modernize-use-default-member-init check

2016-12-22 Thread Aaron Ballman via cfe-commits
On Thu, Dec 22, 2016 at 11:43 AM, NAKAMURA Takumi wrote: > Does the test invoke cl.exe? I supposed it were clang. It shouldn't, but the test also does not specify a target triple, so the behavior depends on what version of MSVC you built clang (and clang-tidy) with. What version of MSVC is used t

Re: [clang-tools-extra] r290202 - [clang-tidy] Add modernize-use-default-member-init check

2016-12-22 Thread NAKAMURA Takumi via cfe-commits
Does the test invoke cl.exe? I supposed it were clang. On Thu, Dec 22, 2016 at 11:24 PM Aaron Ballman wrote: > On Wed, Dec 21, 2016 at 6:10 PM, NAKAMURA Takumi > wrote: > > It'd be the issue if the test depended on installed headers. The builder > > doesn't have MS headers installed. > > Those

[PATCH] D28058: [OpenCL] Correct ndrange_t implementation

2016-12-22 Thread Dmitry Borisenkov via Phabricator via cfe-commits
dmitry created this revision. dmitry added a reviewer: yaxunl. dmitry added subscribers: Anastasia, cfe-commits. Since we don't have an ideal option for ndrange_t implementation (which was discussed there: https://reviews.llvm.org/D23086), I propose to stick with identification by name approach

[PATCH] D27424: Add the diagnose_if attribute to clang.

2016-12-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I really like this attribute, thank you for working on it! Comment at: include/clang/Basic/Attr.td:1584 +def DiagnoseIf : InheritableAttr { + let Spellings = [GNU<"diagnose_if">]; + let Subjects = SubjectList<[Function]>; I thin

Re: r290297 - Add the alloc_size attribute to clang, attempt 2.

2016-12-22 Thread via cfe-commits
Hi George, I'm guessing this may have caused PR31453. Simple reproducer included in bug report. Chad On 2016-12-21 21:50, George Burgess IV via cfe-commits wrote: Author: gbiv Date: Wed Dec 21 20:50:20 2016 New Revision: 290297 URL: http://llvm.org/viewvc/llvm-project?rev=290297&view=rev L

[PATCH] D28052: [change-namespace] consider namespace aliases to shorten qualified names.

2016-12-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:719 +// The alias is defined in some namespace. +assert(AliasQualifiedName.size() >= AliasName.size() + 2); +llvm::StringRef AliasNs = maybe `assert(StringRef(A

[PATCH] D28022: [clang-tidy] Handle constructors in performance-unnecessary-value-param

2016-12-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/performance/UnnecessaryValueParamCheck.cpp:96 - // Do not trigger on non-const value parameters when: - // 1. they are in a constructor definition since they can likely trigger - //modernize-pass-by-value which

[PATCH] D28034: [ASTMatchers] Add hasInClassInitializer traversal matcher for FieldDecl.

2016-12-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, modulo the unrelated documentation changes. https://reviews.llvm.org/D28034 __

[PATCH] D28023: [analyzer] Fix leak false positives before no-return functions caused by incomplete analyses.

2016-12-22 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL290341: [analyzer] Improve suppress-on-sink behavior in incomplete analyses. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D28023?vs=82229&id=82339#toc Repository: rL LLV

r290341 - [analyzer] Improve suppress-on-sink behavior in incomplete analyses.

2016-12-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Dec 22 08:48:52 2016 New Revision: 290341 URL: http://llvm.org/viewvc/llvm-project?rev=290341&view=rev Log: [analyzer] Improve suppress-on-sink behavior in incomplete analyses. Warnings with suppress-on-sink are discarded during FlushReports when BugReporter notices th

[PATCH] D28022: [clang-tidy] Handle constructors in performance-unnecessary-value-param

2016-12-22 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/performance/UnnecessaryValueParamCheck.cpp:96 - // Do not trigger on non-const value parameters when: - // 1. they are in a constructor definition since they can likely trigger - //modernize-pass-by-value which will su

Re: [clang-tools-extra] r290202 - [clang-tidy] Add modernize-use-default-member-init check

2016-12-22 Thread Aaron Ballman via cfe-commits
On Wed, Dec 21, 2016 at 6:10 PM, NAKAMURA Takumi wrote: > It'd be the issue if the test depended on installed headers. The builder > doesn't have MS headers installed. Those type names do not require any headers to be installed. They're keywords in C++11 and later, but MSVC did not support them u

[clang-tools-extra] r290340 - [clang-tidy] cppcoreguidelines-slicing: display discarded state size in bytes

2016-12-22 Thread Clement Courbet via cfe-commits
Author: courbet Date: Thu Dec 22 08:12:31 2016 New Revision: 290340 URL: http://llvm.org/viewvc/llvm-project?rev=290340&view=rev Log: [clang-tidy] cppcoreguidelines-slicing: display discarded state size in bytes https://reviews.llvm.org/D27212 Modified: clang-tools-extra/trunk/clang-tidy/cpp

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2016-12-22 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo marked an inline comment as done. gerazo added a comment. So thank you again for the valuable questions. In this checker, I give warnings for values which are both tainted and were also not checked by the programmer. So unlike GenericTaintChecker, I do implement the boundedness check here

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2016-12-22 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo marked 6 inline comments as done. gerazo added a comment. Thank you very much for your help. I've added all suggested modifications including tests covering all checker option settings. https://reviews.llvm.org/D27753 ___ cfe-commits mailing

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2016-12-22 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo updated this revision to Diff 82336. https://reviews.llvm.org/D27753 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/DirtyScalarChecker.cpp lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp test/Ana

[PATCH] D28053: Cleanup the handling of noinline function attributes, -fno-inline, -fno-inline-functions, -O0, and optnone.

2016-12-22 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc created this revision. chandlerc added reviewers: rsmith, rnk, mehdi_amini. chandlerc added a subscriber: cfe-commits. chandlerc added a dependency: D28047: Remove the '-disable-llvm-passes' flag (which I didn't even know existed, and I suspect many others aren't aware of either) and st

r290337 - clang-format: Less eagerly try to keep label-value pairs on a line.

2016-12-22 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Dec 22 06:37:06 2016 New Revision: 290337 URL: http://llvm.org/viewvc/llvm-project?rev=290337&view=rev Log: clang-format: Less eagerly try to keep label-value pairs on a line. Before: string v = StrCat("aaa: ", SomeFunction(,

[PATCH] D27981: Fix problems in "[OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand."

2016-12-22 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! If you checked there are no warnings any more, it seems fine to commit! :) https://reviews.llvm.org/D27981 ___ cfe-commits mailing li

[PATCH] D28048: [OpenCL] Align fake address space map with the SPIR target maps.

2016-12-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a subscriber: pekka.jaaskelainen. Anastasia added a comment. I believe it's not that important what those numbers actually are, but having the consistency with SPIR might be better indeed at least even for documentation purposes! @pekka.jaaskelainen, I think you are using x86 ta

[PATCH] D26350: Keep invalid Switch in the AST

2016-12-22 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. ping2 https://reviews.llvm.org/D26350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28047: Remove the '-disable-llvm-passes' flag (which I didn't even know existed, and I suspect many others aren't aware of either) and strength '-disable-llvm-optzns' to do the same thing.

2016-12-22 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. There are two issues I have with the flags right now. The first one you are addressing with this patch. The second issue is they remain CC1-only flags. Can we introduce a proper "-emit-raw-llvm" flag to work like "-emit-llvm" but without the additional IR processing. We c

[PATCH] D26465: [Diag] Optimize DiagnosticIDs::getDiagnosticSeverity

2016-12-22 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart updated this revision to Diff 82325. ogoffart marked an inline comment as done. https://reviews.llvm.org/D26465 Files: include/clang/Basic/Diagnostic.h include/clang/Basic/DiagnosticIDs.h lib/Basic/Diagnostic.cpp lib/Basic/DiagnosticIDs.cpp lib/Serialization/ASTReader.cpp Inde

[PATCH] D26465: [Diag] Optimize DiagnosticIDs::getDiagnosticSeverity

2016-12-22 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart marked an inline comment as done. ogoffart added a comment. In https://reviews.llvm.org/D26465#607860, @arphaman wrote: > What did you test the parsing on? Will this patch get similar improvements > for code that compiles without errors and warnings? It was benchamerked with https://g

[PATCH] D28052: [change-namespace] consider namespace aliases to shorten qualified names.

2016-12-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: hokein. ioeric added a subscriber: cfe-commits. https://reviews.llvm.org/D28052 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h unittests/change-namespace/ChangeNamespaceTests.cpp Index: unittests/change-

[PATCH] D28034: [ASTMatchers] Add hasInClassInitializer traversal matcher for FieldDecl.

2016-12-22 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: docs/LibASTMatchersReference.html:2442 }; -fieldDecl(isBitField()) +fieldDecl(hasBitWidth(2)) matches 'int a;' and 'int c;' but not 'int b;'. Prazek wrote: > Fix not connected to patch? Yes. The documentati

[PATCH] D28048: [OpenCL] Align fake address space map with the SPIR target maps.

2016-12-22 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. echuraev added a reviewer: Anastasia. echuraev added subscribers: cfe-commits, bader, yaxunl. We compile user opencl kernel code with spir triple. But built-ins are written in OpenCL and we compile it with triple x86_64 to be able to use x86 intrinsics. And we nee

[PATCH] D28034: [ASTMatchers] Add hasInClassInitializer traversal matcher for FieldDecl.

2016-12-22 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: docs/LibASTMatchersReference.html:2442 }; -fieldDecl(isBitField()) +fieldDecl(hasBitWidth(2)) matches 'int a;' and 'int c;' but not 'int b;'. Fix not connected to patch? Comment at: docs/LibASTMat

[PATCH] D28047: Remove the '-disable-llvm-passes' flag (which I didn't even know existed, and I suspect many others aren't aware of either) and strength '-disable-llvm-optzns' to do the same thing.

2016-12-22 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc created this revision. chandlerc added reviewers: rsmith, mehdi_amini. chandlerc added a subscriber: cfe-commits. Herald added a subscriber: mcrosier. Much to my surprise, '-disable-llvm-optzns' which I thought was the magical flag I wanted to get at the raw LLVM IR coming out of Clang d