[PATCH] D59756: [clangd] Support dependent bases in type hierarchy

2019-04-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 194002. nridge marked 6 inline comments as done. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59756/new/ https://reviews.llvm.org/D59756 Files:

[PATCH] D59407: [clangd] Add RelationSlab

2019-04-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D59407#1456394 , @sammccall wrote: > One thing that strikes me here is that this case is very similar to our > existing Ref data - it's basically a subset, but with a symbolid payload > instead of location. We could consider

[PATCH] D60308: Leave alone the semicolon after the MacroBlockBegin name

2019-04-05 Thread Owen Pan via Phabricator via cfe-commits
owenpan abandoned this revision. owenpan added a comment. The semicolon is redundant but makes the MacroBlockBegin name stand out more. Nonetheless, I agree it's not a bug and we should leave the current behavior as is. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Got rid of the confusing SuppressSRet logic. The "inreg" attribute is now used to indicate sret returns in X0. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, efriedma, TomTan, ssijaric. Herald added subscribers: kristof.beyls, javed.absar. Herald added a project: clang. Related llvm patch: D60348 . Repository: rC Clang https://reviews.llvm.org/D60349

[PATCH] D60283: [clang-cl] Don't emit checksums when compiling a preprocessed CPP

2019-04-05 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. +@rsmith for the PresumedLoc change From glancing on the PresumedLoc computation code, I think this bool might be the way to go. You could make it a bit more "free" by stealing a bit from the column, if we're concerned about size. FYI, I'm off to EuroLLVM after this and

[PATCH] D60237: [MS] Add metadata for __declspec(allocator)

2019-04-05 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm, with some suggestions to improve the test Comment at: clang/test/CodeGen/debug-info-codeview-heapallocsite.c:16-19 +struct Foo foo_buf[1024]; +__declspec(allocator) struct

[PATCH] D59977: [Lexer] Fix an off-by-one bug in Lexer::getAsCharRange() - NFC.

2019-04-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Namely, http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/46376 : Running ['clang-tidy',

[PATCH] D59977: [Lexer] Fix an off-by-one bug in Lexer::getAsCharRange() - NFC.

2019-04-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ reopened this revision. NoQ added a reviewer: alexfh. NoQ added a comment. Reverted in rC357827 because clang-tidy was using this function in some of its checks. I'll have a look at if it is also affected by the bug or was already using a workaround.

r357827 - Revert "[Lexer] NFC: Fix an off-by-one bug in getAsCharRange()."

2019-04-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Apr 5 15:11:28 2019 New Revision: 357827 URL: http://llvm.org/viewvc/llvm-project?rev=357827=rev Log: Revert "[Lexer] NFC: Fix an off-by-one bug in getAsCharRange()." This reverts commit r357823. Was breaking clang-tidy! Differential Revision:

[PATCH] D59977: [Lexer] Fix an off-by-one bug in Lexer::getAsCharRange() - NFC.

2019-04-05 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL357823: [Lexer] NFC: Fix an off-by-one bug in getAsCharRange(). (authored by dergachev, committed by ). Herald added a

r357823 - [Lexer] NFC: Fix an off-by-one bug in getAsCharRange().

2019-04-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Apr 5 14:48:52 2019 New Revision: 357823 URL: http://llvm.org/viewvc/llvm-project?rev=357823=rev Log: [Lexer] NFC: Fix an off-by-one bug in getAsCharRange(). As the unit test demonstrates, subtracting 1 from the offset was unnecessary. The only user of this function

[PATCH] D59802: [clang-tidy] Add new checker: llvm-prefer-isa-or-dyn-cast-in-conditionals

2019-04-05 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 193968. hintonda added a comment. - Use new isa_and_nonnull, and cleanup code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59802/new/ https://reviews.llvm.org/D59802 Files:

[PATCH] D60302: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of named metadata.

2019-04-05 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. I talked with Akira offline and we think this is probably the best approach to fix this LTO issue. I will leave others to comment if they think otherwise. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60302/new/

[PATCH] D60107: [analyzer] NoStoreFuncVisitor: Suppress bug reports with no-store in system headers.

2019-04-05 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357810: [analyzer] NoStoreFuncVisitor: Suppress reports with no-store in system headers. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

r357810 - [analyzer] NoStoreFuncVisitor: Suppress reports with no-store in system headers.

2019-04-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Apr 5 13:18:53 2019 New Revision: 357810 URL: http://llvm.org/viewvc/llvm-project?rev=357810=rev Log: [analyzer] NoStoreFuncVisitor: Suppress reports with no-store in system headers. The idea behind this heuristic is that normally the visitor is there to inform the

[PATCH] D60335: Use -fomit-frame-pointer when optimizing PowerPC code

2019-04-05 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. test coverage? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60335/new/ https://reviews.llvm.org/D60335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D60335: Use -fomit-frame-pointer when optimizing PowerPC code

2019-04-05 Thread George Koehler via Phabricator via cfe-commits
kernigh created this revision. kernigh added reviewers: joerg, brad, cfe-commits. Herald added subscribers: jsji, krytarowski, nemanjai. Herald added a project: clang. This enables -fomit-frame-pointer when optimizing code for all PowerPC targets, instead of only Linux and NetBSD. I mailed this

r357803 - [clang-fuzzer] Include ExternalProject before using it.

2019-04-05 Thread Matt Morehouse via cfe-commits
Author: morehouse Date: Fri Apr 5 12:47:17 2019 New Revision: 357803 URL: http://llvm.org/viewvc/llvm-project?rev=357803=rev Log: [clang-fuzzer] Include ExternalProject before using it. Some versions of CMake require ExternalProject to be included before we can use ExternalProject_Add.

[PATCH] D60326: Fix error in NamedDeclPrinterTest

2019-04-05 Thread David Goldman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC357799: Fix error in NamedDeclPrinterTest (authored by dgoldman, committed by ). Changed prior to commit: https://reviews.llvm.org/D60326?vs=193917=193935#toc Repository: rC Clang CHANGES SINCE

r357799 - Fix error in NamedDeclPrinterTest

2019-04-05 Thread David Goldman via cfe-commits
Author: dgoldman Date: Fri Apr 5 12:17:24 2019 New Revision: 357799 URL: http://llvm.org/viewvc/llvm-project?rev=357799=rev Log: Fix error in NamedDeclPrinterTest Caused by D56924, shouldn't use raw string literals in macros. Differential Revision: https://reviews.llvm.org/D60326 Modified:

[PATCH] D60279: [CUDA] Implemented _[bi]mma* builtins.

2019-04-05 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:12884 +// Helper classes for mapping MMA builtins to particular LLVM intrinsic variant. +class NVPTXMmaLdstInfo { +public: How about having a simple struct and a function? ``` struct

[PATCH] D60320: [clang-format]: Add option to insert space after locical not operator

2019-04-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I actually also tend to change doc/ClangFormatStyleOptions.rst too CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60320/new/ https://reviews.llvm.org/D60320 ___ cfe-commits mailing list

[PATCH] D60320: [clang-format]: Add option to insert space after locical not operator

2019-04-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. just a few nits, apart form that it LG Comment at: clang/include/clang/Format/Format.h:1721 + /// Defines whether a space should be placed after a logical `!` + bool SpaceAfterLogicalNot; nit: end the sentence with a "."

[PATCH] D60326: Fix error in NamedDeclPrinterTest

2019-04-05 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60326/new/ https://reviews.llvm.org/D60326 ___

[PATCH] D60283: [clang-cl] Don't emit checksums when compiling a preprocessed CPP

2019-04-05 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. In D60283#1456497 , @thakis wrote: > See > http://llvm-cs.pcc.me.uk/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp#756 > for a "is same file" example. I'm not sure adding a bool to PresumedLoc is > worth it for this.

[PATCH] D60283: [clang-cl] Don't emit checksums when compiling a preprocessed CPP

2019-04-05 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. I'll try profiling several solution on a large unity/jumbo file and get back with some results. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60283/new/ https://reviews.llvm.org/D60283 ___

r357793 - [docs] Fix rst title in clang langext docs. NFCI

2019-04-05 Thread Kristina Brooks via cfe-commits
Author: kristina Date: Fri Apr 5 11:26:43 2019 New Revision: 357793 URL: http://llvm.org/viewvc/llvm-project?rev=357793=rev Log: [docs] Fix rst title in clang langext docs. NFCI Fix an odd line in LanguageExtensions.rst which rendered incorrectly due to an underscore being mixed in with

[PATCH] D60326: Fix error in NamedDeclPrinterTest

2019-04-05 Thread David Goldman via Phabricator via cfe-commits
dgoldman created this revision. dgoldman added reviewers: sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. Caused by D56924 , shouldn't use raw string literals in macros. Repository: rC Clang

r357792 - [AMDGPU] rename vi-insts into gfx8-insts

2019-04-05 Thread Stanislav Mekhanoshin via cfe-commits
Author: rampitec Date: Fri Apr 5 11:25:00 2019 New Revision: 357792 URL: http://llvm.org/viewvc/llvm-project?rev=357792=rev Log: [AMDGPU] rename vi-insts into gfx8-insts Differential Revision: https://reviews.llvm.org/D60293 Modified: cfe/trunk/include/clang/Basic/BuiltinsAMDGPU.def

[PATCH] D60283: [clang-cl] Don't emit checksums when compiling a preprocessed CPP

2019-04-05 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. See http://llvm-cs.pcc.me.uk/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp#756 for a "is same file" example. I'm not sure adding a bool to PresumedLoc is worth it for this. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-05 Thread Evgeny Mankov via Phabricator via cfe-commits
emankov added a comment. In D60220#1456449 , @tra wrote: > It's not a big deal at the moment -- there are no `long double` users in CUDA > on linux yet. You can clean up in another commit. > BTW, you may want to make commit description somewhat more

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D60220#1456430 , @emankov wrote: > Oooh, sorry, but I've just pushed the fix. But with the following words: "Add > missing long double device functions' declarations. Provide only declarations > to prevent any use of long double

[PATCH] D60139: [clang-tidy] Add misc-placement-new-target-type-mismatch check

2019-04-05 Thread Dennis Luxen via Phabricator via cfe-commits
DennisL added a comment. In D60139#1456123 , @alexfh wrote: > Looks like this check would fit better into the `bugprone` module. Excellent suggestion. Thanks. Will follow up with an updated Diff. CHANGES SINCE LAST ACTION

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-04-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193906. ymandel added a comment. Adjust to use SourceCode instead of FixIt. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59371/new/ https://reviews.llvm.org/D59371 Files:

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-05 Thread Evgeny Mankov via Phabricator via cfe-commits
emankov added a comment. Oooh, sorry, but I've just pushed the fix. But with the following words: "Add missing long double device functions' declarations. Provide only declarations to prevent any use of long double on the device side, because CUDA does not support long double on the device

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-05 Thread Evgeny Mankov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC357779: [CUDA][Windows] Last fix for the clang Bug 38811 Clang fails to compile with… (authored by emankov, committed by ). Changed prior to commit: https://reviews.llvm.org/D60220?vs=193874=193904#toc

r357779 - [CUDA][Windows] Last fix for the clang Bug 38811 "Clang fails to compile with CUDA-9.x on Windows" (https://bugs.llvm.org/show_bug.cgi?id=38811).

2019-04-05 Thread Evgeny Mankov via cfe-commits
Author: emankov Date: Fri Apr 5 09:51:10 2019 New Revision: 357779 URL: http://llvm.org/viewvc/llvm-project?rev=357779=rev Log: [CUDA][Windows] Last fix for the clang Bug 38811 "Clang fails to compile with CUDA-9.x on Windows" (https://bugs.llvm.org/show_bug.cgi?id=38811). [IMPORTANT] With

[PATCH] D59756: [clangd] Support dependent bases in type hierarchy

2019-04-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. LG, though I think your patch might be based on top of some uncommitted changes. I noticed template names rather than type names are shown (not new in this patch) - we should fix that I

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. One more thing -- perhaps the `long double` declarations should be put under `#ifndef _MSC_VER` in all the files to make the change unobservable on non-windows platforms. Adding a comment why we only have declarations for these functions would also be helpful. CHANGES

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-04-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 193903. ilya-biryukov marked 2 inline comments as done. ilya-biryukov added a comment. Herald added a subscriber: mgrang. Changes: - Add multi-file support, record a single expanded stream and per-file-id raw token streams and mappings. - Rename

[PATCH] D59885: [Lex] Allow to consume tokens while preprocessing

2019-04-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 193901. ilya-biryukov added a comment. Pass an enum indicating where the token comes from. The enum is ad-hoc at the moment, will require some thought to turn it into a reasonable abstraction. The consumer of the token stream actually needs to be able

[PATCH] D49863: [istream] Fix error flags and exceptions propagated from input stream operations

2019-04-05 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D49863#1452154 , @ldionne wrote: > In D49863#1452126 , @aprantl wrote: > > > It looks like this may have broken some LLDB data formatters: > >

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-05 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. Thank you for fixing this! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60220/new/ https://reviews.llvm.org/D60220 ___ cfe-commits mailing

[PATCH] D59407: [clangd] Add RelationSlab

2019-04-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D59407#1447070 , @nridge wrote: > @sammccall, thank you for having a look at this. > > I have no objection to revising the data model if there's agreement on a > better one. > > In D59407#1446464

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2019-04-05 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I cannot think of other users, so I would prefer to put it in the CTU lib for now. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D46421/new/ https://reviews.llvm.org/D46421 ___ cfe-commits

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2019-04-05 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl marked 3 inline comments as done. r.stahl added a comment. In D46421#1456171 , @xazax.hun wrote: > My last set of comments are also unresolved. Most of them are minor nits, but > I would love to get rid of the code duplication between

[PATCH] D60323: [clangd] Include compile command inference in fileStatus API

2019-04-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, javed.absar, ilya-biryukov. Herald added a project: clang. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D60323 Files:

[PATCH] D60283: [clang-cl] Don't emit checksums when compiling a preprocessed CPP

2019-04-05 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea updated this revision to Diff 193886. aganea marked 2 inline comments as done. aganea edited the summary of this revision. aganea added a comment. I made a more elegant change, where no additional lookups or string compares are required. I noted btw that clang /E does not generate

[PATCH] D59425: Explicitly Craft a Path to Compiler-RT Builtins on Bare Metal Targets

2019-04-05 Thread Robert Widmann via Phabricator via cfe-commits
CodaFi added a comment. @mehdi_amini @kristina Ping. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59425/new/ https://reviews.llvm.org/D59425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D60320: [clang-format]: Add option to insert space after locical not operator

2019-04-05 Thread Reuben Thomas via Phabricator via cfe-commits
reuk updated this revision to Diff 193889. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60320/new/ https://reviews.llvm.org/D60320 Files: clang/include/clang/Format/Format.h clang/lib/Format/Format.cpp clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTest.cpp

[PATCH] D60320: [clang-format]: Add option to insert space after locical not operator

2019-04-05 Thread Reuben Thomas via Phabricator via cfe-commits
reuk created this revision. reuk added reviewers: MyDeveloperDay, klimek. reuk added a project: clang-tools-extra. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch aims to support the following rule from the Juce coding standards

r357770 - [Tooling] add a Heuristic field indicating that a CompileCommand was guessed.

2019-04-05 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Apr 5 08:22:20 2019 New Revision: 357770 URL: http://llvm.org/viewvc/llvm-project?rev=357770=rev Log: [Tooling] add a Heuristic field indicating that a CompileCommand was guessed. Summary: Use cases: - a tool that dumps the heuristic used for each header in a

[PATCH] D60194: [Tooling] add a Heuristic field indicating that a CompileCommand was guessed.

2019-04-05 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357770: [Tooling] add a Heuristic field indicating that a CompileCommand was guessed. (authored by sammccall, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

r357768 - [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-05 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Apr 5 08:14:05 2019 New Revision: 357768 URL: http://llvm.org/viewvc/llvm-project?rev=357768=rev Log: [LibTooling] Add Transformer, a library for source-to-source transformations. Summary: Adds a basic version of Transformer, a library supporting the concise

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357768: [LibTooling] Add Transformer, a library for source-to-source transformations. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-05 Thread Evgeny Mankov via Phabricator via cfe-commits
emankov updated this revision to Diff 193874. emankov added a comment. Provide only declarations for missing long double device functions to prevent any use of `long double` on the device side, because CUDA does not support `long double` on the device side. [Testing] {Windows 10, Ubuntu

[PATCH] D60194: [Tooling] add a Heuristic field indicating that a CompileCommand was guessed.

2019-04-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D60194#1454633 , @ilya-biryukov wrote: > Yet, having the new field in the `CompileCommand` feels wrong, especially in > combination with a fact that `CompilationDatabase` returns a vector of > compile commands rather just

[PATCH] D60194: [Tooling] add a Heuristic field indicating that a CompileCommand was guessed.

2019-04-05 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, Manuel does not mind having this and the string heuristic does look like the easiest approach to convey this information in the API. Repository: rC Clang CHANGES SINCE

[PATCH] D60316: [clangd] Include insertion: require header guards, drop other heuristics, treat .def like .inc.

2019-04-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added inline comments. Comment at: unittests/clangd/FileIndexTests.cpp:214 TEST(FileIndexTest, HasSystemHeaderMappingsInPreamble) { + TestTU TU; I suspect we can replace most of these tests with TestTU -

[PATCH] D60316: [clangd] Include insertion: require header guards, drop other heuristics, treat .def like .inc.

2019-04-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. We do have some reports of include insertion behaving badly in some codebases. Requiring header guards

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193869. ymandel added a comment. Rebase onto master Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/ https://reviews.llvm.org/D59376 Files: clang/include/clang/Tooling/Refactoring/Transformer.h

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2019-04-05 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In D46421#1456155 , @r.stahl wrote: > Okay so I would suggest to go ahead and commit this. Rebased it succeeds > without modification. > > Still leaves the open problems with the redecls. Should I add the failing > test from

[PATCH] D60269: [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation.

2019-04-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357764: [LibTooling] Add SourceCode library for functions relating to source-code… (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D60269: [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation.

2019-04-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193865. ymandel added a comment. Fix trailing whitespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60269/new/ https://reviews.llvm.org/D60269 Files: clang/include/clang/Tooling/FixIt.h

r357764 - [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation.

2019-04-05 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Apr 5 07:05:03 2019 New Revision: 357764 URL: http://llvm.org/viewvc/llvm-project?rev=357764=rev Log: [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation. Summary: Introduces a utility library in Refactoring/ to collect routines

[PATCH] D59746: [LibTooling] Fix '-h' option

2019-04-05 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In D59746#1456115 , @alexfh wrote: > Can you give a specific example of how this problem manifests? Any tool using `tooling::CommonOptionsParser` with the `llvm::cl::OneOrMore` flag will have this problem, i.e., the `-h` flag

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2019-04-05 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. Okay so I would suggest to go ahead and commit this. Rebased it succeeds without modification. Still leaves the open problems with the redecls. Should I add the failing test from https://reviews.llvm.org/D46421#1375147 in the same commit marked as expected to fail? Or

[PATCH] D59408: [clang-format] [PR25010] Extend AllowShortIfStatementsOnASingleLine not working if an "else" statement is present

2019-04-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:411 * ``SIS_Always`` (in configuration: ``Always``) -Allow short if statements even if the else is a compound statement. +Allow short if/else if/else statements when they are not

[PATCH] D59408: [clang-format] [PR25010] Extend AllowShortIfStatementsOnASingleLine not working if an "else" statement is present

2019-04-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Generally I'm against introducing new style flags or flag options unless a supported style requires it. IMO this increases maintenance burden and can quickly lead to a big space of style flags that contain tricky incompatibilities. CHANGES SINCE LAST ACTION

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-04-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang/include/clang/Tooling/Core/Diagnostic.h:67-71 + // Get the chosen fix to apply for this diagnostic. + // FIXME: currently we choose the first non-empty fix, extend it to support + // fix

[PATCH] D59087: [clang-format] [PR25010] AllowShortIfStatementsOnASingleLine not working if an "else" statement is present

2019-04-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I believe there is no such thing as an "short else statement". The `else` is part of the `if` statement and if it is present, I don't consider the whole `if` statement short. As such, IMO the bug is invalid. Repository: rL LLVM CHANGES SINCE LAST ACTION

[PATCH] D60269: [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation.

2019-04-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193861. ymandel added a comment. Delete unused function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60269/new/ https://reviews.llvm.org/D60269 Files: clang/include/clang/Tooling/FixIt.h

[PATCH] D60139: [clang-tidy] Add misc-placement-new-target-type-mismatch check

2019-04-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Looks like this check would fit better into the `bugprone` module. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60139/new/ https://reviews.llvm.org/D60139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-04-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang/include/clang/Tooling/Core/Diagnostic.h:67-71 + // Get the chosen fix to apply for this diagnostic. + // FIXME: currently we choose the first non-empty fix, extend it to support + // fix selection. + const llvm::StringMap

[PATCH] D59746: [LibTooling] Fix '-h' option

2019-04-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Can you give a specific example of how this problem manifests? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59746/new/ https://reviews.llvm.org/D59746 ___ cfe-commits mailing

[PATCH] D59135: Add check for matching HeaderFilter before emitting Diagnostic

2019-04-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:454 + StringRef FileName(Loc.printToString(Loc.getManager())); +

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-04-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/include/clang/Tooling/Core/Diagnostic.h:67-71 + // Get the chosen fix to apply for this diagnostic. + // FIXME: currently we choose the first non-empty fix, extend it to support + // fix selection. + const llvm::StringMap

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-04-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang/include/clang/Tooling/Core/Diagnostic.h:67-71 + // Get the chosen fix to apply for this diagnostic. + // FIXME: currently we choose the first non-empty fix, extend it to support + // fix selection. + const llvm::StringMap

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-04-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 193857. hokein added a comment. Remove a stale comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59932/new/ https://reviews.llvm.org/D59932 Files:

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-04-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D59932#1453565 , @alexfh wrote: > This looks like a more promising direction. Thanks for the readiness to > experiment with this. > > See the comments inline. Thanks for the comments. Now all existing tests are passed, the

[PATCH] D59540: [clang-tidy] [PR41119] readability-identifier-naming incorrectly fixes lambda capture

2019-04-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Thanks, looks better now, but still a few comments, mostly nits. Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:701 + const ASTContext::DynTypedNodeList = Context->getParents(*DeclRef); + if (!Parents.empty()) { +const Stmt *ST =

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-04-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 193856. hokein marked 8 inline comments as done. hokein added a comment. Fix apply-replacements, and address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59932/new/ https://reviews.llvm.org/D59932

[PATCH] D59540: [clang-tidy] [PR41119] readability-identifier-naming incorrectly fixes lambda capture

2019-04-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D59540#1456011 , @MyDeveloperDay wrote: > friendly ping Sorry for the delay. Feel free to ping earlier. And more frequently :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59540/new/

[PATCH] D60308: Leave alone the semicolon after the MacroBlockBegin name

2019-04-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. The documentation examples of MacroBlockBegin are: /// A regular expression matching macros that start a block. /// \code ///# With: ///MacroBlockBegin: "^NS_MAP_BEGIN|\ ///NS_TABLE_HEAD$" ///MacroBlockEnd: "^\ ///NS_MAP_END|\ ///

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-04-05 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg Comment at: clang/lib/Format/TokenAnnotator.cpp:3177-3178 return false; // Don't split tagged template literal so there is a break between the tag //

[PATCH] D60046: [python, tests] Disable Clang Python tests on Solaris/SPARC

2019-04-05 Thread Michał Górny via Phabricator via cfe-commits
mgorny requested changes to this revision. mgorny added a comment. This revision now requires changes to proceed. Just add it to the regex above. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60046/new/ https://reviews.llvm.org/D60046

[PATCH] D60046: [python, tests] Disable Clang Python tests on Solaris/SPARC

2019-04-05 Thread Rainer Orth via Phabricator via cfe-commits
ro added a reviewer: mgorny. ro added a comment. Ping? Who's an appropriate reviewer here? `CODE_OWNERS.TXT` doesn't list anyone. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60046/new/ https://reviews.llvm.org/D60046

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. One more LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/ https://reviews.llvm.org/D59376 ___ cfe-commits mailing

[PATCH] D60269: [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation.

2019-04-05 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. Nice! A more specific name and a more specific library. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60269/new/

[PATCH] D59540: [clang-tidy] [PR41119] readability-identifier-naming incorrectly fixes lambda capture

2019-04-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. friendly ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59540/new/ https://reviews.llvm.org/D59540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-04-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. friendly ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59309/new/ https://reviews.llvm.org/D59309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D60139: [clang-tidy] Add misc-placement-new-target-type-mismatch check

2019-04-05 Thread Dennis Luxen via Phabricator via cfe-commits
DennisL updated this revision to Diff 193839. DennisL marked an inline comment as done. DennisL added a comment. Sync ReleaseNotes.rst with docs CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60139/new/ https://reviews.llvm.org/D60139 Files: clang-tidy/misc/CMakeLists.txt

[PATCH] D55044: [clang-tidy] check for Abseil make_unique

2019-04-05 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri resigned from this revision. lebedev.ri added a comment. Hmm, i suppose this looks good to me now. It would be good to early-exit, but i'm not sure how important that is. Please see D52771 /

[PATCH] D60308: Leave alone the semicolon after the MacroBlockBegin name

2019-04-05 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: sammccall, klimek, djasper, krasimir. owenpan added a project: clang. Herald added a subscriber: cfe-commits. This patch fixes the bug below. The code: FOO_BEGIN(); FOO_ENTRY FOO_END(); is erroneously formatted to: FOO_BEGIN()