[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-22 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In https://reviews.llvm.org/D53738#1305498, @leonardchan wrote: > @ebevhan Any more comments on this patch? It's strange, I feel like I've responded to the last comment twice now but there's nothing in Phab. Generally I think it's good! One final note; I assume we cou

[PATCH] D54796: [clangd] **Prototype**: C++ API for emitting file status

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Have you considered moving **all** status updates into the TUScheduler? TUScheduler has full information about the file status changes, so it seems to most natural place to provide this kind of information. Repository: rCTE Clang Tools Extra https://reviews.llv

r347446 - The result of is.constant() is unsigned.

2018-11-22 Thread Bill Wendling via cfe-commits
Author: void Date: Thu Nov 22 01:31:08 2018 New Revision: 347446 URL: http://llvm.org/viewvc/llvm-project?rev=347446&view=rev Log: The result of is.constant() is unsigned. Added: cfe/trunk/test/CodeGen/builtin-constant-p.c Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp Modified: cfe/trunk

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-22 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 Could you run clang-format on the changed lines? Comment at: clangd/clients/clangd-vscode/package.json:81 +"command": "clangd-vscode.switchheadersource"

[PATCH] D54798: Move the llvm lit test dependencies to clang-tools-extra.

2018-11-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 175021. hokein added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54798 Files: test/CMakeLists.txt Index: test/CMakeLists.txt === --- test/CMa

[PATCH] D54760: [clangd] Cleanup: make the diags callback global in TUScheduler

2018-11-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Just the context thing. Rest is some optional simplifications. Comment at: clangd/ClangdServer.cpp:77 +FileIndex *FIndex, +llvm::unique_function)> OnDiags) { + using DiagsCallback = decltype(OnDiags); hmm, the double-indirect

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Overall LG, merely stylistic NITs. Comment at: clangd/clients/clangd-vscode/src/extension.ts:69 +const docIdentifier = TextDocumentIdentifier.create(uri.toString()); +clangdClient.sendRequest(SwitchSourceHeaderRequest.type, docIde

[PATCH] D54253: [OpenCL] Launch opencl-types.cl test only on x86

2018-11-22 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. FWIW, I'd vote for the first revision of this patch. From my understanding, the test verifies that libclang is able to parse OpenCL code correctly. It doesn't do anything specific to x86: target for x86 just happens to support a set of OpenCL extensions. https://reviews

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. And many thanks for the change! I've tried it out, will definitely be one of the most-used clangd features for me :-) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54781 ___ cfe-commits mailing list

[PATCH] D54798: Move the llvm lit test dependencies to clang-tools-extra.

2018-11-22 Thread Michał Górny via Phabricator via cfe-commits
mgorny accepted this revision. mgorny added a comment. This revision is now accepted and ready to land. LGTM (assuming you've tested it). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54798 ___ cfe-commits mailing list cfe-commits@

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/DeclBase.cpp:1469 assert(Pos != Map->end() && "no lookup entry for decl"); -if (Pos->second.getAsVector() || Pos->second.getAsDecl() == ND) +// Remove the decl only if it is contained. +if ((Pos-

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/clients/clangd-vscode/src/extension.ts:4 import { realpathSync } from 'fs'; +import { RequestType, TextDocumentIdentifier } from 'vscode-languageclient'; We have imported the whole module as `vscodelc`, maybe ju

[clang-tools-extra] r347449 - Move the llvm lit test dependencies to clang-tools-extra.

2018-11-22 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Nov 22 02:14:55 2018 New Revision: 347449 URL: http://llvm.org/viewvc/llvm-project?rev=347449&view=rev Log: Move the llvm lit test dependencies to clang-tools-extra. Summary: Part of revert r343473 Reviewers: mgorny Subscribers: cfe-commits Differential Revision: https

[PATCH] D54798: Move the llvm lit test dependencies to clang-tools-extra.

2018-11-22 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347449: Move the llvm lit test dependencies to clang-tools-extra. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D54798 File

[clang-tools-extra] r347450 - [clangd] Respect task cancellation in TUScheduler.

2018-11-22 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Nov 22 02:22:16 2018 New Revision: 347450 URL: http://llvm.org/viewvc/llvm-project?rev=347450&view=rev Log: [clangd] Respect task cancellation in TUScheduler. Summary: - Reads are never executed if canceled before ready-to run. In practice, we finalize cancelled read

[PATCH] D54746: [clangd] Respect task cancellation in TUScheduler.

2018-11-22 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE347450: [clangd] Respect task cancellation in TUScheduler. (authored by sammccall, committed by ). Changed prior to commit: https://reviews.llvm.org/D54746?vs=174738&id=175025#toc Repository: rL LL

[PATCH] D54746: [clangd] Respect task cancellation in TUScheduler.

2018-11-22 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done. Closed by commit rL347450: [clangd] Respect task cancellation in TUScheduler. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Changed prior to com

[PATCH] D54829: [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added subscribers: kadircet, jfb, arphaman, jkorous, MaskRay, ioeric, javed.absar. Previously, removeDoc followed by an addDoc to TUScheduler resulted in racy diagnostic responses, i.e. the old dianostics could

[PATCH] D54760: [clangd] Cleanup: make the diags callback global in TUScheduler

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 175028. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Remove accidentally added redundant 'private:' section Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54760 Files: clangd/ClangdServer.cpp cl

[PATCH] D54760: [clangd] Cleanup: make the diags callback global in TUScheduler

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdServer.cpp:77 +FileIndex *FIndex, +llvm::unique_function)> OnDiags) { + using DiagsCallback = decltype(OnDiags); sammccall wrote: > hmm, the double-indirection for diags seems a bit funny, esp

[PATCH] D54760: [clangd] Cleanup: make the diags callback global in TUScheduler

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov planned changes to this revision. ilya-biryukov added a comment. Would like to land https://reviews.llvm.org/D54829 first and rebase on top of it. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54760 ___ cfe-commits m

[PATCH] D54800: [clangd] Cleanup: stop passing around list of supported URI schemes.

2018-11-22 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. Awesome! Comment at: clangd/URI.cpp:202 +("Not a valid absolute path: " + AbsolutePath).str().c_str()); + for (auto I = URISchemeRegistry::begin(), E = URISche

[PATCH] D54829: [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/TUScheduler.cpp:241 ParseInputs FileInputs; + /// Used to indicate to the tasks running inside the worker queue that AST is + /// being destroyed and the AST queue is being drained. Note to myself: shou

[PATCH] D54830: [ASTMatchers] Add hasSideEffect() matcher.

2018-11-22 Thread Clement Courbet via Phabricator via cfe-commits
courbet created this revision. courbet added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Exposes Expr::HasSideEffects. Repository: rC Clang https://reviews.llvm.org/D54830 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMat

r347453 - [ASTMatchers] Re-generate ast matchers doc after rL346455.

2018-11-22 Thread Clement Courbet via cfe-commits
Author: courbet Date: Thu Nov 22 02:44:36 2018 New Revision: 347453 URL: http://llvm.org/viewvc/llvm-project?rev=347453&view=rev Log: [ASTMatchers] Re-generate ast matchers doc after rL346455. Modified: cfe/trunk/docs/LibASTMatchersReference.html Modified: cfe/trunk/docs/LibASTMatchersRefere

[PATCH] D53488: [clang-tidy] Improving narrowing conversions

2018-11-22 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 175030. gchatelet marked an inline comment as done. gchatelet added a comment. - Refactored the code to make it simpler, added more tests Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53488 Files: clang-tidy/cppcoreguidelines/Narrowing

[PATCH] D54830: [ASTMatchers] Add hasSideEffect() matcher.

2018-11-22 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 175031. courbet added a comment. rebase Repository: rC Clang https://reviews.llvm.org/D54830 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatchers/ASTMatchersNa

[PATCH] D53488: [clang-tidy] Improving narrowing conversions

2018-11-22 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet marked 2 inline comments as done. gchatelet added inline comments. Comment at: test/clang-tidy/cppcoreguidelines-narrowing-conversions.cpp:42-44 i += 2.0; - // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: narrowing conversion from 'double' to 'int' [cppcoreguidelines-n

[PATCH] D54817: [clangd] Put direct headers into srcs section.

2018-11-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 175032. kadircet added a comment. - Use include depth to get includes for all files, rather than just main file. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54817 Files: clangd/index/Background.cpp clangd/index/Background.h clangd

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/clients/clangd-vscode/src/extension.ts:17 +export namespace SwitchSourceHeaderRequest { +export const type = new RequestType('textDocument/switchSourceHeader'); +} hokein wrote: > Is `textDocument/switchSourceH

[PATCH] D54829: [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy

2018-11-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/TUScheduler.cpp:424 if (*AST) { OnUpdated((*AST)->getDiagnostics()); trace::Span Span("Running main AST callback"); as discussed offline, this doesn't guarantee we're not going to send OnUpdat

[PATCH] D53488: [clang-tidy] Improving narrowing conversions

2018-11-22 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 175033. gchatelet marked an inline comment as done. gchatelet added a comment. - Reverting the WarnOnFloatingPointNarrowingConversion option to be on by default Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53488 Files: clang-tidy/cpp

[PATCH] D54829: [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 175037. ilya-biryukov added a comment. - Ensure consistency for diagnostic callbacks with a critical section. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54829 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/TUSch

[PATCH] D54795: [clang-format] Do not treat asm clobber [ as ObjCExpr, refined

2018-11-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 175038. krasimir added a comment. - Add tests for _asm etc Repository: rC Clang https://reviews.llvm.org/D54795 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp ===

[PATCH] D54795: [clang-format] Do not treat asm clobber [ as ObjCExpr, refined

2018-11-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In https://reviews.llvm.org/D54795#1305395, @djasper wrote: > Does this also work for _asm and __asm? Thanks! Turns out, yes. I added tests for those. Repository: rC Clang https://reviews.llvm.org/D54795 ___ cfe-commi

[clang-tools-extra] r347460 - [clangd] Fix use-after-scope in unit test

2018-11-22 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Nov 22 04:54:25 2018 New Revision: 347460 URL: http://llvm.org/viewvc/llvm-project?rev=347460&view=rev Log: [clangd] Fix use-after-scope in unit test The scheduler holds a reference to `Proceed`, so it has to be destroyed after the scheduler. Found by asan. Modified: cl

[PATCH] D54830: [ASTMatchers] Add hasSideEffect() matcher.

2018-11-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a minor commenting request. Comment at: include/clang/ASTMatchers/ASTMatchers.h:4121 +/// \brief Matches expressions with potential side effec

[PATCH] D54829: [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 175042. ilya-biryukov marked 3 inline comments as done. ilya-biryukov added a comment. - Added comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54829 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/TUScheduler

[PATCH] D54829: [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/TUScheduler.cpp:424 if (*AST) { OnUpdated((*AST)->getDiagnostics()); trace::Span Span("Running main AST callback"); sammccall wrote: > as discussed offline, this doesn't guarantee we're no

[PATCH] D54817: [clangd] Put direct headers into srcs section.

2018-11-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Going to leave awkward comments suggesting we expand the scope a bit. Full disclosure: file dependency information is something that's come up as useful in lots of contexts. Comment at: clangd/index/Serialization.cpp:469 + // There's no point in p

[PATCH] D54829: [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy

2018-11-22 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/ClangdServer.h:132 /// Remove \p File from list of tracked files, schedule a request to free - /// resources associated with it. + /// resou

[PATCH] D54830: [ASTMatchers] Add hasSideEffect() matcher.

2018-11-22 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked an inline comment as done. courbet added a comment. Thanks. Repository: rC Clang https://reviews.llvm.org/D54830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54830: [ASTMatchers] Add hasSideEffect() matcher.

2018-11-22 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 175044. courbet added a comment. address comment Repository: rC Clang https://reviews.llvm.org/D54830 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatchers/ASTM

r347462 - [ASTMatchers] Add hasSideEffect() matcher.

2018-11-22 Thread Clement Courbet via cfe-commits
Author: courbet Date: Thu Nov 22 06:00:56 2018 New Revision: 347462 URL: http://llvm.org/viewvc/llvm-project?rev=347462&view=rev Log: [ASTMatchers] Add hasSideEffect() matcher. Summary: Exposes Expr::HasSideEffects. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https

[PATCH] D54830: [ASTMatchers] Add hasSideEffect() matcher.

2018-11-22 Thread Clement Courbet via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347462: [ASTMatchers] Add hasSideEffect() matcher. (authored by courbet, committed by ). Changed prior to commit: https://reviews.llvm.org/D54830?vs=175044&id=175045#toc Repository: rC Clang https:/

[PATCH] D54832: [clang-tidy] No fixes for auto new expression in smart check

2018-11-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: aaron.ballman. Herald added a subscriber: xazax.hun. The fix for `auto` new expression is illegal. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54832 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp test/clang-tidy/m

[PATCH] D54833: [clangd] Cleanup: use index file instead of header in workspace symbols lit test.

2018-11-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. The full path of the input header depends on the execution environment and may result in different behavior (e.g. when different URI scheme

r347463 - Revert rL347462 "[ASTMatchers] Add hasSideEffect() matcher."

2018-11-22 Thread Clement Courbet via cfe-commits
Author: courbet Date: Thu Nov 22 06:26:33 2018 New Revision: 347463 URL: http://llvm.org/viewvc/llvm-project?rev=347463&view=rev Log: Revert rL347462 "[ASTMatchers] Add hasSideEffect() matcher." Breaks some buildbots. Modified: cfe/trunk/docs/LibASTMatchersReference.html cfe/trunk/includ

[PATCH] D54800: [clangd] Cleanup: stop passing around list of supported URI schemes.

2018-11-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 175048. ioeric marked 3 inline comments as done. ioeric added a comment. - address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54800 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h c

r347465 - [clang-format] Do not treat asm clobber [ as ObjCExpr, refined

2018-11-22 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Thu Nov 22 06:49:55 2018 New Revision: 347465 URL: http://llvm.org/viewvc/llvm-project?rev=347465&view=rev Log: [clang-format] Do not treat asm clobber [ as ObjCExpr, refined Summary: r346756 refined clang-format to not treat the `[` in `asm (...: [] ..)` as an ObjCExpr. Ho

[PATCH] D54795: [clang-format] Do not treat asm clobber [ as ObjCExpr, refined

2018-11-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347465: [clang-format] Do not treat asm clobber [ as ObjCExpr, refined (authored by krasimir, committed by ). Changed prior to commit: https://reviews.llvm.org/D54795?vs=175038&id=175049#toc Repository

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-11-22 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: unittests/clangd/FindSymbolsTests.cpp:442 +SymNameRange(Main.range("decl"), + AllOf(Wit

[PATCH] D52273: [clangd] Initial implementation of expected types

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 175050. ilya-biryukov marked 11 inline comments as done. ilya-biryukov added a comment. - Address comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52273 Files: clangd/CMakeLists.txt clangd/ExpectedTypes.cpp clangd/Expecte

[PATCH] D52273: [clangd] Initial implementation of expected types

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ExpectedTypes.h:32 +/// this allows the representation to be stored in the index and compared with +/// types coming from a different AST later. +class OpaqueType { sammccall wrote: > ilya-biryukov wrote: >

[clang-tools-extra] r347466 - [clangd] Cleanup: use index file instead of header in workspace symbols lit test.

2018-11-22 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Nov 22 06:59:22 2018 New Revision: 347466 URL: http://llvm.org/viewvc/llvm-project?rev=347466&view=rev Log: [clangd] Cleanup: use index file instead of header in workspace symbols lit test. Summary: The full path of the input header depends on the execution environment a

[PATCH] D54833: [clangd] Cleanup: use index file instead of header in workspace symbols lit test.

2018-11-22 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE347466: [clangd] Cleanup: use index file instead of header in workspace symbols lit… (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D54833?vs=175047&id=175051#t

[clang-tools-extra] r347467 - [clangd] Cleanup: stop passing around list of supported URI schemes.

2018-11-22 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Nov 22 07:02:05 2018 New Revision: 347467 URL: http://llvm.org/viewvc/llvm-project?rev=347467&view=rev Log: [clangd] Cleanup: stop passing around list of supported URI schemes. Summary: Instead of passing around a list of supported URI schemes in clangd, we expose an inte

[PATCH] D54800: [clangd] Cleanup: stop passing around list of supported URI schemes.

2018-11-22 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE347467: [clangd] Cleanup: stop passing around list of supported URI schemes. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D54800?vs=175048&id=175052#toc Repo

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-22 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/AST/DeclBase.cpp:1469 assert(Pos != Map->end() && "no lookup entry for decl"); -if (Pos->second.getAsVector() || Pos->second.getAsDecl() == ND) +// Remove the decl only if it is contained. +if ((Pos

[PATCH] D54466: [Analyzer] Iterator Checkers - Use the region of the topmost base class for iterators stored in a region

2018-11-22 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. In https://reviews.llvm.org/D54466#1305305, @baloghadamsoftware wrote: > In https://reviews.llvm.org/D54466#1297887, @NoQ wrote: > > > > Hmmm, shouldn't we add this to `MemRegion`'s interface instead? > > > This: > > > I wouldn't insist, but this does indeed sound usefu

[PATCH] D54829: [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdServer.h:132 /// Remove \p File from list of tracked files, schedule a request to free - /// resources associated with it. + /// resources associated with it. After this function returns, we guarantee + /// that

[PATCH] D54829: [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 175053. ilya-biryukov marked 3 inline comments as done. ilya-biryukov added a comment. - Address the comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54829 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/TUSch

[PATCH] D54834: [analyzer][MallocChecker] Improve warning messages on double-delete errors

2018-11-22 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: george.karpenkov, NoQ, xazax.hun, rnkovacs. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, whisperity. Repository: rC Clang https://reviews.llvm.org/D54834

[PATCH] D52273: [clangd] Initial implementation of expected types

2018-11-22 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/ExpectedTypes.cpp:8 + +namespace clang { +namespace clangd { nit: using namespace llvm (until/unless we switch other files) ==

[clang-tools-extra] r347468 - [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy

2018-11-22 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Nov 22 07:39:54 2018 New Revision: 347468 URL: http://llvm.org/viewvc/llvm-project?rev=347468&view=rev Log: [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy Summary: Previously, removeDoc followed by an addDoc to TUScheduler resulted in racy diagn

[PATCH] D54829: [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy

2018-11-22 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE347468: [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D54829?vs=175053&id=175055#toc

[PATCH] D54563: [analyzer] MoveChecker Pt.4: Add a few more state reset methods.

2018-11-22 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. In https://reviews.llvm.org/D54563#1301893, @NoQ wrote: > In https://reviews.llvm.org/D54563#1299918, @Szelethus wrote: > > > How about `std::list::splice`? > > > Hmm, you mean that it leaves its argument empty? Interesting, i guess we may > need a separate facility fo

[PATCH] D18860: [analyzer] Fix the "Zombie symbols" issue.

2018-11-22 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. In https://reviews.llvm.org/D18860#1297742, @NoQ wrote: > Nope, unit tests aren't quite useful here. I can't unit-test the behavior of > API that i'm about to //remove//... right? Hmmm, can't really argue with that, can I? :D https://reviews.llvm.org/D18860

[PATCH] D54760: [clangd] Cleanup: make the diags callback global in TUScheduler

2018-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 175056. ilya-biryukov added a comment. - Rebase - Remove makeUpdateCallbacks, expose the callback class instead Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54760 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/TUS

[clang-tools-extra] r347470 - [clang-tidy] Ignore template instantiations in modernize-use-using

2018-11-22 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Nov 22 08:10:18 2018 New Revision: 347470 URL: http://llvm.org/viewvc/llvm-project?rev=347470&view=rev Log: [clang-tidy] Ignore template instantiations in modernize-use-using The test I'm adding passes without the change due to the deduplication logic in ClangTidyDiagnost

[PATCH] D54760: [clangd] Cleanup: make the diags callback global in TUScheduler

2018-11-22 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. Everything looks so much better... Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54760 ___ cfe-commits mailing list cfe-c

[clang-tools-extra] r347472 - [clangd] Cleanup error consumption code. NFC

2018-11-22 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Nov 22 08:20:12 2018 New Revision: 347472 URL: http://llvm.org/viewvc/llvm-project?rev=347472&view=rev Log: [clangd] Cleanup error consumption code. NFC - Remove reimplementations of llvm::consumeError. - Simplify test code by using EXPECT_ERROR where it fits. Modifie

[PATCH] D54796: [clangd] **Prototype**: C++ API for emitting file status

2018-11-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/ClangdLSPServer.cpp:787 + notify("window/showMessage", + json::Object { + {"uri", URI}, we should have a protocol model object (in Protocol.h) for the file status updates. I think it should

[PATCH] D54823: [analyzer][MallocChecker][NFC] Document and reorganize some functions

2018-11-22 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. Thank you for doing the cleaning that no one else is interested in! Comments is inline below. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:342 + DefaultBool IsOptimistic; + MemFunctionInfoTy MemFunctionInfo; public: I can't

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-22 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 175058. martong added a comment. - Revert "Minor style changes and rename a function" Repository: rC Clang https://reviews.llvm.org/D53655 Files: include/clang/AST/DeclContextInternals.h include/clang/ASTMatchers/ASTMatchers.h lib/AST/ASTImporter.c

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-22 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added inline comments. Comment at: lib/AST/DeclBase.cpp:1469 assert(Pos != Map->end() && "no lookup entry for decl"); -if (Pos->second.getAsVector() || Pos->second.getAsDecl() == ND) +// Remove the decl on

[PATCH] D53693: [ASTImporter] Typedef import brings in the complete type

2018-11-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Herald added a reviewer: shafik. Herald added a subscriber: gamesh411. Comment at: lib/AST/ASTImporter.cpp:2310 +D->getUnderlyingType(), FoundTypedef->getUnderlyingType())) { + QualType FromUT = D->getUnderlyingType(); +

[PATCH] D54013: [analyzer] NFC: MallocChecker: Avoid redundant transitions.

2018-11-22 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2383-2384 + if (RS == OldRS) +return; + Hmmm, I guess we return here because if `RegionState` is unchanged, so should be `ReallocPairs` and `FreeReturnValue`, corre

[PATCH] D53708: [ASTImporter] Add importer specific lookup

2018-11-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Herald added a reviewer: shafik. Herald added a subscriber: gamesh411. Gentle Ping. Repository: rC Clang https://reviews.llvm.org/D53708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D53708: [ASTImporter] Add importer specific lookup

2018-11-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Constructs like `struct A { struct Foo *p; };` are very common in C projects. Since `Foo` as a forward decl cannot be found by normal lookup we need this patch in order to properly CTU analyze even a simple C project like `tmux`. Repository: rC Clang https://reviews

[PATCH] D53755: [ASTImporter] Remove import of definition from GetAlreadyImportedOrNull

2018-11-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added a subscriber: gamesh411. martong added a comment. @shafik , @gamesh411 I think when I used arcanist to update the patch it removed you as a reviewer and a subscriber. I am really sorry about this. Fortunately the Herald script added you guys back. And once you are here, this is a g

[clang-tools-extra] r347474 - [clangd] Cleanup: make the diags callback global in TUScheduler

2018-11-22 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Nov 22 09:27:08 2018 New Revision: 347474 URL: http://llvm.org/viewvc/llvm-project?rev=347474&view=rev Log: [clangd] Cleanup: make the diags callback global in TUScheduler Reviewers: sammccall Reviewed By: sammccall Subscribers: javed.absar, ioeric, MaskRay, jkorous,

[PATCH] D54760: [clangd] Cleanup: make the diags callback global in TUScheduler

2018-11-22 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347474: [clangd] Cleanup: make the diags callback global in TUScheduler (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org

[PATCH] D18860: [analyzer] Fix the "Zombie symbols" issue.

2018-11-22 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Let's also have the link to your most recent mail about this issue here: http://lists.llvm.org/pipermail/cfe-dev/2018-November/060038.html I re-read the mailing list conversation from 2016, @szepet's `MisusedMoveChecker` patch, so I have a better graps on whats happen

[PATCH] D54823: [analyzer][MallocChecker][NFC] Document and reorganize some functions

2018-11-22 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. And thank you for helping me along the way! :D Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:342 + DefaultBool IsOptimistic; + MemFunctionInfoTy MemFunctionInfo; public: MTC wrote: > I can't say that abstracting `MemFun

[PATCH] D54823: [analyzer][MallocChecker][NFC] Document and reorganize some functions

2018-11-22 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:342 + DefaultBool IsOptimistic; + MemFunctionInfoTy MemFunctionInfo; public: Szelethus wrote: > Szelethus wrote: > > MTC wrote: > > > I can't say that abstracting `MemFu

[PATCH] D54141: [clang-tidy] add deduplication support for run-clang-tidy.py

2018-11-22 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 175063. JonasToth added a comment. Push some fixes i did while working with this script, for reference of others potentially looking at this patch. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54141 Files: clang-tidy/tool/run-clang-ti

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-22 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Thank you for this great patch! Did you consider using `clang/Tooling/ASTDiff/*` functionality, as there is the possibility of just comparing the AST 'below' the branches? Please add tests that contain macros as well, and what do you think should happen with them? I

[PATCH] D54799: [clangd][WIP] textDocument/CursorInfo method

2018-11-22 Thread Jan Korous via Phabricator via cfe-commits
jkorous marked 7 inline comments as done. jkorous added a comment. Hi Sam. In https://reviews.llvm.org/D54799#1305470, @sammccall wrote: > >> I'd like to ask for early feedback - what's still missing is relevant client >> capability. > > I'd suggest leaving it out unless others feel strong

[PATCH] D33672: [analyzer] INT50-CPP. Do not cast to an out-of-range enumeration checker

2018-11-22 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Herald added a subscriber: baloghadamsoftware. I'll commit tomorrow, when I have time to keep an eye out for buildbots. Thanks! https://reviews.llvm.org/D33672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D54799: [clangd][WIP] textDocument/CursorInfo method

2018-11-22 Thread Jan Korous via Phabricator via cfe-commits
jkorous updated this revision to Diff 175069. jkorous marked 2 inline comments as done. jkorous added a comment. Changes based on review. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54799 Files: ClangdLSPServer.cpp ClangdLSPServer.h ClangdServer.cpp ClangdServer.h

r347480 - A __builtin_constant_p() returns 0 with a function type.

2018-11-22 Thread Bill Wendling via cfe-commits
Author: void Date: Thu Nov 22 14:58:06 2018 New Revision: 347480 URL: http://llvm.org/viewvc/llvm-project?rev=347480&view=rev Log: A __builtin_constant_p() returns 0 with a function type. Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp cfe/trunk/test/CodeGen/builtin-constant-p.c Modified:

[PATCH] D53696: [Haiku] Support __float128 for Haiku x86 and x86_64

2018-11-22 Thread Kristina Brooks via Phabricator via cfe-commits
kristina requested changes to this revision. kristina added a comment. In https://reviews.llvm.org/D53696#1305990, @kallisti5 wrote: > Indeed. I agree the _GLIBCXX_USE_FLOAT128 is misplaced there. That comes > from config.h in libstdc++. That's working around an issue in Haiku's build > (lib

[PATCH] D54379: Add Hurd toolchain support to Clang

2018-11-22 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. Ping. Would like someone else to co-review this, everything looks fine aside from tests (I think a portion of this could use a short unit test with regards to creating the actual target instance). Also your FileCheck test is only for invoking `clang -cc1` from the look

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-22 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 175078. malaperle marked 5 inline comments as done. malaperle added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54781 Files: clangd/clients/clangd-vscode/package.json clangd/clients/clangd-vscode/src/ex

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-22 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D54781#1306102, @ioeric wrote: > Could you run clang-format on the changed lines? I didn't know clang-format could be used for Typescript. I ran it and it's a bit inconsistent with the rest of the file but I don't want to format the whole