[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.

[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] 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", , , NULL, 0) == -1) { +Report("Unable to determine CPU frequency for TSC accounting; errno = %d\n", Is it OK

[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

[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] 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 +

[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

[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] 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 > > >

[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

[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] 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

[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#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 > >

[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] 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=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=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 in

[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] D40242: Do not perform the analysis based warning if all warnings are ignored

2017-11-23 Thread Olivier Goffart via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318900: Do not perform the analysis based warning if the warnings are ignored (authored by ogoffart). Changed prior to commit: https://reviews.llvm.org/D40242?vs=123720=124041#toc Repository: rL

[PATCH] D39903: [libclang] Allow pretty printing declarations

2017-11-23 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping, please review or add more appropriate reviewers. https://reviews.llvm.org/D39903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39882: [clangd] Filter completion results by fuzzy-matching identifiers.

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 124043. sammccall added a comment. Rebase https://reviews.llvm.org/D39882 Files: clangd/ClangdUnit.cpp unittests/clangd/ClangdTests.cpp Index: unittests/clangd/ClangdTests.cpp === ---

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

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 124044. sammccall marked 3 inline comments as done. sammccall added a comment. address review comments https://reviews.llvm.org/D40089 Files: clangd/ClangdUnit.cpp test/clangd/authority-less-uri.test test/clangd/completion-items-kinds.test

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

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 4 inline comments as done. sammccall added a comment. Thanks for the quick review, took me a while to get back to this but I do care about it! Comment at: clangd/ClangdUnit.cpp:387 std::string sortText() const { std::string S, NameStorage;

[PATCH] D40023: [RISCV] Implement ABI lowering

2017-11-23 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. So how does something like the following work: union U { float f; int i; }; void f(union U u); The flattening described in https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#hardware-floating-point-calling-convention makes sense for arrays and

[PATCH] D39882: [clangd] Filter completion results by fuzzy-matching identifiers.

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D39882#932858, @ilya-biryukov wrote: > We definitely need to: > > - Rebase this change on top of current head (to account for limits and > scoring) Done. There's very little interaction - for now the match doesn't affect scoring, we're

r318900 - Do not perform the analysis based warning if the warnings are ignored

2017-11-23 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Thu Nov 23 00:15:22 2017 New Revision: 318900 URL: http://llvm.org/viewvc/llvm-project?rev=318900=rev Log: Do not perform the analysis based warning if the warnings are ignored This saves some cycles when compiling with "-w". (Also fix a potential crash on invalid code

[PATCH] D40023: [RISCV] Implement ABI lowering

2017-11-23 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. In https://reviews.llvm.org/D40023#933464, @majnemer wrote: > So how does something like the following work: > > union U { float f; int i; }; > void f(union U u); > > > The flattening described in >

[PATCH] D40023: [RISCV] Implement ABI lowering

2017-11-23 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D40023#933466, @asb wrote: > In https://reviews.llvm.org/D40023#933464, @majnemer wrote: > > > So how does something like the following work: > > > > union U { float f; int i; }; > > void f(union U u); > > > > > > The flattening

[PATCH] D40301: [clangd] Ensure preamble outlives the AST

2017-11-23 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/ClangdUnit.h:51 +struct PreambleData; + can you move the definition here to avoid the extra decl? (I tend to find this more

[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

[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

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:

[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=rev Log: Fixing a typo; NFC. Modified: clang-tools-extra/trunk/clangd/JSONExpr.cpp Modified: clang-tools-extra/trunk/clangd/JSONExpr.cpp URL:

[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?

[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

[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=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 the

[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

[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

[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

[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: >

[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=rev Log: Update C++2a status and add Glen to CREDITS.TXT. Reviewed as https://reviews.llvm.org/D40379 Modified: libcxx/trunk/CREDITS.TXT

[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] 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

[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] 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? > >

[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

[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=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:

[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

[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:

[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

[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] 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()), +

[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

[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=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] 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: [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

[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

[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,

[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=124098#toc Repository:

[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] 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=rev Log: [clangd] Tracing improvements Summary: [clangd] Tracing improvements Compose JSON using JSONExpr Allow attaching metadata to spans (and avoid it if tracing is off)

[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 ___

[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

[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

[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=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!)

[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:

[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

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: > >

[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

[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

[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=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 NFC,

[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=124099#toc Repository: rL LLVM

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 &&

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=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

[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=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

[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=rev Log: [clang-tidy] rename_check.py: Update '=...' line in the docs. Modified: clang-tools-extra/trunk/clang-tidy/rename_check.py Modified:

[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

[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

[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

[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=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 the

[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

[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

[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=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

[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=rev Log: [clang-tidy] rename_check.py misc-string-constructor bugprone-string-constructor Summary: Rename misc-string-constructor to bugprone-string-constructor + manually

[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

[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

[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(); > }

[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] 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=124070#toc Repository:

[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

[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 ___

[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] 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

[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

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

[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] 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

[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

[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

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

  1   2   >