[PATCH] D50815: Establish the header

2018-08-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/bit:99 + unsigned long where; + // Search from LSB to MSB for first set bit. + // Returns zero if no set bit is found. Pretty sure this is the other way around here. ``` // Search from MSB to LSB for first

[PATCH] D50792: [ASTImporter] Add test for member pointer types.

2018-08-16 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. LGTM. Repository: rC Clang https://reviews.llvm.org/D50792 ___ cfe-commits mailing list

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-08-16 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added inline comments. This revision is now accepted and ready to land. Comment at: lib/AST/ASTImporter.cpp:1317 + for (auto *D : FromRD->decls()) { +Decl *ToD = Importer.GetAlreadyImportedOrNull(D); +assert(ToRD ==

[PATCH] D50619: [clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer

2018-08-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. You are totally right. Am 16.08.2018 um 02:41 schrieb Shuai Wang via Phabricator: > shuaiwang added inline comments. > > > Comment at: unittests/clang-tidy/ExprMutationAnalyzerTest.cpp:309 > > +TEST(ExprMutationAnalyzerTest, CallUnresolved) { > +

r339843 - [X86] Remove masking from the 512-bit padds and psubs builtins. Use select builtin instead.

2018-08-16 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Aug 15 23:20:29 2018 New Revision: 339843 URL: http://llvm.org/viewvc/llvm-project?rev=339843=rev Log: [X86] Remove masking from the 512-bit padds and psubs builtins. Use select builtin instead. Modified: cfe/trunk/include/clang/Basic/BuiltinsX86.def

[PATCH] D50815: Establish the header

2018-08-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: include/bit:145 + static_assert(sizeof(unsigned) == 4, ""); + return __popcnt(__x); +#endif How does this work on pre-Haswell X86 CPUs? Doesn't MSVC just blindly emit the popcnt instruction when it sees this?

[PATCH] D50805: Don't warn on returning the address of a label

2018-08-16 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. > I think that, ultimately, this warning isn't worth the code complexity in > clang to support it. The code complexity is //at most// 11 lines (the 11 lines removed by this patch), which really isn't much. But there's an interface-complexity argument to be made,

[PATCH] D50815: Establish the header

2018-08-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: include/bit:163 + static_assert(sizeof(unsigned long long) == 8, ""); + return __popcnt64(__x); +#endif I don't think __popcnt64 exists in MSVC when targeting 32-bit mode. https://reviews.llvm.org/D50815

[PATCH] D50619: [clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer

2018-08-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I see, thank you for the clarification :) Am 15.08.2018 um 19:25 schrieb Shuai Wang via Phabricator: > shuaiwang added inline comments. > > > Comment at: unittests/clang-tidy/ExprMutationAnalyzerTest.cpp:410 > +

[PATCH] D50811: [ASTImporter] Add test for WhileStmt

2018-08-16 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. LGTM. Repository: rC Clang https://reviews.llvm.org/D50811 ___ cfe-commits mailing list

[PATCH] D50813: [ASTImporter] Add test for IndirectGotoStmt

2018-08-16 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. LGTM. Repository: rC Clang https://reviews.llvm.org/D50813 ___ cfe-commits mailing list

[PATCH] D49798: [ASTImporter] Adding some friend function related unittests.

2018-08-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 160972. balazske added a comment. - Renamed variables, corrected a variable type. Repository: rC Clang https://reviews.llvm.org/D49798 Files: unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp

[PATCH] D50672: [ASTImporter] Change the return result of Decl import to Optional

2018-08-16 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > Yes, I was thinking about it too. The reason why I chose Optional was that > ASTImporter clients don't use the error kind. If you have any plans on > changing this, Expected is a preferred approach. Yes, we plan to submit a patch to LLDB too which would apply the use

[PATCH] D50785: [clangd][tests] Add exit(EXIT_FAILURE) in case of JSON parsing failure in TestMode

2018-08-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. +1 to having a separate option for that. More generally, wouldn't we want to exit on more kinds errors in the future? JSON parsing errors is something that popped up recently, but the option only for that looks too narrow. We might end up wanting more options like

[PATCH] D50727: [clangd] Fetch documentation from the Index during signature help

2018-08-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. looks good, a few nits. Comment at: clangd/CodeComplete.cpp:742 +llvm::DenseMap FetchedDocs; +if (Index) { + LookupRequest IndexRequest; nit: do we want to log anything here? It may be useful

[PATCH] D50691: [CMake] Fix the LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY option

2018-08-16 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Merged in r339850. Repository: rL LLVM https://reviews.llvm.org/D50691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r339850 - Merging r339697:

2018-08-16 Thread Hans Wennborg via cfe-commits
Author: hans Date: Thu Aug 16 02:03:32 2018 New Revision: 339850 URL: http://llvm.org/viewvc/llvm-project?rev=339850=rev Log: Merging r339697: r339697 | mstorsjo | 2018-08-14 19:33:10 +0200 (Tue, 14 Aug 2018) | 8 lines

Re: [libcxx] r339697 - [CMake] Fix the LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY option

2018-08-16 Thread Hans Wennborg via cfe-commits
Merged to 7.0 in r339850. On Tue, Aug 14, 2018 at 7:33 PM, Martin Storsjo via cfe-commits wrote: > Author: mstorsjo > Date: Tue Aug 14 10:33:10 2018 > New Revision: 339697 > > URL: http://llvm.org/viewvc/llvm-project?rev=339697=rev > Log: > [CMake] Fix the

[PATCH] D50810: [ASTImporter] Add test for DoStmt

2018-08-16 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. LGTM. Repository: rC Clang https://reviews.llvm.org/D50810 ___ cfe-commits mailing list

r339845 - [X86] Remove masking from the 512-bit paddus/psubus builtins. Use a select builtin instead.

2018-08-16 Thread Craig Topper via cfe-commits
Author: ctopper Date: Thu Aug 16 00:28:06 2018 New Revision: 339845 URL: http://llvm.org/viewvc/llvm-project?rev=339845=rev Log: [X86] Remove masking from the 512-bit paddus/psubus builtins. Use a select builtin instead. Modified: cfe/trunk/include/clang/Basic/BuiltinsX86.def

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-16 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. I think I've mentioned this before, but I would like to discuss the possibility of adding a target hook(s) for some of these operations (conversions, arithmetic when it comes). Precisely matching the emitted saturation operation is virtually impossible for a target.

[PATCH] D50793: [ASTImporter] Add test for importing CompoundAssignOperators

2018-08-16 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. Looks good. Repository: rC Clang https://reviews.llvm.org/D50793 ___ cfe-commits mailing list

[PATCH] D50652: [libcxx] By default, do not use internal_linkage to hide symbols from the ABI

2018-08-16 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. >>> Oh, or could we do >>> >>> -D_LIBCPP_HIDE_FROM_ABI= >>> >>> >>> and just get regular odr linkage for these functions? >> >> No, you do need to use `_LIBCPP_HIDDEN _LIBCPP_ALWAYS_INLINE` because of the >> issue described in >>

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-16 Thread David Chisnall via Phabricator via cfe-commits
theraven added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:1886 case BuiltinType::ObjCId: -mangleArtificalTagType(TTK_Struct, "objc_object"); +mangleArtificalTagType(TTK_Struct, ".objc_object"); break; smeenai wrote: > theraven

[PATCH] D50727: [clangd] Fetch documentation from the Index during signature help

2018-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50695: [clangd] Always use the latest preamble

2018-08-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks, we were previously getting inconsistent ASTs (i.e. using different preambles), depending on whether they were built in `TUScheduler::update` or in `TUScheduler::runWithAST` handlers. Just a few NITs. Comment at:

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

2018-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 160986. kadircet added a comment. - Made TaskHandle move-only. Since it is costly and most likely unnecessary to copy it other than to move it into Context. - Provided an explicit clone method for copying. Repository: rCTE Clang Tools Extra

[PATCH] D50619: [clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer

2018-08-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. @shuaiwang i tried to apply this and check the clang-tidy part again, but it does not compile (log attached). I update clang to master, did you add a matcher or something like this? F6950472: error.log Repository: rCTE Clang

[PATCH] D50662: Add dump() method for SourceRange

2018-08-16 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added a comment. This seems like a reasonable addition. Maybe it could also provide `print` and `printToString` to more closely match the `SourceLocation` API? Repository: rC Clang https://reviews.llvm.org/D50662 ___ cfe-commits

[PATCH] D50627: [clangd] Add a testcase for empty preamble.

2018-08-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D50627#1198595, @hokein wrote: > I think this patch is in a good scope (for empty preamble). I'd leave it as > it is. The failure of GoTodefinition test is caused by an inconsistent > behavior of using `lastBuiltPreamble`/`NewPreamble`

[PATCH] D50764: [AST] Make NullStmt final and give it factory functions

2018-08-16 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added a comment. Thanks. I'm not planning to move forward with this until the contracts patch is ready (it might change enough to not even require this); that should leave plenty of time for others to take a look. Repository: rC Clang https://reviews.llvm.org/D50764

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: ioeric, ilya-biryukov, hokein. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Currently we only add parantheses to the functions if snippets are enabled, which also inserts snippets for parameters into parantheses.

[PATCH] D50695: [clangd] Always use the latest preamble

2018-08-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 160983. hokein marked 4 inline comments as done. hokein added a comment. Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50695 Files: clangd/TUScheduler.cpp unittests/clangd/XRefsTests.cpp Index:

Re: r339603 - [OPENMP] Fix emission of the loop doacross constructs.

2018-08-16 Thread Hans Wennborg via cfe-commits
I've gone ahead and merged it in r339851. On Wed, Aug 15, 2018 at 3:23 PM, Alexey Bataev wrote: > I think it would be good to backport it. Could you do that, Jonas? > > - > Best regards, > Alexey Bataev > > 15.08.2018 5:02, Jonas Hahnfeld via cfe-commits пишет: > > Alexey, Hans, > >

Re: r339603 - [OPENMP] Fix emission of the loop doacross constructs.

2018-08-16 Thread Alexey Bataev via cfe-commits
Hans, thanks a lot. Best regards, Alexey Bataev > 16 авг. 2018 г., в 5:36, Hans Wennborg написал(а): > > I've gone ahead and merged it in r339851. > >> On Wed, Aug 15, 2018 at 3:23 PM, Alexey Bataev wrote: >> I think it would be good to backport it. Could you do that, Jonas? >> >>

[PATCH] D49793: [AArch64] - return address signing

2018-08-16 Thread Luke Cheeseman via Phabricator via cfe-commits
LukeCheeseman added a comment. ping https://reviews.llvm.org/D49793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r339852 - Merging r339794:

2018-08-16 Thread Hans Wennborg via cfe-commits
Author: hans Date: Thu Aug 16 02:45:10 2018 New Revision: 339852 URL: http://llvm.org/viewvc/llvm-project?rev=339852=rev Log: Merging r339794: r339794 | dim | 2018-08-15 19:30:32 +0200 (Wed, 15 Aug 2018) | 8 lines For

Re: [libcxx] r339794 - For FreeBSD, don't define _M in nasty_macros.hpp

2018-08-16 Thread Hans Wennborg via cfe-commits
Merged to 7.0 in r339852. On Wed, Aug 15, 2018 at 7:30 PM, Dimitry Andric via cfe-commits wrote: > Author: dim > Date: Wed Aug 15 10:30:32 2018 > New Revision: 339794 > > URL: http://llvm.org/viewvc/llvm-project?rev=339794=rev > Log: > For FreeBSD, don't define _M in nasty_macros.hpp > > Because

Re: [libcxx] r339743 - [libcxx] Fix XFAILs for aligned allocation tests on older OSX versions

2018-08-16 Thread Hans Wennborg via cfe-commits
Merged to 7.0 in r339854. On Wed, Aug 15, 2018 at 2:30 AM, Louis Dionne via cfe-commits wrote: > Author: ldionne > Date: Tue Aug 14 17:30:03 2018 > New Revision: 339743 > > URL: http://llvm.org/viewvc/llvm-project?rev=339743=rev > Log: > [libcxx] Fix XFAILs for aligned allocation tests on older

[libcxx] r339854 - Merging r339743:

2018-08-16 Thread Hans Wennborg via cfe-commits
Author: hans Date: Thu Aug 16 02:52:16 2018 New Revision: 339854 URL: http://llvm.org/viewvc/llvm-project?rev=339854=rev Log: Merging r339743: r339743 | ldionne | 2018-08-15 02:30:03 +0200 (Wed, 15 Aug 2018) | 14 lines

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

2018-08-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Mostly LSP-specific comments and comments about making TaskHandle thread-safe. I'm also starting to wonder if the scope of this patch is too big, we could potentially split it into three separate bits: 1. Generic cancellation API, i.e. `Cancellation.h` and

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

2018-08-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. The last set of comments is for the previous version, might be missing some updates, sorry about that. Will make sure to review the one too! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 ___

[PATCH] D50170: [libcxxabi] Fix test_exception_address_alignment test for ARM

2018-08-16 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. It doesn't seem to get more reviewed than this. yroux, I'd say go ahead and commit it. Repository: rCXXA libc++abi https://reviews.llvm.org/D50170

r339860 - [AST] Pack the unsigned of DependentTemplateSpecializationType into Type

2018-08-16 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Thu Aug 16 03:28:18 2018 New Revision: 339860 URL: http://llvm.org/viewvc/llvm-project?rev=339860=rev Log: [AST] Pack the unsigned of DependentTemplateSpecializationType into Type The bit-fields of `Type` have enough space for the member `unsigned NumArgs` of

[PATCH] D50712: [AST] Pack the unsigned of DependentTemplateSpecializationType into Type

2018-08-16 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339860: [AST] Pack the unsigned of DependentTemplateSpecializationType into Type (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

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

2018-08-16 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a reviewer: vsapsai. jkorous added a comment. Adding Volodymyr who landed related patch recently. Repository: rC Clang https://reviews.llvm.org/D50462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50713: [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type

2018-08-16 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339861: [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r339861 - [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type

2018-08-16 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Thu Aug 16 03:33:36 2018 New Revision: 339861 URL: http://llvm.org/viewvc/llvm-project?rev=339861=rev Log: [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type The bit-fields of Type have enough space for the member unsigned NumArgs of

[PATCH] D50727: [clangd] Fetch documentation from the Index during signature help

2018-08-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 160992. ilya-biryukov marked 2 inline comments as done. ilya-biryukov added a comment. - Log on index request, remove FIXME that was addressed - Remove SymbolID::forDecl, use existing helper instead Repository: rCTE Clang Tools Extra

[PATCH] D50727: [clangd] Fetch documentation from the Index during signature help

2018-08-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/CodeComplete.cpp:755 + }); + log("SigHelp: requested docs for {0} symbols from the index, got {1} " + "symbols with non-empty docs in the response", drive by: I think this should be `vlog` or

[PATCH] D50715: [AST] Store the OwnedTagDecl as a trailing object in ElaboratedType.

2018-08-16 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339862: [AST] Store the OwnedTagDecl as a trailing object in ElaboratedType. (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r339862 - [AST] Store the OwnedTagDecl as a trailing object in ElaboratedType.

2018-08-16 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Thu Aug 16 03:48:16 2018 New Revision: 339862 URL: http://llvm.org/viewvc/llvm-project?rev=339862=rev Log: [AST] Store the OwnedTagDecl as a trailing object in ElaboratedType. The TagDecl *OwnedTagDecl in ElaboratedType is quite commonly null (at least when parsing all

[PATCH] D50740: [SourceManager] isPointWithin: avoid using isBeforeInTranslationUnit, compare buffer offsets directly for lexical correctness

2018-08-16 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Hi Alex, nice work! I am just wondering if it would be beneficial to assert Loc and End are in the same file. It might help to catch bugs. I also stumbled upon this function but not sure it makes things significantly cleaner here:

[PATCH] D50727: [clangd] Fetch documentation from the Index during signature help

2018-08-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/CodeComplete.cpp:742 +llvm::DenseMap FetchedDocs; +if (Index) { + LookupRequest IndexRequest; hokein wrote: > nit: do we want to log anything here? It may be useful for debug. Definitely

[PATCH] D50785: [clangd][tests] Add exit(EXIT_FAILURE) in case of JSON parsing failure in TestMode

2018-08-16 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Oh, I thought that what everyone wanted was test-specific behaviour. I like both approaches you propose much more! If we go for the generic option we can effectively start "checking stderr" in tests by using the flag. That would be nice. Just to be sure we are all on

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/CodeComplete.h:85 + + /// Enables cursor to be moved around according to completions needs even when + /// snippets are disabled. For example selecting a function with parameters as ioeric wrote: > IIRC, the

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

2018-08-16 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg added inline comments. Comment at: test/clang-tidy/abseil-fake-declarations.h:1 +namespace std { +struct string { hokein wrote: > I'd expect this header file is used as as a real absl library file: > > * create an `absl` directory in

[PATCH] D50727: [clangd] Fetch documentation from the Index during signature help

2018-08-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/CodeComplete.cpp:755 + }); + log("SigHelp: requested docs for {0} symbols from the index, got {1} " + "symbols with non-empty docs in the response", ioeric wrote: > drive by: I think this

[PATCH] D50740: [SourceManager] isPointWithin: avoid using isBeforeInTranslationUnit, compare buffer offsets directly for lexical correctness

2018-08-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Basic/SourceManager.cpp:2035 + "Passed invalid source location!"); + assert(Start.isFileID() && End.isFileID() && Loc.isFileID() && + "Passed non-file source location!"); Why do we disallow locations

[clang-tools-extra] r339866 - Attempt to fix clangd tests on older compilers

2018-08-16 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Thu Aug 16 04:41:19 2018 New Revision: 339866 URL: http://llvm.org/viewvc/llvm-project?rev=339866=rev Log: Attempt to fix clangd tests on older compilers Old gcc versions of gcc struggle with raw string literals inside macros. Inspired by rL339759 Modified:

[PATCH] D50727: [clangd] Fetch documentation from the Index during signature help

2018-08-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/CodeComplete.cpp:755 + }); + log("SigHelp: requested docs for {0} symbols from the index, got {1} " + "symbols with non-empty docs in the response", hokein wrote: > ioeric wrote: > >

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D50337#1198914, @kbobyrev wrote: > Don't separate the logic for "long" and "short" queries: > https://reviews.llvm.org/D50517 (https://reviews.llvm.org/rCTE339548) > introduced incomplete trigrams which can be used on for "short" queries,

[PATCH] D48714: [clang-tidy] fix PR37913, templated exception factory diagnosed correctly

2018-08-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: test/clang-tidy/hicpp-exception-baseclass.cpp:191 +void templated_thrower() { throw T{}(); } +// CHECK-MESSAGES: [[@LINE-1]]:34: warning: throwing an exception whose type 'int' is not derived from 'std::exception' +

[PATCH] D50631: [AST] Stuff more data into FunctionTypeBitfields

2018-08-16 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno planned changes to this revision. riccibruno added a comment. I Will put `NumExceptions` in a trailing object. However it seems that `FunctionProtoType` can be substantially cleaned up by converting it to use `llvm::TrailingObjects` instead of manually doing the casts+arithmetic.

[PATCH] D50839: [llvm] Optimize YAML::isNumeric

2018-08-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ilya-biryukov, ioeric. Herald added a reviewer: javed.absar. Herald added a subscriber: kristof.beyls. This patch significantly improves performance of the YAML serializer by optimizing `YAML::isNumeric` function. This function is called

[PATCH] D50726: [clangd] Show function documentation in sigHelp

2018-08-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 161011. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Expose getDeclComment instead of getDocComment Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50726 Files: clangd/CodeComplete.cpp

[PATCH] D50689: [clangd] NFC: Improve Dex Iterators debugging traits

2018-08-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161013. kbobyrev marked an inline comment as done. kbobyrev added a comment. Improved wording to prevent confusion: no more `IDX` (which is the one pointed to by the iterator) and `IDN`; just mention that the element being pointed to is the one enclosed in

[PATCH] D50385: [clangd] Collect symbol occurrences from AST.

2018-08-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D50385#1193600, @ioeric wrote: > In https://reviews.llvm.org/D50385#1193545, @hokein wrote: > > > In https://reviews.llvm.org/D50385#1191914, @ioeric wrote: > > > > > 2 high-level questions: > > > > > > 1. What's the reason for having a

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

2018-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161018. kadircet marked 21 inline comments as done. kadircet added a comment. - Resolve discussions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 Files: clangd/CMakeLists.txt clangd/Cancellation.cpp clangd/Cancellation.h

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

2018-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/Cancellation.h:92 + operator bool() const { return isCancelled(); } + friend CancellationToken isCancelled(); + ilya-biryukov wrote: > It's a bit confusing that this name clashes with a member function. > We

[PATCH] D50839: [llvm] Optimize YAML::isNumeric

2018-08-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161027. kbobyrev marked 2 inline comments as done. kbobyrev added a subscriber: lebedev.ri. kbobyrev added a comment. Herald added a subscriber: mgorny. Very good point by @lebedev.ri! I have added a very simple fuzzer for the parser. So far, there were no

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-16 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld created this revision. Hahnfeld added reviewers: tra, gtbercea, hfinkel. Herald added subscribers: cfe-commits, guansong. When compiling CUDA or OpenMP device code Clang parses header files that expect certain predefined macros from the host architecture. To make this work the compiler

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-16 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D50845#1202540, @ABataev wrote: > Maybe for device compilation we also should define `__NO_MATH_INLINES` and > `__NO_STRING_INLINES` macros to disable inline assembly in glibc? The problem is that `__NO_MATH_INLINES` doesn't even avoid all

[libcxxabi] r339865 - [libcxxabi] Fix test_exception_address_alignment test for ARM

2018-08-16 Thread Yvan Roux via cfe-commits
Author: yroux Date: Thu Aug 16 04:38:09 2018 New Revision: 339865 URL: http://llvm.org/viewvc/llvm-project?rev=339865=rev Log: [libcxxabi] Fix test_exception_address_alignment test for ARM Check _LIBCXXABI_ARM_EHABI macro instead of libunwind version. Fixes PR34182 Differential revision:

[PATCH] D50726: [clangd] Show function documentation in sigHelp

2018-08-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/CodeCompletionStrings.cpp:81 +std::string +getDocComment(const ASTContext , + const CodeCompleteConsumer::OverloadCandidate , The function doesn't seem to carry its weight, and the difference from the

[libunwind] r339848 - [libunwind][mips] Modify the __mips_fpr macro check

2018-08-16 Thread Stefan Maksimovic via cfe-commits
Author: smaksimovic Date: Thu Aug 16 01:47:43 2018 New Revision: 339848 URL: http://llvm.org/viewvc/llvm-project?rev=339848=rev Log: [libunwind][mips] Modify the __mips_fpr macro check The __mips_fpr macro can take the value of 0 as well, change to account for that case. Differential Revision:

[libunwind] r339849 - [libunwind][mips] Guard accumulator registers

2018-08-16 Thread Stefan Maksimovic via cfe-commits
Author: smaksimovic Date: Thu Aug 16 01:49:50 2018 New Revision: 339849 URL: http://llvm.org/viewvc/llvm-project?rev=339849=rev Log: [libunwind][mips] Guard accumulator registers Mipsr6 does not possess HI and LO accumulator registers, adjust validRegister functions to respect that.

[PATCH] D50385: [clangd] Collect symbol occurrences from AST.

2018-08-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. > Hmm, I think this is the same for other symbol payload e.g. definition can be > missing for a symbol. And it seems to me that the concern is on the > SymbolSlab level: if a slab is for a single TU, users should expect missing > information; if a slab is merged from

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161017. kbobyrev added a comment. Sorry, the last diff was the old one. Should be correct now. https://reviews.llvm.org/D50337 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/DexIndex.cpp

[PATCH] D50839: [llvm] Optimize YAML::isNumeric

2018-08-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Just drive-by comments, the maintainers of the code are in a much better position to give feedback, of course. Nevertheless, my few cents: - Getting rid of a regex in favor of the explicit loop is definitely a good thing. It's incredibly how much time is spent

[PATCH] D50839: [llvm] Optimize YAML::isNumeric

2018-08-16 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added inline comments. Comment at: llvm/include/llvm/Support/YAMLTraits.h:477 + if (ParseOct && std::find(std::begin(OctalChars), std::end(OctalChars), +Char) == std::end(OctalChars)) +return false; Can you use

Re: [libcxxabi] r339865 - [libcxxabi] Fix test_exception_address_alignment test for ARM

2018-08-16 Thread Hans Wennborg via cfe-commits
Merged to 7.0 in r339881. On Thu, Aug 16, 2018 at 1:38 PM, Yvan Roux via cfe-commits wrote: > Author: yroux > Date: Thu Aug 16 04:38:09 2018 > New Revision: 339865 > > URL: http://llvm.org/viewvc/llvm-project?rev=339865=rev > Log: > [libcxxabi] Fix test_exception_address_alignment test for ARM >

[PATCH] D50547: [Driver] Use normalized triples for multiarch runtime path

2018-08-16 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 161031. Repository: rC Clang https://reviews.llvm.org/D50547 Files: clang/include/clang/Driver/ToolChain.h clang/lib/Driver/ToolChain.cpp Index: clang/lib/Driver/ToolChain.cpp === ---

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Maybe for device compilation we also should define `__NO_MATH_INLINES` and `__NO_STRING_INLINES` macros to disable inline assembly in glibc? Repository: rC Clang https://reviews.llvm.org/D50845 ___ cfe-commits mailing

[PATCH] D50839: [llvm] Optimize YAML::isNumeric

2018-08-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161033. kbobyrev added a comment. Use consistent `Regex` matchers naming: don't append "Matcher" at the end. https://reviews.llvm.org/D50839 Files: llvm/include/llvm/Support/YAMLTraits.h llvm/tools/llvm-yaml-numeric-parser-fuzzer/CMakeLists.txt

[PATCH] D47196: [Time-report ](2): Recursive timers in Clang

2018-08-16 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 updated this revision to Diff 160997. avt77 added a comment. The ability to produce debug output for 'ftiming' was added. As result now it's possible to check places where timers start/stop and for what functions it's being done (see changes in Utils.h). https://reviews.llvm.org/D47196

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

2018-08-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. @hugoeg, it looks like you are waiting for review, but this patch doesn't include the `IsExpansionInAbseilHeader` matcher. What's your plan of it? Comment at: test/clang-tidy/abseil-fake-declarations.h:1 +namespace std { +struct string {

[PATCH] D50700: [clangd] Generate better incomplete bigrams for the Dex index

2018-08-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/unittests/clangd/DexIndexTests.cpp:324 + EXPECT_THAT(generateQueryTrigrams("u_p"), trigramsAre({"up$"})); + EXPECT_THAT(generateQueryTrigrams("_u_p"), trigramsAre({"_u_"})); ioeric wrote: > I'm

[clang-tools-extra] r339879 - Fixed unused variable warning. NFCI.

2018-08-16 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Thu Aug 16 06:55:10 2018 New Revision: 339879 URL: http://llvm.org/viewvc/llvm-project?rev=339879=rev Log: Fixed unused variable warning. NFCI. Modified: clang-tools-extra/trunk/unittests/clangd/FileDistanceTests.cpp Modified:

Re: [libcxx] r339874 - [libcxx] By default, do not use internal_linkage to hide symbols from the ABI

2018-08-16 Thread Hans Wennborg via cfe-commits
Merged to 7.0 in r339882. On Thu, Aug 16, 2018 at 2:44 PM, Louis Dionne via cfe-commits wrote: > Author: ldionne > Date: Thu Aug 16 05:44:28 2018 > New Revision: 339874 > > URL: http://llvm.org/viewvc/llvm-project?rev=339874=rev > Log: > [libcxx] By default, do not use internal_linkage to hide

[PATCH] D50652: [libcxx] By default, do not use internal_linkage to hide symbols from the ABI

2018-08-16 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Thanks! Merged to 7.0 in r339882. Repository: rL LLVM https://reviews.llvm.org/D50652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50170: [libcxxabi] Fix test_exception_address_alignment test for ARM

2018-08-16 Thread Yvan Roux via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339865: [libcxxabi] Fix test_exception_address_alignment test for ARM (authored by yroux, committed by ). Herald added a subscriber: christof. Changed prior to commit:

[PATCH] D50627: [clangd] Add a testcase for empty preamble.

2018-08-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 161000. hokein marked 2 inline comments as done. hokein added a comment. Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50627 Files: unittests/clangd/TUSchedulerTests.cpp Index:

[PATCH] D50727: [clangd] Fetch documentation from the Index during signature help

2018-08-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/CodeComplete.cpp:755 + }); + log("SigHelp: requested docs for {0} symbols from the index, got {1} " + "symbols with non-empty docs in the response", ilya-biryukov wrote: > ioeric wrote: > >

[libcxx] r339874 - [libcxx] By default, do not use internal_linkage to hide symbols from the ABI

2018-08-16 Thread Louis Dionne via cfe-commits
Author: ldionne Date: Thu Aug 16 05:44:28 2018 New Revision: 339874 URL: http://llvm.org/viewvc/llvm-project?rev=339874=rev Log: [libcxx] By default, do not use internal_linkage to hide symbols from the ABI Summary: https://reviews.llvm.org/D49240 led to symbol size problems in Chromium, and we

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/CodeComplete.h:85 + + /// Enables cursor to be moved around according to completions needs even when + /// snippets are disabled. For example selecting a function with parameters as IIRC, the goal of this

[clang-tools-extra] r339877 - [clangd] NFC: Improve Dex Iterators debugging traits

2018-08-16 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Thu Aug 16 06:19:43 2018 New Revision: 339877 URL: http://llvm.org/viewvc/llvm-project?rev=339877=rev Log: [clangd] NFC: Improve Dex Iterators debugging traits This patch improves `dex::Iterator` string representation by incorporating the information about the element which

[PATCH] D50689: [clangd] NFC: Improve Dex Iterators debugging traits

2018-08-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE339877: [clangd] NFC: Improve Dex Iterators debugging traits (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D50689?vs=161013=161014#toc Repository: rCTE

[PATCH] D50700: [clangd] Generate better incomplete bigrams for the Dex index

2018-08-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/unittests/clangd/DexIndexTests.cpp:324 + EXPECT_THAT(generateQueryTrigrams("u_p"), trigramsAre({"up$"})); + EXPECT_THAT(generateQueryTrigrams("_u_p"), trigramsAre({"_u_"})); kbobyrev wrote: > ioeric

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161023. kadircet marked an inline comment as done. kadircet added a comment. - Change option name. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50835 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h

  1   2   3   >