r261192 - Sema: provide an extension warning for enable_if

2016-02-17 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Thu Feb 18 00:49:31 2016 New Revision: 261192 URL: http://llvm.org/viewvc/llvm-project?rev=261192&view=rev Log: Sema: provide an extension warning for enable_if Clang implements an enable_if attribute as an extension. Hook up `-Wpedantic` to issue an extension usage warnin

r261191 - [Parse] Make sure we don't forget to diagnose typos in exprs

2016-02-17 Thread David Majnemer via cfe-commits
Author: majnemer Date: Thu Feb 18 00:37:44 2016 New Revision: 261191 URL: http://llvm.org/viewvc/llvm-project?rev=261191&view=rev Log: [Parse] Make sure we don't forget to diagnose typos in exprs If ActOn*Op fails, we will forget to diagnose typos in the LHS of expressions. Modified: cfe/tru

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-17 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. OK, I now understand what you meant. > How about the following? > > else if (LocalAlignment == 8) { > if (NumBytesAtAlign8 == 0) { > // We have not seen any 8-byte aligned element yet. There is no padding > and we are either 4-byte > // aligned o

Re: [libcxx] r260431 - Recommit r260012 - Cleanup node-type handling in the unordered containers.

2016-02-17 Thread Evgenii Stepanov via cfe-commits
Thank you! On Wed, Feb 17, 2016 at 9:23 PM, Eric Fiselier wrote: > Hopefully fixed in r261180. > > On Sat, Feb 13, 2016 at 2:08 PM, Evgenii Stepanov > wrote: >> >> Hi, >> >> this is my error message: >> >> In file included from z.cc:1: >> /code/build-llvm/bin/../include/c++/v1/ext/hash_map:213:5

[PATCH] D17369: [OpenMP] Code generation for target exit data directive

2016-02-17 Thread Samuel Antao via cfe-commits
sfantao created this revision. sfantao added reviewers: ABataev, hfinkel, carlo.bertolli, arpith-jacob, kkwli0. sfantao added subscribers: caomhin, fraggamuffin, cfe-commits. This patch adds support for the target exit data directive code generation. Given that, apart from the employed runtime ca

Re: [PATCH] D16821: Add whole-program vtable optimization feature to Clang.

2016-02-17 Thread Peter Collingbourne via cfe-commits
pcc added a reviewer: rsmith. pcc added a comment. Hi Richard, can you take a look please? http://reviews.llvm.org/D16821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D17368: [OpenMP] Code generation for target enter data directive

2016-02-17 Thread Samuel Antao via cfe-commits
sfantao created this revision. sfantao added reviewers: ABataev, hfinkel, carlo.bertolli, arpith-jacob, kkwli0. sfantao added subscribers: caomhin, fraggamuffin, cfe-commits. This patch adds support for the target enter data directive code generation. http://reviews.llvm.org/D17368 Files: lib/

[PATCH] D17367: [OpenMP] Code generation for target data directive

2016-02-17 Thread Samuel Antao via cfe-commits
sfantao created this revision. sfantao added reviewers: ABataev, hfinkel, carlo.bertolli, arpith-jacob, kkwli0. sfantao added subscribers: caomhin, fraggamuffin, cfe-commits. This patch adds support for the target data directive code generation. Part of the already existent functionality related

Re: [libcxx] r260012 - Cleanup node-type handling in the unordered containers

2016-02-17 Thread Eric Fiselier via cfe-commits
> How big a maintenance burden is it? Is there a way to reduce the burden? It's actually not *that* big of a maintenance burden because it's mostly just a shallow wrapper around <__hash_table>. What's been frustrating me is that there were *NO TESTS*. So modifying <__hash_table> is a stab in the

Re: [PATCH] D17349: ARM: fix VFP asm constraints

2016-02-17 Thread Saleem Abdulrasool via cfe-commits
compnerd added a subscriber: compnerd. compnerd added a comment. Test cases? It seems that 't' and 'w' are not available in thumb-1 mode. http://reviews.llvm.org/D17349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

Re: [libcxx] r260431 - Recommit r260012 - Cleanup node-type handling in the unordered containers.

2016-02-17 Thread Eric Fiselier via cfe-commits
Hopefully fixed in r261180. On Sat, Feb 13, 2016 at 2:08 PM, Evgenii Stepanov wrote: > Hi, > > this is my error message: > > In file included from z.cc:1: > /code/build-llvm/bin/../include/c++/v1/ext/hash_map:213:5: warning: > Use of the header is deprecated. Migrate to > [-W#warnings] > # w

Re: [libcxx] r260514 - Teach __hash_table how to handle unordered_map's __hash_value_type.

2016-02-17 Thread Eric Fiselier via cfe-commits
On Feb 14, 2016 2:02 PM, "Duncan P. N. Exon Smith" wrote: > (For anyone else trying to line up this commit message with the > patch: it looks like this message is a dup of r260513, and this > patch is one of its described follow-ups: > > > On 2016-Feb-11, at 04:25, Eric Fiselier via cfe-commits <

Re: r259874 - CodeGen: correct Windows ARM C++ assertion

2016-02-17 Thread Saleem Abdulrasool via cfe-commits
On Wed, Feb 17, 2016 at 1:33 PM, Hans Wennborg wrote: > On Wed, Feb 17, 2016 at 8:55 AM, Hans Wennborg wrote: > > On Tue, Feb 16, 2016 at 9:03 PM, Saleem Abdulrasool > > wrote: > >> On Thu, Feb 4, 2016 at 8:12 PM, Saleem Abdulrasool via cfe-commits > >> wrote: > >>> > >>> Author: compnerd > >>

Re: [PATCH] D17170: [OPENMP] Codegen for distribute directive

2016-02-17 Thread Carlo Bertolli via cfe-commits
carlo.bertolli updated this revision to Diff 48273. carlo.bertolli added a comment. Update to new version of http://reviews.llvm.org/D17148, integrating changes from the trunk. Repository: rL LLVM http://reviews.llvm.org/D17170 Files: include/clang/AST/StmtOpenMP.h lib/CodeGen/CGOpenMPR

Re: [PATCH] D15883: Add ARM EHABI-related constants to unwind.h.

2016-02-17 Thread Saleem Abdulrasool via cfe-commits
compnerd added inline comments. Comment at: lib/Headers/unwind.h:61 @@ +60,3 @@ +#define _UNWIND_ARM_EHABI 0 +#endif + logan wrote: > compnerd wrote: > > logan wrote: > > > Since this is `unwind.h`, I feel that we can get a step further and use > > > `__ARM_EABI_

Re: [PATCH] D17148: [OPENMP] Basic teams directive implementation

2016-02-17 Thread Carlo Bertolli via cfe-commits
carlo.bertolli updated this revision to Diff 48271. carlo.bertolli added a comment. Update against dependence http://reviews.llvm.org/D17019. Repository: rL LLVM http://reviews.llvm.org/D17148 Files: lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGOpenMPRuntime.h lib/CodeGen/CGStmtOpenMP

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-02-17 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. Hi Anastasia, It seems the access qualifier attribute may need to be handled like the you have mentioned in clang-commit that to be in type. What is you opinion? I can write a patch for that too. Thanks Comment at: lib/Sema/SemaDeclAttr.cpp:5804-5816 @

Re: [PATCH] D17362: [Sema] PR23090 Crash when return type or parameter types for extern "C" functions don't have external linkage

2016-02-17 Thread don hinton via cfe-commits
hintonda added a comment. This also causes a few other test failures (~8) which will need to be fixed if this patch is accepted. http://reviews.llvm.org/D17362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

Re: [PATCH] D17362: [Sema] PR23090 Crash when return type or parameter types for extern "C" functions don't have external linkage

2016-02-17 Thread don hinton via cfe-commits
hintonda added a comment. Here's an example of when this will cause a crash: namespace { Struct G; extern "C" G *f(); // has external linkage G *f();// will assert since it has internal linkage because of G and doesn't match previous declaration } http://reviews.llvm.org/D17362

[PATCH] D17362: [Sema] PR23090 Crash when return type or parameter types for extern "C" functions don't have external linkage

2016-02-17 Thread don hinton via cfe-commits
hintonda created this revision. hintonda added reviewers: majnemer, rsmith. hintonda added a subscriber: cfe-commits. Added checks to make sure the return type and parameter types for functions declared as extern "C" have external linkage. http://reviews.llvm.org/D17362 Files: include/clang/Ba

Re: r258524 - Merge templated static member variables, fixes http://llvm.org/pr26179.

2016-02-17 Thread Richard Smith via cfe-commits
+ // TODO: Check visibility. New is hidden but has a complete type. If New + // has no array bound, it should not inherit one from Old, if Old is not + // visible. I think this is in the wrong place: it should be attached to the "old is complete and new is not" case. Also, our conve

Re: r258524 - Merge templated static member variables, fixes http://llvm.org/pr26179.

2016-02-17 Thread Richard Smith via cfe-commits
(And otherwise this LGTM.) On Wed, Feb 17, 2016 at 5:24 PM, Richard Smith wrote: > + // TODO: Check visibility. New is hidden but has a complete type. If > New > + // has no array bound, it should not inherit one from Old, if Old is > not > + // visible. > > I think this is in th

Re: [PATCH] D17360: [cfi] Fix handling of sanitize trap/recover flags in the cross-DSO CFI mode.

2016-02-17 Thread Peter Collingbourne via cfe-commits
pcc added a comment. Why can't we make it so that a trap flag doesn't affect the behaviour if a sanitizer is disabled (this looks like what `CodeGenModule::NeedAllVtablesBitSet` is already doing?) Repository: rL LLVM http://reviews.llvm.org/D17360

[PATCH] D17360: [cfi] Fix handling of sanitize trap/recover flags in the cross-DSO CFI mode.

2016-02-17 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: pcc, krasin. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. In the cross-DSO CFI mode a module may be asked to handle any type of CFI error, even if the module itself is not checked for that

Re: [PATCH] D15883: Add ARM EHABI-related constants to unwind.h.

2016-02-17 Thread Logan Chien via cfe-commits
logan added inline comments. Comment at: lib/Headers/unwind.h:61 @@ +60,3 @@ +#define _UNWIND_ARM_EHABI 0 +#endif + compnerd wrote: > logan wrote: > > Since this is `unwind.h`, I feel that we can get a step further and use > > `__ARM_EABI_UNWINDER__` to get more

r261182 - [sanitizer-coverage] allow -fsanitize-coverage=trace-pc w/o any other sanitizer and w/o ...=[func, bb, edge]. This makes this syntax a superset of the GCC's syntax

2016-02-17 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Wed Feb 17 18:49:23 2016 New Revision: 261182 URL: http://llvm.org/viewvc/llvm-project?rev=261182&view=rev Log: [sanitizer-coverage] allow -fsanitize-coverage=trace-pc w/o any other sanitizer and w/o ...=[func,bb,edge]. This makes this syntax a superset of the GCC's syntax Mod

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-17 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 48261. jlebar added a comment. Move code into ConstructAttributeList. Now it applies to both functions and calls. http://reviews.llvm.org/D17056 Files: lib/CodeGen/CGCall.cpp test/CodeGenCUDA/convergent.cu test/CodeGenCUDA/device-var-init.cu Index:

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-17 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:817-823 @@ -816,1 +816,9 @@ + + if (getLangOpts().CUDA && getLangOpts().CUDAIsDevice) { +// Conservatively, mark all functions in CUDA as convergent (meaning, they +// may call an intrinsically conv

Re: [PATCH] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-02-17 Thread Xiuli PAN via cfe-commits
pxli168 accepted this revision. pxli168 added a comment. Sorry for the late reply, I was on a break. LGTM! http://reviews.llvm.org/D16686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-17 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D17056#355228, @jlebar wrote: > Move coded into SetLLVMFunctionAttributes (not ForDefinition). Much better. :) http://reviews.llvm.org/D17056 ___ cfe-commits mailing list cfe-commits@lists.llvm.

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-17 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 48260. jlebar added a comment. Move coded into SetLLVMFunctionAttributes (not ForDefinition). http://reviews.llvm.org/D17056 Files: lib/CodeGen/CodeGenModule.cpp test/CodeGenCUDA/convergent.cu Index: test/CodeGenCUDA/convergent.cu ==

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-17 Thread Justin Lebar via cfe-commits
jlebar added a comment. In http://reviews.llvm.org/D17056#355198, @jlebar wrote: > Move code into SetLLVMFunctionAttributesForDefinition. Actually, this doesn't work -- we don't annotate __host__ __device__ void baz(); as convergent. (I ran the tests, but of course I didn't notice it faili

[libcxx] r261181 - Commit tests missing from r261180.

2016-02-17 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Feb 17 18:21:09 2016 New Revision: 261181 URL: http://llvm.org/viewvc/llvm-project?rev=261181&view=rev Log: Commit tests missing from r261180. Added: libcxx/trunk/test/libcxx/containers/gnu_cxx/ libcxx/trunk/test/libcxx/containers/gnu_cxx/hash_map.pass.cpp lib

[libcxx] r261180 - Get working again

2016-02-17 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Feb 17 18:20:34 2016 New Revision: 261180 URL: http://llvm.org/viewvc/llvm-project?rev=261180&view=rev Log: Get working again Modified: libcxx/trunk/include/__hash_table Modified: libcxx/trunk/include/__hash_table URL: http://llvm.org/viewvc/llvm-project/libcxx/tru

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-17 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 48255. jlebar added a comment. Move code into SetLLVMFunctionAttributesForDefinition. http://reviews.llvm.org/D17056 Files: lib/CodeGen/CodeGenModule.cpp test/CodeGenCUDA/convergent.cu Index: test/CodeGenCUDA/convergent.cu ==

r261178 - [sanitizer-coverage] add a deprecation warning for -fsanitize-coverage=[1234]

2016-02-17 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Wed Feb 17 17:57:17 2016 New Revision: 261178 URL: http://llvm.org/viewvc/llvm-project?rev=261178&view=rev Log: [sanitizer-coverage] add a deprecation warning for -fsanitize-coverage=[1234] Modified: cfe/trunk/lib/Driver/SanitizerArgs.cpp cfe/trunk/test/Driver/fsanitize-

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-17 Thread Manman Ren via cfe-commits
manmanren added a comment. Hi Akira, How about the following? else if (LocalAlignment == 8) { if (NumBytesAtAlign8 == 0) { // We have not seen any 8-byte aligned element yet. There is no padding and we are either 4-byte // aligned or 8-byte aligned depending on NumBytesAtAlign

Re: [PATCH] D17355: [Sema] Remove assert in TreeTransform::TransformObjCObjectType

2016-02-17 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Note that the test case currently asserts. The patch that is currently under review in http://reviews.llvm.org/D16843 has to be applied first. http://reviews.llvm.org/D17355 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D17355: [Sema] Remove assert in TreeTransform::TransformObjCObjectType

2016-02-17 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: doug.gregor. ahatanak added a subscriber: cfe-commits. The assert is triggered when there is a template function whose return type is a protocol without an object type (e.g., ""). clang treats such a protocol as a synonym for "id" and se

Re: [PATCH] D16552: Implement the likely resolution of core issue 253.

2016-02-17 Thread Nico Weber via cfe-commits
thakis updated this revision to Diff 48248. thakis added a comment. Ok, now cleaned up and caches the "is this ok?" state on a per-record level. http://reviews.llvm.org/D16552 Files: include/clang/AST/DeclCXX.h lib/AST/ASTImporter.cpp lib/AST/DeclCXX.cpp lib/Sema/SemaInit.cpp lib/Seri

r261171 - Don't crash w/ a diagnostic range containing a null byte

2016-02-17 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Feb 17 16:37:45 2016 New Revision: 261171 URL: http://llvm.org/viewvc/llvm-project?rev=261171&view=rev Log: Don't crash w/ a diagnostic range containing a null byte We prematurely ended the line at the null byte which caused us to crash down stream because we tried to r

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-17 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 48241. ahatanak added a comment. Address some of Manman's review comments. - Add comments that explain what the code is doing (I should add some high-level comments too later). - Simplify the if-else statement. I haven't implemented the other changes you'v

Re: r258524 - Merge templated static member variables, fixes http://llvm.org/pr26179.

2016-02-17 Thread Vassil Vassilev via cfe-commits
On 16/02/16 22:20, Richard Smith wrote: --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -419,6 +419,25 @@ static bool isPreferredLookupResult(Sema &S, Sema::LookupNameKind Kind, } } + // VarDecl can have incomplete array types, prefer the one with more complete + /

Re: [PATCH] D17349: ARM: fix VFP asm constraints

2016-02-17 Thread JF Bastien via cfe-commits
jfb added a comment. As a reference, here's the GCC source (instead of the docs): https://raw.githubusercontent.com/gcc-mirror/gcc/master/gcc/config/arm/constraints.md http://reviews.llvm.org/D17349 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D17349: ARM: fix VFP asm constraints

2016-02-17 Thread JF Bastien via cfe-commits
jfb created this revision. jfb added a subscriber: cfe-commits. Herald added subscribers: rengolin, aemerson. Rich Felker was sad that clang used 'w' and 'P' for VFP constraints when GCC documents them as 't' and 'w': https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html This was added w

r261163 - Add 'nopartial' qualifier for availability attributes.

2016-02-17 Thread Manman Ren via cfe-commits
Author: mren Date: Wed Feb 17 16:05:48 2016 New Revision: 261163 URL: http://llvm.org/viewvc/llvm-project?rev=261163&view=rev Log: Add 'nopartial' qualifier for availability attributes. An optional nopartial can be placed after the platform name. int bar() __attribute__((availability(macosx,nopar

r261161 - [modules] Cache 'acceptable decl' lookups for namespaces. In projects with

2016-02-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 17 15:52:44 2016 New Revision: 261161 URL: http://llvm.org/viewvc/llvm-project?rev=261161&view=rev Log: [modules] Cache 'acceptable decl' lookups for namespaces. In projects with thousands of modules, each of which declares the same namespace, linearly scanning the red

Re: [PATCH] D17348: Add -Wcast-calling-convention to warn when casting away calling conventions

2016-02-17 Thread Nico Weber via cfe-commits
thakis added a comment. Nice! Comment at: include/clang/Basic/DiagnosticGroups.td:294 @@ -293,2 +293,3 @@ def SelTypeCast : DiagGroup<"cast-of-sel-type">; +def CastCallingConvention : DiagGroup<"cast-calling-convention">; def FunctionDefInObjCContainer : DiagGroup<"function-de

r261159 - [sanitizer-coverage] implement -fsanitize-coverage=trace-pc. This is similar to trace-bb, but has a different API. We already use the equivalent flag in GCC for Linux kernel fuzzing. We may

2016-02-17 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Wed Feb 17 15:34:43 2016 New Revision: 261159 URL: http://llvm.org/viewvc/llvm-project?rev=261159&view=rev Log: [sanitizer-coverage] implement -fsanitize-coverage=trace-pc. This is similar to trace-bb, but has a different API. We already use the equivalent flag in GCC for Linux

Re: r259874 - CodeGen: correct Windows ARM C++ assertion

2016-02-17 Thread Hans Wennborg via cfe-commits
On Wed, Feb 17, 2016 at 8:55 AM, Hans Wennborg wrote: > On Tue, Feb 16, 2016 at 9:03 PM, Saleem Abdulrasool > wrote: >> On Thu, Feb 4, 2016 at 8:12 PM, Saleem Abdulrasool via cfe-commits >> wrote: >>> >>> Author: compnerd >>> Date: Thu Feb 4 22:12:40 2016 >>> New Revision: 259874 >>> >>> URL: h

[PATCH] D17348: Add -Wcast-calling-convention to warn when casting away calling conventions

2016-02-17 Thread Reid Kleckner via cfe-commits
rnk created this revision. rnk added reviewers: thakis, rtrieu. rnk added a subscriber: cfe-commits. This only warns on casts of the address of a function defined in the current TU. In this case, the fix is likely to be local and the warning useful. Here are some things we could experiment with i

Re: [PATCH] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-02-17 Thread Yaxun Liu via cfe-commits
yaxunl added a comment. ping http://reviews.llvm.org/D16686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16914: [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog

2016-02-17 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261151: [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D16914?vs=47062&id=48232#toc Repository: rL LLVM http:

r261151 - [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog

2016-02-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Feb 17 15:09:50 2016 New Revision: 261151 URL: http://llvm.org/viewvc/llvm-project?rev=261151&view=rev Log: [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog The assert is triggered because isObjCRetainableType() is called on the canonicalized return type t

Re: [PATCH] D17345: [OpenCL] Improve diagnostics of address spaces for variables inside function

2016-02-17 Thread Yaxun Liu via cfe-commits
yaxunl added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7653 @@ -7654,1 +7652,3 @@ +def err_opencl_function_variable : Error< + "%select{non-kernel function|non-program scope}0 variable cannot be declared in %1 address space">; def err_static_functi

Re: [PATCH] D17244: [clang-tidy] readability-ternary-operator new check

2016-02-17 Thread Kirill Bobyrev via cfe-commits
omtcyf0 updated this revision to Diff 48231. omtcyf0 added a comment. Followed some suggestions Richard has kindly given me; fixed the nonsense in SourceRanges' extracting code http://reviews.llvm.org/D17244 Files: clang-tidy/readability/BracesAroundStatementsCheck.cpp clang-tidy/readabili

Re: [PATCH] D17343: [OpenCL] Diagnose program scope pointers

2016-02-17 Thread Yaxun Liu via cfe-commits
yaxunl added a comment. I am not sure about the restriction that program scope pointer must point to global or constant addr space. Can you provide reference to the OpenCL 2.0 spec? https://www.khronos.org/registry/cl/specs/opencl-2.0-openclc.pdf On page 36 there are examples for program-scope

Re: [PATCH] D15314: Fix a bug in unavailable checking

2016-02-17 Thread Manman Ren via cfe-commits
manmanren added a comment. Doug, Thanks for reviewing! I updated the patch to use TreatUnavailableAsInvalid. Cheers, Manman http://reviews.llvm.org/D15314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

Re: [PATCH] D17019: [OpenMP] Code generation for teams - kernel launching

2016-02-17 Thread Samuel Antao via cfe-commits
sfantao added a comment. Hi Alexey, Thanks for the review! Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:3811-3818 @@ -3789,1 +3810,10 @@ DeviceID, FileID, ParentName, Line, Column, OutlinedFn, OutlinedFnID); + + // If the current target region has a teams region enclosed

Re: [PATCH] D17019: [OpenMP] Code generation for teams - kernel launching

2016-02-17 Thread Samuel Antao via cfe-commits
sfantao updated this revision to Diff 48229. sfantao marked 4 inline comments as done. sfantao updated the summary for this revision. sfantao added a comment. Separate emission of num_teams and thread_limit into functions. http://reviews.llvm.org/D17019 Files: lib/CodeGen/CGOpenMPRuntime.cpp

Re: [PATCH] D15314: Fix a bug in unavailable checking

2016-02-17 Thread Manman Ren via cfe-commits
manmanren updated this revision to Diff 48228. http://reviews.llvm.org/D15314 Files: include/clang/Sema/Initialization.h include/clang/Sema/Sema.h lib/Sema/SemaDecl.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaInit.cpp test/SemaObjC/Inputs/arc-system-header.h test/SemaObjC/arc-system-head

Re: [PATCH] D16914: [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog

2016-02-17 Thread Manman Ren via cfe-commits
manmanren added a comment. LGTM otherwise. Cheers, Manman Comment at: lib/CodeGen/CGCall.cpp:2468 @@ +2467,3 @@ + QualType RT; + + if (auto *FD = dyn_cast(CurCodeDecl)) Maybe add comments here on the if else block? http://reviews.llvm.org/D16914

Re: [PATCH] D17345: [OpenCL] Improve diagnostics of address spaces for variables inside function

2016-02-17 Thread Mandeep Singh Grang via cfe-commits
mgrang added a subscriber: mgrang. Comment at: test/SemaOpenCL/storageclass-cl20.cl:9 @@ -8,2 +8,3 @@ global int *global GP6 = 0; +global int * GP7 = 0; Pointers should align to the right. Like: global int *GP7 = 0; http://reviews.llvm.org/D17345

Re: [PATCH] D17343: [OpenCL] Diagnose program scope pointers

2016-02-17 Thread Mandeep Singh Grang via cfe-commits
mgrang added a subscriber: mgrang. Comment at: lib/Sema/SemaDecl.cpp:6605 @@ +6604,3 @@ + // Program scope pointers can only point to data at the constant or global + // address space. + const PointerType *PT = nullptr; Check alignment of comments

[PATCH] D17345: [OpenCL] Improve diagnostics of address spaces for variables inside function

2016-02-17 Thread Anastasia Stulova via cfe-commits
Anastasia created this revision. Anastasia added reviewers: pekka.jaaskelainen, yaxunl. Anastasia added a subscriber: cfe-commits. This patch: 1. Prevents local variables to be declared in global AS 2. Diagnoses AS of local variables with an extern storage class as if they would be in a program s

[PATCH] D17343: [OpenCL] Diagnose program scope pointers

2016-02-17 Thread Anastasia Stulova via cfe-commits
Anastasia created this revision. Anastasia added reviewers: pekka.jaaskelainen, yaxunl. Anastasia added a subscriber: cfe-commits. Programs scope pointers should point to objects in constant AS or for OpenCL 2.0 in global AS. http://reviews.llvm.org/D17343 Files: include/clang/Basic/Diagnosti

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-17 Thread Mats Petersson via cfe-commits
MatsPetersson added a comment. I think adding printf as a builtin function is a good idea. If not, I feel that the error message should distinguish between (for example): int printf(global char* fmt, ...); and void myfunc(int n, ...); since the former is "incorrect prototype of printf" an

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-17 Thread Anastasia Stulova via cfe-commits
Anastasia updated this revision to Diff 48219. Anastasia added a comment. Drafted code for printf handling. Made me think about: 1. How much signature check should we do i.e. should we check the pointer AS itself (generic for CL2.0, any other otherwise) or qualifiers being used for the first p

Re: [PATCH] D17272: Teach clang to use the ThinLTO pipeline

2016-02-17 Thread Mehdi AMINI via cfe-commits
joker.eph closed this revision. joker.eph added a comment. r261045 http://reviews.llvm.org/D17272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16154: Default vaarg lowering should support indirect struct types.

2016-02-17 Thread Dan Gohman via cfe-commits
sunfish added a subscriber: sunfish. sunfish added a comment. For WebAssembly, I'm expecting we'll switch to emitVoidPtrVAArg and eschew LLVM's vaarg instruction too, as other targets do. This exposes the expanded code to the full optimizer, which seems preferable. http://reviews.llvm.org/D161

Re: [PATCH] D17330: PR26648: "inline" shouldn't be recognized as a C keyword in MSVC 2013 compatibility mode

2016-02-17 Thread Reid Kleckner via cfe-commits
rnk added a comment. Thanks, but I don't think we should do this. There's already a lot of code out there (ffmpeg) that is already using clang its current form and it does stuff like this: #if defined(_MSC_VER) && !defined(__clang__) # define inline __inline // More MSVC compatibility hac

Re: [PATCH] D17056: Mark all CUDA device-side function defs and decls as convergent.

2016-02-17 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer added a comment. SetLLVMFunctionAttributesForDefinition seems like the more obvious place for this logic. http://reviews.llvm.org/D17056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

r261135 - Enable SafeStack for CloudABI.

2016-02-17 Thread Ed Schouten via cfe-commits
Author: ed Date: Wed Feb 17 12:56:20 2016 New Revision: 261135 URL: http://llvm.org/viewvc/llvm-project?rev=261135&view=rev Log: Enable SafeStack for CloudABI. Summary: I've got a patchset in my home directory to integrate support for SafeStack into CloudABI's C library. All of the CloudABI unit

Re: [PATCH] D16154: Default vaarg lowering should support indirect struct types.

2016-02-17 Thread Derek Schuff via cfe-commits
dschuff added a comment. This LGTM for PNaCl and WebAssembly. It's possible that for wasm we may still end up doing our own thing for varargs instead of using the default, but this still looks like strictly an improvement, (and it makes bootstrapping a backend simpler). http://reviews.llvm.or

Re: [PATCH] D16914: [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog

2016-02-17 Thread Akira Hatanaka via cfe-commits
ahatanak added a reviewer: manmanren. ahatanak added a comment. ping http://reviews.llvm.org/D16914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17091: [analyzer][scan-build-py] Non-existing directory for scan-build output.

2016-02-17 Thread Anton Yartsev via cfe-commits
ayartsev added a comment. Ping. http://reviews.llvm.org/D17091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r261109 - Correct more typos in conditional expressions

2016-02-17 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Feb 17 11:19:00 2016 New Revision: 261109 URL: http://llvm.org/viewvc/llvm-project?rev=261109&view=rev Log: Correct more typos in conditional expressions We didn't correctly handle some edge cases, causing us to bail out before correcting all the typos. Modified: c

Re: [PATCH] D17170: [OPENMP] Codegen for distribute directive

2016-02-17 Thread Carlo Bertolli via cfe-commits
carlo.bertolli updated this revision to Diff 48200. carlo.bertolli added a comment. Updated diff reflecting comments. Note that having the emission of the runtime kmpc_for_static_init function in a static function (instead of a method of CGOpenMPRuntime) required moving to public some fields in

Re: [PATCH] D17170: [OPENMP] Codegen for distribute directive

2016-02-17 Thread Carlo Bertolli via cfe-commits
carlo.bertolli marked 4 inline comments as done. Comment at: lib/CodeGen/CGStmtOpenMP.cpp:2914 @@ -2713,4 +2913,3 @@ if (NT || TL) { -NumTeamsVal = (NT) ? CGF.EmitScalarExpr(NT->getNumTeams(), -/* IgnoreResultAssign = */ true) : +NumTeamsVal = (NT) ? CGF.EmitSca

Re: [PATCH] D17330: PR26648: "inline" shouldn't be recognized as a C keyword in MSVC 2013 compatibility mode

2016-02-17 Thread Andrey Bokhanko via cfe-commits
OK, so is initial patch a good one? ;-) Andrey On Wed, Feb 17, 2016 at 8:06 PM, David Majnemer wrote: > majnemer added a comment. > > In http://reviews.llvm.org/D17330#354755, @andreybokhanko wrote: > >> In http://reviews.llvm.org/D17330#354730, @majnemer wrote: >> >> > Why not just stick clang

Re: [PATCH] D17330: PR26648: "inline" shouldn't be recognized as a C keyword in MSVC 2013 compatibility mode

2016-02-17 Thread David Majnemer via cfe-commits
majnemer added a comment. In http://reviews.llvm.org/D17330#354755, @andreybokhanko wrote: > In http://reviews.llvm.org/D17330#354730, @majnemer wrote: > > > Why not just stick clang in C90 mode when targeting C if the > > -fms-compatibility-version is 18? > > > > We have similar code for the C+

Re: [PATCH] D17330: PR26648: "inline" shouldn't be recognized as a C keyword in MSVC 2013 compatibility mode

2016-02-17 Thread Andrey Bokhanko via cfe-commits
andreybokhanko added a comment. In http://reviews.llvm.org/D17330#354730, @majnemer wrote: > Why not just stick clang in C90 mode when targeting C if the > -fms-compatibility-version is 18? > > We have similar code for the C++ mode in > https://github.com/llvm-mirror/clang/blob/master/lib/Drive

Re: r259874 - CodeGen: correct Windows ARM C++ assertion

2016-02-17 Thread Hans Wennborg via cfe-commits
On Tue, Feb 16, 2016 at 9:03 PM, Saleem Abdulrasool wrote: > On Thu, Feb 4, 2016 at 8:12 PM, Saleem Abdulrasool via cfe-commits > wrote: >> >> Author: compnerd >> Date: Thu Feb 4 22:12:40 2016 >> New Revision: 259874 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=259874&view=rev >> Log: >> C

Re: [PATCH] D15332: new clang-tidy checker readability-non-const-parameter

2016-02-17 Thread Richard via cfe-commits
LegalizeAdulthood added inline comments. Comment at: test/clang-tidy/readability-non-const-parameter.cpp:3 @@ +2,3 @@ + +// Currently the checker only warns about pointer arguments. +// danielmarjamaki wrote: > LegalizeAdulthood wrote: > > How hard is it to extend

[clang-tools-extra] r261102 - [clang-tidy] Match the type against the get() method we are calling,

2016-02-17 Thread Samuel Benzaquen via cfe-commits
Author: sbenza Date: Wed Feb 17 10:13:14 2016 New Revision: 261102 URL: http://llvm.org/viewvc/llvm-project?rev=261102&view=rev Log: [clang-tidy] Match the type against the get() method we are calling, instead of a get() method we find in the class. The duck typed smart pointer class could have o

Re: [PATCH] D17330: PR26648: "inline" shouldn't be recognized as a C keyword in MSVC 2013 compatibility mode

2016-02-17 Thread David Majnemer via cfe-commits
majnemer added a comment. Why not just stick clang in C90 mode when targeting C if the -fms-compatibility-version is 18? We have similar code for the C++ mode in https://github.com/llvm-mirror/clang/blob/master/lib/Driver/Tools.cpp#l5069 http://reviews.llvm.org/D17330 _

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-02-17 Thread Yaron Keren via cfe-commits
yaron.keren accepted this revision. yaron.keren added a reviewer: yaron.keren. yaron.keren added a comment. This revision is now accepted and ready to land. Would be nice to have CodeGenAction::TheModule redirect to CodeGeneratorImpl::M if possible, but that's for another patch. LGTM. http://re

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-02-17 Thread Serge Pavlov via cfe-commits
sepavloff added a comment. In http://reviews.llvm.org/D15450#354606, @yaron.keren wrote: > It certainly makes sense to redirect the module request to its owner instead > of duplicating it in a local copy. It is not even a duplication, it is simultaneous sharing by two unique_ptr's. > There ma

Re: [PATCH] D16749: [OpenMP] Map clause codegeneration.

2016-02-17 Thread Samuel Antao via cfe-commits
sfantao marked an inline comment as done. Comment at: test/OpenMP/target_map_codegen.cpp:1705 @@ +1704,3 @@ + // CK19-DAG: [[SEC000]] = getelementptr {{.*}}[4 x [5 x [6 x i32]]]* [[VAR0]], i{{.+}} 0, i{{.+}} 1 + + // CK19: call void [[CALL25:@.+]]([4 x [5 x [6 x i32]]]* {{[^,]+

Re: [PATCH] D16749: [OpenMP] Map clause codegeneration.

2016-02-17 Thread Samuel Antao via cfe-commits
sfantao marked an inline comment as done. sfantao added a comment. Hi Alexey, Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:3901-3932 @@ +3900,34 @@ +// Reference types are ignored for mapping purposes. +if (auto *RefTy = ExprTy->getAs()) + ExprTy = RefTy->getPointeeT

Re: [PATCH] D17335: [clang-tidy] Fix a crash issue when clang-tidy runs with compilation database.

2016-02-17 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for working on this! This change needs a lit test (ensure it fails/crashes without the patch and works fine after the patch). Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:343 @@ +342,3 @@ +.get

r261098 - [OPENMP] Fix tests incompatibility with ARM buildbots.

2016-02-17 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Feb 17 09:36:39 2016 New Revision: 261098 URL: http://llvm.org/viewvc/llvm-project?rev=261098&view=rev Log: [OPENMP] Fix tests incompatibility with ARM buildbots. Modified: cfe/trunk/test/OpenMP/parallel_firstprivate_codegen.cpp cfe/trunk/test/OpenMP/parallel_pri

Re: [PATCH] D13622: Add call to find_package to load LLVM dependencies

2016-02-17 Thread don hinton via cfe-commits
hintonda added a comment. Ping,.. Could someone commit this for me? http://reviews.llvm.org/D13622 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r261097 - Merging r261088:

2016-02-17 Thread Daniel Sanders via cfe-commits
Author: dsanders Date: Wed Feb 17 09:02:33 2016 New Revision: 261097 URL: http://llvm.org/viewvc/llvm-project?rev=261097&view=rev Log: Merging r261088: r261088 | dsanders | 2016-02-17 13:16:31 + (Wed, 17 Feb 2016) | 21 li

Re: [PATCH] D16139: [MIPS] initFeatureMap() to handle empty string argument

2016-02-17 Thread Vasileios Kalintiris via cfe-commits
vkalintiris accepted this revision. vkalintiris added a comment. This revision is now accepted and ready to land. LGTM. However, I'm curious to learn which case triggered this behaviour. Repository: rL LLVM http://reviews.llvm.org/D16139 ___ cfe-

Re: [PATCH] D16012: Carry raw string literal information through to the AST StringLiteral representation

2016-02-17 Thread Aaron Ballman via cfe-commits
aaron.ballman abandoned this revision. aaron.ballman added a comment. Your logic makes sense to me. I am abandoning this revision while I think about alternatives. Thanks! http://reviews.llvm.org/D16012 ___ cfe-commits mailing list cfe-commits@list

Re: [PATCH] D15450: Avoid double deletion in Clang driver.

2016-02-17 Thread Yaron Keren via cfe-commits
yaron.keren added a comment. It certainly makes sense to redirect the module request to its owner instead of duplicating it in a local copy. There may be a change in behaviour here, pre-patch CodeGenAction::EndSourceFileAction() would take the BackendConsumer Module, keeping CodeGen Module int

Re: [PATCH] D16579: Warn if friend function depends on template parameters.

2016-02-17 Thread Serge Pavlov via cfe-commits
Any feedback? Thanks, --Serge 2016-01-26 20:55 GMT+06:00 Serge Pavlov : > sepavloff created this revision. > sepavloff added a subscriber: cfe-commits. > > Declaration of friend function may depend on template parameters, > however it does not become a template function: > > template class C

r261089 - [OPENMP 4.5] Codegen support for data members in 'firstprivate' clause.

2016-02-17 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Feb 17 07:19:37 2016 New Revision: 261089 URL: http://llvm.org/viewvc/llvm-project?rev=261089&view=rev Log: [OPENMP 4.5] Codegen support for data members in 'firstprivate' clause. Added codegen for captured data members in non-static member functions. Modified: cfe/

[libcxx] r261088 - [libcxx] Fix definition of regex_traits::__regex_word on big-endian glibc systems

2016-02-17 Thread Daniel Sanders via cfe-commits
Author: dsanders Date: Wed Feb 17 07:16:31 2016 New Revision: 261088 URL: http://llvm.org/viewvc/llvm-project?rev=261088&view=rev Log: [libcxx] Fix definition of regex_traits::__regex_word on big-endian glibc systems Summary: On glibc, the bits used for the various character classes is endian de

  1   2   >