[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161428. kadircet marked 2 inline comments as done. kadircet added a comment. - Check cancellation earlier && Fix normalization difference between string and integer request ids. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 Files:

[PATCH] D50955: [clangd] Implement TRUE Iterator

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: ioeric. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. This patch introduces TRUE Iterator which efficiently handles posting lists containing all items within `[0, Size)` range. https://reviews.llvm.org/D50955 Files:

[PATCH] D50956: [clangd] NFC: Cleanup Dex Iterator comments and simplify tests

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: ioeric. Herald added subscribers: kadircet, arphaman, omtcyfz, jkorous, MaskRay, ilya-biryukov. Proposed changes: - Cleanup comments in `clangd/index/dex/Iterator.h`: Vim's `gq` formatting added redundant spaces instead of newlines in f

[PATCH] D50955: [clangd] Implement TRUE Iterator

2018-08-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Iterator.cpp:230 +/// order to prevent additional memory consumption, it only stores the size of +/// this virtual posting list because posting lists of such density are likely +/// to consume a lot of m

[PATCH] D50956: [clangd] NFC: Cleanup Dex Iterator comments and simplify tests

2018-08-20 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 https://reviews.llvm.org/D50956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161432. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Herald added a subscriber: kadircet. Use TRUE iterator to ensure validity of the query processing. https://reviews.llvm.org/D50337 Files: clang-tools-extra/clangd/CMakeLists.txt

[PATCH] D50955: [clangd] Implement TRUE Iterator

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161435. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Address a couple of comments. https://reviews.llvm.org/D50955 Files: clang-tools-extra/clangd/index/dex/Iterator.cpp clang-tools-extra/clangd/index/dex/Iterator.h clang-tool

[PATCH] D50955: [clangd] Implement TRUE Iterator

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Iterator.cpp:248 +assert(!reachedEnd() && "Can't advance iterator after it reached the end."); +Index = ID; + } ioeric wrote: > Should we check `ID < Size` here? Not really,

[PATCH] D50957: Rename -mlink-cuda-bitcode to -mlink-builtin-bitcode

2018-08-20 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: tra, jlebar. Herald added subscribers: Anastasia, wdng. The same semantics work for OpenCL, and probably any offload language. Keep the old name around as an alias. https://reviews.llvm.org/D50957 Files: include/clang/Driver/CC1Options.td

[PATCH] D50955: [clangd] Implement TRUE Iterator

2018-08-20 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 https://reviews.llvm.org/D50955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D50958: [clangd] WIP: xrefs for dynamic index.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: ilya-biryukov, ioeric. Herald added subscribers: kadircet, arphaman, mgrang, jkorous, MaskRay, javed.absar, mgorny. Depends on the AST callback interfaces. - https://reviews.llvm.org/D50847 - https://reviews.llvm.org/D50889 Repository: rC

[PATCH] D50957: Rename -mlink-cuda-bitcode to -mlink-builtin-bitcode

2018-08-20 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 161439. arsenm added a comment. Forgot to commit part https://reviews.llvm.org/D50957 Files: include/clang/Driver/CC1Options.td lib/Driver/ToolChains/Cuda.cpp lib/Frontend/CompilerInvocation.cpp test/CodeGenCUDA/link-device-bitcode.cu test/CodeGenC

[PATCH] D50847: [clangd] Add callbacks on parsed AST in addition to parsed preambles

2018-08-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Herald added a subscriber: kadircet. Comment at: clangd/TUScheduler.h:66 + /// instead. + virtual void onMainAST(PathRef Path, ParsedAST &AST) = 0; +}; ilya-biryukov wrote: > hokein wrote: > > Does the callback get called every tim

[clang-tools-extra] r340155 - [clangd] Implement TRUE Iterator

2018-08-20 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Mon Aug 20 01:47:30 2018 New Revision: 340155 URL: http://llvm.org/viewvc/llvm-project?rev=340155&view=rev Log: [clangd] Implement TRUE Iterator This patch introduces TRUE Iterator which efficiently handles posting lists containing all items within `[0, Size)` range. Review

[PATCH] D50955: [clangd] Implement TRUE Iterator

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340155: [clangd] Implement TRUE Iterator (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D50955?vs=161435&id=161440#toc

[PATCH] D50958: [clangd] WIP: xrefs for dynamic index.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 161441. hokein added a comment. More cleanups. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50958 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/Protocol.cpp clan

[PATCH] D50958: [clangd] WIP: xrefs for dynamic index.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. This patch is incomplete, and it is a **prototype** based on our discussion last week. You can patch it locally, and play around with VSCode. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50958 ___ cfe-comm

[PATCH] D50960: [clangd] Add missing lock in the lookup.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ioeric. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50960 Files: clangd/index/MemIndex.cpp Index: clangd/index/MemIndex.cpp ===

[PATCH] D50960: [clangd] Add missing lock in the lookup.

2018-08-20 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 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D50956: [clangd] NFC: Cleanup Dex Iterator comments and simplify tests

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161443. kbobyrev edited the summary of this revision. kbobyrev added a comment. Something I initially forgot: fix misplaced `private:` so that `dump()` stays private as it was in the interface. https://reviews.llvm.org/D50956 Files: clang-tools-extra/cl

[PATCH] D50961: [clang-tidy] Add missing check documentation.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ioeric. Herald added subscribers: kadircet, arphaman, jkorous, ilya-biryukov, xazax.hun. [clangd] Simplify the code using UniqueStringSaver, NFC. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50961 Files: clangd/index/In

[PATCH] D50961: [clangd] Simplify the code using UniqueStringSaver, NFC.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 161445. hokein added a comment. Correct the patch. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50961 Files: clangd/index/Index.cpp clangd/index/Index.h docs/clang-tidy/checks/abseil-duration-division.rst Index: docs/clang-tidy/chec

[PATCH] D50961: [clangd] Simplify the code using UniqueStringSaver, NFC.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 161446. hokein added a comment. Update Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50961 Files: clangd/index/Index.cpp clangd/index/Index.h Index: clangd/index/Index.h

[clang-tools-extra] r340156 - [clangd] Add missing lock in the lookup.

2018-08-20 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Aug 20 02:07:59 2018 New Revision: 340156 URL: http://llvm.org/viewvc/llvm-project?rev=340156&view=rev Log: [clangd] Add missing lock in the lookup. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: ht

[PATCH] D50960: [clangd] Add missing lock in the lookup.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE340156: [clangd] Add missing lock in the lookup. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D50960?vs=161442&id=161447#toc Repository: rCTE Clang Tools E

[PATCH] D50961: [clangd] Simplify the code using UniqueStringSaver, NFC.

2018-08-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added inline comments. This revision is now accepted and ready to land. Comment at: docs/clang-tidy/checks/abseil-duration-division.rst:1 +.. title:: clang-tidy - abseil-duration-division + Please revert. Repository: rCTE

[PATCH] D50571: [clangd] add an extension field to LSP to transfer the diagnostic's category

2018-08-20 Thread João Távora via Phabricator via cfe-commits
joaotavora added a comment. Herald added a subscriber: kadircet. > LGTM. Let's watch out for possible breakages in any of the clients, though. > I've checked VSCode and it seems to be fine with the added fields. This isn't in the spec and broke the LSP client eglot (https://github.com/joaotavor

[clang-tools-extra] r340157 - [clangd] NFC: Cleanup Dex Iterator comments and simplify tests

2018-08-20 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Mon Aug 20 02:16:14 2018 New Revision: 340157 URL: http://llvm.org/viewvc/llvm-project?rev=340157&view=rev Log: [clangd] NFC: Cleanup Dex Iterator comments and simplify tests Proposed changes: * Cleanup comments in `clangd/index/dex/Iterator.h`: Vim's `gq` formatting adde

[PATCH] D50956: [clangd] NFC: Cleanup Dex Iterator comments and simplify tests

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340157: [clangd] NFC: Cleanup Dex Iterator comments and simplify tests (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D5

[PATCH] D50847: [clangd] Add callbacks on parsed AST in addition to parsed preambles

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. The interfaces look mostly good to me. Comment at: clangd/ClangdServer.cpp:73 + + void onPreambleAST(PathRef Path, ASTContext &Ctx, + std::shared_ptr PP) override { I think `Ctx` should be a `pointer` which gives us

[clang-tools-extra] r340161 - [clangd] Simplify the code using UniqueStringSaver, NFC.

2018-08-20 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Aug 20 02:47:12 2018 New Revision: 340161 URL: http://llvm.org/viewvc/llvm-project?rev=340161&view=rev Log: [clangd] Simplify the code using UniqueStringSaver, NFC. Modified: clang-tools-extra/trunk/clangd/index/Index.cpp clang-tools-extra/trunk/clangd/index/Index

[PATCH] D50962: [clangd] Speculative code completion index request before Sema is run.

2018-08-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. For index-based code completion, send an asynchronous speculative index request, based on the index request for the last code completion on the

[PATCH] D50889: [clangd] Make FileIndex aware of the main file

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Herald added a subscriber: kadircet. Comment at: clangd/index/FileIndex.h:70 + void + update(PathRef Path, ASTContext *AST, std::shared_ptr PP, + llvm::Optional> TopLevelDecls = llvm::None); Any strong reason to unify the i

[PATCH] D50961: [clangd] Simplify the code using UniqueStringSaver, NFC.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein closed this revision. hokein added a comment. committed in https://reviews.llvm.org/rL340161. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D50889: [clangd] Make FileIndex aware of the main file

2018-08-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/ClangdServer.cpp:70 +// FIXME(ibiryukov): this should be a generic helper instead. +class NoopCallbacks : public ParsingCallbacks { public: Maybe provide noop implementations for `ParsingCallbacks::onPreambleAST()

[PATCH] D50926: [SourceManager] Extract 'findFileIDsForFile' from 'translateFile' to allow mapping from one file entry to multiple FileIDs

2018-08-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Basic/SourceManager.h:1533 + /// Looks through all the local and imported source locations to find the set + /// of FileIDs that correspond to the given entry. nit: put this closer to the closely related

[PATCH] D50963: [NFC] Don't define static function in header (UninitializedObject.h)

2018-08-20 Thread Andrei Elovikov via Phabricator via cfe-commits
a.elovikov created this revision. a.elovikov added reviewers: Szelethus, erichkeane. See also http://lists.llvm.org/pipermail/cfe-users/2016-January/000854.html for the reasons why it's bad. https://reviews.llvm.org/D50963 Files: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/Uninitial

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-20 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In https://reviews.llvm.org/D50616#1204588, @leonardchan wrote: > Would it be simpler instead just to have the logic contained in the virtual > function for `TargetCodeGenInfo` as opposed to returning `nullptr` since any > custom target will end up overriding it anyway

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/Cancellation.h:96 +/// checks using it to avoid extra lookups in the Context. +class CancellationToken { +public: As chatted offline, I have questions about the motivation of the `CancellationToken` class. Intuiti

[PATCH] D50898: [clangd] Suggest code-completions for overriding base class virtual methods.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. I think it is reasonable to make Sema support suggesting override methods, instead of implementing it in clangd side? Comment at: clangd/CodeComplete.cpp:206 + llvm::StringMap> Overrides; + for (auto *Method : dyn_cast(DC)->methods()) { +if (!Meth

[PATCH] D50966: Fix an undefined behavior when storing an empty StringRef.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ioeric. Herald added a subscriber: llvm-commits. Passing a nullptr to memcpy is UB. Repository: rL LLVM https://reviews.llvm.org/D50966 Files: lib/Support/StringSaver.cpp Index: lib/Support/StringSaver.cpp ===

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-20 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. Last few nits and then good to go. Comment at: clang-tools-extra/clangd/index/dex/DexIndex.cpp:97 +} +TopLevelChildren.push_back(createAnd(move(TrigramIterators))

[PATCH] D50967: [Preamble] Fix an undefined behavior when checking an empty preamble can be reused.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Passing nullptr to memcmp is UB. Repository: rC Clang https://reviews.llvm.org/D50967 Files: lib/Frontend/PrecompiledPreamble.cpp Index: lib/Frontend/PrecompiledPreamble.cpp

[PATCH] D50966: Fix an undefined behavior when storing an empty StringRef.

2018-08-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Support/StringSaver.cpp:14 StringRef StringSaver::save(StringRef S) { + if (S.empty()) Is it possible to reuse `StringRef::copy(Allocator &)` here? Repository: rL LLVM https://reviews.llvm.org/D50966 _

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/ClangdLSPServer.cpp:75 +std::string NormalizeRequestID(const json::Value &ID) { + CancelParams CP; + fromJSON(json::Object{{"id", ID}}, CP); ioeric wrote: > Use `ID.getAsString()`? Unfortunately id can be both

[PATCH] D50963: [NFC] Don't define static function in header (UninitializedObject.h)

2018-08-20 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. Thanks! Learned something new today then :) This solution looks a lot cleaner as well. https://reviews.llvm.org/D50963 ___ cfe-commits mai

[PATCH] D50966: Fix an undefined behavior when storing an empty StringRef.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 161467. hokein added a comment. Correct the fix. Repository: rL LLVM https://reviews.llvm.org/D50966 Files: lib/Support/StringSaver.cpp Index: lib/Support/StringSaver.cpp === --- lib/Supp

[PATCH] D50966: Fix an undefined behavior when storing an empty StringRef.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: lib/Support/StringSaver.cpp:14 StringRef StringSaver::save(StringRef S) { + if (S.empty()) ioeric wrote: > Is it possible to reuse `StringRef::copy(Allocator &)` here? Unfortunately, not, `StringRef::copy` will change

[PATCH] D50897: [clangd] Allow using experimental Dex index

2018-08-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Herald added a subscriber: kadircet. Comment at: clang-tools-extra/clangd/index/Index.h:360 + template + static std::unique_ptr build(SymbolSlab Slab) { + struct Snapshot { I'd try to avoid this pattern as it implicitly requires

[PATCH] D50970: [clangd] Introduce BOOST iterators

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. https://reviews.llvm.org/D50970 Files: clang-tools-extra/clangd/index/dex/Iterator.cpp clang-tools-extr

[PATCH] D50970: [clangd] Introduce BOOST iterators

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. This patch is in preview mode, documentation overhaul and minor cleanup incoming. https://reviews.llvm.org/D50970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D50966: Fix an undefined behavior when storing an empty StringRef.

2018-08-20 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: lib/Support/StringSaver.cpp:14 StringRef StringSaver::save(StringRef S) { + if (S.empty()) hokein wrote: > ioeric wrote: > > Is it possibl

[PATCH] D50966: Fix an undefined behavior when storing an empty StringRef.

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340170: Fix an undefined behavior when storing an empty StringRef. (authored by hokein, committed by ). Repository: rL LLVM https://reviews.llvm.org/D50966 Files: llvm/trunk/lib/Support/StringSaver.

[PATCH] D50966: Fix an undefined behavior when storing an empty StringRef.

2018-08-20 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Why do we need to allocate memory in this case at all? I.e. why can't this just be: if (S.empty()) return StringRef("", 0); ... Repository: rL LLVM https://reviews.llvm.org/D50966 ___ cfe-commits mailing list cfe-

[PATCH] D50862: [clang-tidy] Abseil: faster strsplit delimiter check

2018-08-20 Thread Deanna Garcia via Phabricator via cfe-commits
deannagarcia updated this revision to Diff 161472. deannagarcia marked 11 inline comments as done. https://reviews.llvm.org/D50862 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp clang-tidy/abseil/FasterStrs

[PATCH] D50862: [clang-tidy] Abseil: faster strsplit delimiter check

2018-08-20 Thread Deanna Garcia via Phabricator via cfe-commits
deannagarcia added inline comments. Comment at: clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp:54 + // Now replace the " with '. + auto Pos = Result.find_first_of('"'); + if (Pos == Result.npos) JonasToth wrote: > deannagarcia wrote: > > JonasToth wrote: >

r340174 - [NFC] Don't define static function in header (UninitializedObject.h)

2018-08-20 Thread Andrei Elovikov via cfe-commits
Author: a.elovikov Date: Mon Aug 20 06:45:38 2018 New Revision: 340174 URL: http://llvm.org/viewvc/llvm-project?rev=340174&view=rev Log: [NFC] Don't define static function in header (UninitializedObject.h) Summary: See also http://lists.llvm.org/pipermail/cfe-users/2016-January/000854.html for th

[PATCH] D50963: [NFC] Don't define static function in header (UninitializedObject.h)

2018-08-20 Thread Andrei Elovikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340174: [NFC] Don't define static function in header (UninitializedObject.h) (authored by a.elovikov, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.ll

[PATCH] D50862: [clang-tidy] Abseil: faster strsplit delimiter check

2018-08-20 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp:54 + // Now replace the " with '. + auto Pos = Result.find_first_of('"'); + if (Pos == Result.npos) deannagarcia wrote: > JonasToth wrote: > > deannagarcia wrote: >

[PATCH] D50557: [clang][mips] Set __mips_fpr correctly for -mfpxx

2018-08-20 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan added inline comments. Comment at: lib/Basic/Targets/Mips.cpp:141 + Twine(32 / (FPMode == FP64 || IsSingleFloat ? 1 : 2))); if (IsMips16) What do you think about this variant of the code? It's longer, but imho looks more clear

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-20 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg added a comment. Anymore changes I should make or issues I should be aware of? https://reviews.llvm.org/D50542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-20 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In https://reviews.llvm.org/D50542#1205880, @hugoeg wrote: > Anymore changes I should make or issues I should be aware of? From my side not! You still have unresolved comments that cause the revision to not be `Ready To Review` for the main reviewers, maybe that caus

[PATCH] D50970: [clangd] Implement BOOST iterator

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161477. kbobyrev retitled this revision from "[clangd] Introduce BOOST iterators" to "[clangd] Implement BOOST iterator". kbobyrev edited the summary of this revision. kbobyrev added a comment. Add documentation, cleanup tests. https://reviews.llvm.org/D50

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161480. kbobyrev marked 6 inline comments as done. kbobyrev added a comment. Address post-LGTM comments. https://reviews.llvm.org/D50337 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/DexIndex.cpp clang-tools-extra/

[clang-tools-extra] r340175 - [clangd] DexIndex implementation prototype

2018-08-20 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Mon Aug 20 07:39:32 2018 New Revision: 340175 URL: http://llvm.org/viewvc/llvm-project?rev=340175&view=rev Log: [clangd] DexIndex implementation prototype This patch is a proof-of-concept Dex index implementation. It has several flaws, which don't allow replacing static MemI

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340175: [clangd] DexIndex implementation prototype (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D50337?vs=161480&id=16

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-20 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 161485. hugoeg added a comment. fixed some minor things in the test https://reviews.llvm.org/D50542 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/NoInternalDepsCheck.cpp clang-tidy/abseil/NoInternalD

[PATCH] D50962: [clangd] Speculative code completion index request before Sema is run.

2018-08-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric planned changes to this revision. ioeric added a comment. I just realized that `CodeCompleteFlow` would be blocked by the speculative index request even when index request is not needed (e.g. member access), because it owns the future object. This can make some completion requests slower

[PATCH] D50897: [clangd] Allow using experimental Dex index

2018-08-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161487. kbobyrev marked an inline comment as done. https://reviews.llvm.org/D50897 Files: clang-tools-extra/clangd/index/MemIndex.cpp clang-tools-extra/clangd/index/MemIndex.h clang-tools-extra/clangd/index/dex/DexIndex.cpp clang-tools-extra/clangd/i

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/abseil/NoInternalDepsCheck.cpp:20 + +bool IsInAbseilFile(const SourceManager& manager, SourceLocation loc){ + if (loc.isInvalid()) { hugoeg wrote: > hokein wrote: > > I think we can make it as an ASTMatcher in

r340180 - [ASTImporter] Test for importing condition variable from a ForStmt

2018-08-20 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Mon Aug 20 08:51:41 2018 New Revision: 340180 URL: http://llvm.org/viewvc/llvm-project?rev=340180&view=rev Log: [ASTImporter] Test for importing condition variable from a ForStmt Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: cfe-commits, martong Di

[PATCH] D50928: [ASTImporter] Test for importing condition variable from a ForStmt

2018-08-20 Thread Raphael Isemann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340180: [ASTImporter] Test for importing condition variable from a ForStmt (authored by teemperor, committed by ). Changed prior to commit: https://reviews.llvm.org/D50928?vs=161342&id=161493#toc Repos

r340181 - [OPENMP][BLOCKS]Fix PR38923: reference to a global variable is captured

2018-08-20 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Aug 20 09:00:22 2018 New Revision: 340181 URL: http://llvm.org/viewvc/llvm-project?rev=340181&view=rev Log: [OPENMP][BLOCKS]Fix PR38923: reference to a global variable is captured by a block. Added checks for capturing of the variable in the block when trying to emit cor

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-20 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 161494. hugoeg marked 5 inline comments as done. hugoeg added a comment. corrections applied https://reviews.llvm.org/D50542 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/NoInternalDepsCheck.cpp clan

[PATCH] D50932: [ASTImporter] Add test for C++ casts and fix broken const_cast importing.

2018-08-20 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor updated this revision to Diff 161496. teemperor added a comment. - Added comment why we enable RTTI. https://reviews.llvm.org/D50932 Files: lib/AST/ASTImporter.cpp test/Import/cxx-casts/Inputs/F.cpp test/Import/cxx-casts/test.cpp tools/clang-import-test/clang-import-test.cpp

r340182 - [ASTImporter] Add test for C++ casts and fix broken const_cast importing.

2018-08-20 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Mon Aug 20 09:20:01 2018 New Revision: 340182 URL: http://llvm.org/viewvc/llvm-project?rev=340182&view=rev Log: [ASTImporter] Add test for C++ casts and fix broken const_cast importing. Summary: The ASTImporter does currently not handle const_casts. This patch adds the mis

[PATCH] D50932: [ASTImporter] Add test for C++ casts and fix broken const_cast importing.

2018-08-20 Thread Raphael Isemann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340182: [ASTImporter] Add test for C++ casts and fix broken const_cast importing. (authored by teemperor, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://review

[PATCH] D50571: [clangd] add an extension field to LSP to transfer the diagnostic's category

2018-08-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D50571#1205650, @joaotavora wrote: > > LGTM. Let's watch out for possible breakages in any of the clients, though. > > I've checked VSCode and it seems to be fine with the added fields. > > This isn't in the spec and broke the LSP client eglo

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-20 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg marked an inline comment as done. hugoeg added inline comments. Comment at: clang-tidy/abseil/NoInternalDepsCheck.cpp:20 + +bool IsInAbseilFile(const SourceManager& manager, SourceLocation loc){ + if (loc.isInvalid()) { hokein wrote: > hugoeg wrote: > > h

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Parse/ParseExpr.cpp:1126 + +Actions.StartCheckingNoDeref(); + This parser-driven start/stop mechanism will not work in C++ templates. Instead, can you remove the "start" part and check the noderef exprs as part o

r340188 - Close FileEntries of cached files in ModuleManager::addModule().

2018-08-20 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Mon Aug 20 10:10:27 2018 New Revision: 340188 URL: http://llvm.org/viewvc/llvm-project?rev=340188&view=rev Log: Close FileEntries of cached files in ModuleManager::addModule(). While investigating why LLDB (which can build hundreds of clang modules during one debug session) w

[PATCH] D50870: Close FileEntries of cached files in ModuleManager::addModule().

2018-08-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340188: Close FileEntries of cached files in ModuleManager::addModule(). (authored by adrian, committed by ). Changed prior to commit: https://reviews.llvm.org/D50870?vs=161119&id=161501#toc Repository

[PATCH] D50978: [ASTImporter] Add test for C++'s try/catch statements.

2018-08-20 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor created this revision. Herald added subscribers: cfe-commits, martong. Herald added a reviewer: a.sidorin. Also enable exceptions in clang-import-test so that we can parse the test files. Repository: rC Clang https://reviews.llvm.org/D50978 Files: test/Import/cxx-try-catch/Inputs

[PATCH] D42043: c-index: CXString: fix MSAN read-past-end bug

2018-08-20 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added subscribers: jkorous, vsapsai. vsk added a comment. + Jan and Volodymyr. This seemed to be in good shape the last time I looked at it. Not having touched libclang for a while I don't think I can give an official lgtm. Repository: rC Clang https://reviews.llvm.org/D42043 ___

[PATCH] D50926: [SourceManager] Extract 'findFileIDsForFile' from 'translateFile' to allow mapping from one file entry to multiple FileIDs

2018-08-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Basic/SourceManager.h:1539 + /// \returns true if the callback returned true, false otherwise. + bool findFileIDsForFile(const FileEntry *SourceFile, + llvm::function_ref Callback) const; ---

[PATCH] D50926: [SourceManager] Extract 'findFileIDsForFile' from 'translateFile' to allow mapping from one file entry to multiple FileIDs

2018-08-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 161504. arphaman marked 2 inline comments as done. arphaman added a comment. Address review comments. Repository: rC Clang https://reviews.llvm.org/D50926 Files: include/clang/Basic/SourceManager.h lib/Basic/SourceManager.cpp unittests/Basic/Sourc

[PATCH] D50535: Fix selective formatting of ObjC scope

2018-08-20 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak added a comment. Nice! That looks very promising. It still fails when we pass a longer range (maybe mimicking `PreviousRBrace` will help), e.g.: Base code: @protocol A @optional // comment - (void)f; @end MACRO formatted with `clang-format -lines=3:6 file.m` gives: @pr

[PATCH] D50979: Eliminate instances of `EmitScalarExpr(E->getArg(n))` in EmitX86BuiltinExpr().

2018-08-20 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: rnk. Herald added a reviewer: javed.absar. Herald added a subscriber: kristof.beyls. EmitX86BuiltinExpr() emits all args into Ops at the beginning, so don't do that work again. No intended behavior change. (TNorthover: EmitAArch64BuiltinExpr

[PATCH] D50945: [Lex] Make HeaderMaps a unique_ptr vector

2018-08-20 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In https://reviews.llvm.org/D50945#1205337, @kristina wrote: > Given the context (class an file name itself) and documentation around the > function, I don't think in this particular case it improves readability or > maintainability, the lifetime of the `HeaderMap` is

[PATCH] D50945: [Lex] Make HeaderMaps a unique_ptr vector

2018-08-20 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Looks good - thanks! Repository: rC Clang https://reviews.llvm.org/D50945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[PATCH] D50862: [clang-tidy] Abseil: faster strsplit delimiter check

2018-08-20 Thread Deanna Garcia via Phabricator via cfe-commits
deannagarcia updated this revision to Diff 161513. https://reviews.llvm.org/D50862 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp clang-tidy/abseil/FasterStrsplitDelimiterCheck.h docs/ReleaseNotes.rst d

r340191 - [OPENMP] Fix crash on the emission of the weak function declaration.

2018-08-20 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Aug 20 11:03:40 2018 New Revision: 340191 URL: http://llvm.org/viewvc/llvm-project?rev=340191&view=rev Log: [OPENMP] Fix crash on the emission of the weak function declaration. If the function is actually a weak reference, it should not be marked as deferred definition a

[PATCH] D50683: [Android] Set NewAlign for 64-bit Android to 8 bytes

2018-08-20 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama abandoned this revision. pirama added a comment. Thanks for the clarification Richard and Eli. I agree that leaving the status quo will match the intent of the macro. I'll abandon this. Repository: rC Clang https://reviews.llvm.org/D50683 _

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. I made a post on llvm-dev (http://lists.llvm.org/pipermail/llvm-dev/2018-August/125433.html) to see if other people have opinions on this. In the meantime, do you think I should make a separate patch that moves this into an LLVM intrinsic function? Repository: r

r340193 - Rename -mlink-cuda-bitcode to -mlink-builtin-bitcode

2018-08-20 Thread Matt Arsenault via cfe-commits
Author: arsenm Date: Mon Aug 20 11:16:48 2018 New Revision: 340193 URL: http://llvm.org/viewvc/llvm-project?rev=340193&view=rev Log: Rename -mlink-cuda-bitcode to -mlink-builtin-bitcode The same semantics work for OpenCL, and probably any offload language. Keep the old name around as an alias. M

[PATCH] D50957: Rename -mlink-cuda-bitcode to -mlink-builtin-bitcode

2018-08-20 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r340193 https://reviews.llvm.org/D50957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50462: Try building complete AST after a fatal error was emitted if further diagnostics are expected

2018-08-20 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Herald added a subscriber: kadircet. Thanks, Dmitry, for your explanation. It does help to understand your use case better. What about having a mode that treats missing header as non-fatal error? Because I believe there are cases where there is no sense to continue afte

[PATCH] D50979: Eliminate instances of `EmitScalarExpr(E->getArg(n))` in EmitX86BuiltinExpr().

2018-08-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I don't think this is NFC. Testcase: long long int a, b, c, d; unsigned char f() { return _InterlockedCompareExchange128(&(++a), ++b, ++c, &(++d)); } Today, Clang increments `a`, `b`, `c`, and `d` twice each in `f()`. https://reviews.llvm.org/D50979

[PATCH] D50984: AMDGPU: Move target code into TargetParser

2018-08-20 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: rampitec, kzhuravl, yaxunl. Herald added subscribers: t-tye, tpr, dstuttard, nhaehnle, wdng, jvesely. arsenm added a dependency: D50983: AMDGPU: Partially move target handling code from clang to TargetParser. https://reviews.llvm.org/D50984 F

[PATCH] D50413: [libunwind][include] Add some missing definitions to .

2018-08-20 Thread Charles Davis via Phabricator via cfe-commits
cdavis5x added a comment. Ping. Are y'all waiting for me to do something? Repository: rUNW libunwind https://reviews.llvm.org/D50413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

  1   2   >