[PATCH] D17438: [OpenCL] Add Sema checks for atomics and implicit declaration

2016-02-19 Thread Xiuli PAN via cfe-commits
pxli168 created this revision. pxli168 added reviewers: pekka.jaaskelainen, Anastasia, yaxunl. pxli168 added a subscriber: cfe-commits. Add Sema checks for atomics and implicit declaration This patch is partitioned from http://reviews.llvm.org/D16047 http://reviews.llvm.org/D17438 Files: inclu

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

2016-02-19 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 48463. hokein added a comment. - Add lit test. - Address review comments. http://reviews.llvm.org/D17335 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidyDiagnosticConsumer.cpp clang-tidy/ClangTidyDiagnosticConsumer.h test/clang-tidy/Inputs/compil

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

2016-02-19 Thread Haojian Wu via cfe-commits
hokein marked 2 inline comments as done. Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:343 @@ +342,3 @@ + auto WorkingDir = Info.getSourceManager() +.getFileManager().getVirtualFileSystem() +->getCurrentWorkingD

Re: [PATCH] D17387: Add check for CERT FLP30-C

2016-02-19 Thread Haojian Wu via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM with one nit. Comment at: test/clang-tidy/cert-flp30-c.c:6 @@ +5,3 @@ +void func(void) { + // CHECK-MESSAGES: :[[@LINE+1]]:37: warning: loop induction expression should

r261315 - [OPENMP] Improved layout of CGOpenMPRuntime class, NFC.

2016-02-19 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Feb 19 04:38:26 2016 New Revision: 261315 URL: http://llvm.org/viewvc/llvm-project?rev=261315&view=rev Log: [OPENMP] Improved layout of CGOpenMPRuntime class, NFC. Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h Modifi

r261321 - pr26544: Bitfield layout with pragma pack and attributes "packed" and

2016-02-19 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Feb 19 05:23:28 2016 New Revision: 261321 URL: http://llvm.org/viewvc/llvm-project?rev=261321&view=rev Log: pr26544: Bitfield layout with pragma pack and attributes "packed" and "aligned", by Vladimir Yakovlev Fix clang/gcc incompatibility of bitfields layout in the pres

Re: [PATCH] D17023: pr26544: Bitfield layout with pragma pack and attributes "packed" and "aligned

2016-02-19 Thread Alexey Bataev via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261321: pr26544: Bitfield layout with pragma pack and attributes "packed" and (authored by ABataev). Changed prior to commit: http://reviews.llvm.org/D17023?vs=47308&id=48474#toc Repository: rL LLVM

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

2016-02-19 Thread Daniel Sanders via cfe-commits
dsanders added a comment. Can you explain what the problem was and why this change is needed? I'm guessing it's something to do with the 'Features[CPU] = true' line. Repository: rL LLVM http://reviews.llvm.org/D16139 ___ cfe-commits mailing list

Re: r261297 - Implement the likely resolution of core issue 253.

2016-02-19 Thread Ismail Donmez via cfe-commits
Hi, On Fri, Feb 19, 2016 at 3:52 AM, Nico Weber via cfe-commits wrote: > Author: nico > Date: Thu Feb 18 19:52:46 2016 > New Revision: 261297 > > URL: http://llvm.org/viewvc/llvm-project?rev=261297&view=rev > Log: > Implement the likely resolution of core issue 253. > > C++11 requires const objec

r261323 - Removed unused local variable

2016-02-19 Thread Serge Pavlov via cfe-commits
Author: sepavloff Date: Fri Feb 19 06:06:23 2016 New Revision: 261323 URL: http://llvm.org/viewvc/llvm-project?rev=261323&view=rev Log: Removed unused local variable Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp URL: http://llvm.org/viewvc/llvm-

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

2016-02-19 Thread Alexey Bataev via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:3901-3932 @@ +3900,34 @@ +// Reference types are ignored for mapping purposes. +if (auto *RefTy = ExprTy->getAs()) + ExprTy = RefTy->getPointeeType().getCanonicalType(); + +// Given that an

[PATCH] D17444: PR26672: [MSVC] Clang does not recognize "static_assert" keyword in C mode

2016-02-19 Thread Andrey Bokhanko via cfe-commits
andreybokhanko created this revision. andreybokhanko added reviewers: rnk, majnemer, thakis. andreybokhanko added a subscriber: cfe-commits. MS compiler recognizes "static_assert" keyword is C mode as well, while clang-cl doesn't. This patch fixes this. http://reviews.llvm.org/D17444 Files: i

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-19 Thread Michael Matz via cfe-commits
Hi, On Thu, 18 Feb 2016, Richard Smith wrote: > >> An empty type is a type where it and all of its subobjects > >> (recursively) are of class, structure, union, or array type. No > >> memory slot nor register should be used to pass or return an object > >> of empty type. > > > > The trivially

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-19 Thread Michael Matz via cfe-commits
Hi, On Thu, 18 Feb 2016, H.J. Lu wrote: > >> An empty type is a type where it and all of its subobjects > >> (recursively) are of class, structure, union, or array type. No > >> memory slot nor register should be used to pass or return an object > >> of empty type. > > > > The trivially copya

Re: [PATCH] D17444: PR26672: [MSVC] Clang does not recognize "static_assert" keyword in C mode

2016-02-19 Thread Aaron Ballman via cfe-commits
On Fri, Feb 19, 2016 at 8:08 AM, Andrey Bokhanko via cfe-commits wrote: > andreybokhanko created this revision. > andreybokhanko added reviewers: rnk, majnemer, thakis. > andreybokhanko added a subscriber: cfe-commits. > > MS compiler recognizes "static_assert" keyword is C mode as well, while >

[PATCH] D17440: clang-format: [JS] do not wrap ES6 imports/exports.

2016-02-19 Thread Martin Probst via cfe-commits
mprobst created this revision. mprobst added a reviewer: djasper. mprobst added subscribers: cfe-commits, klimek. "import ... from '...';" and "export ... from '...';" should be treated the same as goog.require/provide/module/forwardDeclare calls. http://reviews.llvm.org/D17440 Files: lib/Form

[PATCH] D17439: clang-format: [JS] treat forwardDeclare as an import/export statement.

2016-02-19 Thread Martin Probst via cfe-commits
mprobst created this revision. mprobst added a reviewer: djasper. mprobst added subscribers: cfe-commits, klimek. http://reviews.llvm.org/D17439 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestJS.cpp Index: unittests/Format/FormatTestJS.cpp ===

Re: [PATCH] D17440: clang-format: [JS] do not wrap ES6 imports/exports.

2016-02-19 Thread Martin Probst via cfe-commits
mprobst added a comment. FYI this should not be submitted yet, there are still style discussions going on. http://reviews.llvm.org/D17440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang-tools-extra] r261324 - Add a new check, cert-flp30-c, that diagnoses loop induction expressions of floating-point type. This check corresponds to the CERT secure coding rule: https://www.secure

2016-02-19 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Feb 19 08:03:20 2016 New Revision: 261324 URL: http://llvm.org/viewvc/llvm-project?rev=261324&view=rev Log: Add a new check, cert-flp30-c, that diagnoses loop induction expressions of floating-point type. This check corresponds to the CERT secure coding rule: https

Re: [PATCH] D17387: Add check for CERT FLP30-C

2016-02-19 Thread Aaron Ballman via cfe-commits
aaron.ballman closed this revision. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Thanks! I've commit in r261324. Comment at: test/clang-tidy/cert-flp30-c.c:6 @@ +5,3 @@ +void func(void) { + // CHECK-MESSAGES: :[[@LINE+1]]:37: warning: loop indu

[PATCH] D17446: ASTMatchers: add new statement/decl matchers

2016-02-19 Thread Aleksei Sidorin via cfe-commits
a.sidorin created this revision. a.sidorin added a reviewer: aaron.ballman. a.sidorin added a subscriber: cfe-commits. a.sidorin set the repository for this revision to rL LLVM. Herald added a subscriber: klimek. Added matchers: addrLabelExpr atomicExpr binaryConditionalOperator designatedInitExpr

Re: [PATCH] D17380: [libcxx] Split locale management out of ibm/xlocale.h. NFCI

2016-02-19 Thread Joerg Sonnenberger via cfe-commits
On Thu, Feb 18, 2016 at 03:39:29PM +, Ben Craig via cfe-commits wrote: > Unfortunately, I have no access to an AIX machine to build with, so > this change has been made blind. Any reason why this is not using "new" and "delete"? I think I would prefer to not define uselocale, but that can be l

Re: [PATCH] D17416: [libcxx] Reorganize locale extension fallbacks

2016-02-19 Thread Joerg Sonnenberger via cfe-commits
On Thu, Feb 18, 2016 at 10:32:11PM +, Ben Craig via cfe-commits wrote: > The fallback locale functions are also useful on their own for other > lightweight platforms. Putting these fallback implementations in > support/xlocale should enable code sharing. Shouldn't the fallback functions be usi

Re: [PATCH] D17444: PR26672: [MSVC] Clang does not recognize "static_assert" keyword in C mode

2016-02-19 Thread Andrey Bokhanko via cfe-commits
Aaron, you might be right... but still, I doubt MS will fix it any time soon -- I suppose enough code already depends on this. Either way, it's up to Reid, as Windows maintainer, to decide whatever we want this to be supported in clang or not. Yours, Andrey On Fri, Feb 19, 2016 at 4:43 PM, Aaro

Re: [PATCH] D17444: PR26672: [MSVC] Clang does not recognize "static_assert" keyword in C mode

2016-02-19 Thread Aaron Ballman via cfe-commits
On Fri, Feb 19, 2016 at 9:44 AM, Andrey Bokhanko wrote: > Aaron, you might be right... but still, I doubt MS will fix it any > time soon -- I suppose enough code already depends on this. > > Either way, it's up to Reid, as Windows maintainer, to decide whatever > we want this to be supported in cl

Re: [PATCH] D14286: ASTImporter: expressions, pt.1

2016-02-19 Thread Aleksei Sidorin via cfe-commits
a.sidorin updated the summary for this revision. a.sidorin set the repository for this revision to rL LLVM. a.sidorin updated this revision to Diff 48487. a.sidorin added a comment. Herald added a subscriber: aemerson. Add AST matcher-based unit tests; add some additional nodes to pass the tests.

Re: [PATCH] D17437: [OpenCL] Add Sema checks for image and pipe

2016-02-19 Thread Yaxun Liu via cfe-commits
yaxunl added inline comments. Comment at: test/SemaOpenCL/invalid-pipes-cl2.0.cl:9 @@ -8,1 +8,3 @@ } +void test4() { + pipe int p; // expected-error {{pipe can only be used as a function parameter}} Do we have a test for diagnosing pipe type for OCL < 2.0 ? h

Re: [PATCH] D14286: ASTImporter: expressions, pt.1

2016-02-19 Thread Aleksei Sidorin via cfe-commits
a.sidorin added a comment. Serge Pavlov: I'll enable tests from you patch (http://reviews.llvm.org/D14224) after all node types your patch supports will be supported. If you're agree, of course. Repository: rL LLVM http://reviews.llvm.org/D14286 _

Re: [PATCH] D17446: ASTMatchers: add new statement/decl matchers

2016-02-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. Given the wide disparity of functionality, I'm wondering if there are concrete purposes for these new matchers? Comment at: include/clang/ASTMatchers/ASTMatchers.h:1599 @@ -1543,1 +1598,3 @@ +/// \brief Matches atomic builtins. +const internal::

Re: [PATCH] D17380: [libcxx] Split locale management out of ibm/xlocale.h. NFCI

2016-02-19 Thread Craig, Ben via cfe-commits
On 2/19/2016 8:36 AM, Joerg Sonnenberger via cfe-commits wrote: On Thu, Feb 18, 2016 at 03:39:29PM +, Ben Craig via cfe-commits wrote: Unfortunately, I have no access to an AIX machine to build with, so this change has been made blind. Any reason why this is not using "new" and "delete"? I

Re: [PATCH] D17387: Add check for CERT FLP30-C

2016-02-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. LG Comment at: test/clang-tidy/cert-flp30-c.c:6 @@ +5,3 @@ +void func(void) { + // CHECK-MESSAGES: :[[@LINE+1]]:37: warning: loop induction expression should not have floating-point type [cert-flp30-c] + for (float x = 0.1f; x <= 1.0f; x += 0.1f) { ---

Re: [PATCH] D17416: [libcxx] Reorganize locale extension fallbacks

2016-02-19 Thread Craig, Ben via cfe-commits
On 2/19/2016 8:40 AM, Joerg Sonnenberger via cfe-commits wrote: On Thu, Feb 18, 2016 at 10:32:11PM +, Ben Craig via cfe-commits wrote: The fallback locale functions are also useful on their own for other lightweight platforms. Putting these fallback implementations in support/xlocale should

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-19 Thread H.J. Lu via cfe-commits
On Fri, Feb 19, 2016 at 5:35 AM, Michael Matz wrote: > Hi, > > On Thu, 18 Feb 2016, Richard Smith wrote: > >> >> An empty type is a type where it and all of its subobjects >> >> (recursively) are of class, structure, union, or array type. No >> >> memory slot nor register should be used to pass o

[PATCH] D17447: Add check for CERT ENV33-C

2016-02-19 Thread Aaron Ballman via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: alexfh, sbenza. aaron.ballman added a subscriber: cfe-commits. This patch adds a check for the CERT secure coding rule: ENV33-C. Do not call system(). It flags any call expression that calls a system command processor (system(),

Re: [PATCH] D17434: [Clang-tidy] Make readability-container-size-empty working with STL string

2016-02-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. I agree with David, I'd like to see test coverage for this (with both std::string and std::wstring to be paranoid). Repository: rL LLVM http://reviews.llvm.org/D17434 ___ cfe-commits mailing list cfe-commits@lists.

Re: [PATCH] D17447: Add check for CERT ENV33-C

2016-02-19 Thread Samuel Benzaquen via cfe-commits
sbenza added inline comments. Comment at: clang-tidy/cert/CommandProcessorCheck.cpp:22 @@ +21,3 @@ + Finder->addMatcher( + callExpr(callee(functionDecl(anyOf(hasName("system"), hasName("popen"), + hasName("_popen"))) S

Re: [PATCH] D17447: Add check for CERT ENV33-C

2016-02-19 Thread Aaron Ballman via cfe-commits
aaron.ballman updated this revision to Diff 48499. aaron.ballman marked an inline comment as done. http://reviews.llvm.org/D17447 Files: clang-tidy/cert/CERTTidyModule.cpp clang-tidy/cert/CMakeLists.txt clang-tidy/cert/CommandProcessorCheck.cpp clang-tidy/cert/CommandProcessorCheck.h do

Re: [PATCH] D17447: Add check for CERT ENV33-C

2016-02-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/cert/CommandProcessorCheck.cpp:22 @@ +21,3 @@ + Finder->addMatcher( + callExpr(callee(functionDecl(anyOf(hasName("system"), hasName("popen"), + hasName("_popen"))) ---

Re: r261297 - Implement the likely resolution of core issue 253.

2016-02-19 Thread Hans Wennborg via cfe-commits
On Fri, Feb 19, 2016 at 4:00 AM, Ismail Donmez via cfe-commits wrote: > On Fri, Feb 19, 2016 at 3:52 AM, Nico Weber via cfe-commits > wrote: >> Author: nico >> Date: Thu Feb 18 19:52:46 2016 >> New Revision: 261297 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=261297&view=rev >> Log: >> Impl

[PATCH] D17451: PR26448: [Sema] Fix determined type of ternary operator acting on two xvalue class types

2016-02-19 Thread Erik Pilkington via cfe-commits
erik.pilkington created this revision. erik.pilkington added a reviewer: rsmith. erik.pilkington added a subscriber: cfe-commits. Previously, when the 2 expressions passed to a ternary operator were xvalues and one inherits from the other, the resulting expression had type 'T', not 'T&&' as 5.16

[PATCH] D17452: [CMake] Add partial support for MSVC in compiler-rt builtins

2016-02-19 Thread Roman Shirokiy via cfe-commits
roman.shirokiy created this revision. roman.shirokiy added reviewers: rnk, majnemer, beanz, pcc. roman.shirokiy added a subscriber: cfe-commits. This enables MSVC build of complex number arithmetic compiler-rt builtins. Consider Clang which is built under native Windows environment. Compiling t

[PATCH] D17453: [Driver] Enable --rtlib option for MSVC target

2016-02-19 Thread Roman Shirokiy via cfe-commits
roman.shirokiy created this revision. roman.shirokiy added reviewers: rnk, majnemer, beanz, pcc. roman.shirokiy added a subscriber: cfe-commits. This enables "--rtlib compiler-rt" option under MSVC environment. Related compiler-rt patch: http://reviews.llvm.org/D17452 http://reviews.llvm

Re: [PATCH] D17452: [CMake] Add partial support for MSVC in compiler-rt builtins

2016-02-19 Thread Chris Bieneman via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. Looks good to me. http://reviews.llvm.org/D17452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

Re: [PATCH] D10013: Refactor: Simplify boolean conditional return statements in lib/Driver

2016-02-19 Thread Richard via cfe-commits
LegalizeAdulthood added a comment. I do not have commit access, so someone else will need to commit this. Let me know if it needs rebasing. Patch by Richard Thomson. http://reviews.llvm.org/D10013 ___ cfe-commits mailing list cfe-commits@lists.ll

Re: r261297 - Implement the likely resolution of core issue 253.

2016-02-19 Thread Nico Weber via cfe-commits
If you merge this, you also need to merge the small follow up "r261301 - Fix SemaTemplate/instantiate-field.cpp after r261297." On Feb 19, 2016 11:26 AM, "Hans Wennborg via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > On Fri, Feb 19, 2016 at 4:00 AM, Ismail Donmez via cfe-commits > wrote:

Re: [PATCH] D17446: ASTMatchers: add new statement/decl matchers

2016-02-19 Thread Aleksei Sidorin via cfe-commits
a.sidorin removed rL LLVM as the repository for this revision. a.sidorin updated this revision to Diff 48503. a.sidorin added a comment. Fix issues pointed by Aaron. http://reviews.llvm.org/D17446 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h include/cla

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

2016-02-19 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. @Mats, I think I would prefer not to add even more special handling (i.e. error in this case) for printf. I will look into adding it as a Builtin instead. However, I would prefer to remove it from this change and submit a separate patch as it doesn't belong to Clang

[PATCH] D17456: [libcxx] Reorganize _LIBCPP_LOCALE__L_EXTENSIONS

2016-02-19 Thread Ben Craig via cfe-commits
bcraig created this revision. bcraig added reviewers: scshunt, howard.hinnant, jroelofs, mclow.lists. bcraig added a subscriber: cfe-commits. Herald added a subscriber: jfb. This is one part of many of a locale refactor. See http://reviews.llvm.org/D17146 for an idea of where this is going. Inst

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

2016-02-19 Thread Mats Petersson via cfe-commits
MatsPetersson added a comment. @Anastasia: Yes, I agree, printf should be done as a separate patch. http://reviews.llvm.org/D16928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17456: [libcxx] Reorganize _LIBCPP_LOCALE__L_EXTENSIONS

2016-02-19 Thread Jonathan Roelofs via cfe-commits
jroelofs added a subscriber: EricWF. jroelofs added a comment. > The private redirector symbol names are all prefixed with _CXX_* so that they > won't conflict with user symbols, This is more @mclow.lists/@ericwf's domain, but I think __libcxx_ prefixes would be safer (so that there's no chanc

Re: [PATCH] D17434: [Clang-tidy] Make readability-container-size-empty working with STL string

2016-02-19 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment. Also I agree that testing is good idea, it doesn't make sense in current incarnation which test only vector and set and only with containers' code snippets instead of real implementations. I wrote about last issue in cfe-dev, but idea was rejected. Other issue i

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

2016-02-19 Thread Carlo Bertolli via cfe-commits
carlo.bertolli updated this revision to Diff 48511. carlo.bertolli added a comment. Update against trunk. Repository: rL LLVM http://reviews.llvm.org/D17148 Files: lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGOpenMPRuntime.h lib/CodeGen/CGStmtOpenMP.cpp test/OpenMP/teams_codegen.cpp

Re: [PATCH] D17434: [Clang-tidy] Make readability-container-size-empty working with STL string

2016-02-19 Thread David Blaikie via cfe-commits
On Fri, Feb 19, 2016 at 10:25 AM, Eugene Zelenko via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Eugene.Zelenko added a comment. > > Also I agree that testing is good idea, it doesn't make sense in current > incarnation which test only vector and set and only with containers' code > snippet

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

2016-02-19 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261350: [OpenCL] Generate metadata for opencl_unroll_hint attribute (authored by stulova). Changed prior to commit: http://reviews.llvm.org/D16686?vs=47716&id=48513#toc Repository: rL LLVM http://re

r261350 - [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-02-19 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Fri Feb 19 12:30:11 2016 New Revision: 261350 URL: http://llvm.org/viewvc/llvm-project?rev=261350&view=rev Log: [OpenCL] Generate metadata for opencl_unroll_hint attribute Add support for opencl_unroll_hint attribute from OpenCL v2.0 s6.11.5. Reusing most of metadata genera

Re: [PATCH] D17456: [libcxx] Reorganize _LIBCPP_LOCALE__L_EXTENSIONS

2016-02-19 Thread Ben Craig via cfe-commits
bcraig added a comment. In http://reviews.llvm.org/D17456#357232, @jroelofs wrote: > > The private redirector symbol names are all prefixed with _CXX_* so that > > they won't conflict with user symbols, > > > This is more @mclow.lists/@ericwf's domain, but I think __libcxx_ prefixes > would be

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

2016-02-19 Thread Anastasia Stulova via cfe-commits
Anastasia updated this revision to Diff 48514. Anastasia added a comment. Removed varargs due to printf special handling. To be added as a separate review! http://reviews.llvm.org/D16928 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaType.cpp test/

Re: [PATCH] D17434: [Clang-tidy] Make readability-container-size-empty working with STL string

2016-02-19 Thread David Blaikie via cfe-commits
On Fri, Feb 19, 2016 at 10:38 AM, Eugene Zelenko wrote: > On Fri, Feb 19, 2016 at 10:32 AM, David Blaikie > wrote: > > > > > > On Fri, Feb 19, 2016 at 10:25 AM, Eugene Zelenko via cfe-commits > > wrote: > >> > >> Eugene.Zelenko added a comment. > >> > >> Also I agree that testing is good idea,

Re: [PATCH] D17456: [libcxx] Reorganize _LIBCPP_LOCALE__L_EXTENSIONS

2016-02-19 Thread Jonathan Roelofs via cfe-commits
jroelofs added a comment. In http://reviews.llvm.org/D17456#357245, @bcraig wrote: > In http://reviews.llvm.org/D17456#357232, @jroelofs wrote: > > > > The private redirector symbol names are all prefixed with _CXX_* so that > > > they won't conflict with user symbols, > > > > > > This is more @

[PATCH] D17457: [VFS] Add 'overlay-relative' field to YAML files

2016-02-19 Thread Bruno Cardoso Lopes via cfe-commits
bruno created this revision. bruno added reviewers: benlangmuir, bogner. bruno added subscribers: cfe-commits, dexonsmith. The VFS overlay mapping between virtual paths and real paths is done through the 'external-contents' entries in YAML files, which contains hardcoded paths to the real files.

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-19 Thread Matthijs van Duin via cfe-commits
On 19 February 2016 at 16:27, H.J. Lu wrote: > We want to include static member functions and exclude non-static member > functions. > There's no reason to disallow non-static member functions in general; they have no impact on being trivially copyable or not, only the presence of a non-trivial

Re: [PATCH] D17456: [libcxx] Reorganize _LIBCPP_LOCALE__L_EXTENSIONS

2016-02-19 Thread Sean Hunt via cfe-commits
scshunt added a comment. Oh man, what did I do to get included on this one? ;) I haven't worked on LLVM for years, though, so please proceed without me. :) Sean http://reviews.llvm.org/D17456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2016-02-19 Thread Anastasia Stulova via cfe-commits
Anastasia updated this revision to Diff 48516. Anastasia added a comment. Fixed error msg and test! http://reviews.llvm.org/D17345 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/Parser/opencl-storage-class.cl test/SemaOpenCL/storageclass-cl20.cl test/Sema

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

2016-02-19 Thread Anastasia Stulova via cfe-commits
Anastasia updated this revision to Diff 48518. Anastasia added a comment. Corrected to new error msg in tests too! http://reviews.llvm.org/D17345 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/Parser/opencl-storage-class.cl test/SemaOpenCL/storageclass-cl20

Re: [PATCH] D17456: [libcxx] Reorganize _LIBCPP_LOCALE__L_EXTENSIONS

2016-02-19 Thread Ben Craig via cfe-commits
bcraig updated the summary for this revision. bcraig removed a reviewer: scshunt. bcraig updated this revision to Diff 48520. bcraig added a comment. Switched from _CXX_* prefix to _libcxx_* prefix to avoid link time conflicts with other C++ library implementations. Removed Sean Hunt from the re

Re: [PATCH] D17444: PR26672: [MSVC] Clang does not recognize "static_assert" keyword in C mode

2016-02-19 Thread Reid Kleckner via cfe-commits
rnk added a comment. I think we should do this because MSVC doesn't make _Static_assert available to C code. David says that, according to the C standard, assert.h is supposed to `#define static_assert _Static_assert`. MSVC doesn't do that because they provide static_assert directly as a keywor

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

2016-02-19 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:5046 @@ +5045,3 @@ + if (D->hasAttr()) { +S.Diag(Attr.getLoc(), diag::err_opencl_multiple_access_qualifiers) +<< D->getSourceRange(); Yes, I think attribute would make more sense.

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-19 Thread Matthijs van Duin via cfe-commits
On 19 February 2016 at 14:35, Michael Matz wrote: > struct S { > S() {something();} > }; > > would be an empty type, and that's not what we want. Why not? The default constructor is never invoked as part of passing such an object around. Its copy constructor is a nop and requires no reference t

Re: [PATCH] D17444: PR26672: [MSVC] Clang does not recognize "static_assert" keyword in C mode

2016-02-19 Thread Aaron Ballman via cfe-commits
On Fri, Feb 19, 2016 at 2:02 PM, Reid Kleckner via cfe-commits wrote: > rnk added a comment. > > I think we should do this because MSVC doesn't make _Static_assert available > to C code. Except, they do, somewhat. _Static_assert(0, "this should diagnose"); does *not* work in MSVC. _Static_assert

Re: [PATCH] D17434: [Clang-tidy] Make readability-container-size-empty working with STL string

2016-02-19 Thread David Blaikie via cfe-commits
On Fri, Feb 19, 2016 at 11:10 AM, Eugene Zelenko wrote: > On Fri, Feb 19, 2016 at 11:06 AM, David Blaikie > wrote: > > > > Could we take this conversation back to the list? (better to discuss > things > > with everyone) > > > > On Fri, Feb 19, 2016 at 11:02 AM, Eugene Zelenko < > eugene.zele...@

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

2016-02-19 Thread Carlo Bertolli via cfe-commits
carlo.bertolli updated this revision to Diff 48526. carlo.bertolli added a comment. Update to trunk and implement suggestions from latest review: do not make public methods used in static function calling kmpc_for_static_init, but call those functions in the caller that can access them. Reposi

Re: [PATCH] D17444: PR26672: [MSVC] Clang does not recognize "static_assert" keyword in C mode

2016-02-19 Thread Reid Kleckner via cfe-commits
An alternative fix would be to interpose MSVC's assert.h in clang's builtin headers with #include_next, and do the define there. I don't like interposing headers if we can avoid it though. ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

Re: [PATCH] D17436: [OpenCL] Add Sema checks for OpenCL 2.0 block

2016-02-19 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7719 @@ +7718,3 @@ +def err_opencl_block_proto_variadic : Error< + "invalid block prototype, variadic arguments are not allowed in opencl">; +def err_opencl_invalid_block_array : Error< --

Re: [PATCH] D17437: [OpenCL] Add Sema checks for image and pipe

2016-02-19 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5714 @@ +5713,3 @@ + // OpenCL v2.0 s6.9.b + // An image type can only be used as a type of a function argument. + if (getLangOpts().OpenCL && R->isImageType()) { Move to the line above, separat

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

2016-02-19 Thread Peter Collingbourne via cfe-commits
pcc added a comment. What I meant was that it looks like a hack that this is being handled in the driver. The frontend shouldn't care what the value of a trap flag is if a sanitizer is disabled. Why are we even emitting checks for disabled sanitizers in the target DSO anyway? Can we fail open

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-19 Thread H.J. Lu via cfe-commits
On Fri, Feb 19, 2016 at 11:03 AM, Matthijs van Duin wrote: > On 19 February 2016 at 14:35, Michael Matz wrote: >> struct S { >> S() {something();} >> }; >> >> would be an empty type, and that's not what we want. > > Why not? The default constructor is never invoked as part of passing > such an

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

2016-02-19 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/storageclass-cl20.cl:23 @@ -19,1 +22,3 @@ + extern global int G5; + extern int G6; // expected-error{{program scope variable must reside in global or constant address space}} } Apparently not, becaus

Re: [PATCH] D17447: Add check for CERT ENV33-C

2016-02-19 Thread Samuel Benzaquen via cfe-commits
sbenza added inline comments. Comment at: clang-tidy/cert/CommandProcessorCheck.cpp:36 @@ +35,3 @@ + // is not a security risk by itself. + if (Fn->getName() == "system" && E->getNumArgs() == 1 && + E->getArg(0)->isNullPointerConstant(*Result.Context, You c

Re: [PATCH] D17438: [OpenCL] Add Sema checks for atomics and implicit declaration

2016-02-19 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:3900 @@ -3899,1 +3899,3 @@ if (!DeclaresAnything) { +// OpenCL C doesn't support bit-field, so declaration with no declarator +// has no use. I am still not convinced about this change?

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

2016-02-19 Thread Yaxun Liu via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. Comment at: test/SemaOpenCL/storageclass-cl20.cl:23 @@ -19,1 +22,3 @@ + extern global int G5; + extern int G6; // expected-error{{program scope variable must r

Re: [PATCH] D17438: [OpenCL] Add Sema checks for atomics and implicit declaration

2016-02-19 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:11504 @@ +11503,3 @@ + else if (getLangOpts().OpenCL) +// OpenCL function need to be called with prototype, so we don't allow +// implicit function declarations in OpenCL Could you add spe

[PATCH] D17462: Fix a codegen bug for variadic functions with pass_object_size params

2016-02-19 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a reviewer: rsmith. george.burgess.iv added subscribers: srhines, cfe-commits. Currently, we get assertion failures/segfaults for variadic functions with `pass_object_size` params, e.g.: ``` void foo(void *const __attribute__((pass

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-19 Thread Richard Smith via cfe-commits
On Fri, Feb 19, 2016 at 5:35 AM, Michael Matz wrote: > Hi, > > On Thu, 18 Feb 2016, Richard Smith wrote: > >> >> An empty type is a type where it and all of its subobjects >> >> (recursively) are of class, structure, union, or array type. No >> >> memory slot nor register should be used to pass o

Re: [PATCH] D17444: PR26672: [MSVC] Clang does not recognize "static_assert" keyword in C mode

2016-02-19 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. Do they treat this as a keyword or as a predefined macro? (Does `#ifdef` think `static_assert` is defined?) http://reviews.llvm.org/D17444 ___ cfe-commits mailing list cfe-commits@lists.llv

Re: [PATCH] D17444: PR26672: [MSVC] Clang does not recognize "static_assert" keyword in C mode

2016-02-19 Thread Aaron Ballman via cfe-commits
On Fri, Feb 19, 2016 at 4:14 PM, Richard Smith via cfe-commits wrote: > rsmith added a subscriber: rsmith. > rsmith added a comment. > > Do they treat this as a keyword or as a predefined macro? (Does `#ifdef` > think `static_assert` is defined?) It seems to be treated as a keyword instead of a

Re: r261297 - Implement the likely resolution of core issue 253.

2016-02-19 Thread Richard Smith via cfe-commits
On Thu, Feb 18, 2016 at 5:52 PM, Nico Weber via cfe-commits wrote: > Author: nico > Date: Thu Feb 18 19:52:46 2016 > New Revision: 261297 > > URL: http://llvm.org/viewvc/llvm-project?rev=261297&view=rev > Log: > Implement the likely resolution of core issue 253. > > C++11 requires const objects to

Re: [PATCH] D17456: [libcxx] Reorganize _LIBCPP_LOCALE__L_EXTENSIONS

2016-02-19 Thread Joerg Sonnenberger via cfe-commits
On Fri, Feb 19, 2016 at 06:14:18PM +, Ben Craig via cfe-commits wrote: > Instead of checking _LIBCPP_LOCALE__L_EXTENSIONS all over, instead > check it once, and define the various *_l symbols once. If you want to rename using macros, please use the argument form. I find that to provide better

r261372 - [modules] Flatten -fmodule-name= and -fmodule-implementation-of= into a single

2016-02-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 19 16:25:36 2016 New Revision: 261372 URL: http://llvm.org/viewvc/llvm-project?rev=261372&view=rev Log: [modules] Flatten -fmodule-name= and -fmodule-implementation-of= into a single option. Previously these options could both be used to specify that you were compiling

r261373 - [modules] Do less scanning of macro definition chains when computing the set of

2016-02-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 19 16:43:58 2016 New Revision: 261373 URL: http://llvm.org/viewvc/llvm-project?rev=261373&view=rev Log: [modules] Do less scanning of macro definition chains when computing the set of exported module macros outside local submodule visibility mode. Related to PR24667.

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

2016-02-19 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGVTables.cpp:904-919 @@ -900,5 +903,18 @@ + +bool CodeGenModule::IsBitSetBlacklistedRecord(const CXXRecordDecl *RD) { + std::string TypeName = RD->getQualifiedNameAsString(); + auto isInBlacklist = [&](const SanitizerBlackli

Re: [PATCH] D16346: Add stdbool.h wrapper for libc++

2016-02-19 Thread Eric Fiselier via cfe-commits
EricWF accepted this revision. EricWF added a reviewer: EricWF. EricWF added a comment. This revision is now accepted and ready to land. Got approval from @mclow.lists offline. http://reviews.llvm.org/D16346 ___ cfe-commits mailing list cfe-commits@

[libcxx] r261381 - Add stdbool.h wrapper for libc++

2016-02-19 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Feb 19 18:16:41 2016 New Revision: 261381 URL: http://llvm.org/viewvc/llvm-project?rev=261381&view=rev Log: Add stdbool.h wrapper for libc++ Summary: According to the C++ standard isn't allowed to define `true` `false` or `bool`. However these macros are sometimes defin

Re: [PATCH] D16345: Make __wrap_iter work with GCC again

2016-02-19 Thread Eric Fiselier via cfe-commits
EricWF accepted this revision. EricWF added a reviewer: EricWF. EricWF added a comment. This revision is now accepted and ready to land. @mclow.lists said this was OK to commit if he couldn't think of a better idea. It's unfortunate to use `` to forward declare containers but `` already included

[libcxx] r261382 - Make __wrap_iter work with GCC again

2016-02-19 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Feb 19 18:19:45 2016 New Revision: 261382 URL: http://llvm.org/viewvc/llvm-project?rev=261382&view=rev Log: Make __wrap_iter work with GCC again Summary: This bug was originally fixed in http://reviews.llvm.org/D7201. However it was broken again by the fix to https://l

[libcxx] r261383 - Fix PR26622 - Make CheckLibcxxAtomic.cmake use the libc++ headers.

2016-02-19 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Feb 19 18:24:43 2016 New Revision: 261383 URL: http://llvm.org/viewvc/llvm-project?rev=261383&view=rev Log: Fix PR26622 - Make CheckLibcxxAtomic.cmake use the libc++ headers. Modified: libcxx/trunk/cmake/Modules/CheckLibcxxAtomic.cmake Modified: libcxx/trunk/cmake/Mo

Re: [libcxx] r261381 - Add stdbool.h wrapper for libc++

2016-02-19 Thread Richard Smith via cfe-commits
On Fri, Feb 19, 2016 at 4:16 PM, Eric Fiselier via cfe-commits wrote: > Author: ericwf > Date: Fri Feb 19 18:16:41 2016 > New Revision: 261381 > > URL: http://llvm.org/viewvc/llvm-project?rev=261381&view=rev > Log: > Add stdbool.h wrapper for libc++ > > Summary: > According to the C++ standard is

Re: r261297 - Implement the likely resolution of core issue 253.

2016-02-19 Thread Nico Weber via cfe-commits
On Fri, Feb 19, 2016 at 4:29 PM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Thu, Feb 18, 2016 at 5:52 PM, Nico Weber via cfe-commits > wrote: > > Author: nico > > Date: Thu Feb 18 19:52:46 2016 > > New Revision: 261297 > > > > URL: http://llvm.org/viewvc/llvm-project?

Re: [libcxx] r261381 - Add stdbool.h wrapper for libc++

2016-02-19 Thread Eric Fiselier via cfe-commits
> Is there any point in the #include_next, even? I think so. If stdbool.h may provide extensions/additional definitions (ex "#define _Bool"). I don't want to manage these within libc++ and I don't want to prevent users from getting them from the actual header. Although upon further inspection "_B

Re: r261297 - Implement the likely resolution of core issue 253.

2016-02-19 Thread Richard Smith via cfe-commits
On Fri, Feb 19, 2016 at 4:41 PM, Nico Weber wrote: > On Fri, Feb 19, 2016 at 4:29 PM, Richard Smith via cfe-commits > wrote: >> >> On Thu, Feb 18, 2016 at 5:52 PM, Nico Weber via cfe-commits >> wrote: >> > Author: nico >> > Date: Thu Feb 18 19:52:46 2016 >> > New Revision: 261297 >> > >> > URL:

r261388 - Remove a duplicate declaration specifier from _ReadBarrier

2016-02-19 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri Feb 19 18:57:00 2016 New Revision: 261388 URL: http://llvm.org/viewvc/llvm-project?rev=261388&view=rev Log: Remove a duplicate declaration specifier from _ReadBarrier This fixes PR26675. Modified: cfe/trunk/lib/Headers/Intrin.h Modified: cfe/trunk/lib/Headers/Intr

  1   2   >