[PATCH] D29599: Clang Changes for alloc_align

2017-02-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Can this attribute be used on c++ template methods? Is the following code valid? template struct S { T foo(int a) __attribute__((alloc_align(1))); }; https://reviews.llvm.org/D29599 ___ cfe-commits mailing list

[PATCH] D29755: Cache FileID when translating diagnostics in PCH files

2017-02-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/Frontend/ASTUnit.cpp:2551 continue; -FileID FID = SrcMgr.translateFile(FE); +FileID FID; +if (FE == CachedFE) { Since FID is always equal to CachedFID, I think you can simplify this a bit by

Re: r293199 - Turn on -Wblock-capture-autoreleasing by default.

2017-02-12 Thread Akira Hatanaka via cfe-commits
Hi Nico, The documentation might confuse people now that the warning is on by default, but it’s correct as clang still qualifies indirect parameters with __autoreleasing. We had to add this warning and turn it on by default because a lot of people capture indirect parameters in their code not

[PATCH] D28835: [coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction.

2017-02-12 Thread Gor Nishanov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. GorNishanov marked an inline comment as done. Closed by commit rL294933: [coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction. (authored by GorNishanov). Changed prior to commit:

r294933 - [coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction.

2017-02-12 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Sun Feb 12 23:05:02 2017 New Revision: 294933 URL: http://llvm.org/viewvc/llvm-project?rev=294933=rev Log: [coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction. Summary: Sema::CheckCompletedCoroutineBody was growing unwieldy with building all of the

[PATCH] D28835: [coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction.

2017-02-12 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov marked an inline comment as done. GorNishanov added a comment. Preparing to land. Thank you very much for review! Comment at: lib/Sema/SemaCoroutine.cpp:719 + + if (!PromiseRecordDecl) +return true; EricWF wrote: > I figured out what's going

[PATCH] D28835: [coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction.

2017-02-12 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov updated this revision to Diff 88152. GorNishanov added a comment. Initialized PromiseRecordDecl to nullptr https://reviews.llvm.org/D28835 Files: include/clang/AST/StmtCXX.h include/clang/Sema/ScopeInfo.h lib/AST/StmtCXX.cpp lib/Sema/SemaCoroutine.cpp

[PATCH] D28835: [coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction.

2017-02-12 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov updated this revision to Diff 88151. GorNishanov added a comment. Initialized member variable to zero. https://reviews.llvm.org/D28835 Files: include/clang/AST/StmtCXX.h include/clang/Sema/ScopeInfo.h lib/AST/StmtCXX.cpp lib/Sema/SemaCoroutine.cpp

[PATCH] D29839: [clang-tidy] New misc-istream-overflow check

2017-02-12 Thread Kostya Kortchinsky via Phabricator via cfe-commits
cryptoad added a comment. So if I understand correctly, the consensus is to abandon this and rewrite it to be part of the clang static analyzer? https://reviews.llvm.org/D29839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29879: [OpenMP] Teams reduction on the NVPTX device.

2017-02-12 Thread Arpith Jacob via Phabricator via cfe-commits
arpith-jacob created this revision. Herald added a subscriber: jholewinski. This patch implements codegen for the reduction clause on any teams construct for elementary data types. It builds on parallel reductions on the GPU. Subsequently, the team master writes to a unique location in a global

[PATCH] D29758: [OpenMP] Parallel reduction on the NVPTX device.

2017-02-12 Thread Arpith Jacob via Phabricator via cfe-commits
arpith-jacob updated this revision to Diff 88149. arpith-jacob added a comment. Minor fixup of comment style on emitInterWarpCopyFunction(). https://reviews.llvm.org/D29758 Files: lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGOpenMPRuntime.h lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-02-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. Thanks for updating the tests to be able to run both the z3 and range-constraint managers! I think this will make it much easier to ensure the z3-backed manager continues to work as as expected moving forward. I suggested an alternative approach inline to running the

[PATCH] D29839: [clang-tidy] New misc-istream-overflow check

2017-02-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. In https://reviews.llvm.org/D29839#674517, @aaron.ballman wrote: > In https://reviews.llvm.org/D29839#674301, @xazax.hun wrote: > > > Shouldn't this be a path sensitive check within

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-12 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: lib/Parse/ParseDecl.cpp:2989 + + Diag(Loc, diag::err_ms_attributes_not_enabled); + continue; aaron.ballman wrote: > compnerd wrote: > > I think that we want to emit the diagnostic even if there is no

[libcxx] r294917 - test: use char32_t rather than wchar_t

2017-02-12 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Sun Feb 12 15:42:35 2017 New Revision: 294917 URL: http://llvm.org/viewvc/llvm-project?rev=294917=rev Log: test: use char32_t rather than wchar_t wchar_t is not as portable as char32_t. On Windows, wchar_t is 16-bytes and on Linux 32-bits. The conversion to utf8 causes

[libcxx] r294918 - math: follow up to SVN r294902

2017-02-12 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Sun Feb 12 15:42:37 2017 New Revision: 294918 URL: http://llvm.org/viewvc/llvm-project?rev=294918=rev Log: math: follow up to SVN r294902 Pull in the math functions from ucrt 14+ after auditing the library. It seems that they are now complete for C99 math. Fixes more

[libclc] r294916 - Move BufferPtr into the block where it it being used

2017-02-12 Thread Jeroen Ketema via cfe-commits
Author: jketema Date: Sun Feb 12 15:33:49 2017 New Revision: 294916 URL: http://llvm.org/viewvc/llvm-project?rev=294916=rev Log: Move BufferPtr into the block where it it being used The previous location outside the block would crash prepare-builtins when no the builtins file accidentially not

[libclc] r294915 - Add the correct prefixes to the cl_khr_fp64 pragma

2017-02-12 Thread Jeroen Ketema via cfe-commits
Author: jketema Date: Sun Feb 12 15:31:41 2017 New Revision: 294915 URL: http://llvm.org/viewvc/llvm-project?rev=294915=rev Log: Add the correct prefixes to the cl_khr_fp64 pragma Modified: libclc/trunk/generic/include/clc/shared/vstore.h Modified:

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-02-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. Repository: rL LLVM https://reviews.llvm.org/D29877 Files: lib/Sema/Sema.cpp lib/Sema/SemaDecl.cpp lib/Serialization/ASTReader.cpp test/SemaCXX/warn-unused-filescoped.cpp Index: test/SemaCXX/warn-unused-filescoped.cpp

[PATCH] D29863: [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types.

2017-02-12 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/string:782 _LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s, size_type __n); _LIBCPP_INLINE_VISIBILITY EricWF wrote: > rsmith wrote: > > Did you skip this one intentionally? > Yes.

[PATCH] D29758: [OpenMP] Parallel reduction on the NVPTX device.

2017-02-12 Thread Arpith Jacob via Phabricator via cfe-commits
arpith-jacob updated this revision to Diff 88144. arpith-jacob added a comment. Updated patch to address Alexey's comments. Condensed parameters in emitReduction() to a struct Options. https://reviews.llvm.org/D29758 Files: lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGOpenMPRuntime.h

[clang-tools-extra] r294913 - [clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work for class members

2017-02-12 Thread Mads Ravn via cfe-commits
Author: madsravn Date: Sun Feb 12 14:35:42 2017 New Revision: 294913 URL: http://llvm.org/viewvc/llvm-project?rev=294913=rev Log: [clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work for class members Fix for commit r294912 which had a small error in the AST matcher.

[PATCH] D29726: [Clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work for class members

2017-02-12 Thread Mads Ravn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294912: [clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work… (authored by madsravn). Changed prior to commit: https://reviews.llvm.org/D29726?vs=88123=88143#toc Repository:

[clang-tools-extra] r294912 - [clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work for class members

2017-02-12 Thread Mads Ravn via cfe-commits
Author: madsravn Date: Sun Feb 12 14:09:59 2017 New Revision: 294912 URL: http://llvm.org/viewvc/llvm-project?rev=294912=rev Log: [clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work for class members I have made a small fix for readability-delete-null-pointer check so

Re: r294862 - Hopefully fixes a compile error introduced by r294861.

2017-02-12 Thread Renato Golin via cfe-commits
On 12 February 2017 at 19:24, Aaron Ballman wrote: > Did, just that the test also needs a triple. I guess I'll do the dance > to add it and re-commit. Makes sense. Thanks! ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r294910 - Revert "Attributes on K C functions should not cause incompatible..."

2017-02-12 Thread Aaron Ballman via cfe-commits
On Sun, Feb 12, 2017 at 2:08 PM, Renato Golin via cfe-commits wrote: > Author: rengolin > Date: Sun Feb 12 13:08:02 2017 > New Revision: 294910 > > URL: http://llvm.org/viewvc/llvm-project?rev=294910=rev > Log: > Revert "Attributes on K C functions should not cause

r294911 - Revert r294910 and recommit r294861 and r294862 with a target triple to hopefully appease the bots.

2017-02-12 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Sun Feb 12 13:24:47 2017 New Revision: 294911 URL: http://llvm.org/viewvc/llvm-project?rev=294911=rev Log: Revert r294910 and recommit r294861 and r294862 with a target triple to hopefully appease the bots. Modified: cfe/trunk/include/clang/AST/Type.h

Re: r294862 - Hopefully fixes a compile error introduced by r294861.

2017-02-12 Thread Aaron Ballman via cfe-commits
On Sun, Feb 12, 2017 at 2:20 PM, Renato Golin wrote: > On 11 February 2017 at 18:00, Aaron Ballman via cfe-commits > wrote: >> Author: aaronballman >> Date: Sat Feb 11 12:00:32 2017 >> New Revision: 294862 >> >> URL:

Re: r294862 - Hopefully fixes a compile error introduced by r294861.

2017-02-12 Thread Renato Golin via cfe-commits
On 11 February 2017 at 18:00, Aaron Ballman via cfe-commits wrote: > Author: aaronballman > Date: Sat Feb 11 12:00:32 2017 > New Revision: 294862 > > URL: http://llvm.org/viewvc/llvm-project?rev=294862=rev > Log: > Hopefully fixes a compile error introduced by r294861.

r294910 - Revert "Attributes on K C functions should not cause incompatible..."

2017-02-12 Thread Renato Golin via cfe-commits
Author: rengolin Date: Sun Feb 12 13:08:02 2017 New Revision: 294910 URL: http://llvm.org/viewvc/llvm-project?rev=294910=rev Log: Revert "Attributes on K C functions should not cause incompatible..." ...function type with a redeclaration having the same attribute. Fixing this introduced a

r294904 - ASTReader: Refactor common code for writing function definitions, to match the writing code

2017-02-12 Thread David Blaikie via cfe-commits
Author: dblaikie Date: Sun Feb 12 12:45:31 2017 New Revision: 294904 URL: http://llvm.org/viewvc/llvm-project?rev=294904=rev Log: ASTReader: Refactor common code for writing function definitions, to match the writing code Modified: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp Modified:

[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-02-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. A couple of comments. Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:35 + + auto HasConstructExpr = has(ConstructExpr); + Nit: I

[PATCH] D29726: [Clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work for class members

2017-02-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D29726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[libcxx] r294903 - test: mark requirement for pthread test

2017-02-12 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Sun Feb 12 11:37:48 2017 New Revision: 294903 URL: http://llvm.org/viewvc/llvm-project?rev=294903=rev Log: test: mark requirement for pthread test This test explicitly is checking the behaviour of std::thread and pthread interactions. This requires pthreads. Add an

[libcxx] r294902 - math: pull more C functions from std

2017-02-12 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Sun Feb 12 11:37:45 2017 New Revision: 294902 URL: http://llvm.org/viewvc/llvm-project?rev=294902=rev Log: math: pull more C functions from std The newer ucrt version provides the gamma meth routines. Includede them when building the library. Modified:

[libcxx] r294901 - test: squelch -Wreturn-type error

2017-02-12 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Sun Feb 12 11:37:44 2017 New Revision: 294901 URL: http://llvm.org/viewvc/llvm-project?rev=294901=rev Log: test: squelch -Wreturn-type error Add an unreachable marker to avoid a -Wreturn-type error when building on Windows. Modified:

[libcxx] r294899 - cmath: adjust math forwards for Windows

2017-02-12 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Sun Feb 12 10:44:17 2017 New Revision: 294899 URL: http://llvm.org/viewvc/llvm-project?rev=294899=rev Log: cmath: adjust math forwards for Windows The newer versions of ucrt have the math routines. Use the CRT version to determine if we should include the math routines.

[PATCH] D29726: [Clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work for class members

2017-02-12 Thread Mads Ravn via Phabricator via cfe-commits
madsravn updated this revision to Diff 88123. madsravn marked an inline comment as done. madsravn added a comment. Added comment in CHECK-FIX to ensure the line we are referring to is uniquely identified. https://reviews.llvm.org/D29726 Files:

[PATCH] D29685: Lit C++11 Compatibility - Function Attributes

2017-02-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: delesley. aaron.ballman added a subscriber: delesley. aaron.ballman added a comment. The changes to the format string look good to me, but the changes to the thread-safety attributes do not make sense. I *think* those are indicative of a bug with thready safety

[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-02-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I found a few more small nits, but basically LGTM. Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:70 + + for (int I = 0, NumParams = MatchedFunctionDecl->getNumParams(); + I < NumParams; ++I) { `I` should

[PATCH] D29692: [clang-tidy] add check modernize-use-const-instead-of-define

2017-02-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. One big concern I have with this is the potential to introduce ODR violations into the user's code. We may want to limit this check to only trigger on macros that are defined in the primary source file of the TU rather than something in the include stack. One

[PATCH] D29839: [clang-tidy] New misc-istream-overflow check

2017-02-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D29839#674301, @xazax.hun wrote: > Shouldn't this be a path sensitive check within the clang static analyzer > instead? So branches are properly handled and interprocedural analysis is > done. I agree; I think this check should be

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Parse/ParseDecl.cpp:2973 + // recognize that scenario and recover gracefully. + if (!getLangOpts().MicrosoftExt && Tok.is(tok::identifier) && + Tok.getIdentifierInfo()->getName().equals("__declspec")) {

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 88122. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Correcting review feedback. https://reviews.llvm.org/D29868 Files: include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseDecl.cpp