[PATCH] D39114: [XRay][darwin] Initial XRay in Darwin Support

2017-11-23 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added inline comments. Comment at: compiler-rt/lib/xray/xray_x86_64.cc:25 + size_t Len = 0; + if (sysctlbyname("hw.cpufrequency_max", &CPUFreq, &Len, NULL, 0) == -1) { +Report("Unable to determine CPU frequency for TSC accounting; errno = %d\n", ---

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2017-11-23 Thread JVApen via Phabricator via cfe-commits
JVApen added a comment. Looking at the documentation and the examples, it is unclear to me what the behavior of checking is when you call a function without throw/noexcept if you can't see the implementation. (Other cpp file) https://reviews.llvm.org/D33537

[PATCH] D38124: Hide some symbols to avoid a crash on shutdown when using code coverage

2017-11-23 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. @davidxl David, is that ok with you? Can you sign off this change? Thanks https://reviews.llvm.org/D38124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 updated this revision to Diff 124124. tk1012 added a comment. Hello there, I update the diff and add `void f() { declToImport().m(); }` after `declToImport` definition. I leave the matcher for private in the test file, so I don't update the documentation. https://reviews.llvm.org/D3972

[PATCH] D38694: [ASTImporter] Support importing CXXUnresolvedConstructExpr and UnresolvedLookupExpr

2017-11-23 Thread Peter Szecsi via Phabricator via cfe-commits
szepet updated this revision to Diff 124123. szepet added a comment. Updating the usage of `ImportTemplateArgumentListInfo`. https://reviews.llvm.org/D38694 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp ===

[PATCH] D40406: [clangd] Switch from YAMLParser to JSONExpr

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall edited reviewers, added: ioeric; removed: ilya-biryukov. sammccall added a comment. Oops, Eric is most likely to have this stuff in cache :-) Sorry this is huge and ugly, -500 lines though! I think the `Protocol` code could be a lot tighter (there's still a lot of repeated "is this an

[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

2017-11-23 Thread Peter Szecsi via Phabricator via cfe-commits
szepet updated this revision to Diff 124119. szepet marked 6 inline comments as done. szepet added a comment. Herald added a subscriber: rnkovacs. Updated based on review comments. Hello Aleksei, Thank for the review and the code snippet as well! https://reviews.llvm.org/D38845 Files: lib/AS

[PATCH] D40406: [clangd] Switch from YAMLParser to JSONExpr

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. - Converted Protocol.h parse() functions to take JSON::Expr. These no longer detect and log unknown fields, as this is not that useful and no longer free. I haven't changed the error handling too much: fields that were treated as optional before are still option

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D38425#922408, @ioeric wrote: > Drive-by comment: in general, have you considered reusing the existing > declarations and occurrences finding functionalities in clang-rename? AFAIK, > it deals with templates and macros pretty well. > > o >

[PATCH] D35894: [clangd] Code hover for Clangd

2017-11-23 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124116. Nebiroth marked 32 inline comments as done. Nebiroth added a comment. Minor code cleanup and improvements getRawCommentForDeclNoCache() now called for every Decl and only once per Decl getHover() now properly handles templates https://reviews.llvm.o

Re: [clang-tools-extra] r318840 - [FindAllSymbols] Cache regexes, creating them is expensive

2017-11-23 Thread Krzysztof Parzyszek via cfe-commits
+Dimitry. On 11/23/2017 12:50 PM, Benjamin Kramer wrote: I'm afraid I can't really help you here. You can try twiddling the code a bit by creating the pair explicitly and moving it into the vector, just to avoid the brokenness in the standard library. Not sure if that will help though. On Thu,

[PATCH] D38694: [ASTImporter] Support importing CXXUnresolvedConstructExpr and UnresolvedLookupExpr

2017-11-23 Thread Peter Szecsi via Phabricator via cfe-commits
szepet added a comment. Hello Aleksei, Thank you for the review! (and sorry for the late update) Comment at: lib/AST/ASTImporter.cpp:5510 + UnresolvedSet<8> ToDecls; + for (Decl *D : E->decls()) { +if (NamedDecl *To = cast_or_null(Importer.Import(D))) a.

[PATCH] D38694: [ASTImporter] Support importing CXXUnresolvedConstructExpr and UnresolvedLookupExpr

2017-11-23 Thread Peter Szecsi via Phabricator via cfe-commits
szepet updated this revision to Diff 124115. szepet marked 7 inline comments as done. szepet added a comment. Herald added a subscriber: rnkovacs. Updates based on review comments. https://reviews.llvm.org/D38694 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index: unitt

[PATCH] D40381: Parse concept definition

2017-11-23 Thread Saar Raz via Phabricator via cfe-commits
saar.raz requested changes to this revision. saar.raz added a comment. This revision now requires changes to proceed. Also add: In ASTDumper +void VisitConceptTemplateDecl(const ConceptTemplateDecl *D); Implementation: void ASTDumper::VisitConceptTemplateDecl(const ConceptTemplateDecl *

[PATCH] D40399: [clangd] Add missing (but documented!) JSONExpr typed accessors

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 124105. sammccall added a comment. While here, fix a duplicated test. https://reviews.llvm.org/D40399 Files: clangd/JSONExpr.h unittests/clangd/JSONExprTests.cpp Index: unittests/clangd/JSONExprTests.cpp ==

[PATCH] D40398: Remove ValueDependent assertions on ICE checks.

2017-11-23 Thread Matt Davis via Phabricator via cfe-commits
mattd created this revision. In the case of ill-formed templates, a value dependent name can reach the integral constant expression (ICE) check. After an error occurs following an ill-formed template, an ICE check can be performed on a template definition. That definition might contain an expre

Re: [clang-tools-extra] r318840 - [FindAllSymbols] Cache regexes, creating them is expensive

2017-11-23 Thread Benjamin Kramer via cfe-commits
I'm afraid I can't really help you here. You can try twiddling the code a bit by creating the pair explicitly and moving it into the vector, just to avoid the brokenness in the standard library. Not sure if that will help though. On Thu, Nov 23, 2017 at 7:05 PM, Krzysztof Parzyszek wrote: > There

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/ClangdUnit.cpp:997 + DocumentHighlightKind Kind; + switch (Roles) { + case (unsigned)index::SymbolRole::Read: With this code, I always get "text" kind. It's because index::SymbolRoleSet is a bitf

Re: [clang-tools-extra] r318840 - [FindAllSymbols] Cache regexes, creating them is expensive

2017-11-23 Thread Krzysztof Parzyszek via cfe-commits
There has been some problem with std::pair on FreeBSD (due to some ABI compatibility issue), but I don't know much about what it was. Commenting the reserve doesn't help, unfortunately. The same problem is now flagged in emplace_back. -Krzysztof On 11/23/2017 11:47 AM, Benjamin Kramer wrote

[PATCH] D39730: Enabling constructor code completion

2017-11-23 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple added a comment. Sorry for delays, I'm working on this on and off when there's nothing more important. Let me specify a little narrower scope of this change: - Make code completion contain constructor item for out-of-line constructor definition: struct foo { foo(); }; foo:: // re

Re: [clang-tools-extra] r318840 - [FindAllSymbols] Cache regexes, creating them is expensive

2017-11-23 Thread Benjamin Kramer via cfe-commits
That looks like a bug in the standard library. Does removing the call to reserve fix it? It's not really necessary, that code isn't performance sensitive at all. On Thu, Nov 23, 2017 at 6:36 PM, Krzysztof Parzyszek wrote: > Hi, > This broke build on FreeBSD 11: > > [100%] Building CXX object > to

Re: [clang-tools-extra] r318840 - [FindAllSymbols] Cache regexes, creating them is expensive

2017-11-23 Thread Krzysztof Parzyszek via cfe-commits
Hi, This broke build on FreeBSD 11: [100%] Building CXX object tools/clang/tools/extra/include-fixer/find-all-symbols/CMakeFiles/findAllSymbols.dir/HeaderMapCollector.cpp.o cd /w/bld/org/tools/clang/tools/extra/include-fixer/find-all-symbols && /w/c/clang+llvm-5.0.0-x86_64-unknown-freebsd11/bin

[PATCH] D40132: [clangd] Tracing improvements

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318928: [clangd] Tracing improvements (authored by sammccall). Repository: rL LLVM https://reviews.llvm.org/D40132 Files: clang-tools-extra/trunk/clangd/ClangdUnit.cpp clang-tools-extra/trunk/clan

[clang-tools-extra] r318928 - [clangd] Tracing improvements

2017-11-23 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Nov 23 09:12:04 2017 New Revision: 318928 URL: http://llvm.org/viewvc/llvm-project?rev=318928&view=rev Log: [clangd] Tracing improvements Summary: [clangd] Tracing improvements Compose JSON using JSONExpr Allow attaching metadata to spans (and avoid it if tracing is o

[clang-tools-extra] r318927 - [clangd] Make completion scores use 0-1 floats internally.

2017-11-23 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Nov 23 09:09:04 2017 New Revision: 318927 URL: http://llvm.org/viewvc/llvm-project?rev=318927&view=rev Log: [clangd] Make completion scores use 0-1 floats internally. Summary: This scale is much easier to mix with other signals, such as fuzzy match strength. Mostly NF

[PATCH] D40089: [clangd] Make completion scores use 0-1 floats internally.

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318927: [clangd] Make completion scores use 0-1 floats internally. (authored by sammccall). Changed prior to commit: https://reviews.llvm.org/D40089?vs=124044&id=124099#toc Repository: rL LLVM https

[PATCH] D40392: [clang-tidy] rename_check.py misc-argument-comment bugprone-argument-comment

2017-11-23 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318926: [clang-tidy] rename_check.py misc-argument-comment bugprone-argument-comment (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D40392?vs=124079&id=124098#toc Repository:

[clang-tools-extra] r318926 - [clang-tidy] rename_check.py misc-argument-comment bugprone-argument-comment

2017-11-23 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Nov 23 09:02:48 2017 New Revision: 318926 URL: http://llvm.org/viewvc/llvm-project?rev=318926&view=rev Log: [clang-tidy] rename_check.py misc-argument-comment bugprone-argument-comment Summary: + manually convert the unit test to lit test. Reviewers: hokein Reviewed By:

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/ClangdUnit.cpp:1245 + + for (unsigned I = 0; I < DocHighlightsFinder->getSourceRanges().size(); I++) { +HighlightLocations.push_back( malaperle wrote: > replace all this code (1242-1265) by moving it in Do

[PATCH] D39836: [clangd] Drop impossible completions (unavailable or inaccessible)

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318925: [clangd] Drop impossible completions (unavailable or inaccessible) (authored by sammccall). Repository: rL LLVM https://reviews.llvm.org/D39836 Files: clang-tools-extra/trunk/clangd/ClangdLS

[clang-tools-extra] r318925 - [clangd] Drop impossible completions (unavailable or inaccessible)

2017-11-23 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Nov 23 08:58:22 2017 New Revision: 318925 URL: http://llvm.org/viewvc/llvm-project?rev=318925&view=rev Log: [clangd] Drop impossible completions (unavailable or inaccessible) Summary: (There must be some reason why D38077 didn't just do this, but I don't get it!) Rev

[PATCH] D40060: [clangd] Fuzzy match scorer

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 124096. sammccall marked 15 inline comments as done. sammccall added a comment. Addressing review comments and generally improving comments. https://reviews.llvm.org/D40060 Files: clangd/CMakeLists.txt clangd/FuzzyMatch.cpp clangd/FuzzyMatch.h uni

[PATCH] D40060: [clangd] Fuzzy match scorer

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for the review, and sorry for the subtlety of the code and sparse comments. It should be a little better now, please let me know which parts aren't clear enough. Comment at: clangd/FuzzyMatch.cpp:69 +: NPat(std::min(MaxPat, Pattern.size()

[PATCH] D40310: Restructure how we break tokens.

2017-11-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek marked an inline comment as done. klimek added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1504 : Style.PenaltyBreakComment; - unsigned RemainingSpace = ColumnLimit - Current.UnbreakableTailLength; + // Stores whethe

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle requested changes to this revision. malaperle added inline comments. This revision now requires changes to proceed. Comment at: clangd/ClangdLSPServer.cpp:67 ); + if (Params.rootUri && !Params.rootUri->file.empty()) extra line

[PATCH] D40310: Restructure how we break tokens.

2017-11-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 124095. klimek added a comment. Pull out getRemainingLength. https://reviews.llvm.org/D40310 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTest.cpp unittests/Format/Forma

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/fuchsia/DefaultArgumentsCheck.cpp:35-38 +SourceRange RemovalRange( + Lexer::getLocForEndOfToken(D->getLocation(), 0, +*Result.SourceManager, Result.Context->getLangOpts()), + D->get

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39722#933838, @xazax.hun wrote: > In https://reviews.llvm.org/D39722#933828, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D39722#933699, @a.sidorin wrote: > > > > > Hello Takafumi, > > > > > > This is almost OK to me but there

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Oh, sorry! I was thinking that a matcher is still in ASTMatchers.h (in previous revisions it was there). If matcher is internal (current revision), there is no need to update docs. https://reviews.llvm.org/D39722 ___ cfe

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D39722#933828, @aaron.ballman wrote: > In https://reviews.llvm.org/D39722#933699, @a.sidorin wrote: > > > Hello Takafumi, > > > > This is almost OK to me but there is an inline comment we need to resolve > > in order to avoid Windows buildbo

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39722#933699, @a.sidorin wrote: > Hello Takafumi, > > This is almost OK to me but there is an inline comment we need to resolve in > order to avoid Windows buildbot failures. > In addition, as Gabor pointed, when we add a new matcher,

[PATCH] D40392: [clang-tidy] rename_check.py misc-argument-comment bugprone-argument-comment

2017-11-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D40392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D40132: [clangd] Tracing improvements

2017-11-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/JSONRPCDispatcher.h:78 llvm::Optional ID; + std::unique_ptr Tracer; }; ilya-biryukov wrote: > sammccall wrote: > > ilya-biryukov wrote: > > > Why do we need `unique_ptr`? Are `Span`s non-movable? > > Sp

[PATCH] D40310: Restructure how we break tokens.

2017-11-23 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/BreakableToken.cpp:198 + "Getting the length of a part of the string literal indicates that " + "the code tries to reflow it."); + return UnbreakableTailLength + Postfix.size() + klimek wrote

[PATCH] D40176: [CodeGen] Collect information about sizes of accesses and access types for TBAA

2017-11-23 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev updated this revision to Diff 124084. kosarev added a comment. Rebased. https://reviews.llvm.org/D40176 Files: lib/CodeGen/CGClass.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/CodeGenTBAA.cpp lib/CodeGen/CodeGenTBAA.h Index: lib/CodeGen/CodeGenTBA

[PATCH] D30946: [ScopePrinting] Added support to print full scopes of types and declarations.

2017-11-23 Thread Simon Schroeder via Phabricator via cfe-commits
schroedersi added a comment. Ping https://reviews.llvm.org/D30946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39963: [RISCV][RFC] Add initial RISC-V target and driver support

2017-11-23 Thread Alex Bradbury via Phabricator via cfe-commits
asb marked an inline comment as done. asb added a comment. In https://reviews.llvm.org/D39963#931026, @apazos wrote: > Can you push this as a patch to review/commit instead of RFC? It has received > a lot of comments/corrections already and I think it is getting in a shape we > can merge. I m

[PATCH] D40392: [clang-tidy] rename_check.py misc-argument-comment bugprone-argument-comment

2017-11-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. Herald added subscribers: xazax.hun, mgorny. + manually convert the unit test to lit test. https://reviews.llvm.org/D40392 Files: clang-tidy/bugprone/ArgumentCommentCheck.cpp clang-tidy/bugprone/ArgumentCommentCheck.h clang-tidy/bugprone/BugproneTidyModule.cp

[PATCH] D33589: clang-format: consider not splitting tokens in optimization

2017-11-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D33589#933746, @Typz wrote: > with this setting, a "non wrapped" comment will actually be reflown to > ColumnLimit+10... Isn't the same true for code then, though? Generally, code will protrude by 10 columns before being broken? https://re

[PATCH] D33589: clang-format: consider not splitting tokens in optimization

2017-11-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D33589#933746, @Typz wrote: > > @klimek wrote: > > In the above example, we add 3 line breaks, and we'd add 1 (or more) > > additional line breaks when reflowing below the column limit. > > I agree that that can lead to different overall outc

[clang-tools-extra] r318922 - [clang-tidy] rename_check.py: fix a bug in check presence detection

2017-11-23 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Nov 23 06:59:19 2017 New Revision: 318922 URL: http://llvm.org/viewvc/llvm-project?rev=318922&view=rev Log: [clang-tidy] rename_check.py: fix a bug in check presence detection Modified: clang-tools-extra/trunk/clang-tidy/rename_check.py Modified: clang-tools-extra/tr

Re: [clang-tools-extra] r318809 - Silence some MSVC warnings about not all control paths returning a value; NFC.

2017-11-23 Thread Aaron Ballman via cfe-commits
On Thu, Nov 23, 2017 at 1:47 AM, Kim Gräsman wrote: > > > Den 21 nov. 2017 11:24 em skrev "Aaron Ballman via cfe-commits" > : > > Author: aaronballman > Date: Tue Nov 21 14:24:13 2017 > New Revision: 318809 > > URL: http://llvm.org/viewvc/llvm-project?rev=318809&view=rev > Log: > Silence some MSVC

[clang-tools-extra] r318921 - Fixing a typo; NFC.

2017-11-23 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Nov 23 06:57:24 2017 New Revision: 318921 URL: http://llvm.org/viewvc/llvm-project?rev=318921&view=rev Log: Fixing a typo; NFC. Modified: clang-tools-extra/trunk/clangd/JSONExpr.cpp Modified: clang-tools-extra/trunk/clangd/JSONExpr.cpp URL: http://llvm.org/vie

[PATCH] D40089: [clangd] Make completion scores use 0-1 floats internally.

2017-11-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM Comment at: clangd/ClangdUnit.cpp:425 +const uint32_t SignBit = ~(~uint32_t{0} >> 1); +return U & SignBit ? 0 - U : U + SignBit; + } sammccall

[libcxx] r318919 - Update C++2a status and add Glen to CREDITS.TXT. Reviewed as https://reviews.llvm.org/D40379

2017-11-23 Thread Marshall Clow via cfe-commits
Author: marshall Date: Thu Nov 23 06:50:56 2017 New Revision: 318919 URL: http://llvm.org/viewvc/llvm-project?rev=318919&view=rev Log: Update C++2a status and add Glen to CREDITS.TXT. Reviewed as https://reviews.llvm.org/D40379 Modified: libcxx/trunk/CREDITS.TXT libcxx/trunk/www/cxx2a_st

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-11-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Let us summarize the possibilities: 1. Type extension approach. I tested it, all tests pass, and also in Devin's examples we do not infer narrower range than we should. (Wider do not matter.) I think this is the most complete solution and many checkers could

[PATCH] D37813: clang-format: better handle namespace macros

2017-11-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D37813#930065, @Typz wrote: > ping? Argh, very sorry for the delay in response. In https://reviews.llvm.org/D37813#905257, @Typz wrote: > In https://reviews.llvm.org/D37813#876227, @klimek wrote: > > > I think instead of introducing more and

[PATCH] D33589: clang-format: consider not splitting tokens in optimization

2017-11-23 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. > @klimek wrote: > In the above example, we add 3 line breaks, and we'd add 1 (or more) > additional line breaks when reflowing below the column limit. > I agree that that can lead to different overall outcomes, but I don't see > how the approach of this patch really fixe

[PATCH] D40310: Restructure how we break tokens.

2017-11-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/BreakableToken.cpp:198 + "Getting the length of a part of the string literal indicates that " + "the code tries to reflow it."); + return UnbreakableTailLength + Postfix.size() + krasimir wrote

[PATCH] D40310: Restructure how we break tokens.

2017-11-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 124075. klimek marked 10 inline comments as done. klimek added a comment. Address review comments. https://reviews.llvm.org/D40310 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Format/F

[PATCH] D40302: Avoid copying the data of in-memory preambles

2017-11-23 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D40302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D40302: Avoid copying the data of in-memory preambles

2017-11-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 124074. ilya-biryukov added a comment. - Fixed a typo. https://reviews.llvm.org/D40302 Files: include/clang/Frontend/PrecompiledPreamble.h lib/Frontend/PrecompiledPreamble.cpp Index: lib/Frontend/PrecompiledPreamble.cpp =

[PATCH] D40302: Avoid copying the data of in-memory preambles

2017-11-23 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added inline comments. Comment at: include/clang/Frontend/PrecompiledPreamble.h:101 /// is accessible. + /// For in-memory preambles, PrecompiledPreamble instance continues to owns + /// the MemoryBuffer with the Preamble after this method returns. The caller ---

[PATCH] D40132: [clangd] Tracing improvements

2017-11-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Comment at: clangd/JSONRPCDispatcher.h:78 llvm::Optional ID; + std::unique_ptr Tracer; }; sammccall wrote: > ilya-biryukov wrote: > >

[clang-tools-extra] r318918 - [clang-tidy] rename_check.py: Update '=====...' line in the docs.

2017-11-23 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Nov 23 06:05:32 2017 New Revision: 318918 URL: http://llvm.org/viewvc/llvm-project?rev=318918&view=rev Log: [clang-tidy] rename_check.py: Update '=...' line in the docs. Modified: clang-tools-extra/trunk/clang-tidy/rename_check.py Modified: clang-tools-extra/trun

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2017-11-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D33537#902242, @JonasToth wrote: > > Will this check find stuff like this (or is it part of the frontend) > > int throwing() { > throw int(42); > } > > int not_throwing() noexcept { > throwing(); > } Yes,

[PATCH] D40389: [clang-tidy] rename_check.py misc-dangling-handle bugprone-dangling-handle

2017-11-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. Herald added subscribers: xazax.hun, mgorny. https://reviews.llvm.org/D40389 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/DanglingHandleCheck.cpp clang-tidy/bugprone/DanglingHandleCheck.h clang-tid

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Takafumi, This is almost OK to me but there is an inline comment we need to resolve in order to avoid Windows buildbot failures. In addition, as Gabor pointed, when we add a new matcher, we need to update matcher documentation as well. To update the docs, you sh

[PATCH] D40388: [clang-tidy] rename_check.py misc-string-constructor bugprone-string-constructor

2017-11-23 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318916: [clang-tidy] rename_check.py misc-string-constructor bugprone-string-constructor (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D40388?vs=124065&id=124070#toc Repositor

[clang-tools-extra] r318916 - [clang-tidy] rename_check.py misc-string-constructor bugprone-string-constructor

2017-11-23 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Nov 23 05:49:14 2017 New Revision: 318916 URL: http://llvm.org/viewvc/llvm-project?rev=318916&view=rev Log: [clang-tidy] rename_check.py misc-string-constructor bugprone-string-constructor Summary: Rename misc-string-constructor to bugprone-string-constructor + manually u

[PATCH] D39836: [clangd] Drop impossible completions (unavailable or inaccessible)

2017-11-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D39836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D39370: [clang-tidy] Detect bugs in bugprone-misplaced-operator-in-strlen-in-alloc even in the case the allocation function is called using a constant function pointer

2017-11-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware closed this revision. baloghadamsoftware added a comment. Closed by commit https://reviews.llvm.org/rL318913. https://reviews.llvm.org/D39370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

[clang-tools-extra] r318913 - [clang-tidy] Detect bugs in bugprone-misplaced-operator-in-strlen-in-alloc even in the case the allocation function is called using a constant function pointer

2017-11-23 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Thu Nov 23 05:12:25 2017 New Revision: 318913 URL: http://llvm.org/viewvc/llvm-project?rev=318913&view=rev Log: [clang-tidy] Detect bugs in bugprone-misplaced-operator-in-strlen-in-alloc even in the case the allocation function is called using a constant function

[PATCH] D40132: [clangd] Tracing improvements

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/JSONRPCDispatcher.h:78 llvm::Optional ID; + std::unique_ptr Tracer; }; ilya-biryukov wrote: > Why do we need `unique_ptr`? Are `Span`s non-movable? Spans aren't movable, they have an explicitly declared des

[PATCH] D40132: [clangd] Tracing improvements

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 124069. sammccall marked an inline comment as done. sammccall added a comment. Address review comment. https://reviews.llvm.org/D40132 Files: clangd/ClangdUnit.cpp clangd/JSONRPCDispatcher.cpp clangd/JSONRPCDispatcher.h clangd/Trace.cpp clangd/T

[PATCH] D39367: [clang-tidy] Add support for operator new[] in check bugprone-misplaced-operator-in-strlen-in-alloc

2017-11-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware closed this revision. baloghadamsoftware added a comment. Closed by commit https://reviews.llvm.org/rL318912. https://reviews.llvm.org/D39367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

[clang-tools-extra] r318912 - [clang-tidy] Add support for operator new[] in check bugprone-misplaced-operator-in-strlen-in-alloc

2017-11-23 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Thu Nov 23 04:56:23 2017 New Revision: 318912 URL: http://llvm.org/viewvc/llvm-project?rev=318912&view=rev Log: [clang-tidy] Add support for operator new[] in check bugprone-misplaced-operator-in-strlen-in-alloc The check now recognizes error cases like `new char

[PATCH] D39366: [ASTMatchers] Matchers for new[] operators

2017-11-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware closed this revision. baloghadamsoftware added a comment. Closed by commit https://reviews.llvm.org/rL318909. https://reviews.llvm.org/D39366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

r318909 - [ASTMatchers] Matchers for new[] operators

2017-11-23 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Thu Nov 23 04:43:20 2017 New Revision: 318909 URL: http://llvm.org/viewvc/llvm-project?rev=318909&view=rev Log: [ASTMatchers] Matchers for new[] operators Two new matchers for `CXXNewExpr` are added which may be useful e.g. in `clang-tidy` checkers. One of them is

[PATCH] D39836: [clangd] Drop impossible completions (unavailable or inaccessible)

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 124066. sammccall added a comment. Address review comments https://reviews.llvm.org/D39836 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ClangdUnit.cpp clangd/ClangdUnit.h cla

[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-11-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware closed this revision. baloghadamsoftware marked 2 inline comments as done. baloghadamsoftware added a comment. https://reviews.llvm.org/rL318906 and https://reviews.llvm.org/rL318907 https://reviews.llvm.org/D39121 ___ cfe-commits

[clang-tools-extra] r318907 - [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-11-23 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Thu Nov 23 04:33:12 2017 New Revision: 318907 URL: http://llvm.org/viewvc/llvm-project?rev=318907&view=rev Log: [clang-tidy] Misplaced Operator in Strlen in Alloc A possible error is to write `malloc(strlen(s+1))` instead of `malloc(strlen(s)+1)`. Unfortunately th

[clang-tools-extra] r318906 - [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-11-23 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Thu Nov 23 04:26:28 2017 New Revision: 318906 URL: http://llvm.org/viewvc/llvm-project?rev=318906&view=rev Log: [clang-tidy] Misplaced Operator in Strlen in Alloc A possible error is to write `malloc(strlen(s+1))` instead of `malloc(strlen(s)+1)`. Unfortunately th

[PATCH] D40388: [clang-tidy] rename_check.py misc-string-constructor bugprone-string-constructor

2017-11-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. LGTM. https://reviews.llvm.org/D40388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40388: [clang-tidy] rename_check.py misc-string-constructor bugprone-string-constructor

2017-11-23 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. LG! https://reviews.llvm.org/D40388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D40388: [clang-tidy] rename_check.py misc-string-constructor bugprone-string-constructor

2017-11-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. Herald added subscribers: xazax.hun, mgorny. Rename misc-string-constructor to bugprone-string-constructor + manually update the lenght of '==='s in the doc file. https://reviews.llvm.org/D40388 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugpr

[clang-tools-extra] r318905 - clang-tidy/rename_check.py: support for moving between modules

2017-11-23 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Nov 23 04:08:53 2017 New Revision: 318905 URL: http://llvm.org/viewvc/llvm-project?rev=318905&view=rev Log: clang-tidy/rename_check.py: support for moving between modules Modified: clang-tools-extra/trunk/clang-tidy/rename_check.py Modified: clang-tools-extra/trunk/c

[PATCH] D39836: [clangd] Drop impossible completions (unavailable or inaccessible)

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/tool/ClangdMain.cpp:169 + clangd::CodeCompleteOptions CCOpts; + CCOpts.EnableSnippets = EnableSnippets; + CCOpts.IncludeIneligibleResults = IncludeIneligibleResults; ilya-biryukov wrote: > We should also set

[PATCH] D33589: clang-format: consider not splitting tokens in optimization

2017-11-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D33589#933568, @klimek wrote: > In https://reviews.llvm.org/D33589#931723, @Typz wrote: > > > In https://reviews.llvm.org/D33589#925903, @klimek wrote: > > > > > I think this patch doesn't handle a couple of cases that I'd like to see > > > han

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2017-11-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.cpp:250 + // Verify if path has value and is a valid path + if (Params.settings.compilationDatabasePath.hasValue()) { +CDB.setCompileCommandsDir( Replace `Settings` instead of `Params.s

[PATCH] D39936: [OpenCL] Add extensions cl_intel_subgroups and cl_intel_subgroups_short

2017-11-23 Thread Alexey Sotkin via Phabricator via cfe-commits
AlexeySotkin added a comment. https://reviews.llvm.org/D39936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39936: [OpenCL] Add extensions cl_intel_subgroups and cl_intel_subgroups_short

2017-11-23 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. LGTM. Thanks! https://reviews.llvm.org/D39936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 updated this revision to Diff 124057. tk1012 added a comment. Hello there, I update the diff, reflecting the comments. Updates: 1. Use ImportContainerChecked() for importing TypeSourceInfo. 2. Modify `bool ToValue = (...) ? ... : false;`. 3. Add a test case for the value-dependent `TypeT

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-23 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318902: Allow to set locale on Windows. (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D40181?vs=123923&id=124055#toc Repository: rL LLVM https://reviews.llvm.org/D40181

[libcxx] r318902 - Allow to set locale on Windows.

2017-11-23 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Thu Nov 23 02:38:18 2017 New Revision: 318902 URL: http://llvm.org/viewvc/llvm-project?rev=318902&view=rev Log: Allow to set locale on Windows. Fix the problem PR31516 with setting locale on Windows by wrapping _locale_t with a pointer-like class. Reduces 74 test failures

[PATCH] D40068: Implement more accurate penalty & trade-offs while breaking protruding tokens.

2017-11-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D40068#931679, @Typz wrote: > Generally, this indeed improves the situation (though I cannot say much about > the code itself, it is still too subtle for my shallow knowledge of > clang-format). > > But it seems to give some strange looking re

[PATCH] D33589: clang-format: consider not splitting tokens in optimization

2017-11-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D33589#931802, @Typz wrote: > Btw, another issue I am having is that reflowing does not respect the > alignment. For exemple: > > enum { > Foo,///< This is a very long comment > Bar,///< This is shorter > BarBar, ///<

[PATCH] D33589: clang-format: consider not splitting tokens in optimization

2017-11-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D33589#931723, @Typz wrote: > In https://reviews.llvm.org/D33589#925903, @klimek wrote: > > > I think this patch doesn't handle a couple of cases that I'd like to see > > handled. A counter-proposal with different trade-offs is in > > https://

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-23 Thread Andrey Khalyavin via Phabricator via cfe-commits
halyavin added a comment. @EricWF, could you please commit this change? https://reviews.llvm.org/D40181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40060: [clangd] Fuzzy match scorer

2017-11-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clangd/FuzzyMatch.cpp:69 +: NPat(std::min(MaxPat, Pattern.size())), NWord(0), + ScoreScale(0.5f / NPat) { + memcpy(Pat, Pattern.data(), NPat); Why .5? Comment at: clangd/FuzzyMatch.cpp:88 +

  1   2   >