[PATCH] D31404: [OpenCL] Allow alloca return non-zero private pointer

2017-04-02 Thread Tony Tye via Phabricator via cfe-commits
t-tye added inline comments. Comment at: include/clang/AST/Type.h:339-340 +auto Addr = getAddressSpace(); +if (Addr == 0) + return 0; +return Addr - LangAS::target_first; Since you mention this is only used for `__attribute__((address_space(n)))

[libcxx] r299348 - [libc++] Explicitly mark specializations as dllexport

2017-04-02 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Sun Apr 2 23:04:24 2017 New Revision: 299348 URL: http://llvm.org/viewvc/llvm-project?rev=299348&view=rev Log: [libc++] Explicitly mark specializations as dllexport Method specializations don't get exported even if there's an exported extern template instantiation on Window

r299347 - [AVX-512] Fix a couple more intrinsic macros I missed in r299346.

2017-04-02 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun Apr 2 22:51:57 2017 New Revision: 299347 URL: http://llvm.org/viewvc/llvm-project?rev=299347&view=rev Log: [AVX-512] Fix a couple more intrinsic macros I missed in r299346. Modified: cfe/trunk/lib/Headers/avx512fintrin.h Modified: cfe/trunk/lib/Headers/avx512fintri

r299346 - [AVX-512] Fix some intrinsic macros that use the wrong macro parameter names and don't have parentheses around them.

2017-04-02 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun Apr 2 22:41:29 2017 New Revision: 299346 URL: http://llvm.org/viewvc/llvm-project?rev=299346&view=rev Log: [AVX-512] Fix some intrinsic macros that use the wrong macro parameter names and don't have parentheses around them. Thanks to Matthew Barr for reporting this iss

[PATCH] D31590: [coroutines] Add support for deallocation elision

2017-04-02 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov created this revision. Wrap deallocation code with: if (auto *mem = coro.free()) Deallocate When backend decides to elide allocations it will replace coro.free with nullptr to suppress deallocation code. https://reviews.llvm.org/D31590 Files: lib/CodeGen/CGCoroutine.cpp tes

[PATCH] D31404: [OpenCL] Allow alloca return non-zero private pointer

2017-04-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 93820. yaxunl marked an inline comment as done. yaxunl added a comment. Update for the llvm IRBuilder API change for alloca. Removed data layout argument. Moved a lit test to SemaOpenCL. https://reviews.llvm.org/D31404 Files: include/clang/AST/ASTContext.

[PATCH] D31588: Fix PR25627: Certain constant local variables must be usable as template arguments (without being odr-used)

2017-04-02 Thread Faisal Vali via Phabricator via cfe-commits
faisalv created this revision. This patch ensures that clang processes the expression-nodes that are generated when disambiguating between types and expressions within template arguments, as if they were truly constant-expressions. Currently, trunk correctly disambiguates, and identifies the e

[PATCH] D31586: [coroutines] Replace all coro.frame builtins with an SSA value of coro.begin

2017-04-02 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov created this revision. SemaCoroutine forms expressions referring to the coroutine frame of the enclosing coroutine using coro.frame builtin. During codegen, we emit llvm.coro.begin intrinsic that returns the address of the coroutine frame. When coro.frame is emitted, we replace it wi

[PATCH] D31584: [coroutines] Add support for allocation elision

2017-04-02 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov created this revision. We wrap allocation code so that backend can elide it if necessary. llvm.coro.alloc intrinsic returns true, when allocation is needed and false otherwise. %NeedAlloc = call i1 @llvm.coro.alloc(token %2) br i1 %NeedAlloc, label %AllocBB, label %InitBB

[PATCH] D29262: Fixes to modernize-use-using

2017-04-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299340: Fixes for modernize-use-using check: (authored by krystynka). Changed prior to commit: https://reviews.llvm.org/D29262?vs=93797&id=93804#toc Repository: rL LLVM https://reviews.llvm.org/D292

[PATCH] D29262: Fixes to modernize-use-using

2017-04-02 Thread Krystyna via Phabricator via cfe-commits
krystyna updated this revision to Diff 93797. krystyna marked 2 inline comments as done. https://reviews.llvm.org/D29262 Files: clang-tidy/modernize/UseUsingCheck.cpp clang-tidy/modernize/UseUsingCheck.h test/clang-tidy/modernize-use-using-macros.cpp test/clang-tidy/modernize-use-using.cp

[PATCH] D30547: [clang-tidy] Forwarding reference overload in constructors

2017-04-02 Thread AndrĂ¡s Leitereg via Phabricator via cfe-commits
leanil updated this revision to Diff 93774. leanil added a comment. Simplify checking the presence of copy and move ctors. Repository: rL LLVM https://reviews.llvm.org/D30547 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/ForwardingReferenceOverloadCheck.cpp clang-tidy/misc/Forw

[PATCH] D31328: [clangd] Add code completion support

2017-04-02 Thread Stanislav Ionascu via Phabricator via cfe-commits
stanionascu added inline comments. Comment at: clangd/Protocol.cpp:613 + if (CI.kind != CompletionItemKind::Missing) +Os << R"("kind":)" << static_cast(CI.kind) << R"(",)"; + if (!CI.detail.empty()) if kind is actually provided there will be a trailing quot