r325103 - Test commit access

2018-02-13 Thread Henry Wong via cfe-commits
Author: henrywong Date: Tue Feb 13 23:32:27 2018 New Revision: 325103 URL: http://llvm.org/viewvc/llvm-project?rev=325103&view=rev Log: Test commit access Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/Pa

[PATCH] D42755: [libcxx] Fix last_write_time tests for filesystems that don't support very small times.

2018-02-13 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp:360 - -ec = GetTestEC(); -last_write_time(p, Clock::now()); vsapsai wrote: > EricWF wrote: > > I would really lov

[PATCH] D38639: [clangd] #include statements support for Open definition

2018-02-13 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: unittests/clangd/XRefsTests.cpp:245 + const char *SourceContents = R"cpp( + #include "$2^invalid.h" + #include "^foo.h" ilya-biryukov wrote: > Could we also add tests for corner cases: cursor before opening quote, c

[PATCH] D43277: limits: Use `false` instead of `type(0)`.

2018-02-13 Thread Bruce Mitchener via Phabricator via cfe-commits
brucem created this revision. brucem added reviewers: mclow.lists, EricWF. This fixes warnings when using clang-tidy and the `modernize-use-bool-literals` check. Repository: rCXX libc++ https://reviews.llvm.org/D43277 Files: include/limits Index: include/limits ==

[PATCH] D43273: [libcxx] [test] Fix MSVC warnings and errors.

2018-02-13 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. [libcxx] [test] Fix MSVC warnings and errors. test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp test/std/numerics/numeric.

[clang-tools-extra] r325097 - [clangd] Configure clangd tracing with CLANGD_TRACE env instead of -trace flag

2018-02-13 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Feb 13 19:20:07 2018 New Revision: 325097 URL: http://llvm.org/viewvc/llvm-project?rev=325097&view=rev Log: [clangd] Configure clangd tracing with CLANGD_TRACE env instead of -trace flag Modified: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp clang-tools-e

[PATCH] D43272: [clangd] Fix tracing now that spans lifetimes can overlap on a thread.

2018-02-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added subscribers: cfe-commits, jkorous-apple, ilya-biryukov, klimek. The chrome trace viewer requires events within a thread to strictly nest. So we need to record the lifetime of the Span objects, not the contexts. But

Re: [PATCH] D43259: Implement function attribute artificial

2018-02-13 Thread David Blaikie via cfe-commits
Maybe - though that'd actually make for larger debug info & not be much use. With nodebug+always_inline (which is how the intrinsics are provided) the function call dissolves into the raw instruction it's meant to represent. The debug info describes that instruction as if it had been written at th

r325095 - Fix a couple of places where we assumed that non-type template parameters are always rvalues.

2018-02-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 13 18:07:53 2018 New Revision: 325095 URL: http://llvm.org/viewvc/llvm-project?rev=325095&view=rev Log: Fix a couple of places where we assumed that non-type template parameters are always rvalues. Added: cfe/trunk/test/SemaTemplate/sizeof-pack.cpp Modified:

[PATCH] D42755: [libcxx] Fix last_write_time tests for filesystems that don't support very small times.

2018-02-13 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp:360 - -ec = GetTestEC(); -last_write_time(p, Clock::now()); EricWF wrote: > I would really love to keep this tes

[PATCH] D42498: [ExprConstant] Fix crash when initialize an indirect field with another field.

2018-02-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Please handle this by temporarily updating the `This` pointer appropriately when evaluating the `CXXDefaultInitExpr` rather than trying to work around the `This` value being wrong later (your approach will still go wrong if the `This` pointer is used in other ways, such

Re: r325081 - Implement function attribute artificial

2018-02-13 Thread Richard Smith via cfe-commits
On 13 February 2018 at 16:14, Erich Keane via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: erichkeane > Date: Tue Feb 13 16:14:07 2018 > New Revision: 325081 > > URL: http://llvm.org/viewvc/llvm-project?rev=325081&view=rev > Log: > Implement function attribute artificial > > Added su

[libcxxabi] r325093 - [demangler] Support for exception specifications on function types.

2018-02-13 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Feb 13 17:08:20 2018 New Revision: 325093 URL: http://llvm.org/viewvc/llvm-project?rev=325093&view=rev Log: [demangler] Support for exception specifications on function types. Modified: libcxxabi/trunk/src/cxa_demangle.cpp libcxxabi/trunk/test/test_demangle.pass.cp

[libcxxabi] r325092 - [demangler] Simplify the AST for function types, NFC.

2018-02-13 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Feb 13 17:08:17 2018 New Revision: 325092 URL: http://llvm.org/viewvc/llvm-project?rev=325092&view=rev Log: [demangler] Simplify the AST for function types, NFC. Modified: libcxxabi/trunk/src/cxa_demangle.cpp Modified: libcxxabi/trunk/src/cxa_demangle.cpp URL: http:/

[PATCH] D42755: [libcxx] Fix last_write_time tests for filesystems that don't support very small times.

2018-02-13 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. LGTM except the removal of the test. I think it's probably valuable to keep around on platforms that allow it. What do you think? Comment at: libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp:360 - -

[PATCH] D42498: [ExprConstant] Fix crash when initialize an indirect field with another field.

2018-02-13 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Herald added a subscriber: jkorous-apple. Ping. https://reviews.llvm.org/D42498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43167: Fix incorrect indentation.

2018-02-13 Thread Bruce Mitchener via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325087: Fix incorrect indentation. (authored by brucem, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D43167 Files: libcxx/trunk/include/ios

[PATCH] D43259: Implement function attribute artificial

2018-02-13 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325081: Implement function attribute artificial (authored by erichkeane, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D43259?vs=134123&id=13

r325081 - Implement function attribute artificial

2018-02-13 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Tue Feb 13 16:14:07 2018 New Revision: 325081 URL: http://llvm.org/viewvc/llvm-project?rev=325081&view=rev Log: Implement function attribute artificial Added support in clang for GCC function attribute 'artificial'. This attribute is used to control stepping behavior of

[PATCH] D40925: Add option -fkeep-static-consts

2018-02-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. >> OK. My concern is that users need to use __attribute__((used)) or something >> more robust if they want SVN identifiers to reliably appear in the output. >> Adding this flag just creates a trap that will fail once they turn on >>-O2. >> I'd rather not have it in t

r325070 - [analyzer] [tests] Update CmpRuns to write to stdout correctly in multithreaded environment

2018-02-13 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Feb 13 15:36:01 2018 New Revision: 325070 URL: http://llvm.org/viewvc/llvm-project?rev=325070&view=rev Log: [analyzer] [tests] Update CmpRuns to write to stdout correctly in multithreaded environment Modified: cfe/trunk/utils/analyzer/CmpRuns.py cfe/tru

[PATCH] D43259: Implement function attribute artificial

2018-02-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added subscribers: probinson, aprantl, dblaikie. rnk added a comment. This revision is now accepted and ready to land. lgtm --- Clang's builtin headers use `__attribute__((__nodebug__))` for this purpose. Do you think we should follow this up by using artificial

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2018-02-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Type.h:1102 +PDK_Struct // non-trivial C struct. + }; + This is unused. Comment at: lib/CodeGen/CGBlocks.cpp:1565 // For all other types, the memcpy is fine. return

[PATCH] D43259: Implement function attribute artificial

2018-02-13 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews created this revision. eandrews added reviewers: erichkeane, aaron.ballman. Added support in clang for GCC function attribute 'artificial'. This attribute is used to control stepping behavior of debugger with respect to inline functions. https://reviews.llvm.org/D43259 Files: inclu

[libclc] r325061 - amdgpu/half_recip: Switch implementation to native_recip

2018-02-13 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Feb 13 14:09:46 2018 New Revision: 325061 URL: http://llvm.org/viewvc/llvm-project?rev=325061&view=rev Log: amdgpu/half_recip: Switch implementation to native_recip Reviewer: Tom Stellard Signed-off-by: Jan Vesely Added: libclc/trunk/amdgpu/lib/math/half_recip.cl

[libclc] r325060 - amdgpu/half_log2: Switch implementation to native_log2

2018-02-13 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Feb 13 14:09:44 2018 New Revision: 325060 URL: http://llvm.org/viewvc/llvm-project?rev=325060&view=rev Log: amdgpu/half_log2: Switch implementation to native_log2 Reviewer: Tom Stellard Signed-off-by: Jan Vesely Added: libclc/trunk/amdgpu/lib/math/half_log2.cl Mod

[libclc] r325058 - amdgpu/half_log: Switch implementation to native_log

2018-02-13 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Feb 13 14:09:41 2018 New Revision: 325058 URL: http://llvm.org/viewvc/llvm-project?rev=325058&view=rev Log: amdgpu/half_log: Switch implementation to native_log Reviewer: Tom Stellard Signed-off-by: Jan Vesely Added: libclc/trunk/amdgpu/lib/math/half_log.cl Modifi

[libclc] r325055 - amdgpu/half_exp: Switch implementation to native_exp

2018-02-13 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Feb 13 14:09:35 2018 New Revision: 325055 URL: http://llvm.org/viewvc/llvm-project?rev=325055&view=rev Log: amdgpu/half_exp: Switch implementation to native_exp Reviewer: Tom Stellard Signed-off-by: Jan Vesely Added: libclc/trunk/amdgpu/lib/math/half_exp.cl Modifi

[libclc] r325059 - amdgpu/half_log10: Switch implementation to native_log10

2018-02-13 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Feb 13 14:09:42 2018 New Revision: 325059 URL: http://llvm.org/viewvc/llvm-project?rev=325059&view=rev Log: amdgpu/half_log10: Switch implementation to native_log10 Reviewer: Tom Stellard Signed-off-by: Jan Vesely Added: libclc/trunk/amdgpu/lib/math/half_log10.cl

[libclc] r325053 - amdgpu/half_rsqrt: Switch implementation to native_rsqrt

2018-02-13 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Feb 13 14:09:31 2018 New Revision: 325053 URL: http://llvm.org/viewvc/llvm-project?rev=325053&view=rev Log: amdgpu/half_rsqrt: Switch implementation to native_rsqrt Reviewer: Tom Stellard Signed-off-by: Jan Vesely Added: libclc/trunk/amdgpu/lib/math/half_native_un

[libclc] r325056 - amdgpu/half_exp10: Switch implementation to native_exp10

2018-02-13 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Feb 13 14:09:37 2018 New Revision: 325056 URL: http://llvm.org/viewvc/llvm-project?rev=325056&view=rev Log: amdgpu/half_exp10: Switch implementation to native_exp10 Reviewer: Tom Stellard Signed-off-by: Jan Vesely Added: libclc/trunk/amdgpu/lib/math/half_exp10.cl

[libclc] r325057 - amdgpu/half_exp2: Switch implementation to native_exp2

2018-02-13 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Feb 13 14:09:38 2018 New Revision: 325057 URL: http://llvm.org/viewvc/llvm-project?rev=325057&view=rev Log: amdgpu/half_exp2: Switch implementation to native_exp2 Reviewer: Tom Stellard Signed-off-by: Jan Vesely Added: libclc/trunk/amdgpu/lib/math/half_exp2.cl Mod

[libclc] r325054 - amdgpu/half_sqrt: Switch implementation to native_sqrt

2018-02-13 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Feb 13 14:09:33 2018 New Revision: 325054 URL: http://llvm.org/viewvc/llvm-project?rev=325054&view=rev Log: amdgpu/half_sqrt: Switch implementation to native_sqrt Reviewer: Tom Stellard Signed-off-by: Jan Vesely Added: libclc/trunk/amdgpu/lib/math/half_sqrt.cl Mod

[PATCH] D43221: Teach Wreturn-type, Wunreachable-code, and alpha.deadcode.UnreachableCode to treat __assume(0) like __builtin_unreachable.

2018-02-13 Thread Nico Weber via Phabricator via cfe-commits
thakis closed this revision. thakis added a comment. r325052, thanks! https://reviews.llvm.org/D43221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42800: Let CUDA toolchain support amdgpu target

2018-02-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 134107. yaxunl added a comment. Update with Greg's change. https://reviews.llvm.org/D42800 Files: include/clang/Basic/Cuda.h include/clang/Driver/ToolChain.h lib/Basic/Cuda.cpp lib/Basic/Targets/AMDGPU.cpp lib/Basic/Targets/AMDGPU.h lib/Basic/Tar

r325052 - Teach Wreturn-type, Wunreachable-code, and alpha.deadcode.UnreachableCode to treat __assume(0) like __builtin_unreachable.

2018-02-13 Thread Nico Weber via cfe-commits
Author: nico Date: Tue Feb 13 13:31:47 2018 New Revision: 325052 URL: http://llvm.org/viewvc/llvm-project?rev=325052&view=rev Log: Teach Wreturn-type, Wunreachable-code, and alpha.deadcode.UnreachableCode to treat __assume(0) like __builtin_unreachable. Fixes PR29134. https://reviews.llvm.org/D4

[PATCH] D43221: Teach Wreturn-type, Wunreachable-code, and alpha.deadcode.UnreachableCode to treat __assume(0) like __builtin_unreachable.

2018-02-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm It looks like we already generate llvm.assume() for these and that eventually behaves the same as the unreachable instruction. Neat. :) https://reviews.llvm.org/D43221

[PATCH] D41880: Adding nocf_check attribute for cf-protection fine tuning

2018-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:2089 +def AnyX86NoCfCheck : InheritableAttr, TargetSpecificAttr{ + let Spellings = [GCC<"nocf_check">]; + let Documentation = [AnyX86NoCfCheckDocs]; -

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2018-02-13 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 134097. simark added a comment. Add tests, work in progress Can you take a look at the "TEST(DidChangeConfiguration, DifferentDeclaration)" test, and tell me if you see anything wrong with it? It seems to me like changes in command line arguments (adding -DMA

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2018-02-13 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. I think I managed to make some tests by using the `MockCompilationDatabase`. Basically with some code like: #ifndef MACRO static void func () {} // 1 #else static void func () {} // 2 #endif and these steps: 1. Server.addDocument(...) 2. Server.findDefiniti

[PATCH] D41880: Adding nocf_check attribute for cf-protection fine tuning

2018-02-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:2007 + +bool Sema::CheckAttrNoArgs(const AttributeList &Attr) { + if (!checkAttributeNumArgs(*this, Attr, 0)) { Wy did this get renamed? Comment at: lib/Sema/SemaDeclAtt

r325040 - Update StmtProfile.cpp to handle zero template arguments.

2018-02-13 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Feb 13 11:53:40 2018 New Revision: 325040 URL: http://llvm.org/viewvc/llvm-project?rev=325040&view=rev Log: Update StmtProfile.cpp to handle zero template arguments. Treat having no templates arguments differently than having zero template arguments when profiling. Modif

[PATCH] D43246: [clangd] Assert path is absolute when assigning to URIForFile.

2018-02-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/Protocol.h:52 struct URIForFile { + URIForFile() = default; I don't like how the API changes here take us further away from the other structs in this file. Why does this one enforce invariants, when the oth

[PATCH] D43227: [clangd] Make functions of ClangdServer callback-based

2018-02-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. LG, suggest a tweak to capture() though. I wonder whether we want to introduce `using Callback = UniqueFunction` for readability at some point... Comment at: clangd/C

[PATCH] D43248: [Attr] Fix printing of parameter indices in attributes

2018-02-13 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. jdenny added reviewers: aaron.ballman, hfinkel. Parameter indices in some attributes (argument_with_type_tag, pointer_with_type_tag, nonnull, ownership_takes, ownership_holds, and ownership_returns) are specified in source as one-origin including any this parameter,

[PATCH] D43227: [clangd] Make functions of ClangdServer callback-based

2018-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/ClangdLSPServer.cpp:194 +if (!Replacements) + return replyError(ErrorCode::InternalError, +llvm::toString(Replacements.takeError())); ilya-biryukov wrote: > ioeric wrote

[PATCH] D43187: [AST] Refine the condition for element-dependent array fillers

2018-02-13 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. Repository: rL LLVM https://reviews.llvm.org/D43187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D43181: [CodeGen] Initialize large arrays by copying from a global

2018-02-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:421 + // with explicit initializers should be large enough. + if (NumInitElements > 8 && elementType->isBuiltinType()) { +CodeGen::CodeGenModule &CGM = CGF.CGM; kosarev wrote: > rjmccall

[PATCH] D43227: [clangd] Make functions of ClangdServer callback-based

2018-02-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.cpp:194 +if (!Replacements) + return replyError(ErrorCode::InternalError, +llvm::toString(Replacements.takeError())); ioeric wrote: > nit: since w

[PATCH] D43227: [clangd] Make functions of ClangdServer callback-based

2018-02-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 134080. ilya-biryukov added a comment. - Capture only needed vars in lambda, not everything. - Rebase onto head. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43227 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clan

[PATCH] D43230: [clangd] Explicitly initialize all primitive fields in Protocol.h

2018-02-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/Protocol.h:80 struct Position { + Position() = default; + Position(int line, int character) : line(line), character(character) {} I'd lean to making callers initialize field-by-field here rather than provide

[PATCH] D43246: [clangd] Assert path is absolute when assigning to URIForFile.

2018-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. I think another option to prevent the bug in r325029 from happening would be providing a canonical approach for retrieving (absolute) paths from `FileManager`. We already have code in symbol collector that does this, and we have similar code in XRefs.cpp now. We should p

[PATCH] D42995: [ThinLTO] Ignore object files with empty ThinLTO index

2018-02-13 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka planned changes to this revision. vitalybuka added a comment. https://reviews.llvm.org/D42995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 8 inline comments as done. MaskRay added inline comments. Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:46 + + static const llvm::StringMap Mapping{ +// [simd.alg] hokein wrote: > consider using `llvm::StringSwitch`? The list is c

[PATCH] D43230: [clangd] Explicitly initialize all primitive fields in Protocol.h

2018-02-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Yup, I got bitten recently from some of our plain-c-style structs with no default initializers (in Index). Definitely a fan of this change. Main downside is you can't use aggregate init

[PATCH] D43230: [clangd] Explicitly initialize all primitive fields in Protocol.h

2018-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D43230#1006469, @ilya-biryukov wrote: > In https://reviews.llvm.org/D43230#1006104, @ioeric wrote: > > > But I think it's safe and probably easier to rely on default values of > > primitive types like int, bool etc > > > It's not always safe, a

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-02-13 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc added a comment. Ping! I believe all feedback has been addressed - further consideration would be much appreciated. https://reviews.llvm.org/D40988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

[PATCH] D42624: [clang-tidy] Add a utility Matcher to match the next statement within a statement sequence

2018-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/utils/Matchers.h:16 +#include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/Analysis/CFG.h" tbourvon wrote: > aaron.ballman wrote: > > This will require linking in the clangAnalysis library as

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 134076. MaskRay marked an inline comment as done. MaskRay added a comment. Remove UseStdExperimental Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42983 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTid

[PATCH] D35894: [clangd] Code hover for Clangd

2018-02-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D35894#1006124, @simark wrote: > Is there a way to get the macro name from the MacroInfo object? I couldn't > find any, so the solution I'm considering is to make > `DeclarationAndMacrosFinder::takeMacroInfos` return an > `std::vector

[PATCH] D38639: [clangd] #include statements support for Open definition

2018-02-13 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: unittests/clangd/XRefsTests.cpp:53 +class IgnoreDiagnostics : public DiagnosticsConsumer { + void onDiagnosticsReady( ilya-biryukov wrote: > NIT: remove this class, use `IgnoreDiagnostics` from `Compiler.h` instead.

[PATCH] D43230: [clangd] Explicitly initialize all primitive fields in Protocol.h

2018-02-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D43230#1006104, @ioeric wrote: > But I think it's safe and probably easier to rely on default values of > primitive types like int, bool etc It's not always safe, as primitive types are sometimes left uninitialized (e.g. when construc

[PATCH] D43171: [AMDGPU] Change constant addr space to 4 for clang

2018-02-13 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC325031: [AMDGPU] Change constant addr space to 4 (authored by yaxunl, committed by ). Changed prior to commit: https://reviews.llvm.org/D43171?vs=133802&id=134071#toc Repository: rC Clang https://re

r325031 - [AMDGPU] Change constant addr space to 4

2018-02-13 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Feb 13 10:01:21 2018 New Revision: 325031 URL: http://llvm.org/viewvc/llvm-project?rev=325031&view=rev Log: [AMDGPU] Change constant addr space to 4 Differential Revision: https://reviews.llvm.org/D43171 Added: cfe/trunk/test/CodeGenOpenCL/amdgpu-env-amdgcn.cl Remove

[PATCH] D43171: [AMDGPU] Change constant addr space to 4 for clang

2018-02-13 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325031: [AMDGPU] Change constant addr space to 4 (authored by yaxunl, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D43171?vs=133802&id=13407

[PATCH] D43230: [clangd] Explicitly initialize all primitive fields in Protocol.h

2018-02-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Protocol.h:190 /// (see exit notification) its process. - llvm::Optional processId; + llvm::Optional processId = 0; jkorous-apple wrote: > Sorry if I am asking stupid question but since the type is Op

[PATCH] D43227: [clangd] Make functions of ClangdServer callback-based

2018-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/ClangdLSPServer.cpp:194 +if (!Replacements) + return replyError(ErrorCode::InternalError, +llvm::toString(Replacements.takeError())); nit: since we are not spelling out

[PATCH] D43120: [clang-tidy] New checker for exceptions that are created but not thrown

2018-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. I apologize for not noticing this important detail earlier -- I think this check should live under `bugprone` rather than `misc`. Other than where it lives (and the rel

[PATCH] D43246: [clangd] Assert path is absolute when assigning to URIForFile.

2018-02-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: hokein, ioeric, sammccall. Herald added subscribers: jkorous-apple, klimek. The assertion will point directly to misbehaving code, so that debugging related problems (like the one fixed by r325029) is easier. Repository: rCTE

[PATCH] D42606: [Coroutines] Use allocator overload when available

2018-02-13 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added inline comments. Comment at: lib/Sema/SemaCoroutine.cpp:1062 + // an argument list." + for (auto *PD : FD.parameters()) { +if (PD->getType()->isDependentType()) GorNishanov wrote: > This does not implement TS specified behavior for non sta

[PATCH] D42606: [Coroutines] Use allocator overload when available

2018-02-13 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added inline comments. Comment at: lib/Sema/SemaCoroutine.cpp:1062 + // an argument list." + for (auto *PD : FD.parameters()) { +if (PD->getType()->isDependentType()) This does not implement TS specified behavior for non static member functions:

[clang-tools-extra] r325029 - [clangd] Fixed findDefinitions to always return absolute paths.

2018-02-13 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue Feb 13 09:47:16 2018 New Revision: 325029 URL: http://llvm.org/viewvc/llvm-project?rev=325029&view=rev Log: [clangd] Fixed findDefinitions to always return absolute paths. Relative paths could be returned in some cases, e.g. when relative path is used in compilation ar

[libcxx] r325028 - Make the ctype_byname::widen test cases pass on FreeBSD.

2018-02-13 Thread Dimitry Andric via cfe-commits
Author: dim Date: Tue Feb 13 09:43:24 2018 New Revision: 325028 URL: http://llvm.org/viewvc/llvm-project?rev=325028&view=rev Log: Make the ctype_byname::widen test cases pass on FreeBSD. Modified: libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1

[PATCH] D43209: Put type attributes after class keyword

2018-02-13 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX325027: Put type attributes after class keyword (authored by dim, committed by ). Changed prior to commit: https://reviews.llvm.org/D43209?vs=133932&id=134065#toc Repository: rCXX libc++ https://r

[libcxx] r325027 - Put type attributes after class keyword

2018-02-13 Thread Dimitry Andric via cfe-commits
Author: dim Date: Tue Feb 13 09:40:59 2018 New Revision: 325027 URL: http://llvm.org/viewvc/llvm-project?rev=325027&view=rev Log: Put type attributes after class keyword Summary: Compiling `` in C++17 or higher mode results in: ``` functional:2500:1: warning: attribute '__visibility__' is ignore

[clang-tools-extra] r325024 - [clangd] Log if CWD could not be changed. NFC.

2018-02-13 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue Feb 13 09:15:06 2018 New Revision: 325024 URL: http://llvm.org/viewvc/llvm-project?rev=325024&view=rev Log: [clangd] Log if CWD could not be changed. NFC. Modified: clang-tools-extra/trunk/clangd/ClangdUnit.cpp clang-tools-extra/trunk/clangd/CodeComplete.cpp M

[libcxxabi] r325022 - [demangler] Rewrite parse_nested_name in the new style.

2018-02-13 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Feb 13 09:09:03 2018 New Revision: 325022 URL: http://llvm.org/viewvc/llvm-project?rev=325022&view=rev Log: [demangler] Rewrite parse_nested_name in the new style. Modified: libcxxabi/trunk/src/cxa_demangle.cpp Modified: libcxxabi/trunk/src/cxa_demangle.cpp URL: http

[libcxxabi] r325023 - [demangler] Support for inheriting constructors.

2018-02-13 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Feb 13 09:09:07 2018 New Revision: 325023 URL: http://llvm.org/viewvc/llvm-project?rev=325023&view=rev Log: [demangler] Support for inheriting constructors. Fixes PR33223. Modified: libcxxabi/trunk/src/cxa_demangle.cpp libcxxabi/trunk/test/test_demangle.pass.cpp

[clang-tools-extra] r325021 - [clangd] Remove the RealFS layer from test VFS. NFC.

2018-02-13 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue Feb 13 09:08:13 2018 New Revision: 325021 URL: http://llvm.org/viewvc/llvm-project?rev=325021&view=rev Log: [clangd] Remove the RealFS layer from test VFS. NFC. It was required before because preambles could only be created on disk. All tests use in-memory preambles no

[PATCH] D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch

2018-02-13 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Hum, not sure I fully got your proposal. So you actually mean that clang-format you format like this (with 4-space indent for clarity): switch (x) { case 0: break; case 1: { foo(); break; } case 2: { foo(); } break; case 3: {

[PATCH] D43171: [AMDGPU] Change constant addr space to 4 for clang

2018-02-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: test/CodeGenOpenCL/address-spaces.cl:37 +// SPIR: i32 addrspace(2)* %arg +// GIZ: i32 addrspace(4)* %arg void f__c(__constant int *arg) {} t-tye wrote: > Suggest using the same name across all the OpenCL tests as some ar

[PATCH] D43240: [OpenCL] Fix __enqueue_block for block with captures

2018-02-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: Anastasia, bader. The following test case causes issue with codegen of __enqueue_block void (^block)(void) = ^{ callee(id, out); }; enqueue_kernel(queue, 0, ndrange, block); Clang first does codegen for block expression in the first l

[PATCH] D43181: [CodeGen] Initialize large arrays by copying from a global

2018-02-13 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev updated this revision to Diff 134042. kosarev added a comment. Improved as suggested to cover all trivially-copyable types. https://reviews.llvm.org/D43181 Files: lib/CodeGen/CGExprAgg.cpp test/CodeGen/init.c Index: test/CodeGen/init.c ==

[PATCH] D43187: [AST] Refine the condition for element-dependent array fillers

2018-02-13 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added a comment. John, maybe you can review this or suggest some other reviewers? Thanks. Repository: rL LLVM https://reviews.llvm.org/D43187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D43181: [CodeGen] Initialize large arrays by copying from a global

2018-02-13 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:421 + // with explicit initializers should be large enough. + if (NumInitElements > 8 && elementType->isBuiltinType()) { +CodeGen::CodeGenModule &CGM = CGF.CGM; rjmccall wrote: > Is there

[PATCH] D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch

2018-02-13 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. In https://reviews.llvm.org/D43183#1006224, @Typz wrote: > It is explicitly documented in google style guide: > https://google.github.io/styleguide/cppguide.html#Loops_and_Switch_Statements > : > > > case blocks in switch statements can have curly braces or not, dependi

[PATCH] D43223: [clang-tidy] Update fuchsia-multiple-inheritance to not fail

2018-02-13 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE325015: [clang-tidy] Update fuchsia-multiple-inheritance to not fail (authored by juliehockett, committed by ). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43223 Files: clang-tidy

[clang-tools-extra] r325015 - [clang-tidy] Update fuchsia-multiple-inheritance to not fail

2018-02-13 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Tue Feb 13 07:40:40 2018 New Revision: 325015 URL: http://llvm.org/viewvc/llvm-project?rev=325015&view=rev Log: [clang-tidy] Update fuchsia-multiple-inheritance to not fail Updating the fuchsia-multiple-inheritance to gracefully handle unknown record types (e.g. templat

r325011 - An updated test to show the current warnings produced for implicit conversions from 'double' to 'float'.

2018-02-13 Thread Andrew V. Tischenko via cfe-commits
Author: avt77 Date: Tue Feb 13 07:20:29 2018 New Revision: 325011 URL: http://llvm.org/viewvc/llvm-project?rev=325011&view=rev Log: An updated test to show the current warnings produced for implicit conversions from 'double' to 'float'. Modified: cfe/trunk/test/Sema/conversion.c Modified: c

[PATCH] D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch

2018-02-13 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. It is explicitly documented in google style guide: https://google.github.io/styleguide/cppguide.html#Loops_and_Switch_Statements : > case blocks in switch statements can have curly braces or not, depending on > your preference. If you do include curly braces they should be

[PATCH] D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch

2018-02-13 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. In https://reviews.llvm.org/D43183#1006170, @Typz wrote: > > We'll just format those cases in a somewhat weird way and users can either > > accept that or change their code to not need it. > > I think we have a really diverging opinion on this. From my experience, > peo

[PATCH] D43231: [clang-format] Refactor ObjC tests

2018-02-13 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak abandoned this revision. jolesiak added a comment. In https://reviews.llvm.org/D43231#1006123, @krasimir wrote: > I don't believe this is needed: test fails before would fail at the line > where test instance is checked, and after they will fail at the checkLanguage > function. Thank

[PATCH] D43108: Support for the mno-stack-arg-probe flag

2018-02-13 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In https://reviews.llvm.org/D43108#1005904, @nruslan wrote: > @hans: One real-world example is when it is used to compile UEFI code using > PE/COFF targets natively. Obviously, UEFI uses ABI which is basically almost > the same as MS ABI, except that chkstk is not used. It

[PATCH] D42623: [clang-tidy] Add a Lexer util to get the source text of a statement

2018-02-13 Thread Tristan Bourvon via Phabricator via cfe-commits
tbourvon abandoned this revision. tbourvon added inline comments. Comment at: clang-tidy/utils/LexerUtils.h:26 +/// Get source code text for statement. +Optional getStmtText(const Stmt* Statement, const SourceManager& SM); + alexfh wrote: > aaron.ballman wrote:

[PATCH] D42624: [clang-tidy] Add a utility Matcher to match the next statement within a statement sequence

2018-02-13 Thread Tristan Bourvon via Phabricator via cfe-commits
tbourvon added inline comments. Comment at: clang-tidy/utils/Matchers.h:16 +#include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/Analysis/CFG.h" aaron.ballman wrote: > This will require linking in the clangAnalysis library as well; are we sure > we w

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2018-02-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D39571#1005926, @malaperle wrote: > I haven't looked at the newest patch yet but I gave it a quick try and saw > something odd. If I change the configuration to something invalid (say I > specify the path to a CMakeLists.txt), then I ge

[PATCH] D43167: Fix incorrect indentation.

2018-02-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. This is fine. Repository: rCXX libc++ https://reviews.llvm.org/D43167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch

2018-02-13 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. > We'll just format those cases in a somewhat weird way and users can either > accept that or change their code to not need it. I think we have a really diverging opinion on this. From my experience, people will mostly accept the output of the formatter without question :

[PATCH] D38639: [clangd] #include statements support for Open definition

2018-02-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdUnit.cpp:103 + +if (SourceMgr.isInMainFile(FilenameRange.getAsRange().getBegin())) { + // Only inclusion directives in the main file make sense. The user cannot NIT: replace `FilenameRange.get

[PATCH] D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch

2018-02-13 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. To me none of these options make sense. For the case you are describing, I agree that the current behavior is not ideal, but neither are any of the alternatives. However, I think that's fine. We'll just format those cases in a somewhat weird way and users can either acc

  1   2   >