[clang-tools-extra] r365632 - [clangd] Trim spaces around parsed include in include extractor

2019-07-10 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Wed Jul 10 06:59:13 2019 New Revision: 365632 URL: http://llvm.org/viewvc/llvm-project?rev=365632=rev Log: [clangd] Trim spaces around parsed include in include extractor Modified: clang-tools-extra/trunk/clangd/QueryDriverDatabase.cpp Modified:

[PATCH] D64487: [clang, test] Fix Clang :: Headers/max_align.c on 64-bit SPARC

2019-07-10 Thread Rainer Orth via Phabricator via cfe-commits
ro created this revision. ro added reviewers: venkatra, fedor.sergeev. Herald added subscribers: jrtc27, jyknight. Herald added a project: clang. `Clang :: Headers/max_align.c` currently FAILs on 64-bit SPARC: error: 'error' diagnostics seen but not expected: File

[PATCH] D64481: [clangd] Add a flag to clangdServer rename function to control whether we want format the replacements.

2019-07-10 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365631: [clangd] Add a flag to clangdServer rename function to control whether we want… (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[clang-tools-extra] r365631 - [clangd] Add a flag to clangdServer rename function to control whether we want format the replacements.

2019-07-10 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Jul 10 06:44:22 2019 New Revision: 365631 URL: http://llvm.org/viewvc/llvm-project?rev=365631=rev Log: [clangd] Add a flag to clangdServer rename function to control whether we want format the replacements. Summary: This would allow clangd embedders to use the

[PATCH] D64481: [clangd] Add a flag to clangdServer rename function to control whether we want format the replacements.

2019-07-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 208940. hokein marked an inline comment as done. hokein added a comment. Address review comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64481/new/ https://reviews.llvm.org/D64481 Files:

[PATCH] D64471: Loop pragma parsing. NFC.

2019-07-10 Thread Sjoerd Meijer via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365629: Loop pragma parsing. NFC. (authored by SjoerdMeijer, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

r365629 - Loop pragma parsing. NFC.

2019-07-10 Thread Sjoerd Meijer via cfe-commits
Author: sjoerdmeijer Date: Wed Jul 10 06:34:57 2019 New Revision: 365629 URL: http://llvm.org/viewvc/llvm-project?rev=365629=rev Log: Loop pragma parsing. NFC. I would like to add some pragma handling here, but couldn't resist a little NFC and tidy up first. Differential Revision:

[PATCH] D64482: [Driver] Define _FILE_OFFSET_BITS=64 on Solaris

2019-07-10 Thread Rainer Orth via Phabricator via cfe-commits
ro created this revision. ro added reviewers: fedor.sergeev, rsmith. ro added a project: clang. `make check-all` currently fails on `x86_64-pc-solaris2.11` when building with GCC 9: Undefined first referenced symbol in file

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-07-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:185 +/// if (cond) else +class IfStatement final : public Statement { +public: sammccall wrote: > I guess the missing cond here (and similar below) are due to

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-07-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 208937. ilya-biryukov marked 5 inline comments as done. ilya-biryukov added a comment. - Rebase - Address comments - Restructure the roles - Remove the role from tree dumps for now With too many roles it is annoying to update the test outputs on

[PATCH] D64481: [clangd] Add a flag to clangdServer rename function to control whether we want format the replacements.

2019-07-10 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 with a small NIT. Was also thinking about adding a test for this, but the amount of work required to do so seems to outweigh the usefulness. Therefore seems ok to land

[PATCH] D63932: [GlobalDCE] Dead Virtual Function Elimination

2019-07-10 Thread Oliver Stannard (Linaro) via Phabricator via cfe-commits
ostannard added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63932/new/ https://reviews.llvm.org/D63932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D61749: [clang-tidy] initial version of readability-const-method

2019-07-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp:96 +CheckFactories.registerCheck( +"readability-static-method"); CheckFactories.registerCheck( mgehre wrote: > aaron.ballman

[PATCH] D64480: [ASTImporter] Added visibility context check for TypedefNameDecl.

2019-07-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. balazske added a parent revision: D64477: [ASTImporter] Using

[PATCH] D64481: [clangd] Add a flag to clangdServer rename function to control whether we want format the replacements.

2019-07-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: sammccall, ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. This would allow clangd embedders to use the ClangdServer::rename for other purposes (highlighting all the occurrences of

[PATCH] D63954: Add lifetime categories attributes

2019-07-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2770 +def Owner : InheritableAttr { + let Spellings = [CXX11<"gsl", "Owner">]; + let Subjects = SubjectList<[CXXRecord]>; xazax.hun wrote: > aaron.ballman wrote: > > Has

[PATCH] D64477: [ASTImporter] Using Lang_CXX11 in ASTImporterVisibilityTest.

2019-07-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a project: clang. These tests may work with language constructs in C++11 in the future. To avoid warnings about

[PATCH] D64083: [OpenCL][Sema] Improve address space support for blocks

2019-07-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: cfe/trunk/lib/Sema/SemaExprCXX.cpp:4229 +LangAS AddrSpaceR = +RHSType->getAs()->getPointeeType().getAddressSpace(); +CastKind Kind = rjmccall wrote: > All of this can be much simpler: > > ``` > LangAS

[PATCH] D62855: [clangd] Implementation of auto type expansion.

2019-07-10 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel updated this revision to Diff 208923. kuhnel marked 13 inline comments as done. kuhnel added a comment. fixed parts of the 3rd round of review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62855/new/ https://reviews.llvm.org/D62855

[PATCH] D64471: Loop pragma parsing. NFC.

2019-07-10 Thread Sam Parker via Phabricator via cfe-commits
samparker accepted this revision. samparker added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64471/new/ https://reviews.llvm.org/D64471 ___ cfe-commits mailing list

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-10 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, mgrang, jkorous, MaskRay. Herald added a project: clang. Added a class for diffing highlightings and removing duplicate lines. Integrated into

[PATCH] D64211: [AArch64] Fix vector vuqadd intrinsics operands

2019-07-10 Thread Diogo N. Sampaio via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365609: [AArch64] Fix vector vuqadd intrinsics operands (authored by dnsampaio, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE

[PATCH] D64210: [NFC][AArch64] Fix vector vsqadd intrinsics operands

2019-07-10 Thread Diogo N. Sampaio via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365608: [NFC][AArch64] Fix vector vsqadd intrinsics operands (authored by dnsampaio, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES

r365609 - [AArch64] Fix vector vuqadd intrinsics operands

2019-07-10 Thread Diogo N. Sampaio via cfe-commits
Author: dnsampaio Date: Wed Jul 10 02:58:51 2019 New Revision: 365609 URL: http://llvm.org/viewvc/llvm-project?rev=365609=rev Log: [AArch64] Fix vector vuqadd intrinsics operands Summary: Change the vuqadd vector instrinsics to have the second argument as unsigned values, not signed,

r365608 - [NFC][AArch64] Fix vector vsqadd intrinsics operands

2019-07-10 Thread Diogo N. Sampaio via cfe-commits
Author: dnsampaio Date: Wed Jul 10 02:58:03 2019 New Revision: 365608 URL: http://llvm.org/viewvc/llvm-project?rev=365608=rev Log: [NFC][AArch64] Fix vector vsqadd intrinsics operands Summary: Change the vsqadd vector instrinsics to have the second argument as signed values, not unsigned,

Re: r365499 - [OpenCL][Sema] Fix builtin rewriting

2019-07-10 Thread Marco Antognini via cfe-commits
Hello Reid, Thanks for reporting it. I filed a bug to fix that (http://llvm.org/PR42560). However, I'm not sure I'll have time this week to look at it, especially given that we have no Windows builder around here. If you are critically blocked by this, could you check that adding '//

[PATCH] D64448: gsl::Owner/gsl::Pointer: Add implicit annotations for some std types

2019-07-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Just as Sidenote in case you were not aware: There is a check in clang-tidy for `gsl::owner` (https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines-owning-memory.html) It will benefit from your annotation and can be simplified. Repository: rG LLVM

[clang-tools-extra] r365607 - [clangd] Stop recording tokens before running clang-tidy

2019-07-10 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Jul 10 02:28:35 2019 New Revision: 365607 URL: http://llvm.org/viewvc/llvm-project?rev=365607=rev Log: [clangd] Stop recording tokens before running clang-tidy modernize-trailing-return-type runs the preprocessor, breaking the token collection logic. This lead to a

[clang-tools-extra] r365606 - [clangd] Consume error to avoid assertion failures

2019-07-10 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Jul 10 02:18:09 2019 New Revision: 365606 URL: http://llvm.org/viewvc/llvm-project?rev=365606=rev Log: [clangd] Consume error to avoid assertion failures When we fail to calculate #include insertion for a completion item. Note that this change does not add a test,

[PATCH] D63954: Add lifetime categories attributes

2019-07-10 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:4164 + let Content = [{ +When annotating a class ``O`` with ``[[gsl::Owner(T)]]``, then each function +that returns cv-qualified ``T&`` or ``T*`` is assumed to return a Slightly

[PATCH] D64257: [clangd] Added highlighting for class and enum types

2019-07-10 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365602: [clangd] Added highlighting for class and enum types. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r365602 - [clangd] Added highlighting for class and enum types.

2019-07-10 Thread Johan Vikstrom via cfe-commits
Author: jvikstrom Date: Wed Jul 10 01:41:25 2019 New Revision: 365602 URL: http://llvm.org/viewvc/llvm-project?rev=365602=rev Log: [clangd] Added highlighting for class and enum types. Summary: Added highlighting for non-builtin types using VisitTypeLoc. Ignoring namespace qualifiers as for

[PATCH] D64448: gsl::Owner/gsl::Pointer: Add implicit annotations for some std types

2019-07-10 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. > Those are already there in clang/test/SemaCXX/attr-gsl-owner-pointer.cpp. I see. Sorry, but that seems insufficient to me -- different libraries use different patterns. For example, libc++ wraps everything in std in an inline namespace. I don't know how various

[PATCH] D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes

2019-07-10 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added a comment. This revision is now accepted and ready to land. I'm not an expert in SemaInit code, but this change LGTM. Comment at: clang/test/Sema/warn-lifetime-analysis-nocfg.cpp:8 + +struct OwnerWithConv; +

[PATCH] D64257: [clangd] Added highlighting for class and enum types

2019-07-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D64257#1577347 , @nridge wrote: > are you testing these patches against a client-side implementation of > semantic highlighting? If so, which one? Looks like Theia is the only LSP client supporting the semantic highlighting

[PATCH] D64247: [clangd] Filter out non-governed files from broadcast

2019-07-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 208890. kadircet marked 3 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64247/new/ https://reviews.llvm.org/D64247 Files:

r365599 - [Syntax] Add assertion to catch invalid tokens early. NFC

2019-07-10 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Jul 10 01:24:42 2019 New Revision: 365599 URL: http://llvm.org/viewvc/llvm-project?rev=365599=rev Log: [Syntax] Add assertion to catch invalid tokens early. NFC To help with identifiying root cause of a crash we are seeing. Modified:

[PATCH] D64257: [clangd] Added highlighting for class and enum types

2019-07-10 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. thanks, looks good. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:83 +// `Class` type. The destructor decls are handled in `VisitTypeLoc` (we will +

[PATCH] D64294: [Driver] Consolidate shouldUseFramePointer() and shouldUseLeafFramePointer()

2019-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:585 + (A && A->getOption().matches(options::OPT_fno_omit_frame_pointer)) || + (!(A && A->getOption().matches(options::OPT_fomit_frame_pointer)) && +

[PATCH] D64243: [NFC][AArch64] Fix vector vqtb[lx][1-4]_s8 operand

2019-07-10 Thread Diogo N. Sampaio via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365598: [NFC][AArch64] Fix vector vqtb[lx][1-4]_s8 operand (authored by dnsampaio, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES

[PATCH] D64471: Loop pragma parsing. NFC.

2019-07-10 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer created this revision. SjoerdMeijer added reviewers: Meinersbur, dmgreen, samparker. I would like to add some pragma handling here, but couldn't resist a little NFC and tidy up first. https://reviews.llvm.org/D64471 Files: clang/lib/Sema/SemaStmtAttr.cpp Index:

r365598 - [NFC][AArch64] Fix vector vqtb[lx][1-4]_s8 operand

2019-07-10 Thread Diogo N. Sampaio via cfe-commits
Author: dnsampaio Date: Wed Jul 10 01:16:49 2019 New Revision: 365598 URL: http://llvm.org/viewvc/llvm-project?rev=365598=rev Log: [NFC][AArch64] Fix vector vqtb[lx][1-4]_s8 operand Summary: Change the vqtb[lx][1-4]_s8 instrinsics to have the last argument as vector of unsigned valuse, not

[PATCH] D61001: [clang-format][tests] Explicitly specify style in some tests

2019-07-10 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl marked 2 inline comments as done. r.stahl added inline comments. Comment at: test/Format/language-detection.cpp:2 // RUN: grep -Ev "// *[A-Z0-9_]+:" %s \ -// RUN: | clang-format -style=llvm -assume-filename=foo.js \ // RUN: | FileCheck -strict-whitespace

[PATCH] D64257: [clangd] Added highlighting for class and enum types

2019-07-10 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added a comment. In D64257#1577347 , @nridge wrote: > @jvikstrom out of curiosity, are you testing these patches against a > client-side implementation of semantic highlighting? If so, which one? Yes, I am testing against Theia. Just modified

[PATCH] D61001: [clang-format][tests] Explicitly specify style in some tests

2019-07-10 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/Format/language-detection.cpp:2 // RUN: grep -Ev "// *[A-Z0-9_]+:" %s \ -// RUN: | clang-format -style=llvm -assume-filename=foo.js \ // RUN: | FileCheck -strict-whitespace -check-prefix=CHECK1 %s What's

[PATCH] D61001: [clang-format][tests] Explicitly specify style in some tests

2019-07-10 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added reviewers: MyDeveloperDay, krasimir. r.stahl added a comment. This should be trivial enough to just commit, but I'd just be more comfortable if someone looked at it before, because this is my first commit in this area of clang. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D63085: Provide a fix-it hint for -Wswitch, which adds missing cases. If there are >3 cases, the inserted text will contain newlines so it will not be shown in console output (but will be appl

2019-07-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. One major drawback that I see is the lack of indentation (and other format options) in the added code. Should we have this fix at a higher level that can have formatting (either now or in the future)? E.g. in `clangd` directly? Comment at:

[PATCH] D64123: Add clang-llvm-rename tool.

2019-07-10 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu updated this revision to Diff 208883. ruiu added a comment. - Add a comment as to how to build and run clang-llvm-rename tool Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64123/new/ https://reviews.llvm.org/D64123 Files:

[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-10 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Type.h:6512 +inline bool Type::isTemplateSpecializationType() const { + return isa(this); +} This is a sugar type. What are you trying to do? Comment at:

[PATCH] D62584: [OpenCL][PR42033] Deducing addr space with template parameter types

2019-07-10 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/TreeTransform.h:5363 +if (ResultType.getAddressSpace() != LangAS::Default && +(ResultType.getAddressSpace() != LangAS::opencl_private)) { SemaRef.Diag(TL.getReturnLoc().getBeginLoc(),

[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

2019-07-10 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added subscribers: beanz, smeenai. smeenai added a comment. In D58418#1577349 , @jkorous wrote: > Thanks for the revert. > > There's actually one more problem - seems like ninja doesn't like the > generated build.ninja file on Linux. > > ninja:

<    1   2   3