[PATCH] D46183: [clangd] Incorporate #occurrences in scoring code complete results.

2018-04-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, jkorous, MaskRay, ioeric, klimek. needs tests Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46183 Files: clangd/CodeComplete.cpp clangd/index/Index.cpp clan

[PATCH] D46035: [clangd] Fix unicode handling, using UTF-16 where LSP requires it.

2018-04-27 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked 2 inline comments as done. Closed by commit rL331029: [clangd] Fix unicode handling, using UTF-16 where LSP requires it. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Chan

[clang-tools-extra] r331029 - [clangd] Fix unicode handling, using UTF-16 where LSP requires it.

2018-04-27 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Apr 27 04:59:28 2018 New Revision: 331029 URL: http://llvm.org/viewvc/llvm-project?rev=331029&view=rev Log: [clangd] Fix unicode handling, using UTF-16 where LSP requires it. Summary: The Language Server Protocol unfortunately mandates that locations in files be repres

[PATCH] D46002: [clangd] Parse all comments in Sema and completion.

2018-04-27 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 (once the dependencies are done!) Comment at: clangd/ClangdUnit.cpp:362 CI->getFrontendOpts().DisableFree = false; +CI->getLangOpts()->CommentOpts.ParseAllC

[PATCH] D46035: [clangd] Fix unicode handling, using UTF-16 where LSP requires it.

2018-04-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 3 inline comments as done. sammccall added a comment. Thanks! Comment at: clangd/SourceCode.cpp:25 +// Returns true if CB returned true, false if we hit the end of string. +template +bool iterateCodepoints(StringRef U8, const Callback &CB) { h

[PATCH] D45999: [clangd] Retrieve minimally formatted comment text in completion.

2018-04-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. My main question/concern is: if these APIs extract/format based on CodeCompletionString and friends, what should our plan be using this this in AST-based features, such as hover? Comment at: clangd/CodeComplete.cpp:259 + CodeCo

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-04-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This change LG as an extraction of the helper functionality to be reused in clang, clang-tidy, etc. However, I feel there are potential improvements both to the underlying code and the new APIs that we could make. I left some comments, trying to focus on interface

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-27 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL331026: [OpenCL] Add separate read_only and write_only pipe IR types (authored by svenvh, committed by ). Herald added a s

r331026 - [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-27 Thread Sven van Haastregt via cfe-commits
Author: svenvh Date: Fri Apr 27 03:37:04 2018 New Revision: 331026 URL: http://llvm.org/viewvc/llvm-project?rev=331026&view=rev Log: [OpenCL] Add separate read_only and write_only pipe IR types SPIR-V encodes the read_only and write_only access qualifiers of pipes, so separate LLVM IR types are r

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/Expr.cpp:870 + if (C.getLangOpts().OpenCL && Ty.getAddressSpace() == LangAS::Default) +Ty = C.getAddrSpaceQualType(Ty, LangAS::opencl_constant); + bader wrote: > As `Ty` is passed by value, shouldn't we ac

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-27 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 144303. nik added a comment. Reduction to skip-in-preamble-only functionality. Repository: rC Clang https://reviews.llvm.org/D45815 Files: include/clang-c/Index.h include/clang/Frontend/ASTUnit.h lib/Frontend/ASTUnit.cpp test/Parser/skip-function-bod

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-27 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. In https://reviews.llvm.org/D45815#1079327, @ilya-biryukov wrote: > > OK, I've rechecked this change. I don't see any obvious mistake :) > > I think I got to the bottom of it. We didn't expect a big win, because we > expect people to not put their non-template code into the

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-04-27 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. Hi klimek, many thank for your comments. I will made the modifications you propose and then update this patch. Repository: rC Clang https://reviews.llvm.org/D44609 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Re: locations in parameter USRs: OK, so reading through the code, it looks like locations are included in USRs: - for macros (except from system headers) - for decls that aren't externally visible (static etc, function parameters, locals) - an objective-c class extens

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-04-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. There isn't actually as much code changed as it appears to be, but phabricator doens't understand the diff very well... `git diff` might be an easier way to review the patch. Repository: rC Clang https://reviews.llvm.org/D46180 ___

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-04-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, klimek. The class will be moved into libToolingCore as followup. The new behaviors in this patch: - New #include is inserted in the right position in a #include block to preserver sorted

[PATCH] D45931: [ASTMatchers] Don't garble the profiling output when multiple TU's are processed

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Ping? Repository: rC Clang https://reviews.llvm.org/D45931 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I just feel like pointing out that you can already do that: $ clang-tidy -checks=clang-analyzer-alpha* -p <> (be wary of `*` expanding) `clang-tidy --help` says: -checks= - <...> This option's value is appended to

[PATCH] D46176: Pull helper class Environment from clangFormat into libToolingCore [NFC]

2018-04-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: djasper. Herald added subscribers: cfe-commits, mgorny, klimek. This can be used to create a virtual environment (incl. VFS, source manager) for code snippets. The existing clang::format::Environment is implemented based on the new clang::tool

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-04-27 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. ping^2 Repository: rC Clang https://reviews.llvm.org/D44934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37475: Make MultiplexASTDeserializationListener part of the API [NFC]

2018-04-27 Thread Raphael Isemann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331021: Make MultiplexASTDeserializationListener part of the API [NFC] (authored by teemperor, committed by ). Changed prior to commit: https://reviews.llvm.org/D37475?vs=113847&id=144287#toc Repositor

r331021 - Make MultiplexASTDeserializationListener part of the API [NFC]

2018-04-27 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Fri Apr 27 00:05:40 2018 New Revision: 331021 URL: http://llvm.org/viewvc/llvm-project?rev=331021&view=rev Log: Make MultiplexASTDeserializationListener part of the API [NFC] Summary: This patch moves the MultiplexASTDeserializationListener declaration into a public heade

r331020 - [CodeGen] Avoid destructing a callee-destructued struct type in a

2018-04-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Apr 26 23:57:00 2018 New Revision: 331020 URL: http://llvm.org/viewvc/llvm-project?rev=331020&view=rev Log: [CodeGen] Avoid destructing a callee-destructued struct type in a function if a function delegates to another function. Fix a bug introduced in r328731, which cau

<    1   2