Re: [PATCH] D9924: Ignore report when the argument to malloc is assigned known value

2015-08-17 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Maybe, I should add a check that `a, b, n' are positive. So, in this case static analyzer can choose to be strict and reject false positives. What would this buy us? Does the checker warn on underflow? If a' might overflow, then in this case we can emit

Re: r239883 - Update the intel intrinsic headers to use the target attribute support.

2015-08-17 Thread Dimitry Andric via cfe-commits
[Re-sending, used the old cfe-commits address by accident] Where is the other thread? This problem still exists, for both trunk and the upcoming 3.7.0 RC3. I'll try to submit a patch tomorrow to partially restore the include guards, so we won't have a broken release. -Dimitry On 03 Aug

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-17 Thread Beren Minor via cfe-commits
berenm marked 2 inline comments as done. Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:166 @@ +165,3 @@ + static llvm::Regex Splitter( + (([a-z0-9A-Z]*)(_+)|([A-Z]?[a-z0-9]+)([A-Z]|$)|([A-Z]+)([A-Z]|$))); + alexfh wrote: Why do you need the

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

2015-08-17 Thread pierre gousseau via cfe-commits
pgousseau added a comment. In http://reviews.llvm.org/D11832#224929, @dcoughlin wrote: You should consider what should happen when the memcpy may write past the end of the fixed-size array and add tests that specify correct behavior for these cases. An important example is: struct Foo {

[clang-tools-extra] r245215 - [clang-tidy] Fix a use-after-free.

2015-08-17 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Aug 17 06:27:11 2015 New Revision: 245215 URL: http://llvm.org/viewvc/llvm-project?rev=245215view=rev Log: [clang-tidy] Fix a use-after-free. Modified: clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp Modified:

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-17 Thread Beren Minor via cfe-commits
berenm added a comment. In http://reviews.llvm.org/D10933#225671, @alexfh wrote: Looks good with a couple of comments. Tell me if you need me to submit the patch for you, once you address the comments. If you tell me how I should proceed, I can maybe do it myself (do I just have to send

r245204 - [clang-tidy] Make NumOccurrenceFlag for SourcePaths configurable.

2015-08-17 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Aug 17 05:01:42 2015 New Revision: 245204 URL: http://llvm.org/viewvc/llvm-project?rev=245204view=rev Log: [clang-tidy] Make NumOccurrenceFlag for SourcePaths configurable. Added an additional ctor that takes a NumOccurrenceFlag parameter for the SourcePaths option. This

Re: [PATCH] D12076: Add loop-convert check to clang-tidy.

2015-08-17 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Some initial comments. I'll need a bit more time to review this thoroughly. Comment at: test/clang-tidy/modernize-loop-convert.cpp:149 @@ +148,3 @@ +arr[i] = 0; + // CHECK-MESSAGES-NOT: :[[@LINE-2]]:3: warning: use range-based for loop instead +

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-17 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good with a couple of comments. Tell me if you need me to submit the patch for you, once you address the comments. Thank you for the awesome new check! Comment at:

[clang-tools-extra] r245205 - [clang-tidy] Allow use of -list-checks option without need to pass source files.

2015-08-17 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Aug 17 05:03:27 2015 New Revision: 245205 URL: http://llvm.org/viewvc/llvm-project?rev=245205view=rev Log: [clang-tidy] Allow use of -list-checks option without need to pass source files. Initialize CommonOptionsParser with ZeroOrOne NumOccurrenceFlag so callers can pass

Re: [PATCH] D11932: [OPENMP] Link libomp.lib on Windows

2015-08-17 Thread İsmail Dönmez via cfe-commits
ismail accepted this revision. ismail added a reviewer: ismail. ismail added a comment. This revision is now accepted and ready to land. Great work. Tested fine on Windows. Next step would be mapping /openmp flag to -fopenmp but I guess thats for another bug. http://reviews.llvm.org/D11932

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-17 Thread Beren Minor via cfe-commits
berenm updated this revision to Diff 32277. berenm added a comment. Here is an updated version with the latest comments fixed. http://reviews.llvm.org/D10933 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/IdentifierNamingCheck.cpp

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-17 Thread Beren Minor via cfe-commits
berenm marked 6 inline comments as done. berenm added a comment. http://reviews.llvm.org/D10933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r245257 - Generating assumption loads of vptr after ctor call

2015-08-17 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Mon Aug 17 18:33:49 2015 New Revision: 245257 URL: http://llvm.org/viewvc/llvm-project?rev=245257view=rev Log: Generating assumption loads of vptr after ctor call Generating call assume(icmp %vtable, %global_vtable) after constructor call for devirtualization purposes. For

Re: [PATCH] D12036: We shouldn't need to pass -fno-strict-aliasing when building clang with clang.

2015-08-17 Thread Eric Christopher via cfe-commits
echristo accepted this revision. echristo added a comment. This revision is now accepted and ready to land. Sure I guess. I'm still not sure why we can't do this in the configure side of things, but I don't really care that much for now. http://reviews.llvm.org/D12036

Re: r239883 - Update the intel intrinsic headers to use the target attribute support.

2015-08-17 Thread Justin Bogner via cfe-commits
Eric Christopher echri...@gmail.com writes: There is nothing broken about not having the include guards there, it's just not helpful. I'm working on the infrastructure for an error if you call a function from within an incompatible routine at the moment (without duplicating a lot of code it's

Re: Second Lit tests C++11 compatibility patch: using preprocessor to filter expected-error

2015-08-17 Thread Richard Smith via cfe-commits
On Mon, Aug 17, 2015 at 5:15 PM, Li, Charles via cfe-commits cfe-commits@lists.llvm.org wrote: Hi Richard and Justin, What's the upside to this approach? AFAICT it makes the test harder to read and errors less informative due to pointing at the wrong lines, but (at least in switch-1.c)

Re: [PATCH] D11944: Nativize filename in FileManager::getFile().

2015-08-17 Thread Sean Silva via cfe-commits
On Thu, Aug 13, 2015 at 10:50 AM, Richard Smith via cfe-commits cfe-commits@lists.llvm.org wrote: rsmith added a comment. I would think most Windows users would be surprised if we showed them paths with /s instead of \s, but I'm fine with us using / internally if it doesn't leak out to the

Re: r239883 - Update the intel intrinsic headers to use the target attribute support.

2015-08-17 Thread Hans Wennborg via cfe-commits
The 3.7 branch does have the include guards; they were re-added in http://llvm.org/viewvc/llvm-project?rev=243925view=rev. That happened after rc2, but it will be in rc3. Can you double check if you're still running into problems on the 3.7 branch? - Hans On Mon, Aug 17, 2015 at 3:04 PM,

RE: [PATCH] D9924: Ignore report when the argument to malloc is assigned known value

2015-08-17 Thread Aditya K via cfe-commits
Date: Mon, 17 Aug 2015 21:39:32 + To: hiradi...@msn.com; jordan_r...@apple.com; kreme...@apple.com; daniel.marjam...@evidente.se; mclow.li...@gmail.com; adasg...@codeaurora.org; zaks.a...@gmail.com From: zaks.a...@gmail.com CC:

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-17 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM Comment at: test/CodeGenCXX/vtable-assume-load.cpp:24 @@ +23,3 @@ +// CHECK1-LABEL: define void @_ZN5test14fooAEv() +// CHECK1: call void

r245251 - Remove dead code, there's no need for an override that just duplicates

2015-08-17 Thread Eric Christopher via cfe-commits
Author: echristo Date: Mon Aug 17 17:22:28 2015 New Revision: 245251 URL: http://llvm.org/viewvc/llvm-project?rev=245251view=rev Log: Remove dead code, there's no need for an override that just duplicates the default behavior. Modified: cfe/trunk/lib/Basic/Targets.cpp Modified:

Re: [PATCH] D12036: We shouldn't need to pass -fno-strict-aliasing when building clang with clang.

2015-08-17 Thread Justin Bogner via cfe-commits
Chris Bieneman be...@apple.com writes: beanz updated this revision to Diff 32349. beanz added a comment. - Adapting to r245255 which exposes a variable in autoconf for which compiler you are building with. - Updated the CMake to be more CMake-y Note: This has been tested by running a check

Re: r245257 - Generating assumption loads of vptr after ctor call

2015-08-17 Thread Hans Wennborg via cfe-commits
I reverted this in r245260 as it caused https://llvm.org/bugs/show_bug.cgi?id=24479 - Hans On Mon, Aug 17, 2015 at 4:34 PM, Piotr Padlewski via cfe-commits cfe-commits@lists.llvm.org wrote: Author: prazek Date: Mon Aug 17 18:33:49 2015 New Revision: 245257 URL:

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-17 Thread Piotr Padlewski via cfe-commits
Prazek updated this revision to Diff 32363. Prazek added a comment. Fix for the PR24479 http://reviews.llvm.org/D11859 Files: lib/CodeGen/CGCXXABI.h lib/CodeGen/CGCall.cpp lib/CodeGen/CGClass.cpp lib/CodeGen/CodeGenFunction.h lib/CodeGen/ItaniumCXXABI.cpp

Re: r245041 - [OPENMP] Fix for http://llvm.org/PR24371: Assert failure compiling blender 2.75.

2015-08-17 Thread Bataev, Alexey via cfe-commits
Hans, everything is fine. Best regards, Alexey Bataev = Software Engineer Intel Compiler Team 17.08.2015 21:30, Hans Wennborg пишет: Merged in r245229. There were merge conflicts in StmtOpenMP.h because we don't have r244209 on the branch. I think I got it right, but I'd

r245250 - Make a test less brittle.

2015-08-17 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Mon Aug 17 17:18:30 2015 New Revision: 245250 URL: http://llvm.org/viewvc/llvm-project?rev=245250view=rev Log: Make a test less brittle. Capture line numbers in a variable for FileCheck instead of hardcoding them. Modified:

Re: [PATCH] D10431: PR21174 - clang only searches current working directory for precompiled include file

2015-08-17 Thread Richard Smith via cfe-commits
On Mon, Aug 17, 2015 at 9:24 AM, Nico Weber tha...@chromium.org wrote: thakis added a subscriber: thakis. Comment at: lib/Driver/Tools.cpp:398 @@ +397,3 @@ + FoundPTH = !UsePCH; +} + } kimgr wrote: kimgr wrote:

Re: r239883 - Update the intel intrinsic headers to use the target attribute support.

2015-08-17 Thread Eric Christopher via cfe-commits
There is nothing broken about not having the include guards there, it's just not helpful. I'm working on the infrastructure for an error if you call a function from within an incompatible routine at the moment (without duplicating a lot of code it's actually a bit annoying), but there's nothing

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-17 Thread John McCall via cfe-commits
rjmccall added a comment. Just a couple tweaks and then LGTM. Comment at: lib/CodeGen/CGClass.cpp:1833 @@ +1832,3 @@ + // unless we are calling base constructor - we don't want to generating + // assumption loads for not completed because vptr may still change. + if

Re: [PATCH] D12036: We shouldn't need to pass -fno-strict-aliasing when building clang with clang.

2015-08-17 Thread Chris Bieneman via cfe-commits
beanz updated this revision to Diff 32349. beanz added a comment. - Adapting to r245255 which exposes a variable in autoconf for which compiler you are building with. - Updated the CMake to be more CMake-y Note: This has been tested by running a check on a stage2 clang built with asan and

r245260 - Revert r245257 Generating assumption loads of vptr after ctor call

2015-08-17 Thread Hans Wennborg via cfe-commits
Author: hans Date: Mon Aug 17 19:17:58 2015 New Revision: 245260 URL: http://llvm.org/viewvc/llvm-project?rev=245260view=rev Log: Revert r245257 Generating assumption loads of vptr after ctor call It caused PR24479 Removed: cfe/trunk/test/CodeGenCXX/vtable-assume-load.cpp Modified:

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

2015-08-17 Thread Sean Silva via cfe-commits
On Wed, Aug 12, 2015 at 6:05 PM, Richard Smith rich...@metafoo.co.uk wrote: On Wed, Aug 12, 2015 at 6:00 PM, Sean Silva chisophu...@gmail.com wrote: On Wed, Aug 12, 2015 at 2:43 PM, Richard Smith rich...@metafoo.co.uk wrote: On Wed, Aug 12, 2015 at 12:08 AM, Sean Silva

r245264 - Generating assumption loads of vptr after ctor call (fixed)

2015-08-17 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Mon Aug 17 22:52:00 2015 New Revision: 245264 URL: http://llvm.org/viewvc/llvm-project?rev=245264view=rev Log: Generating assumption loads of vptr after ctor call (fixed) Generating call assume(icmp %vtable, %global_vtable) after constructor call for devirtualization

r245259 - Doxygen: add build option to use svg instead of png files for graphs

2015-08-17 Thread Hans Wennborg via cfe-commits
Author: hans Date: Mon Aug 17 18:38:56 2015 New Revision: 245259 URL: http://llvm.org/viewvc/llvm-project?rev=245259view=rev Log: Doxygen: add build option to use svg instead of png files for graphs Differential Revision: http://reviews.llvm.org/D11994 Modified:

Re: [PATCH] D5102: [analyzer][Bugfix/improvement] Fix for PR16833

2015-08-17 Thread Aleksei Sidorin via cfe-commits
a.sidorin updated this revision to Diff 32293. a.sidorin added a comment. - Fix review notes - Add some more tests - Add a fix and a test for incorrect pruning of trivially unreachable case statements in CFG for SwitchStmt (accidentially found while writing a test).

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-17 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D10933#225678, @berenm wrote: In http://reviews.llvm.org/D10933#225671, @alexfh wrote: Looks good with a couple of comments. Tell me if you need me to submit the patch for you, once you address the comments. If you tell me how I should

[PATCH] D12081: Add use-nullptr check to clang-tidy.

2015-08-17 Thread Angel Garcia via cfe-commits
angelgarcia created this revision. angelgarcia added a reviewer: alexfh. angelgarcia added subscribers: klimek, cfe-commits. angelgarcia changed the visibility of this Differential Revision from Public (No Login Required) to All Users. Move UseNullptr from clang-modernize to modernize module in

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-17 Thread Beren Minor via cfe-commits
berenm updated this revision to Diff 32294. berenm added a comment. Indeed, I probably don't have rights on Clang/LLVM repositories. I have updated the patch with stricter tests - and found a missing break statement (`clang-tidy/readability/IdentifierNamingCheck.cpp:201`). I also realized that

RE: [PATCH] RE: [cfe-dev] missing return statement for non-void functions in C++

2015-08-17 Thread Sjoerd Meijer via cfe-commits
Agreed, let’s get that right first. The attached patch causes the program to trap for all optimizations levels, except when optimizing for size. Sjoerd. From: dosr...@gmail.com [mailto:dosr...@gmail.com] On Behalf Of Gabriel Dos Reis Sent: 13 August 2015 21:51 To: Richard Smith Cc: Sjoerd

Re: [PATCH] D12038: CodeGen: Introduce CodeGenModule::CreateMetadataIdentifierForType.

2015-08-17 Thread Peter Collingbourne via cfe-commits
pcc added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:3677 @@ +3676,3 @@ +llvm::Metadata *CodeGenModule::CreateMetadataIdentifierForType(QualType T) { + llvm::Metadata *InternalId = MetadataIdMap[T.getCanonicalType()]; + if (InternalId) Prazek

Re: [PATCH] D10431: PR21174 - clang only searches current working directory for precompiled include file

2015-08-17 Thread Kim Gräsman via cfe-commits
On Tue, Aug 18, 2015 at 2:00 AM, Richard Smith rich...@metafoo.co.uk wrote: Should this logic for PCH/PTH scanning move out of the driver and into the frontend? gcc also checks if the gch file is a directory and if so finds the first file with matching language / defines etc. It also uses

Re: r245264 - Generating assumption loads of vptr after ctor call (fixed)

2015-08-17 Thread Justin Bogner via cfe-commits
Piotr Padlewski via cfe-commits cfe-commits@lists.llvm.org writes: Author: prazek Date: Mon Aug 17 22:52:00 2015 New Revision: 245264 URL: http://llvm.org/viewvc/llvm-project?rev=245264view=rev Log: Generating assumption loads of vptr after ctor call (fixed) Generating call assume(icmp

r245267 - Revert Generating assumption loads of vptr after ctor call (fixed)

2015-08-17 Thread Justin Bogner via cfe-commits
Author: bogner Date: Tue Aug 18 00:40:20 2015 New Revision: 245267 URL: http://llvm.org/viewvc/llvm-project?rev=245267view=rev Log: Revert Generating assumption loads of vptr after ctor call (fixed) Bootstrap bots were failing:

Re: Second Lit tests C++11 compatibility patch: using preprocessor to filter expected-error

2015-08-17 Thread Justin Bogner via cfe-commits
Li, Charles charles...@playstation.sony.com writes: Hi Richard, I have modified the “expected-“ lines as you requested. Cheers, Charles From: meta...@gmail.com [mailto:meta...@gmail.com] On Behalf Of Richard Smith Sent: Monday, August 17, 2015 5:41 PM To: Li, Charles Cc: Justin Bogner;

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

2015-08-17 Thread Samuel Antao via cfe-commits
sfantao added a comment. Alexey, Thanks for the review! Find my comments inlined. Thanks again! Samuel Comment at: lib/CodeGen/CGExpr.cpp:1969 @@ -1945,3 +1968,3 @@ else - return EmitCapturedFieldLValue(*this, CapturedStmtInfo-lookup(VD), -

Re: Second Lit tests C++11 compatibility patch: using preprocessor to filter expected-error

2015-08-17 Thread Justin Bogner via cfe-commits
Li, Charles via cfe-commits cfe-commits@lists.llvm.org writes: Hi Clang developers, We here at Sony are continuing to update the Lit tests for C++ dialects compatibility. Attached is the second patch. (As a reference, here is the link to the discussion on the previous Lit patch.

[PATCH] D12087: always_inline codegen rewrite

2015-08-17 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: chandlerc, rsmith. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. Currently always_inline definitions are emitted as (in most cases) an available_externally llvm function with an

Second Lit tests C++11 compatibility patch: using preprocessor to filter expected-error

2015-08-17 Thread Li, Charles via cfe-commits
Hi Clang developers, We here at Sony are continuing to update the Lit tests for C++ dialects compatibility. Attached is the second patch. (As a reference, here is the link to the discussion on the previous Lit patch.

Re: [PATCH] D12081: Add use-nullptr check to clang-tidy.

2015-08-17 Thread Angel Garcia via cfe-commits
angelgarcia updated this revision to Diff 32303. angelgarcia added a comment. Previous diff was not the newest one. http://reviews.llvm.org/D12081 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseNullptrCheck.cpp

Re: [PATCH] D12081: Add use-nullptr check to clang-tidy.

2015-08-17 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/UseNullptrCheck.cpp:16 @@ +15,3 @@ + +using namespace clang::ast_matchers; +using namespace clang; nit: The list should be sorted. Comment at:

Re: [PATCH] D12081: Add use-nullptr check to clang-tidy.

2015-08-17 Thread Angel Garcia via cfe-commits
angelgarcia updated this revision to Diff 32311. angelgarcia marked 9 inline comments as done. angelgarcia added a comment. Comments fixed. http://reviews.llvm.org/D12081 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp

Re: [PATCH] D10431: PR21174 - clang only searches current working directory for precompiled include file

2015-08-17 Thread Nico Weber via cfe-commits
thakis added a subscriber: thakis. Comment at: lib/Driver/Tools.cpp:398 @@ +397,3 @@ + FoundPTH = !UsePCH; +} + } kimgr wrote: kimgr wrote: kimgr wrote: kimgr wrote: Add a `break;` here so we don't continue searching

Re: r245041 - [OPENMP] Fix for http://llvm.org/PR24371: Assert failure compiling blender 2.75.

2015-08-17 Thread Hans Wennborg via cfe-commits
Merged in r245229. There were merge conflicts in StmtOpenMP.h because we don't have r244209 on the branch. I think I got it right, but I'd appreciate if someone could double check http://llvm.org/viewvc/llvm-project?rev=245229view=rev Thanks, Hans On Sun, Aug 16, 2015 at 8:55 PM, Bataev, Alexey

Re: [PATCH] D12052: [X86][SSE] Add _mm_undefined_* intrinsics

2015-08-17 Thread Eric Christopher via cfe-commits
On Sun, Aug 16, 2015 at 3:05 AM Simon Pilgrim llvm-...@redking.me.uk wrote: RKSimon added a comment. Yes using that uninitialized value has worried me as well. I originally set it to zero (and considered using __ LINE __ or __ COUNTER __) but both introduce defined behaviour that I could see

Re: [PATCH] D12087: always_inline codegen rewrite

2015-08-17 Thread Chandler Carruth via cfe-commits
chandlerc added a comment. FYI, we should send an RFC to llvm-dev about the design change of always_inline and make sure folks generally like the IR-level direction as well. We can point at this review as an example. I'm happy to write that up and send it if that's useful? Repository: rL

Re: [PATCH] D12087: always_inline codegen rewrite

2015-08-17 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:447-448 @@ +446,4 @@ + C-handleOperandChange(GV, IndirectReplacement, U); +} else if (!isallvm::InvokeInst(U.getUser()) + !isallvm::CallInst(U.getUser())) { +

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

2015-08-17 Thread Akira Hatanaka via cfe-commits
On Thu, Aug 13, 2015 at 5:56 PM, Eric Christopher echri...@gmail.com wrote: Apologies, I'm really resistant to more things being used in TargetOptions and I was (perhaps mistakenly) under the impression that you wanted to move it to TargetOptions without an IR serialization. We need all

Re: [PATCH] D11433: [Static Analyzer] Make NonNullParamChecker emit implicit null dereference events.

2015-08-17 Thread Anna Zaks via cfe-commits
zaks.anna requested changes to this revision. zaks.anna added a comment. This revision now requires changes to proceed. I believe we saw a regression in diagnostics with this modification. Gabor, do you recall what it was? http://reviews.llvm.org/D11433

Re: [PATCH] D9924: Ignore report when the argument to malloc is assigned known value

2015-08-17 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. x = a/b; where n b malloc (x*n); Then x*n will not overflow I am not convinced that the new rule is strong enough. 'a' can be any expression. For example, maybe you have (b-1)*a/b and the denominator cancels out something unrelated to 'n' in the numerator?

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

2015-08-17 Thread Eric Christopher via cfe-commits
On Mon, Aug 17, 2015 at 11:57 AM Akira Hatanaka ahata...@gmail.com wrote: On Thu, Aug 13, 2015 at 5:56 PM, Eric Christopher echri...@gmail.com wrote: Apologies, I'm really resistant to more things being used in TargetOptions and I was (perhaps mistakenly) under the impression that you

Re: [PATCH] D12087: always_inline codegen rewrite

2015-08-17 Thread Evgeniy Stepanov via cfe-commits
eugenis removed rL LLVM as the repository for this revision. eugenis updated this revision to Diff 32330. http://reviews.llvm.org/D12087 Files: lib/CodeGen/CGCXX.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/ItaniumCXXABI.cpp

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-17 Thread Piotr Padlewski via cfe-commits
Prazek updated this revision to Diff 32343. Prazek marked an inline comment as done. http://reviews.llvm.org/D11859 Files: lib/CodeGen/CGCXXABI.h lib/CodeGen/CGClass.cpp lib/CodeGen/CodeGenFunction.h lib/CodeGen/ItaniumCXXABI.cpp lib/CodeGen/MicrosoftCXXABI.cpp

Re: [PATCH] D12087: always_inline codegen rewrite

2015-08-17 Thread Richard Smith via cfe-commits
On Mon, Aug 17, 2015 at 1:59 PM, David Blaikie dblai...@gmail.com wrote: On Mon, Aug 17, 2015 at 11:07 AM, Evgeniy Stepanov via cfe-commits cfe-commits@lists.llvm.org wrote: eugenis created this revision. eugenis added reviewers: chandlerc, rsmith. eugenis added a subscriber:

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-17 Thread Piotr Padlewski via cfe-commits
Prazek marked 3 inline comments as done. Prazek added a comment. http://reviews.llvm.org/D11859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r245239 - Make regex and any assert when they should throw an exception _but_ the user has decreed 'no exceptions'. This matches the behavior of string and vector

2015-08-17 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Aug 17 16:14:16 2015 New Revision: 245239 URL: http://llvm.org/viewvc/llvm-project?rev=245239view=rev Log: Make regex and any assert when they should throw an exception _but_ the user has decreed 'no exceptions'. This matches the behavior of string and vector

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

2015-08-17 Thread Akira Hatanaka via cfe-commits
On Mon, Aug 17, 2015 at 12:41 PM, Eric Christopher echri...@gmail.com wrote: On Mon, Aug 17, 2015 at 11:57 AM Akira Hatanaka ahata...@gmail.com wrote: On Thu, Aug 13, 2015 at 5:56 PM, Eric Christopher echri...@gmail.com wrote: Apologies, I'm really resistant to more things being used

Re: [PATCH] D10933: Add new IdentifierNaming check

2015-08-17 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D10933#225696, @berenm wrote: Indeed, I probably don't have rights on Clang/LLVM repositories. I have updated the patch with stricter tests - and found a missing break statement (`clang-tidy/readability/IdentifierNamingCheck.cpp:201`).

Re: [PATCH] D11194: Instantiate function declarations in instantiated functions.

2015-08-17 Thread Serge Pavlov via cfe-commits
sepavloff updated this revision to Diff 32310. sepavloff added a comment. Updated method isLexicallyWithinFunctionOrMethod according to Richard's notes. http://reviews.llvm.org/D11194 Files: include/clang/AST/DeclBase.h lib/AST/DeclBase.cpp lib/Sema/SemaTemplateInstantiate.cpp

Re: [PATCH] D12000: Bugfix - Clang handles __builtin_object_size in wrong way

2015-08-17 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/AST/ExprConstant.cpp:6221-6223 @@ +6220,5 @@ + // + // extern struct X { char buff[32]; int a, b, c; } *p; + // int a = __builtin_object_size(p-buff + 4, 3); // returns 28 + // int b = __builtin_object_size(p-buff

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-17 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGClass.cpp:1862 @@ +1861,3 @@ + for (const VPtr Vptr : getVTablePointers(ClassDecl)) +if (CGM.getCXXABI().requiresVPtrInitialization(Vptr)) + EmitVTableAssumptionLoad(Vptr, This); No, it only

Re: [PATCH] D12087: always_inline codegen rewrite

2015-08-17 Thread Evgeniy Stepanov via cfe-commits
eugenis marked an inline comment as done. Comment at: lib/CodeGen/CodeGenModule.cpp:447-448 @@ +446,4 @@ +if (C !isallvm::GlobalValue(C)) { + C-handleOperandChange(GV, IndirectReplacement, U); + continue; +} Good catch.

Re: [PATCH] D12087: always_inline codegen rewrite

2015-08-17 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:513 @@ +512,3 @@ +void CodeGenModule::RewriteAlwaysInlineFunctions() { + for (llvm::Function *Fn : AlwaysInlineFunctions) +RewriteAlwaysInlineFunction(Fn); Does it matter that this

Re: [PATCH] D12087: always_inline codegen rewrite

2015-08-17 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 32341. http://reviews.llvm.org/D12087 Files: lib/CodeGen/CGCXX.cpp lib/CodeGen/CGClass.cpp lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/ItaniumCXXABI.cpp

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-17 Thread Piotr Padlewski via cfe-commits
Prazek marked 3 inline comments as done. Comment at: lib/CodeGen/CGClass.cpp:1862 @@ +1861,3 @@ + for (const VPtr Vptr : getVTablePointers(ClassDecl)) +if (CGM.getCXXABI().requiresVPtrInitialization(Vptr)) + EmitVTableAssumptionLoad(Vptr, This);

Re: [PATCH] D12087: always_inline codegen rewrite

2015-08-17 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:513 @@ +512,3 @@ +void CodeGenModule::RewriteAlwaysInlineFunctions() { + for (llvm::Function *Fn : AlwaysInlineFunctions) +RewriteAlwaysInlineFunction(Fn); Done. Should I make it a

Re: [PATCH] D12000: Bugfix - Clang handles __builtin_object_size in wrong way

2015-08-17 Thread George Burgess IV via cfe-commits
george.burgess.iv updated the summary for this revision. george.burgess.iv updated this revision to Diff 32333. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Addressed feedback. http://reviews.llvm.org/D12000 Files: lib/AST/ExprConstant.cpp

Re: Second Lit tests C++11 compatibility patch: using preprocessor to filter expected-error

2015-08-17 Thread Richard Smith via cfe-commits
On Mon, Aug 17, 2015 at 9:56 AM, Li, Charles via cfe-commits cfe-commits@lists.llvm.org wrote: Hi Clang developers, We here at Sony are continuing to update the Lit tests for C++ dialects compatibility. Attached is the second patch. (As a reference, here is the link to the discussion on

Re: [PATCH] D12000: Bugfix - Clang handles __builtin_object_size in wrong way

2015-08-17 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a reviewer: rsmith. rsmith added a comment. This revision is now accepted and ready to land. LGTM with one more testcase :) Comment at: lib/AST/ExprConstant.cpp:6243-6245 @@ +6242,5 @@ + } else if (End.Designator.IsOnePastTheEnd) { +

r245236 - [modules] When parsing the base specifiers of a parse-merged class, the current

2015-08-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Aug 17 15:24:17 2015 New Revision: 245236 URL: http://llvm.org/viewvc/llvm-project?rev=245236view=rev Log: [modules] When parsing the base specifiers of a parse-merged class, the current context is the class itself but lookups should be performed starting with the lookup

Re: [PATCH] D11194: Instantiate function declarations in instantiated functions.

2015-08-17 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/DeclBase.cpp:273 @@ +272,3 @@ +return true; + if (const CXXRecordDecl *ClassD = dyn_castCXXRecordDecl(LDC)) +return ClassD-isLocalClass() !ClassD-isLambda();; It's not necessary for this change, but to

Re: [PATCH] D12087: always_inline codegen rewrite

2015-08-17 Thread David Blaikie via cfe-commits
On Mon, Aug 17, 2015 at 11:07 AM, Evgeniy Stepanov via cfe-commits cfe-commits@lists.llvm.org wrote: eugenis created this revision. eugenis added reviewers: chandlerc, rsmith. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. Currently

Re: [PATCH] D11433: [Static Analyzer] Make NonNullParamChecker emit implicit null dereference events.

2015-08-17 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. The problem here is that, this checker can emit a warning for two cases: 1, Null was bound to a reference which should be reported as a dereference 2, Null was passed to parameter that should be non-null (marked by the attribute, not the qualifier) which should be