[PATCH] D39138: [CodeGen] Generate TBAA info for 'this' pointers

2017-10-24 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added a comment. Correct, they are eliminated. However, this change makes things a bit easier as we are pursuing undecorated instructions produced by clang. Once they have their TBAA tags, we don't need to guess if it's something trivial for the optimizer. It shouldn't be a problem to k

[libunwind] r316415 - Add missing checks for register number

2017-10-24 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Tue Oct 24 00:16:40 2017 New Revision: 316415 URL: http://llvm.org/viewvc/llvm-project?rev=316415&view=rev Log: Add missing checks for register number Most other cases that touch savedRegisters[reg] have got this check, but these three seemed to lack it. Differential Revis

[PATCH] D39206: [libunwind] Add missing checks for register number

2017-10-24 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316415: Add missing checks for register number (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D39206?vs=119940&id=120001#toc Repository: rL LLVM https://reviews.llvm.org/D

[PATCH] D39206: [libunwind] Add missing checks for register number

2017-10-24 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39206#904723, @compnerd wrote: > I'd say out of range rather than too big. Ok, pushing with the message changed to out of range, and actually printing the value. Repository: rL LLVM https://reviews.llvm.org/D39206 _

[PATCH] D39138: [CodeGen] Generate TBAA info for 'this' pointers

2017-10-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Okay, if this is just for your own checking, I'd rather not take it. It's not a significant compile-time cost, but there's no reason to pay it at all. Repository: rL LLVM https://reviews.llvm.org/D39138 ___ cfe-commits

[PATCH] D39086: Performance tracing facility for clangd.

2017-10-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Trace.cpp:87 + +static Tracer* T = nullptr; +} // namespace sammccall wrote: > ilya-biryukov wrote: > > Maybe use `unique_ptr` (or even `llvm::Optional`)? > > Otherwise we leak memory and don't flush the st

[PATCH] D36111: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb

2017-10-24 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo abandoned this revision. mstorsjo added a comment. This was updated, finished and merged in https://reviews.llvm.org/D38821. https://reviews.llvm.org/D36111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D31868: [analyzer] Check NULL pointer dereference issue for memset function

2017-10-24 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. > One of the possible improvements for future work here would be to actually > bind the second argument value to the buffer instead of just invalidating it. > Like, after `memset(buf, 0, sizeof(buf))` the analyzer should know that all > values in the `buf` array are `0`. In

[PATCH] D39224: Moved QualTypeNames.h from Tooling to AST.

2017-10-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. Herald added a subscriber: mgorny. For code reuse in SemaCodeComplete. Note that the tests for QualTypeNames are still in Tooling as they use Tooling's common testing code. https://reviews.llvm.org/D39224 Files: include/clang/AST/QualTypeNames.h include/

[PATCH] D38538: Avoid printing some redundant name qualifiers in completion

2017-10-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 120016. ilya-biryukov added a comment. - Extracted the move of QualTypeNames to AST into a separate revision. https://reviews.llvm.org/D38538 Files: lib/Sema/SemaCodeComplete.cpp test/CodeCompletion/call.cpp test/CodeCompletion/qualifiers-as-wri

[PATCH] D39224: Moved QualTypeNames.h from Tooling to AST.

2017-10-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. The actual usage of `QualTypeNames` is in https://reviews.llvm.org/D38538. https://reviews.llvm.org/D39224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D31868: [analyzer] Check NULL pointer dereference issue for memset function

2017-10-24 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai added a comment. Dear Henry, Sorry for my poor English, please Create a New patch or provide Chinese translation :) Regards, Leslie Zhai Repository: rL LLVM https://reviews.llvm.org/D31868 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D38110: [libunwind][MIPS]: Add support for unwinding in O32 and N64 processes.

2017-10-24 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb marked an inline comment as done. bsdjhb added a comment. Ping? https://reviews.llvm.org/D38110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r316424 - [AArch64] Fix PR34625 -mtune without -mcpu should not set -target-cpu

2017-10-24 Thread Peter Smith via cfe-commits
Author: psmith Date: Tue Oct 24 02:51:55 2017 New Revision: 316424 URL: http://llvm.org/viewvc/llvm-project?rev=316424&view=rev Log: [AArch64] Fix PR34625 -mtune without -mcpu should not set -target-cpu When -mtune is used on AArch64 the -target-cpu is passed the value of the cpu given to -mtune.

[PATCH] D39179: [AArch64] Fix PR34625 -mtune without -mcpu should not set -target-cpu

2017-10-24 Thread Peter Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316424: [AArch64] Fix PR34625 -mtune without -mcpu should not set -target-cpu (authored by psmith). Changed prior to commit: https://reviews.llvm.org/D39179?vs=119837&id=120025#toc Repository: rL LLV

[PATCH] D31868: [analyzer] Check NULL pointer dereference issue for memset function

2017-10-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D31868#904814, @MTC wrote: > > One of the possible improvements for future work here would be to actually > > bind the second argument value to the buffer instead of just invalidating > > it. Like, after `memset(buf, 0, sizeof(buf))` the analyzer

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2017-10-24 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added inline comments. Comment at: include/__libunwind_config.h:59-68 +# elif defined(__mips__) && defined(_ABIN32) && defined(__mips_soft_float) +# define _LIBUNWIND_TARGET_MIPS_N64 1 +# define _LIBUNWIND_CONTEXT_SIZE 35 +# define _LIBUNWIND_CURSOR_SIZE 46 +# define

Re: r316268 - [Sema] Fixes for enum handling for tautological comparison diagnostics

2017-10-24 Thread Hans Wennborg via cfe-commits
On Mon, Oct 23, 2017 at 2:02 PM, Roman Lebedev wrote: > On Mon, Oct 23, 2017 at 2:13 PM, Hans Wennborg wrote: > Hi. > >> This seems to have had the side effect of introducing a new warning in >> Chromium builds: >> >> ../../third_party/expat/files/lib/xmlparse.c(2429,24): error: >> comparison of

r316433 - [Tooling] Add a factory method for CommonOptionsParser

2017-10-24 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Oct 24 06:10:58 2017 New Revision: 316433 URL: http://llvm.org/viewvc/llvm-project?rev=316433&view=rev Log: [Tooling] Add a factory method for CommonOptionsParser Summary: This returns error instead of exiting the program in case of error. Reviewers: klimek, hokein Revi

[PATCH] D39042: [Tooling] Add a factory method for CommonOptionsParser

2017-10-24 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316433: [Tooling] Add a factory method for CommonOptionsParser (authored by ioeric). Repository: rL LLVM https://reviews.llvm.org/D39042 Files: cfe/trunk/include/clang/Tooling/CommonOptionsParser.h

[PATCH] D39239: [AST] Incorrectly qualified unscoped enumeration as template actual parameter.

2017-10-24 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso created this revision. An unscoped enumeration used as template argument, should not have any qualified information about its enclosing scope, as its visibility is global. In the case of scoped enumerations, they must include information about their enclosing scope. For the b

r316436 - Do not add a colon chunk to the code completion of class inheritance access modifiers

2017-10-24 Thread Erik Verbruggen via cfe-commits
Author: erikjv Date: Tue Oct 24 06:46:58 2017 New Revision: 316436 URL: http://llvm.org/viewvc/llvm-project?rev=316436&view=rev Log: Do not add a colon chunk to the code completion of class inheritance access modifiers With enabled CINDEXTEST_CODE_COMPLETE_PATTERNS env option (which enables Incl

[PATCH] D38618: Do not add a colon chunk to the code completion of class inheritance access modifiers

2017-10-24 Thread Erik Verbruggen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316436: Do not add a colon chunk to the code completion of class inheritance access… (authored by erikjv). Changed prior to commit: https://reviews.llvm.org/D38618?vs=119273&id=120067#toc Repository:

[PATCH] D39239: [AST] Incorrectly qualified unscoped enumeration as template actual parameter.

2017-10-24 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso updated this revision to Diff 120066. https://reviews.llvm.org/D39239 Files: lib/AST/Decl.cpp test/Modules/odr.cpp test/SemaCXX/return-noreturn.cpp test/SemaTemplate/temp_arg_enum_printing.cpp test/SemaTemplate/temp_arg_enum_printing_more.cpp unittests/AST/NamedDec

r316437 - Add Forgotten test for: Fix template parameter default args missed if redecled

2017-10-24 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Tue Oct 24 06:51:07 2017 New Revision: 316437 URL: http://llvm.org/viewvc/llvm-project?rev=316437&view=rev Log: Add Forgotten test for: Fix template parameter default args missed if redecled Addendum to differential revision: https://reviews.llvm.org/D39127 Added: cf

[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 120068. ioeric added a comment. - Experimented and refined the interfaces. o Get rid of `ExecutionConfig` class; pass actions into executors directly. o Add ArgumentAdjuster to ExecutionContext. o Make command-line based executor selection more explicit by r

[PATCH] D39127: Fix template parameter default args missed if redecled

2017-10-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D39127#904685, @rnk wrote: > I think you forgot to svn add the test case Ugg... thanks for the heads up! Added in r316437 Repository: rL LLVM https://reviews.llvm.org/D39127 ___ cfe-comm

[PATCH] D39241: [clang-rename] Fix and enable the failing TemplatedClassFunction test.

2017-10-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D39241 Files: lib/Tooling/Refactoring/Rename/USRFindingAction.cpp test/clang-rename/TemplatedClassFunction.cpp Index: test/clang-rename/TemplatedClassFunction.cpp ==

[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric marked an inline comment as done. ioeric added a comment. PTAL I experimented with our internal tools (incl. mapreduce-based execution) and modified the interfaces a bit: o Get rid of `ExecutionConfig` class; pass actions into executors directly. o Moved `ArgumentAdjuster`s that are commo

[libcxx] r316439 - Mark string_view literals as 'noexcept'. Fixes PR#25054. Thanks to Pavel K for the bug report.

2017-10-24 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue Oct 24 07:06:00 2017 New Revision: 316439 URL: http://llvm.org/viewvc/llvm-project?rev=316439&view=rev Log: Mark string_view literals as 'noexcept'. Fixes PR#25054. Thanks to Pavel K for the bug report. Modified: libcxx/trunk/include/string_view libcxx/trunk/t

[PATCH] D39138: [CodeGen] Generate TBAA info for 'this' pointers

2017-10-24 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D39138#904747, @rjmccall wrote: > Okay, if this is just for your own checking, I'd rather not take it. It's > not a significant compile-time cost, but there's no reason to pay it at all. In that case, can we take it? I'd rather have everyth

[PATCH] D39241: [clang-rename] Fix and enable the failing TemplatedClassFunction test.

2017-10-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lg Comment at: test/clang-rename/TemplatedClassFunction.cpp:8 int main(int argc, char **argv) { A a; + a.foo(); /* Test 2 */ // CHECK: a.bar(); /* Test 2 */

r316444 - [modules] Add a regression test for merging anon decls in extern C contexts.

2017-10-24 Thread Vassil Vassilev via cfe-commits
Author: vvassilev Date: Tue Oct 24 07:52:35 2017 New Revision: 316444 URL: http://llvm.org/viewvc/llvm-project?rev=316444&view=rev Log: [modules] Add a regression test for merging anon decls in extern C contexts. Added: cfe/trunk/test/Modules/merge-anon-in-extern_c.cpp Added: cfe/trunk/test/

[PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 120076. yaxunl added a comment. Revised the test by Paul's comments. https://reviews.llvm.org/D39069 Files: lib/CodeGen/CGExpr.cpp test/CodeGenOpenCL/func-call-dbg-loc.cl Index: test/CodeGenOpenCL/func-call-dbg-loc.cl ==

[PATCH] D39064: implement __has_unique_object_representations

2017-10-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/AST/Type.cpp:2226 +Context.getFieldOffset(*Record->field_begin())); +for (const auto *Field : Record->fields()) { + if (!Field->getType().hasUniqueObjectRepresentations(Context)) erichkeane wrote:

[PATCH] D38982: [refactor] Initial outline of implementation of "extract function" refactoring

2017-10-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lgtm Comment at: include/clang/Basic/DiagnosticRefactoringKinds.td:24 + "not overlap with the AST nodes of interest">; + +def err_refactor_code_outside_of_function : Error<"

r316447 - Fix spelling in comment, field is isMsStruct, not Strust

2017-10-24 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Tue Oct 24 08:34:59 2017 New Revision: 316447 URL: http://llvm.org/viewvc/llvm-project?rev=316447&view=rev Log: Fix spelling in comment, field is isMsStruct, not Strust Modified: cfe/trunk/include/clang/AST/Decl.h Modified: cfe/trunk/include/clang/AST/Decl.h URL: ht

[PATCH] D39055: [refactor] Add an editor client that is used in clangd

2017-10-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Tooling/Refactoring/EditorClient.h:46 + /// error otherwise. + Expected performRefactoring(ASTContext &Context, + StringRef CommandName, I think it's worth think

[PATCH] D37813: clang-format: better handle namespace macros

2017-10-24 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D37813#876227, @klimek wrote: > I think instead of introducing more and more special cases of macros we might > want to handle, we should instead allow specifying macro productions globally. what do you mean? Do you mean to group all the macro

Re: r316447 - Fix spelling in comment, field is isMsStruct, not Strust

2017-10-24 Thread Nico Weber via cfe-commits
This is fine, but a few years ago we agreed that we shouldn't repeat method names in doxygen. So an Even Better Fix would've been to just remove everything up to (and including) the ' - ' :-) Just FYI, no need to follow this up with the deletion. On Tue, Oct 24, 2017 at 3:34 PM, Erich Keane via cf

RE: r316447 - Fix spelling in comment, field is isMsStruct, not Strust

2017-10-24 Thread Keane, Erich via cfe-commits
Ah, thanks for letting me know! I’ll do that now. From: tha...@google.com [mailto:tha...@google.com] On Behalf Of Nico Weber Sent: Tuesday, October 24, 2017 8:59 AM To: Keane, Erich Cc: cfe-commits Subject: Re: r316447 - Fix spelling in comment, field is isMsStruct, not Strust This is fine, but

r316453 - Remove repeated function name in doxygen comment.

2017-10-24 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Tue Oct 24 09:16:34 2017 New Revision: 316453 URL: http://llvm.org/viewvc/llvm-project?rev=316453&view=rev Log: Remove repeated function name in doxygen comment. Modified: cfe/trunk/include/clang/AST/Decl.h Modified: cfe/trunk/include/clang/AST/Decl.h URL: http://ll

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-10-24 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? https://reviews.llvm.org/D32478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33589: clang-format: consider not splitting tokens in optimization

2017-10-24 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. > My question is: if CanBreak is false, we currently don't call > breakProtrudingToken. So either we do something very wrong in that case > (which might be true, but I'd like to understand why) or we should be able > to just calculate the penalty by not breaking anything

[PATCH] D33440: clang-format: better handle statement macros

2017-10-24 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 120084. Typz added a comment. rebase https://reviews.llvm.org/D33440 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/FormatToken.h lib/Format/FormatTokenLexer.cpp lib/Format/FormatTokenLexer.h lib/Format/UnwrappedLineParser.cp

[PATCH] D39204: [CodeGen] __builtin_sqrt should map to the compiler's intrinsic sqrt function

2017-10-24 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. In https://reviews.llvm.org/D39204#904312, @efriedma wrote: > The gcc documentation says "GCC includes built-in versions of many of the > functions in the standard C library. These functions come in two forms: one > whose names start with the `__builtin_` prefix, and the

[PATCH] D37813: clang-format: better handle namespace macros

2017-10-24 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 120085. Typz added a comment. rebase https://reviews.llvm.org/D37813 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/FormatToken.h lib/Format/FormatTokenLexer.cpp lib/Format/NamespaceEndCommentsFixer.cpp lib/Format/TokenAnnota

[libcxx] r316456 - Mark string_view's constructor from (ptr, len) as noexcept (an extension). Update the tests to check this (and other noexcept bits

2017-10-24 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue Oct 24 09:30:06 2017 New Revision: 316456 URL: http://llvm.org/viewvc/llvm-project?rev=316456&view=rev Log: Mark string_view's constructor from (ptr,len) as noexcept (an extension). Update the tests to check this (and other noexcept bits Modified: libcxx/trunk/incl

r316458 - [code completion] Complete ObjC methods in @implementation without leading

2017-10-24 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Oct 24 09:39:37 2017 New Revision: 316458 URL: http://llvm.org/viewvc/llvm-project?rev=316458&view=rev Log: [code completion] Complete ObjC methods in @implementation without leading '-'/'+' prefix rdar://12040840 Modified: cfe/trunk/include/clang/Sema/Sema.h c

[PATCH] D36790: [ObjC] Messages to 'self' in class methods should use class method dispatch to avoid multiple method ambiguities

2017-10-24 Thread Doug Gregor via Phabricator via cfe-commits
doug.gregor added a comment. Yes, I think it's reasonable to treat instancetype as an inherited requirement. I guess the only exception would be if we had some notion of final classes or methods in Objective-C, in which case they'd be able to return a concrete type. Repository: rL LLVM http

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added subscribers: vit9696, hfinkel. hfinkel added a comment. Noting that, as @vit9696 pointed out in https://reviews.llvm.org/D38554, this does not suppress uses of the PLT that occur from backend/optimizer-generated functions (e.g., calls into compiler-rt and similar). https://revie

[PATCH] D39204: [CodeGen] __builtin_sqrt should map to the compiler's intrinsic sqrt function

2017-10-24 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. Working my way through the stack: does the sqrt LangRef change mean we can revert https://reviews.llvm.org/rL265521? What allows us to transform any of those libm calls that set errno to vectors in the first place? I'm even more confused than usual, but if I can find a w

[PATCH] D39218: [WebAssembly] Include libclang_rt.builtins in the standard way

2017-10-24 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: lib/Driver/ToolChain.cpp:318 + else +OSLibName = getOS(); llvm::sys::path::append(Path, "lib", OSLibName); dschuff wrote: > Is this logic intended to replace what was removed from CommonArgs.cpp? > Should there b

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Why again is this a good idea? This is an even worse hack than -Bsymbolic, the latter at least is visible in ELF header without code inspection. This is breaking core premises of ELF. https://reviews.llvm.org/D39079 ___ cfe-

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added a comment. In https://reviews.llvm.org/D39079#905353, @hfinkel wrote: > Noting that, as @vit9696 pointed out in https://reviews.llvm.org/D38554, > this does not suppress uses of the PLT that occur from > backend/optimizer-generated functions (e.g., calls into compiler-rt and >

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added a comment. In https://reviews.llvm.org/D39079#905372, @joerg wrote: > Why again is this a good idea? This is an even worse hack than -Bsymbolic, > the latter at least is visible in ELF header without code inspection. This is > breaking core premises of ELF. Could you elaborate

r316465 - [refactor] Initial outline of implementation of "extract function" refactoring

2017-10-24 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Oct 24 10:18:45 2017 New Revision: 316465 URL: http://llvm.org/viewvc/llvm-project?rev=316465&view=rev Log: [refactor] Initial outline of implementation of "extract function" refactoring This commit adds an initial, skeleton outline of the "extract function" refactoring

[PATCH] D38982: [refactor] Initial outline of implementation of "extract function" refactoring

2017-10-24 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. arphaman marked an inline comment as done. Closed by commit rL316465: [refactor] Initial outline of implementation of "extract function" refactoring (authored by arphaman). Changed prior to commit: https://reviews.llvm.or

[PATCH] D38982: [refactor] Initial outline of implementation of "extract function" refactoring

2017-10-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Basic/DiagnosticRefactoringKinds.td:24 + "not overlap with the AST nodes of interest">; + +def err_refactor_code_outside_of_function : Error<"the selected code is not a " ioeric wrote: > nit: was this new

r316467 - Add missing clangRewrite lib dependency for clangToolingRefactor

2017-10-24 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Oct 24 10:23:53 2017 New Revision: 316467 URL: http://llvm.org/viewvc/llvm-project?rev=316467&view=rev Log: Add missing clangRewrite lib dependency for clangToolingRefactor Modified: cfe/trunk/lib/Tooling/Refactoring/CMakeLists.txt Modified: cfe/trunk/lib/Tooling/R

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D39079#905371, @tmsriram wrote: > In https://reviews.llvm.org/D39079#905353, @hfinkel wrote: > > > Noting that, as @vit9696 pointed out in https://reviews.llvm.org/D38554, > > this does not suppress uses of the PLT that occur from > > backen

[PATCH] D39218: [WebAssembly] Include libclang_rt.builtins in the standard way

2017-10-24 Thread Derek Schuff via Phabricator via cfe-commits
dschuff accepted this revision. dschuff added inline comments. This revision is now accepted and ready to land. Comment at: lib/Driver/ToolChain.cpp:318 + else +OSLibName = getOS(); llvm::sys::path::append(Path, "lib", OSLibName); sbc100 wrote: > dschuff

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Let me phrase it differently. What is this patch (and the matching backend PR) supposed to achieve? There are effectively two ways to get rid of PLT entries: (1) Bind references locally. This is effectively what -Bsymbolic does and what is breaking the ELF interposition ru

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D39079#905372, @joerg wrote: > Why again is this a good idea? It saves the direct jump to the PLT, reducing icache pressure, which is a major cost in some workloads. > This is an even worse hack than -Bsymbolic, Personally, I would like to bui

Re: [PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Sriraman Tallam via cfe-commits
On Tue, Oct 24, 2017 at 10:25 AM, Joerg Sonnenberger via Phabricator wrote: > joerg added a comment. > > Let me phrase it differently. What is this patch (and the matching backend > PR) supposed to achieve? There are effectively two ways to get rid of PLT > entries: > (1) Bind references locally

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D39079#905395, @joerg wrote: > Let me phrase it differently. What is this patch (and the matching backend > PR) supposed to achieve? There are effectively two ways to get rid of PLT > entries: > (1) Bind references locally. This is effectively w

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. > what is breaking the ELF interposition rules Frankly, in retrospect, ELF's interposition rules (or at least the defaults for those rules), seem suboptimal on several fronts. While breaking them has some unfortunate consistency implications, I don't consider breaking t

[PATCH] D39224: Moved QualTypeNames.h from Tooling to AST.

2017-10-24 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Can you remind me why `NamedDecl::printQualifiedName` is not appropriate for your needs? https://reviews.llvm.org/D39224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-24 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. Okay, LGTM. https://reviews.llvm.org/D39069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D39138: [CodeGen] Generate TBAA info for 'this' pointers

2017-10-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D39138#905184, @hfinkel wrote: > In https://reviews.llvm.org/D39138#904747, @rjmccall wrote: > > > Okay, if this is just for your own checking, I'd rather not take it. It's > > not a significant compile-time cost, but there's no reason to pa

[PATCH] D39138: [CodeGen] Generate TBAA info for 'this' pointers

2017-10-24 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D39138#905445, @rjmccall wrote: > In https://reviews.llvm.org/D39138#905184, @hfinkel wrote: > > > In https://reviews.llvm.org/D39138#904747, @rjmccall wrote: > > > > > Okay, if this is just for your own checking, I'd rather not take it. > >

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. In https://reviews.llvm.org/D39079#905396, @rnk wrote: > In https://reviews.llvm.org/D39079#905372, @joerg wrote: > > > Why again is this a good idea? > > > It saves the direct jump to the PLT, reducing icache pressure, which is a > major cost in some workloads. It also

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added a comment. In https://reviews.llvm.org/D39079#905423, @rnk wrote: > In https://reviews.llvm.org/D39079#905395, @joerg wrote: > > > Let me phrase it differently. What is this patch (and the matching backend > > PR) supposed to achieve? There are effectively two ways to get rid of P

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added a comment. In https://reviews.llvm.org/D39079#905454, @joerg wrote: > In https://reviews.llvm.org/D39079#905396, @rnk wrote: > > > In https://reviews.llvm.org/D39079#905372, @joerg wrote: > > > > > Why again is this a good idea? > > > > > > It saves the direct jump to the PLT, redu

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D39079#905454, @joerg wrote: > It also increases the pressure on the branch predictor, so it is not really > black and white. I don't understand this objection. I'm assuming that the PLT stub is an indirect jump through the PLTGOT, not a hotpat

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added a comment. In https://reviews.llvm.org/D39079#905468, @rnk wrote: > In https://reviews.llvm.org/D39079#905454, @joerg wrote: > > > It also increases the pressure on the branch predictor, so it is not really > > black and white. > > > I don't understand this objection. I'm assuming

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. You In https://reviews.llvm.org/D38985#901152, @sammccall wrote: > Hi Alex! I'm working on clangd, but am pretty new to the project, so forgive > some naive questions. > > I'm a bit unclear at a high level what the new abstractions in this patch > add, in terms of wir

[PATCH] D39064: implement __has_unique_object_representations

2017-10-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 120106. erichkeane added a comment. Based on @rnk s comments, I discovered that base-class handling is more difficult than I suspected! I added a couple more tests and am properly handling base classes. https://reviews.llvm.org/D39064 Files: include

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. In https://reviews.llvm.org/D39079#905468, @rnk wrote: > In https://reviews.llvm.org/D39079#905454, @joerg wrote: > > > It also increases the pressure on the branch predictor, so it is not really > > black and white. > > > I don't understand this objection. I'm assuming th

[PATCH] D39220: [Analyzer] Store BodyFarm in std::unique_ptr

2017-10-24 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 120109. https://reviews.llvm.org/D39220 Files: include/clang/Analysis/AnalysisDeclContext.h lib/Analysis/AnalysisDeclContext.cpp Index: lib/Analysis/AnalysisDeclContext.cpp === ---

[PATCH] D39251: [libunwind] Fix building for ARM with dwarf exception handling

2017-10-24 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added subscribers: kristof.beyls, aprantl, aemerson. The previous definition of _LIBUNWIND_HIGHEST_DWARF_REGISTER seems to be a copy of the ARM64 value (introduced in SVN r276128); since the code actually hasn't compiled properly for arm in dwarf mode befor

[PATCH] D39218: [WebAssembly] Include libclang_rt.builtins in the standard way

2017-10-24 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 120111. sbc100 added a comment. - remove debugging - git squash commit for startup_libs. - update test expectations https://reviews.llvm.org/D39218 Files: lib/Driver/ToolChain.cpp lib/Driver/ToolChains/CommonArgs.cpp lib/Driver/ToolChains/WebAssembly.c

r316484 - CodeGen: Fix missing debug loc due to alloca

2017-10-24 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Oct 24 12:14:43 2017 New Revision: 316484 URL: http://llvm.org/viewvc/llvm-project?rev=316484&view=rev Log: CodeGen: Fix missing debug loc due to alloca Builder save/restores insertion pointer when emitting addr space cast for alloca, but does not save/restore debug loc,

[PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-24 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316484: CodeGen: Fix missing debug loc due to alloca (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D39069?vs=120076&id=120115#toc Repository: rL LLVM https://reviews.llvm.o

[PATCH] D39064: implement __has_unique_object_representations

2017-10-24 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/AST/Type.cpp:2212-2213 +for (const auto Base : ClassDecl->bases()) { + if (Base.isVirtual()) +return false; + OK, I guess vbases don't have a unique representation. :) What about vtable slots? Should we

[PATCH] D34158: For Linux/gnu compatibility, preinclude if the file is available

2017-10-24 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. I'd still _very_ much like a solution that is acceptable for all libc to use, and have that on by default. However, I guess this is fine. Only concern I have is that it seems odd that so many test-cases needed to be changed. What fails without those test changes? ht

r316488 - [OPENMP] Fix PR35013: Fix passing VLAs captures to outlined functions.

2017-10-24 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Oct 24 12:52:31 2017 New Revision: 316488 URL: http://llvm.org/viewvc/llvm-project?rev=316488&view=rev Log: [OPENMP] Fix PR35013: Fix passing VLAs captures to outlined functions. Fixed passing of VLAs and variably-modified types to outlined functions. Synchronized passin

[PATCH] D39220: [Analyzer] Store BodyFarm in std::unique_ptr

2017-10-24 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray accepted this revision. lichray added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D39220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D34158: For Linux/gnu compatibility, preinclude if the file is available

2017-10-24 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. In https://reviews.llvm.org/D34158#905596, @jyknight wrote: > I'd still _very_ much like a solution that is acceptable for all libc to use, > and have that on by default. > > However, I guess this is fine. > > Only concern I have is that it seems odd that so many test-ca

[PATCH] D39239: [AST] Incorrectly qualified unscoped enumeration as template actual parameter.

2017-10-24 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. Have you tried this change against the GDB and LLDB test suites? If they have failures then we should think about whether those tests are over-specific or whether we should put this under a tuning option. https://reviews.llvm.org/D39239 __

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 120128. arphaman added a comment. Avoid using a separate EditorCommand class. Repository: rL LLVM https://reviews.llvm.org/D38985 Files: include/clang/Tooling/Refactoring/RefactoringActionRule.h include/clang/Tooling/Refactoring/RefactoringActionRul

[PATCH] D39217: [libclang, bindings]: add spelling location

2017-10-24 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn added inline comments. Comment at: test/Index/annotate-tokens.c:226 // CHECK-RANGE2: Punctuation: "." [55:5 - 55:6] UnexposedExpr= -// CHECK-RANGE2: Identifier: "z" [55:6 - 55:7] MemberRef=z:52:1 +// CHECK-RANGE2: Identifier: "z" [55:6 - 55:7] MemberRef=z:41:9 // CHECK-

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 120129. arphaman marked an inline comment as done. arphaman added a comment. Fix comment nit. Repository: rL LLVM https://reviews.llvm.org/D38985 Files: include/clang/Tooling/Refactoring/RefactoringActionRule.h include/clang/Tooling/Refactoring/Refa

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-24 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added a comment. In https://reviews.llvm.org/D39079#905519, @joerg wrote: > In https://reviews.llvm.org/D39079#905468, @rnk wrote: > > > In https://reviews.llvm.org/D39079#905454, @joerg wrote: > > > > > It also increases the pressure on the branch predictor, so it is not > > > really b

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Tooling/Refactoring/RefactoringActionRule.h:58 + /// Returns the editor command that's was bound to this rule. + virtual const EditorCommand *getEditorCommand() { return nullptr; } }; ioeric wrote: > ar

[PATCH] D39064: implement __has_unique_object_representations

2017-10-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/AST/Type.cpp:2212-2213 +for (const auto Base : ClassDecl->bases()) { + if (Base.isVirtual()) +return false; + rnk wrote: > OK, I guess vbases don't have a unique representation. :) What about vtab

[PATCH] D39064: implement __has_unique_object_representations

2017-10-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 120132. erichkeane added a comment. Adding tests for excluding dynamic types. https://reviews.llvm.org/D39064 Files: include/clang/AST/Type.h include/clang/Basic/TokenKinds.def include/clang/Basic/TypeTraits.h lib/AST/Type.cpp lib/Parse/ParseEx

[PATCH] D36952: [libclang] Add support for checking abstractness of records

2017-10-24 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn added a comment. ping :) https://reviews.llvm.org/D36952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35181: Defer addition of keywords to identifier table when loading AST

2017-10-24 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn added a comment. ping :) https://reviews.llvm.org/D35181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r316500 - [Sema] Document+test the -Wsign-compare change for enums in C code [NFC]

2017-10-24 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Tue Oct 24 14:05:43 2017 New Revision: 316500 URL: http://llvm.org/viewvc/llvm-project?rev=316500&view=rev Log: [Sema] Document+test the -Wsign-compare change for enums in C code [NFC] rL316268 / D39122 has fixed PR35009, and now when in C, these three(?) diagnostics prope

  1   2   >