[PATCH] D53032: [clangd] Minimal implementation of automatic static index, behind a flag.

2018-10-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. still lgtm Comment at: clangd/Compiler.cpp:83 +std::string getStandardResourceDir() { + static int Dummy; // Just an address in this process. Maybe also revert this change? Repository: rCTE Clang

[PATCH] D53032: [clangd] Minimal implementation of automatic static index, behind a flag.

2018-10-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: unittests/clangd/BackgroundIndexTests.cpp:14 + +TEST(BackgroundIndexTest, IndexesOneFile) { + MockFSProvider FS; sammccall wrote: > ioeric wrote: > > sammccall wrote: > > > ioeric wrote: > > > > sammccall wrote: > >

[PATCH] D53032: [clangd] Minimal implementation of automatic static index, behind a flag.

2018-10-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 169694. sammccall marked an inline comment as done. sammccall added a comment. Address comments, strip out of clangdlspserver for now. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53032 Files: clangd/CMakeLists.txt

[PATCH] D53280: [analyzer] Emit a warning for unknown -analyzer-config options

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 169693. https://reviews.llvm.org/D53280 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/StaticAnalyzer/Core/AnalyzerOptions.h lib/Frontend/CompilerInvocation.cpp Index: lib/Frontend/CompilerInvocation.cpp

[PATCH] D53277: [analyzer][NFC][WIP] Collect all -analyzer-config options in a .def file

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:128-135 +/// Describes the kinds for high-level analyzer mode. +enum UserModeKind { + /// Perform shallow but fast analyzes. + UMK_Shallow = 1, + + /// Perform deep analyzes. +

[PATCH] D53286: [clangd] Refactor JSON-over-stdin/stdout code into Transport abstraction.

2018-10-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This patch is big and hard to navigate. I tried to keep it contained, but JSONRPCDispatcher is pretty tangled. The main parts are: - `Transport.h` is the key new abstraction that should be understood first - `JSONTransport.cpp` is its standard implementation. The raw

[PATCH] D52784: [ARM][AArch64] Pass through endianness flags to the GNU assembler and linker

2018-10-15 Thread Peter Smith via Phabricator via cfe-commits
peter.smith updated this revision to Diff 169689. peter.smith marked 3 inline comments as done. peter.smith added a comment. Updated diff to reflect review comments. Main changes are: - isArmBigEndian always returns false if the target architecture isn't Arm. - Added tests to make sure "--be8"

[PATCH] D52784: [ARM][AArch64] Pass through endianness flags to the GNU assembler and linker

2018-10-15 Thread Peter Smith via Phabricator via cfe-commits
peter.smith marked 7 inline comments as done. peter.smith added a comment. Thanks very much for the comments. I'll post an update shortly. Comment at: lib/Driver/ToolChains/Gnu.cpp:357-364 +const char* EndianFlag = "-EL"; +if (isArmBigEndian(Triple, Args)) { +

[PATCH] D53277: [analyzer][NFC][WIP] Collect all -analyzer-config options in a .def file

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 169688. https://reviews.llvm.org/D53277 Files: include/clang/StaticAnalyzer/Core/AnalyzerOptions.def include/clang/StaticAnalyzer/Core/AnalyzerOptions.h lib/StaticAnalyzer/Core/AnalyzerOptions.cpp lib/StaticAnalyzer/Core/CoreEngine.cpp Index:

[PATCH] D53019: [clangd] dump xrefs information in dexp tool.

2018-10-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/index/dex/dexp/Dexp.cpp:185 clang::clangd::LookupRequest Request; -Request.IDs = {*SID}; +Request.IDs.insert(IDs.begin(), IDs.end()); bool FoundSymbol = false; hokein wrote: > sammccall wrote:

[PATCH] D53286: [clangd] Refactor JSON-over-stdin/stdout code into Transport abstraction.

2018-10-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: jkorous, ioeric, hokein. Herald added subscribers: cfe-commits, kadircet, arphaman, MaskRay, ilya-biryukov, mgorny. This paves the way for alternative transports (mac XPC, maybe messagepack?), and also generally improves layering:

[clang-tools-extra] r344510 - [clangd] Remove an unused include header, NFC.

2018-10-15 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Oct 15 05:39:45 2018 New Revision: 344510 URL: http://llvm.org/viewvc/llvm-project?rev=344510=rev Log: [clangd] Remove an unused include header, NFC. Modified: clang-tools-extra/trunk/clangd/index/Merge.cpp Modified: clang-tools-extra/trunk/clangd/index/Merge.cpp

[PATCH] D53284: [CodeComplete] Make sure keyword 'template' is added even when code pattern is disabled.

2018-10-15 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC344509: [CodeComplete] Make sure keyword template is added even when code pattern is… (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D53284?vs=169681=169685#toc

r344509 - [CodeComplete] Make sure keyword 'template' is added even when code pattern is disabled.

2018-10-15 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon Oct 15 05:37:23 2018 New Revision: 344509 URL: http://llvm.org/viewvc/llvm-project?rev=344509=rev Log: [CodeComplete] Make sure keyword 'template' is added even when code pattern is disabled. Reviewers: sammccall, hokein Subscribers: arphaman, cfe-commits Differential

[PATCH] D53019: [clangd] dump xrefs information in dexp tool.

2018-10-15 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE344508: [clangd] dump xrefs information in dexp tool. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D53019?vs=169683=169684#toc Repository: rCTE Clang

[clang-tools-extra] r344508 - [clangd] dump xrefs information in dexp tool.

2018-10-15 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Oct 15 05:32:49 2018 New Revision: 344508 URL: http://llvm.org/viewvc/llvm-project?rev=344508=rev Log: [clangd] dump xrefs information in dexp tool. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential

[PATCH] D53019: [clangd] dump xrefs information in dexp tool.

2018-10-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 169683. hokein marked 3 inline comments as done. hokein added a comment. Fix global scope, and clang-format. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53019 Files: clangd/index/dex/dexp/CMakeLists.txt clangd/index/dex/dexp/Dexp.cpp

[PATCH] D53019: [clangd] dump xrefs information in dexp tool.

2018-10-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/index/dex/dexp/Dexp.cpp:61 + Request.Scopes.emplace_back(); + std::tie(Request.Scopes.back(), Request.Query) = + clang::clangd::splitQualifiedName(QualifiedName); sammccall wrote: > Are you sure you want

[PATCH] D53284: [CodeComplete] Make sure keyword 'template' is added even when code pattern is disabled.

2018-10-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: sammccall, hokein. Herald added subscribers: cfe-commits, arphaman. Repository: rC Clang https://reviews.llvm.org/D53284 Files: lib/Sema/SemaCodeComplete.cpp test/Index/complete-template-keywords.cpp Index:

[PATCH] D53273: [clangd] Fix some references missing in dynamic index.

2018-10-15 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344507: [clangd] Fix some references missing in dynamic index. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D53273 Files:

[clang-tools-extra] r344507 - [clangd] Fix some references missing in dynamic index.

2018-10-15 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Oct 15 04:46:26 2018 New Revision: 344507 URL: http://llvm.org/viewvc/llvm-project?rev=344507=rev Log: [clangd] Fix some references missing in dynamic index. Summary: Previously, SymbolCollector postfilters all references at the end to find all references of interesting

[PATCH] D51633: [ASTImporter] Added error handling for AST import.

2018-10-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 9 inline comments as done. balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:2683 +continue; + } else if (isa(Found)) +continue; a_sidorin wrote: > Same here. I do not know exactly why this was made, it

[PATCH] D53280: [analyzer] Emit a warning for unknown -analyzer-config options

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. @whisperity @xazax.hun A worry of mine is shared libraries, for example, we've got an array of Ericsson-specific checkers that we load run-time. Do we support (or should we) support acquiring non-checker `-analyzer-config` options? Repository: rC Clang

[PATCH] D53280: [analyzer] Emit a warning for unknown -analyzer-config options

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, rnkovacs, MTC. Herald added subscribers: cfe-commits, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. I'm in the process of refactoring AnalyzerOptions. The main motivation behind here is

r344504 - [TI removal] Make `getTerminator()` return a generic `Instruction`.

2018-10-15 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Mon Oct 15 03:42:50 2018 New Revision: 344504 URL: http://llvm.org/viewvc/llvm-project?rev=344504=rev Log: [TI removal] Make `getTerminator()` return a generic `Instruction`. This removes the primary remaining API producing `TerminatorInst` which will reduce the rate at

[PATCH] D53277: [analyzer][NFC][WIP] Collect all -analyzer-config options in a .def file

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Also, this patch does not contain checker options. That I would suspect be a little more invasive, so I'll do that in a followup patch. Repository: rC Clang https://reviews.llvm.org/D53277 ___ cfe-commits mailing list

[PATCH] D50250: [clang][ubsan] Implicit Conversion Sanitizer - integer sign change - clang part

2018-10-15 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Ping. The prerequisite "split truncation sanitizer into unsigned and signed cases" has landed. I believe i have replied/addressed all the points previously raised here. Would be awesome to get this going at long last :) Repository: rC Clang

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-10-15 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:1019 + assert(!SrcType->isFixedPointType() && !DstType->isFixedPointType() && + "Use the TargetCodeGenInfo::emitFixedPoint family functions for " + "handling conversions involving fixed

[PATCH] D53019: [clangd] dump xrefs information in dexp tool.

2018-10-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clangd/index/dex/dexp/Dexp.cpp:61 + Request.Scopes.emplace_back(); + std::tie(Request.Scopes.back(), Request.Query) = +

[PATCH] D53273: [clangd] Fix some references missing in dynamic index.

2018-10-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 169671. hokein marked an inline comment as done. hokein added a comment. avoid calling shouldCollectSymbol every time during indexing. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53273 Files: clangd/index/SymbolCollector.cpp

[PATCH] D53273: [clangd] Fix some references missing in dynamic index.

2018-10-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/index/SymbolCollector.cpp:348 + if (!shouldCollectSymbol(*ND, *ASTCtx, Opts)) +return true; sammccall wrote: > This seems better for the main-AST case, but substantially more expensive for > indexing

[PATCH] D53277: [analyzer][NFC][WIP] Collect all -analyzer-config options in a .def file

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, rnkovacs, MTC. Herald added subscribers: cfe-commits, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. I'm in the process of refactoring AnalyzerOptions. The main motivation behind here is

[PATCH] D53019: [clangd] dump xrefs information in dexp tool.

2018-10-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 169668. hokein marked 2 inline comments as done. hokein added a comment. Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53019 Files: clangd/index/dex/dexp/CMakeLists.txt clangd/index/dex/dexp/Dexp.cpp Index:

[PATCH] D53276: [analyzer][NFC] Fix some incorrect uses of AnalyzerOptions

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, MTC, rnkovacs. Herald added subscribers: cfe-commits, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. I'm in the process of refactoring AnalyzerOptions. The main motivation behind here is

[PATCH] D53274: [analyzer][NFC] Tighten up AnalyzerOptions

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, MTC, rnkovacs. Herald added subscribers: cfe-commits, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. I was a little unsure about the title, but it is what it is. I'm in the process of

[PATCH] D53273: [clangd] Fix some references missing in dynamic index.

2018-10-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Nice fix, just performance concerns. (I do think this might be significant, but measuring dynamic index time before/after for a big TU might show this to be unimportant) Comment at: clangd/index/SymbolCollector.cpp:348 + if

[PATCH] D53273: [clangd] Fix some references missing in dynamic index.

2018-10-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Previously, SymbolCollector postfilters all references at the end to find all references of interesting symbols. It was incorrect when indxing

[PATCH] D53272: Add target requirement to profile remap test.

2018-10-15 Thread Yvan Roux via Phabricator via cfe-commits
yroux created this revision. yroux added a reviewer: rsmith. Herald added a reviewer: javed.absar. Herald added a subscriber: kristof.beyls. Fix bots which don't have x86_64 target built (ARM/AArch64). Repository: rC Clang https://reviews.llvm.org/D53272 Files:

[PATCH] D53244: [Coverage] Fix PR39258: support coverage regions that start deeper than they end

2018-10-15 Thread Orivej Desh via Phabricator via cfe-commits
orivej added a comment. Thanks! Could you merge this (after a while to let others review)? Comment at: test/CoverageMapping/macros.c:60 +// CHECK-NEXT: func6 +void func6(unsigned count) { // CHECK-NEXT: File 0, [[@LINE]]:28 -> [[@LINE+4]]:2 = #0 vsk wrote:

[PATCH] D53192: [clangd] Do not query index for new name completions.

2018-10-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (This looks good, of course the Sema patch needs to land first!) Comment at: clangd/CodeComplete.cpp:643 case CodeCompletionContext::CCC_Recovery: + // TODO: Provide identifier based completions for the following two contexts: + case

[PATCH] D51340: Add /Zc:DllexportInlines option to clang-cl

2018-10-15 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta updated this revision to Diff 169652. takuto.ikuta retitled this revision from "[WIP] Add /Zc:DllexportInlines option to clang-cl" to "Add /Zc:DllexportInlines option to clang-cl". takuto.ikuta added a comment. Export function inside explicit template instantiation definition

[PATCH] D53220: Remove possibility to change compile database path at runtime

2018-10-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for cleaning this up! Comment at: clangd/ClangdLSPServer.cpp:433 reparseOpenedFiles(); } This isn't needed, the compilation database can only be set during initialization. Comment at:

[PATCH] D53213: [clangd] Send CodeAction responses to textDocument/codeAction (LSP 3.8)

2018-10-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/ClangdLSPServer.cpp:338 + Command Cmd; + if (Action.command && Action.edit) +return llvm::None; kadircet wrote: > What would you think about emitting two commands in this case? First the edit > and then

[PATCH] D53213: [clangd] Send CodeAction responses to textDocument/codeAction (LSP 3.8)

2018-10-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 169650. sammccall marked an inline comment as done. sammccall added a comment. update comment Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53213 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/Protocol.cpp

[PATCH] D53266: [clangd] Simplify client capabilities parsing.

2018-10-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Instead of parsing into structs that mirror LSP, simply parse into a flat struct that contains the info we need. This is an exception

<    1   2