[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-29 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: llvm/test/Transforms/ThinLTOBitcodeWriter/new-pm.ll:1 +; RUN: opt -passes='lto' -debug-pass-manager -thinlto-bc -thin-link-bitcode-file=%t2 -o %t %s 2>&1 | FileCheck %s --check-prefix=DEBUG_PM +; RUN: llvm-bcanalyzer -dump %t2 | FileChe

r304190 - Diagnose attempts to build a preprocessed module that defines an unavailable submodule.

2017-05-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue May 30 00:22:59 2017 New Revision: 304190 URL: http://llvm.org/viewvc/llvm-project?rev=304190&view=rev Log: Diagnose attempts to build a preprocessed module that defines an unavailable submodule. The errors we would otherwise get are incomprehensible, as we would enter t

r304188 - [trivial] fix a typo in comment, NFC

2017-05-29 Thread Hiroshi Inoue via cfe-commits
Author: inouehrs Date: Tue May 30 00:06:46 2017 New Revision: 304188 URL: http://llvm.org/viewvc/llvm-project?rev=304188&view=rev Log: [trivial] fix a typo in comment, NFC Modified: cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp Modified: cfe/trunk/lib/Frontend/SerializedDiagnosticPr

[PATCH] D33663: CGCleanup: Use correct insertion point for AllocaInst

2017-05-29 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov created this revision. This is a follow up for the https://reviews.llvm.org/rL297084 which made sure that dominance is preserved during expression cleanup emission. We ran into a case where dominance fixup code was inserting the store in the middle of allocas. %x = alloca i32, ali

r304183 - [modules] When we #include a local submodule header that we've already built,

2017-05-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon May 29 21:03:19 2017 New Revision: 304183 URL: http://llvm.org/viewvc/llvm-project?rev=304183&view=rev Log: [modules] When we #include a local submodule header that we've already built, and it has an include guard, produce callbacks for a module import, not for a skipped n

[PATCH] D32411: [libcxx] Provide #include_next alternative for MSVC

2017-05-29 Thread Ben Craig via Phabricator via cfe-commits
bcraig updated this revision to Diff 100650. bcraig edited the summary of this revision. https://reviews.llvm.org/D32411 Files: CMakeLists.txt docs/DesignDocs/IncludeNextEmulation.rst include/__config include/__config_site.in include/complex.h include/cstddef include/ctype.h inclu

[PATCH] D33661: [Sema][ObjC] Don't emit availability diagnostics for categories extending unavailable interfaces

2017-05-29 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. Previously, @implementations of categories that extended unavailable/deprecated/partial @interfaces triggered availability diagnostics. There was no way to turn this off, as we check the use of the unavailable decl outside of the context of the @implementa

[PATCH] D33082: Fix Libc++ build with MinGW64

2017-05-29 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai accepted this revision. smeenai added a comment. LGTM. Thanks for all the revisions! https://reviews.llvm.org/D33082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r303934 - "*" => "+" to avoid matching on empty string.

2017-05-29 Thread Richard Trieu via cfe-commits
On some Windows bots, multiple back slashes are used as a single path separator so the path looks like: build_dirbinclang PREFIX_DIR would match "build_dirbin\\", the path separator matches "\", then the directory would match the empty string, and the final path separator would match

[PATCH] D33563: Track whether a unary operation can overflow

2017-05-29 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:9 +VK_LValue, OK_Ordinary, Loc, true); // Construct the loop that copies all elements of this array. Can we pass false here if we know the array size is not too larg

[libcxx] r304180 - Add missing 'requires coroutines' to module map

2017-05-29 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon May 29 18:17:28 2017 New Revision: 304180 URL: http://llvm.org/viewvc/llvm-project?rev=304180&view=rev Log: Add missing 'requires coroutines' to module map Modified: libcxx/trunk/include/module.modulemap Modified: libcxx/trunk/include/module.modulemap URL: http://ll

Re: r303714 - [coroutines] Fix leak in CGCoroutine.cpp

2017-05-29 Thread David Blaikie via cfe-commits
Fair enough. I don't have all the context there either. Perhaps Richard Smith could sanity check what the right memory management scheme is here. On Mon, May 29, 2017 at 3:54 PM Gor Nishanov wrote: > My clang-foo is not strong enough :) . > > I wanted to make sure that: "CurCoro.Data->FinalJD =

Re: r303714 - [coroutines] Fix leak in CGCoroutine.cpp

2017-05-29 Thread Gor Nishanov via cfe-commits
My clang-foo is not strong enough :) . I wanted to make sure that: "CurCoro.Data->FinalJD = getJumpDestInCurrentScope(FinalBB);" is in the correct scope where I want it. As opposed to creating it in whatever scope co_return statement is encountered. But that could be simply my misundersanding of t

Re: r303714 - [coroutines] Fix leak in CGCoroutine.cpp

2017-05-29 Thread David Blaikie via cfe-commits
On Mon, May 29, 2017 at 2:12 PM Gor Nishanov wrote: > It is not known in advance whether the final block is needed or not. It > will become known once the user-authored body of the coroutine is emitted. > I cannot defer creation of it up until that point, since final bb acts as a > jump target fo

[PATCH] D33526: Fix spurious Wunused-lambda-capture warning

2017-05-29 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaLambda.cpp:1524-1526 + if (!CurContext->isDependentContext() && !IsImplicit) +if ((IsGenericLambda && !From.isNonODRUsed()) || +(!IsGenericLambda && !From.isODRUsed())) kongyi wrote

[PATCH] D33660: [coroutines] Fix assertion during -Wuninitialized analysis

2017-05-29 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. @rsmith Is there a better place to put this test? https://reviews.llvm.org/D33660 Files: lib/Sema/SemaCoroutine.cpp test/SemaCXX/coreturn.cpp test/SemaCXX/coroutine-uninitialized-warning-crash.cpp Index: test/SemaCXX/coroutine-uninitialized-warning-crash.cp

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-05-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Yep, fixed indeed. https://reviews.llvm.org/D30909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-05-29 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 100641. Prazek added a comment. changed assert https://reviews.llvm.org/D33437 Files: include/clang/AST/VTableBuilder.h lib/CodeGen/CGVTables.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/ItaniumCXXABI.cpp lib/CodeGen/

r304176 - CGCoroutine.cpp: (NFC) clang-format misplaced brace

2017-05-29 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon May 29 16:15:31 2017 New Revision: 304176 URL: http://llvm.org/viewvc/llvm-project?rev=304176&view=rev Log: CGCoroutine.cpp: (NFC) clang-format misplaced brace Modified: cfe/trunk/lib/CodeGen/CGCoroutine.cpp Modified: cfe/trunk/lib/CodeGen/CGCoroutine.cpp URL:

Re: r303714 - [coroutines] Fix leak in CGCoroutine.cpp

2017-05-29 Thread Gor Nishanov via cfe-commits
It is not known in advance whether the final block is needed or not. It will become known once the user-authored body of the coroutine is emitted. I cannot defer creation of it up until that point, since final bb acts as a jump target for co_returns which could be in the user authored body and I ne

[PATCH] D33659: Extend DynamicLibrary class to be usable without loading permanently.

2017-05-29 Thread Frederich Munch via Phabricator via cfe-commits
marsupial created this revision. https://reviews.llvm.org/D33659 Files: lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp Index: lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp === --- lib/StaticAnalyzer/Frontend/CheckerReg

[libcxx] r304173 - Fix in C++03

2017-05-29 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon May 29 14:46:16 2017 New Revision: 304173 URL: http://llvm.org/viewvc/llvm-project?rev=304173&view=rev Log: Fix in C++03 Modified: libcxx/trunk/include/experimental/coroutine Modified: libcxx/trunk/include/experimental/coroutine URL: http://llvm.org/viewvc/llvm-pro

[libcxx] r304172 - [coroutines] Make coroutine_handle::from_address ill-formed for everything but void*.

2017-05-29 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon May 29 14:24:25 2017 New Revision: 304172 URL: http://llvm.org/viewvc/llvm-project?rev=304172&view=rev Log: [coroutines] Make coroutine_handle::from_address ill-formed for everything but void*. from_address requires that the provided pointer refer to the suspended corou

Re: r303714 - [coroutines] Fix leak in CGCoroutine.cpp

2017-05-29 Thread David Blaikie via cfe-commits
Could you avoid creating the FinalBB unless it's needed rather than creating it and then adding it so it can be removed? (or, if the creation can't be avoided, maybe it's OK to 'delete FinalBB' here, rather than adding it for it to be removed later?) (also bracing seems off - could you run your ch

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-05-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. We've broken something: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/5288/steps/check-clang%20asan/logs/stdio I hope i fixed it in https://reviews.llvm.org/rL304170. https://reviews.llvm.org/D30909 ___

r304170 - [analyzer] Fix immutable map factory lifetime for partial taint.

2017-05-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon May 29 13:54:02 2017 New Revision: 304170 URL: http://llvm.org/viewvc/llvm-project?rev=304170&view=rev Log: [analyzer] Fix immutable map factory lifetime for partial taint. This should fix the leaks found by asan buildbot in r304162. Also don't store a reference to th

Re: r303934 - "*" => "+" to avoid matching on empty string.

2017-05-29 Thread David Blaikie via cfe-commits
Why would matching on an empty string be bad in this case? On Thu, May 25, 2017 at 4:25 PM Richard Trieu via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rtrieu > Date: Thu May 25 18:25:36 2017 > New Revision: 303934 > > URL: http://llvm.org/viewvc/llvm-project?rev=303934&view=rev >

Re: r304127 - IRGen: Add optnone attribute on function during O0

2017-05-29 Thread David Blaikie via cfe-commits
I'm assuming most of these tests aren't actually testing for attributes - perhaps it'd be better to remove their dependence on a particular attribute list number so future changes to attributes don't require so many touches? On Sun, May 28, 2017 at 10:38 PM Mehdi Amini via cfe-commits < cfe-commi

r304167 - Unbreak long test after r304127.

2017-05-29 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon May 29 13:11:11 2017 New Revision: 304167 URL: http://llvm.org/viewvc/llvm-project?rev=304167&view=rev Log: Unbreak long test after r304127. Modified: cfe/trunk/test/CodeGen/arm_neon_intrinsics.c Modified: cfe/trunk/test/CodeGen/arm_neon_intrinsics.c URL: http://llvm.o

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-05-29 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:1383-1385 + if (!OpportunisticVTables.empty()) +assert(shouldOpportunisticallyEmitVTables() && + "Only emit opportunistic vtables with optimizations"); Perhaps this: assert

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-05-29 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 100623. Prazek marked an inline comment as done. Prazek added a comment. - Final changes https://reviews.llvm.org/D33437 Files: include/clang/AST/VTableBuilder.h lib/CodeGen/CGVTables.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h li

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-05-29 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked 4 inline comments as done. Prazek added inline comments. Comment at: include/clang/AST/VTableBuilder.h:160 + "GlobalDecl can be created only from virtual function"); +if (getKind() == CK_FunctionPointer) + return GlobalDecl(getFunctionDecl()); ---

[PATCH] D33305: [ubsan] Add a check for pointer overflow UB

2017-05-29 Thread Will Dietz via Phabricator via cfe-commits
dtzWill added a comment. LGTM! I've built quite a bit with this (ground-up Linux distribution) which attests to it being fairly robust (no crashing or new errors not experienced with unpatched clang) and the bugs found so far are all true positives (few of which were caught and reported last t

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-05-29 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked an inline comment as done. Prazek added inline comments. Comment at: include/clang/AST/VTableBuilder.h:169 + return GlobalDecl(DtorDecl, CXXDtorType::Dtor_Deleting); +default: + llvm_unreachable("Only function pointers kinds"); rjmccal

[PATCH] D31830: Emit invariant.group.barrier when using union field

2017-05-29 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 100621. Prazek added a comment. Add test https://reviews.llvm.org/D31830 Files: lib/CodeGen/CGExpr.cpp test/CodeGenCXX/strict-vtable-pointers.cpp Index: test/CodeGenCXX/strict-vtable-pointers.cpp =

[PATCH] D33648: [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element

2017-05-29 Thread Ulrich Weigand via Phabricator via cfe-commits
uweigand accepted this revision. uweigand added a comment. This revision is now accepted and ready to land. Yes, this works for me now. Thanks! https://reviews.llvm.org/D33648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-05-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ closed this revision. NoQ added a comment. Uhm, messed up the phabricator link in https://reviews.llvm.org/rL304162, which should have been pointing here but points to https://reviews.llvm.org/D28445 instead. https://reviews.llvm.org/D30909 __

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-05-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Uhm, messed up the phabricator link in https://reviews.llvm.org/rL304162, which should have been pointing to https://reviews.llvm.org/D30909 but points here instead. Repository: rL LLVM https://reviews.llvm.org/D28445 ___ c

r304162 - [analyzer] Support partially tainted records.

2017-05-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon May 29 10:42:56 2017 New Revision: 304162 URL: http://llvm.org/viewvc/llvm-project?rev=304162&view=rev Log: [analyzer] Support partially tainted records. The analyzer's taint analysis can now reason about structures or arrays originating from taint sources in which onl

[PATCH] D32592: [Analyzer] Iterator Checker - Part 1: Minimal Checker for a Simple Test Case

2017-05-29 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304160: [analyzer] Initial commit for the upcoming refactoring of the IteratorChecker. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D32592?vs=100239&id=100616#toc Reposito

r304160 - [analyzer] Initial commit for the upcoming refactoring of the IteratorChecker.

2017-05-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon May 29 10:03:20 2017 New Revision: 304160 URL: http://llvm.org/viewvc/llvm-project?rev=304160&view=rev Log: [analyzer] Initial commit for the upcoming refactoring of the IteratorChecker. The new checker currently contains the very core infrastructure for tracking the s

[PATCH] D32449: Modifying PthreadLockChecker.cpp to reduce false positives.

2017-05-29 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304159: [analyzer] PthreadLockChecker: model failed pthread_mutex_destroy() calls. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D32449?vs=99970&id=100615#toc Repository:

r304159 - [analyzer] PthreadLockChecker: model failed pthread_mutex_destroy() calls.

2017-05-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon May 29 09:51:39 2017 New Revision: 304159 URL: http://llvm.org/viewvc/llvm-project?rev=304159&view=rev Log: [analyzer] PthreadLockChecker: model failed pthread_mutex_destroy() calls. pthread_mutex_destroy() may fail, returning a non-zero error number, and keeping the m

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-05-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. I'll land this. Thanks again for working on all that stuff! https://reviews.llvm.org/D30909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang-tools-extra] r304154 - [clang-tidy] Use getLocalOrGlobal for the StrictMode option

2017-05-29 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon May 29 08:59:27 2017 New Revision: 304154 URL: http://llvm.org/viewvc/llvm-project?rev=304154&view=rev Log: [clang-tidy] Use getLocalOrGlobal for the StrictMode option Modified: clang-tools-extra/trunk/clang-tidy/misc/SuspiciousEnumUsageCheck.cpp clang-tools-extr

[PATCH] D33648: [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element

2017-05-29 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. This is the fix for patch https://reviews.llvm.org/D33353 @uweigand, could you please verify that everything will be good on SystemZ? I added triple spir-unknown-unknown. Thank you in advance! https://reviews.llvm.org/D33648 Fil

[PATCH] D33531: Clang-tidy readability: avoid const value return

2017-05-29 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. > Would it make sense to silence this diagnostic in the presence of also > checking for cert-dcl21-cpp for such operators? Currently there's no mechanism in clang-tidy to express dependencies or compatibility issues between checks. Moreover, we already have checks that a

[PATCH] D33365: [clang-tidy] misc-assertion-count: A New Check

2017-05-29 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I will obviously try to add lambda handling, but until then, the general idea and design should be pretty much done, so i'd love to hear any feedback about the current diff :) Repository: rL LLVM https://reviews.llvm.org/D33365

[PATCH] D33645: [analyzer] Add missing documentation for static analyzer checkers

2017-05-29 Thread Dominik Szabó via Phabricator via cfe-commits
szdominik created this revision. Some checks did not have documentation in the www/analyzer/ folder, and also some alpha checks became non-alpha. https://reviews.llvm.org/D33645 Files: www/analyzer/alpha_checks.html www/analyzer/available_checks.html www/analyzer/implicit_checks.html In

[PATCH] D33644: Add default values for function parameter chunks

2017-05-29 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan created this revision. Append optional chunks with their default values. For example: before - "int i", after - "int i = 10". This change affects only simple types. https://reviews.llvm.org/D33644 Files: lib/Sema/SemaCodeComplete.cpp Index: lib/Sema/SemaCodeComplete.cpp =

[PATCH] D33493: Speed up preamble loading, reduce global completion cache calls

2017-05-29 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 100605. yvvan added a comment. diff with -U https://reviews.llvm.org/D33493 Files: include/clang/Frontend/ASTUnit.h lib/Frontend/ASTUnit.cpp Index: lib/Frontend/ASTUnit.cpp === --- lib/

[PATCH] D33353: [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element

2017-05-29 Thread Ulrich Weigand via Phabricator via cfe-commits
uweigand added a comment. The problem is that the new test case you added does not contain a -triple argument in the compile command. This means that the compile targets the native architecture on the build system, whatever this is. Since OpenCL support on different architectures may be diffe

[PATCH] D32592: [Analyzer] Iterator Checker - Part 1: Minimal Checker for a Simple Test Case

2017-05-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. I believe we can move on to the next one :) Just hope we didn't screw up the rebase too much here. Thanks again! https://reviews.llvm.org/D32592 ___ c

[PATCH] D32449: Modifying PthreadLockChecker.cpp to reduce false positives.

2017-05-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. I'd commit your patch without the .gitignore change, as it deserves a separate commit and more attention; will have a look at it myself - llvm's and clang's .gitignores have diverged quite a bit. T

[PATCH] D33353: [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element

2017-05-29 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added a comment. Hi all, I tried to reproduce this problem but I'm not able to do it... I tried to do it in two different ways: 1. I tried to build llvm by the following steps: 1.1. Checkout llvm and clang: svn co https://echur...@llvm.org/svn/llvm-project/llvm/trunk llvm svn co h

r304134 - [OpenCL] Test on half immediate support.

2017-05-29 Thread Egor Churaev via cfe-commits
Author: echuraev Date: Mon May 29 02:44:22 2017 New Revision: 304134 URL: http://llvm.org/viewvc/llvm-project?rev=304134&view=rev Log: [OpenCL] Test on half immediate support. Reviewers: Anastasia Reviewed By: Anastasia Subscribers: yaxunl, cfe-commits, bader Differential Revision: https://rev

[PATCH] D33531: Clang-tidy readability: avoid const value return

2017-05-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm not opposed to this check, but I'm not keen on having a check that directly contradicts the output from another check. The `cert-dcl21-cpp` check will diagnose user's code when a postfix operator ++ or -- is *not* const-qualified. Would it make sense to silenc

[PATCH] D33531: Clang-tidy readability: avoid const value return

2017-05-29 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:27 + // skip those too. + Finder->addMatcher(functionDecl(returns(qualType( +isConstQualified(), How about just matching definitions to avoid duplicate warnings?

[PATCH] D33531: Clang-tidy readability: avoid const value return

2017-05-29 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. > The check ignores returns of const pointers (meaning * const, not const *); > while pointless, these are not particularly harmful. It could be made laxer > by ignoring all trivially copyable types (on the grounds that they won't have > interesting move constructors/ass

[PATCH] D33042: [libclang] Allow to suspend a translation unit.

2017-05-29 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. I'm new to this review tool. I've addressed the comments and rebased. Does this needs a re-review? Note that this is my first change and I probably do not have any permissions to submit this change. https://reviews.llvm.org/D33042 ___

r304141 - clang-format: [JS] do not clean up duplicated commas.

2017-05-29 Thread Martin Probst via cfe-commits
Author: mprobst Date: Mon May 29 03:41:11 2017 New Revision: 304141 URL: http://llvm.org/viewvc/llvm-project?rev=304141&view=rev Log: clang-format: [JS] do not clean up duplicated commas. Summary: In JavaScript, duplicated commas have semantic meaning. x = [a,,b]; The statement above creates

[PATCH] D33416: [clangd] Allow to use vfs::FileSystem for file accesses.

2017-05-29 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for fixing the failures. Sorry for not being around to look into that myself. Comment at: clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp:123 + TmpDirs.push_back(TmpDir1.str()); + if (TmpDir2 != TmpDir2) +TmpDirs.push_back(T

[PATCH] D33640: clang-format: [JS] fix indenting bound functions.

2017-05-29 Thread Martin Probst via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304135: clang-format: [JS] fix indenting bound functions. (authored by mprobst). Changed prior to commit: https://reviews.llvm.org/D33640?vs=100589&id=100591#toc Repository: rL LLVM https://reviews.

r304135 - clang-format: [JS] fix indenting bound functions.

2017-05-29 Thread Martin Probst via cfe-commits
Author: mprobst Date: Mon May 29 02:50:52 2017 New Revision: 304135 URL: http://llvm.org/viewvc/llvm-project?rev=304135&view=rev Log: clang-format: [JS] fix indenting bound functions. Summary: The previous fix to force build style wrapping if the previous token is a closing parenthesis broke a p

[PATCH] D33640: clang-format: [JS] fix indenting bound functions.

2017-05-29 Thread Martin Probst via Phabricator via cfe-commits
mprobst updated this revision to Diff 100589. mprobst added a comment. - fix comment https://reviews.llvm.org/D33640 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestJS.cpp Index: unittests/Format/FormatTestJS.cpp ==

[PATCH] D33640: clang-format: [JS] fix indenting bound functions.

2017-05-29 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added inline comments. This revision is now accepted and ready to land. Comment at: lib/Format/ContinuationIndenter.cpp:210 // FIXME: We should find a more generic solution to this problem. - !(State.Column <= NewLineColumn && P

[PATCH] D33640: clang-format: [JS] fix indenting bound functions.

2017-05-29 Thread Martin Probst via Phabricator via cfe-commits
mprobst updated this revision to Diff 100588. mprobst added a comment. - fix comment https://reviews.llvm.org/D33640 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestJS.cpp Index: unittests/Format/FormatTestJS.cpp ==

[PATCH] D33640: clang-format: [JS] fix indenting bound functions.

2017-05-29 Thread Martin Probst via Phabricator via cfe-commits
mprobst created this revision. Herald added a subscriber: klimek. The previous fix to force build style wrapping if the previous token is a closing parenthesis broke a peculiar pattern where users parenthesize the function declaration in a bind call: fn((function() { ... }).bind(this)); This