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

2017-10-30 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 120894. Nebiroth added a comment. Code hover now displays declaration of symbol instead of source code by default. Code hover now displays context information such as namespace and class name. Array of MarkedString objects is now sent as response in JSON. h

[PATCH] D39269: [Analyzer] [Tests] Do not discard output from CmpRuns.py when running integration tests

2017-10-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @zaks.anna prints "XXX added / XXX removed" for every report which has appeared or disappeared. https://reviews.llvm.org/D39269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-10-30 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 120890. lebedev.ri marked 2 inline comments as done. lebedev.ri added a comment. Ping. Rebased. Silenced (via the `-w` flag in the `RUN` line) the `Fix conflicts with existing fix!` assertion since this differential does not actually cause it, but the te

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

2017-10-30 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. I also have a quick patch that supports displaying comments preceding the declaration of a function. Once the review comments have been addressed for this revision I will submit it. https://reviews.llvm.org/D35894 ___ cfe

Re: r315402 - [modules] Only take visible using-directives into account during name lookup.

2017-10-30 Thread Vassil Vassilev via cfe-commits
On 11/10/17 03:19, Richard Smith via cfe-commits wrote: Author: rsmith Date: Tue Oct 10 18:19:11 2017 New Revision: 315402 URL: http://llvm.org/viewvc/llvm-project?rev=315402&view=rev Log: [modules] Only take visible using-directives into account during name lookup. Added: cfe/trunk/test/M

r316963 - [analyzer] Use the same filename for the header and the implementation of BugReporterVisitor

2017-10-30 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Oct 30 15:31:57 2017 New Revision: 316963 URL: http://llvm.org/viewvc/llvm-project?rev=316963&view=rev Log: [analyzer] Use the same filename for the header and the implementation of BugReporterVisitor Differential Revision: https://reviews.llvm.org/D37935 Adde

[PATCH] D39430: [clangd] formatting: don't ignore style

2017-10-30 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. For testing you could do something similar to how clang-format does it . https://reviews.llvm.org/D39430 ___ cfe-commits mailing list

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

2017-10-30 Thread Sanjay Patel via Phabricator via cfe-commits
spatel updated this revision to Diff 120902. spatel added a comment. Patch updated: As suggested, I've morphed this patch to just handle sqrt libcalls based on the updated LLVM intrinsic definition. I was going to include the builtins too, but that exposes another bug (marked here with FIXME) -

r316965 - [modules] Retain multiple using-directives in the same scope even if they name the same namespace.

2017-10-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Oct 30 15:38:20 2017 New Revision: 316965 URL: http://llvm.org/viewvc/llvm-project?rev=316965&view=rev Log: [modules] Retain multiple using-directives in the same scope even if they name the same namespace. They might have different visibility, and thus discarding all bu

Re: r315402 - [modules] Only take visible using-directives into account during name lookup.

2017-10-30 Thread Richard Smith via cfe-commits
On 30 October 2017 at 15:12, Vassil Vassilev via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On 11/10/17 03:19, Richard Smith via cfe-commits wrote: > >> Author: rsmith >> Date: Tue Oct 10 18:19:11 2017 >> New Revision: 315402 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=315402&view=r

Re: r316965 - [modules] Retain multiple using-directives in the same scope even if they name the same namespace.

2017-10-30 Thread Richard Smith via cfe-commits
I should add: the test is courtesy of Vassil Vassilev. Thanks! On 30 October 2017 at 15:38, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rsmith > Date: Mon Oct 30 15:38:20 2017 > New Revision: 316965 > > URL: http://llvm.org/viewvc/llvm-project?rev=316965&view=rev

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-10-30 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. Herald added subscribers: szepet, xazax.hun. This diff extends StackAddrEscapeChecker to catch stack addr leaks via block captures if the block is executed asynchronously. Test plan: make check-all Repository: rL LLVM https://reviews.llvm.org/D39438 Files:

Re: r315402 - [modules] Only take visible using-directives into account during name lookup.

2017-10-30 Thread Vassil Vassilev via cfe-commits
On 30/10/17 23:40, Richard Smith wrote: On 30 October 2017 at 15:12, Vassil Vassilev via cfe-commits mailto:cfe-commits@lists.llvm.org>> wrote: On 11/10/17 03:19, Richard Smith via cfe-commits wrote: Author: rsmith Date: Tue Oct 10 18:19:11 2017 New Revision: 315402

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-10-30 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 120908. alexshap added a comment. Add positive tests Repository: rL LLVM https://reviews.llvm.org/D39438 Files: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp test/Analysis/stack-async-leak.m Index: test/Analysis/stack-async-leak.m

r316966 - Typo correct the condition of 'do-while' before exiting its scope

2017-10-30 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Oct 30 15:55:11 2017 New Revision: 316966 URL: http://llvm.org/viewvc/llvm-project?rev=316966&view=rev Log: Typo correct the condition of 'do-while' before exiting its scope rdar://35172419 Modified: cfe/trunk/lib/Parse/ParseStmt.cpp cfe/trunk/test/SemaObjCXX/t

[PATCH] D39284: [c++2a] Decomposed _condition_

2017-10-30 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 120913. lichray added a comment. Make the feature unconditional with an `ExtWarn` https://reviews.llvm.org/D39284 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/DeclSpec.h lib/Parse/ParseExprCXX.cpp lib/Sema/SemaDeclCXX.cpp t

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-10-30 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray marked 3 inline comments as done. lichray added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:696-698 + // a for-range-declaration, or a condition in C++2a, but we parse it in more + // cases than that. + if (!D.mayHaveDecompositionDeclarator(getLangOpts())) {

[libcxx] r316969 - Add a fail test for aligned_union of an incomplete type. See LWG#2979. NFC

2017-10-30 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Oct 30 17:05:17 2017 New Revision: 316969 URL: http://llvm.org/viewvc/llvm-project?rev=316969&view=rev Log: Add a fail test for aligned_union of an incomplete type. See LWG#2979. NFC Added: libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_un

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-10-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:696-698 + // a for-range-declaration, or a condition in C++2a, but we parse it in more + // cases than that. + if (!D.mayHaveDecompositionDeclarator(getLangOpts())) { lichray wrote: > rsmith wr

[libcxx] r316970 - Fix broken links; update more issues.

2017-10-30 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Oct 30 17:19:47 2017 New Revision: 316970 URL: http://llvm.org/viewvc/llvm-project?rev=316970&view=rev Log: Fix broken links; update more issues. Modified: libcxx/trunk/www/upcoming_meeting.html Modified: libcxx/trunk/www/upcoming_meeting.html URL: http://llvm.or

[PATCH] D39396: Fix for PR33930. Short-circuit metadata mapping when cloning a varargs thunk.

2017-10-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl accepted this revision. aprantl added a comment. This revision is now accepted and ready to land. This works for me, but as I said previously, perhaps we can get by with just not having any variables described in the thunk to further simplify the code. https://reviews.llvm.org/D39396

[PATCH] D39396: Fix for PR33930. Short-circuit metadata mapping when cloning a varargs thunk.

2017-10-30 Thread Wolfgang Pieb via Phabricator via cfe-commits
wolfgangp updated this revision to Diff 120876. wolfgangp added a comment. Incorporated review comments. https://reviews.llvm.org/D39396 Files: include/llvm/IR/Metadata.h lib/CodeGen/CGVTables.cpp test/CodeGenCXX/tmp-md-nodes1.cpp test/CodeGenCXX/tmp-md-nodes2.cpp Index: test/CodeGenCX

[PATCH] D39396: Fix for PR33930. Short-circuit metadata mapping when cloning a varargs thunk.

2017-10-30 Thread Wolfgang Pieb via Phabricator via cfe-commits
wolfgangp marked 5 inline comments as done. wolfgangp added inline comments. Comment at: lib/CodeGen/CGVTables.cpp:143 + for (llvm::Function::iterator BB = Fn->begin(), E = Fn->end(); BB != E; + ++BB) { +for (llvm::Instruction &I : *BB) { aprantl wrote

[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-10-30 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. I thought on something like this, but I still do not like my phrasing: "Addition operator is applied to the argument of strlen(). instead of its result; move the '+ 1' outside of the call. (Or, if it is intentional then surround the addition subexpression wit

[PATCH] D39422: [analyzer] pr34779: CStringChecker: Don't get crashed by non-standard standard library function definitions.

2017-10-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/string-with-signedness.c:1 +// RUN: %clang_analyze_cc1 -Wno-incompatible-library-redeclaration -analyzer-checker=core,unix.cstring,alpha.unix.cstring -verify %s + We do have a warning for this. https://revie

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

2017-10-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > I was going to include the builtins too, but that exposes another bug (marked > here with FIXME) - the builtins are all defined 'const'. Probably just need to change c->e in Builtins.def? > This does make me curious about the use-case of libm-equivalent builtins. If

[PATCH] D39396: Fix for PR33930. Short-circuit metadata mapping when cloning a varargs thunk.

2017-10-30 Thread Wolfgang Pieb via Phabricator via cfe-commits
wolfgangp marked an inline comment as done. wolfgangp added a comment. In https://reviews.llvm.org/D39396#911306, @aprantl wrote: > This works for me, but as I said previously, perhaps we can get by with just > not having any variables described in the thunk to further simplify the code. I rem

r316971 - [refactor] select the entire DeclStmt if one ifs decls is selected

2017-10-30 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Oct 30 18:28:17 2017 New Revision: 316971 URL: http://llvm.org/viewvc/llvm-project?rev=316971&view=rev Log: [refactor] select the entire DeclStmt if one ifs decls is selected Modified: cfe/trunk/lib/Tooling/Refactoring/ASTSelection.cpp cfe/trunk/unittests/Toolin

[PATCH] D39441: [refactor][extract] insert semicolons into extracted/inserted code when needed

2017-10-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Herald added a subscriber: mgorny. This patch implements the semicolon insertion logic into the extract refactoring. The following rules are taken: - extracting expression: add terminating ';' to the extracted function. - extracting statements that don't require t

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-10-30 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 120922. lichray marked an inline comment as done. lichray added a comment. Tweak coding style https://reviews.llvm.org/D39284 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/DeclSpec.h lib/Parse/ParseExprCXX.cpp lib/Sema/SemaDec

[PATCH] D39445: [clang-fuzzer] Fix incremental builds of the fuzzer

2017-10-30 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. Herald added a subscriber: mgorny. Don't use BUILD_IN_SOURCE keep git checkout clean Don't forward CMAKE_GENERATOR as ExternalProject_Add should do it already Reset UPDATE_COMMAND to avoid git checkout updates on each build https://reviews.llvm.org/D39445 Files

[PATCH] D39446: [PGO] Detect more structural changes with the stable hash

2017-10-30 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. Lifting from Bob Wilson's notes: The hash value that we compute and store in PGO profile data to detect out-of-date profiles does not include enough information. This means that many significant changes to the source will not cause compiler warnings about the profile bei

[PATCH] D39396: Fix for PR33930. Short-circuit metadata mapping when cloning a varargs thunk.

2017-10-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. I see. Then it makes sense to do it this way. Thanks for clarifying! https://reviews.llvm.org/D39396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2