[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: lib/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] 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 wr

[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 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 -check-pref

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&view=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] 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: clang/lib/Sema/

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

[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] 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] 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: clang-tools-ex

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&view=rev Log: [Syntax] Add assertion to catch invalid tokens early. NFC To help with identifiying root cause of a crash we are seeing. Modified: cfe/trunk/include/clang/T

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

[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; + Not

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

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

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

[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&view=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,

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

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

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 '// UNSUPPORTE

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&view=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, a

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&view=rev Log: [AArch64] Fix vector vuqadd intrinsics operands Summary: Change the vuqadd vector instrinsics to have the second argument as unsigned values, not signed, accord

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

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

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

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

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

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

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

[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 https://lists.llvm.org/

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

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

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

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

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&view=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: https://r

[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: https://reviews.llvm.org/D644

[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: clang-tools-ext

[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&view=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 Clang

[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

[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 /vol/llvm/src/clang/dist/

[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&view=rev Log: [clangd] Trim spaces around parsed include in include extractor Modified: clang-tools-extra/trunk/clangd/QueryDriverDatabase.cpp Modified: clang-tools-extra/

[PATCH] D64488: [Driver] Support -fsanitize=function on Solaris/x86

2019-07-10 Thread Rainer Orth via Phabricator via cfe-commits
ro created this revision. ro added a reviewer: kcc. ro added a project: Sanitizers. Herald added a subscriber: fedor.sergeev. Herald added a project: clang. `UBSan-Standalone-x86_64 :: TestCases/TypeCheck/Function/function.cpp` currently FAILs on Solaris/x86_64: clang-9: error: unsupported opti

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

2019-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > There's one caveat: gcc defines _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE for > C++ only, while clang has long been doing it for all languages Can you explain more about the hack https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0f97ccfdccc033f543ccbcb220697e62e84bf01f

[PATCH] D64489: [clangd][QueryDriver] Use language from underlying database if possible

2019-07-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64489 Files: clang-tools-extra/clangd/QueryDri

[PATCH] D64491: [Driver] Enable __cxa_atexit on Solaris

2019-07-10 Thread Rainer Orth via Phabricator via cfe-commits
ro created this revision. ro added reviewers: fedor.sergeev, rsmith. Herald added subscribers: dexonsmith, mehdi_amini, jyknight. Herald added a project: clang. Starting with Solaris 11.4 (which is now the required minimal version), Solaris does support `__cxa_atexit`. This patch reflects that.

[PATCH] D64492: [clangd] Added highlightings for namespace specifiers.

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, jkorous, MaskRay. Herald added a project: clang. Added highlightings for namespace specifiers. Repository: rG LLVM Github Monorepo https://r

[clang-tools-extra] r365634 - [clangd] Filter out non-governed files from broadcast

2019-07-10 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Wed Jul 10 07:11:46 2019 New Revision: 365634 URL: http://llvm.org/viewvc/llvm-project?rev=365634&view=rev Log: [clangd] Filter out non-governed files from broadcast Summary: This also turns off implicit discovery of additional compilation databases. Reviewers: sammccall

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

2019-07-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365634: [clangd] Filter out non-governed files from broadcast (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https

[PATCH] D64493: [Driver] Don't pass --dynamic-linker to ld on Solaris

2019-07-10 Thread Rainer Orth via Phabricator via cfe-commits
ro created this revision. ro added reviewers: fedor.sergeev, rsmith, theraven. Herald added subscribers: jrtc27, jyknight. Herald added a project: clang. I noticed that clang currenly passes `--dynamic-linker` to `ld`. This has been the case since Solaris 11 support was added initially back in 2

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1947 +def RequireDesignatedInit : InheritableAttr { + let Spellings = [CXX11<"clang", "require_designated_init">]; This should be `RequiresDesignator`. Commen

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: NoQ, Szelethus. aaron.ballman added a subscriber: NoQ. aaron.ballman added a comment. I'm worried that this will continue to drift out of sync with the static analyzer checks unless we find some way to automate it. I wonder if we could write a script to generate th

[PATCH] D64494: [analyzer]Add user docs rst

2019-07-10 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added a reviewer: dkrupp. Herald added subscribers: cfe-commits, Charusso, gamesh411, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, whisperity. Herald added a project: clang. Add user documentation page.

[PATCH] D64494: [analyzer]Add user docs rst

2019-07-10 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp accepted this revision. dkrupp added a comment. This revision is now accepted and ready to land. I guess this is a placeholder for the subpages of "User Manual" @ https://clang-analyzer.llvm.org, which will be ported in follow-up patches. Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D64495: [AArch64] Implement __jcvt intrinsic from Armv8.3-A

2019-07-10 Thread Kyrill Tkachov via Phabricator via cfe-commits
ktkachov created this revision. ktkachov added reviewers: t.p.northover, SjoerdMeijer, pbarrio, momchil.velikov. ktkachov added projects: LLVM, clang. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, kristof.beyls, javed.absar. The __jcvt intrinsic defined in ACLE [1] is available

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

2019-07-10 Thread Rainer Orth via Phabricator via cfe-commits
ro added a comment. In D64482#1578245 , @MaskRay wrote: > > There's one caveat: gcc defines _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE > > for C++ only, while clang has long been doing it for all languages > > Can you explain more about the hack > https:/

[PATCH] D64495: [AArch64] Implement __jcvt intrinsic from Armv8.3-A

2019-07-10 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:237 +break; + case llvm::AArch64::ArchKind::ARMV8_4A: +getTargetDefinesARMV84A(Opts, Builder); It is a good change, but I think you should either add tests for these case

[PATCH] D63139: [Diagnostics] Implement -Wswitch-unreachable

2019-07-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D63139#1561891 , @rjmccall wrote: > Are the `CaseStmt`s being dropped in C++ because the expression overflows? I > agree that that's bad AST behavior; we should strive to generate AST whenever > we can, even if it's not

[PATCH] D64494: [analyzer]Add user docs rst

2019-07-10 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D64494#1578373 , @dkrupp wrote: > I guess this is a placeholder for the subpages of "User Manual" @ > https://clang-analyzer.llvm.org, which will be ported in follow-up patches. Yes. Repository: rG LLVM Github Monorepo C

r365639 - [analyzer]Add user docs rst

2019-07-10 Thread Gabor Marton via cfe-commits
Author: martong Date: Wed Jul 10 07:49:53 2019 New Revision: 365639 URL: http://llvm.org/viewvc/llvm-project?rev=365639&view=rev Log: [analyzer]Add user docs rst Summary: Add user documentation page. This is an empty page atm, later patches will add the specific user documentatoins. Reviewers: d

r365638 - Remove two unused member variables.

2019-07-10 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Jul 10 07:49:36 2019 New Revision: 365638 URL: http://llvm.org/viewvc/llvm-project?rev=365638&view=rev Log: Remove two unused member variables. They were added over 10 years ago in r66575 and have never been used as far as I can tell. (r67087 added similar fields to Compil

[PATCH] D64494: [analyzer]Add user docs rst

2019-07-10 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365639: [analyzer]Add user docs rst (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D64494?

[PATCH] D64495: [AArch64] Implement __jcvt intrinsic from Armv8.3-A

2019-07-10 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:237 +break; + case llvm::AArch64::ArchKind::ARMV8_4A: +getTargetDefinesARMV84A(Opts, Builder); SjoerdMeijer wrote: > It is a good change, but I think you should either ad

[PATCH] D64492: [clangd] Added highlightings for namespace specifiers.

2019-07-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:41 +// namespace. +if (const auto UD = dyn_cast(ND)) { + addToken(UD->getIdentLocation(), HighlightingKind::Namespace); nit: const auto * C

[PATCH] D64495: [AArch64] Implement __jcvt intrinsic from Armv8.3-A

2019-07-10 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.td:720 def FJCVTZS : BaseFPToIntegerUnscaled<0b01, 0b11, 0b110, FPR64, GPR32, - "fjcvtzs", []> { + "fjcvtzs", [(set

[PATCH] D63756: [AMDGPU] Increased the number of implicit argument bytes for both OpenCL and HIP (CLANG).

2019-07-10 Thread Christudasan Devadasan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365643: [AMDGPU] Increased the number of implicit argument bytes for both OpenCL and… (authored by cdevadas, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

r365643 - [AMDGPU] Increased the number of implicit argument bytes for both OpenCL and HIP (CLANG).

2019-07-10 Thread Christudasan Devadasan via cfe-commits
Author: cdevadas Date: Wed Jul 10 08:10:08 2019 New Revision: 365643 URL: http://llvm.org/viewvc/llvm-project?rev=365643&view=rev Log: [AMDGPU] Increased the number of implicit argument bytes for both OpenCL and HIP (CLANG). To enable a new implicit kernel argument, increased the number of argum

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

2019-07-10 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Hi Oliver, thanks for working on this. This is something that I've always wanted to do with the type metadata but never had time to work on. I'll try to take a more in depth look later this week. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D63192: [Diagnostics] Implement -Wswitch-default

2019-07-10 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 208974. xbolva00 added a comment. Rebased, improved. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63192/new/ https://reviews.llvm.org/D63192 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/

[PATCH] D63192: [Diagnostics] Implement -Wswitch-default

2019-07-10 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D63192#1539605 , @xbolva00 wrote: > I will work on this after we land https://reviews.llvm.org/D63139. ^ not yet landed, but please @aaron.ballman take a look, this patch is ready for review. CHANGES SINCE LAST ACTION h

[PATCH] D64504: Various minor tweaks to CLCompatOptions.td

2019-07-10 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: rnk. - Add back indentation I accidentally removed in r364901 - Wrap two lines to 80 cols - Slightly tighten up help text for several flags - Consistently use "Do not" instead of "Don't" - Make every option description start with a verb - Use

[PATCH] D64495: [AArch64] Implement __jcvt intrinsic from Armv8.3-A

2019-07-10 Thread Kyrill Tkachov via Phabricator via cfe-commits
ktkachov updated this revision to Diff 208980. ktkachov added a comment. Add more CHECK-LABEL tests, test v8.4a and v8.5a features. Fix formatting in pattern. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64495/new/ https://reviews.llvm.org/D64495 Files: clang/include/clang/Basic/Bu

[PATCH] D64506: clang-cl: Remove -O0 option

2019-07-10 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: rnk. cl.exe doesn't understand it; there's /Od instead. See also the review thread for r229575. https://reviews.llvm.org/D64506 Files: clang/include/clang/Driver/CLCompatOptions.td Index: clang/include/clang/Driver/CLCompatOptions.td ==

[PATCH] D64506: clang-cl: Remove -O0 option

2019-07-10 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. I did check that we now warn, like you had requested: $ out/gn/bin/clang-cl test.cc /O0 /c clang: warning: argument unused during compilation: '/O0' [-Wunused-command-line-argument] Adding a test for that felt weird though, so I didn't. CHANGES SINCE LAST ACTION

[PATCH] D63192: [Diagnostics] Implement -Wswitch-default

2019-07-10 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 208984. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63192/new/ https://reviews.llvm.org/D63192 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaStmt.cpp test/Sema/switch-availability.c

[PATCH] D64495: [AArch64] Implement __jcvt intrinsic from Armv8.3-A

2019-07-10 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer accepted this revision. SjoerdMeijer added a comment. This revision is now accepted and ready to land. Looks like a good change to me, some nits inlined. It shouldn't be difficult to request an account and commit it yourself, which might be useful if you maybe intend to submit more

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D64454#1578352 , @aaron.ballman wrote: > I'm worried that this will continue to drift out of sync with the static > analyzer checks unless we find some way to automate it. I wonder if we could > write a script to generate these .

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

2019-07-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 208993. Anastasia marked 2 inline comments as done. Anastasia added a comment. - Added handling of similar test case with `InjectedClassNameType` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64400/new/ https://reviews.llvm.org/D64400 Files: in

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

2019-07-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done and 2 inline comments as done. Anastasia added inline comments. Comment at: include/clang/AST/Type.h:6512 +inline bool Type::isTemplateSpecializationType() const { + return isa(this); +} rjmccall wrote: > This is a suga

[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 208995. ilya-biryukov added a comment. - Mark groups of kinds for statements and expressions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63835/new/ https://reviews.llvm.org/D63835 Files: clang/includ

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Just thinking aloud! We were tinkering with the idea of a checker creator script similar to what clang-tidy has, that could help on this potentially. Is generating the rst code with Tblgen a feasable approach? At first glance, it sounds like a nightmare to implement,

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

2019-07-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This is ready for another round Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:25 /// A kind of a syntax node, used for implementing casts. enum class NodeKind : uint16_t { Leaf, sammccall wrote: > there are going to

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D64454#1578704 , @Szelethus wrote: > Just thinking aloud! > > We were tinkering with the idea of a checker creator script similar to what > clang-tidy has, that could help on this potentially. > > Is generating the rst co

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-10 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. In D64454#1578352 , @aaron.ballman wrote: > I'm worried that this will continue to drift out of sync with the static > analyzer checks unless we find some way to automate it. I wonder if we could > write a script to g

[PATCH] D64492: [clangd] Added highlightings for namespace specifiers.

2019-07-10 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 208998. jvikstrom marked 6 inline comments as done. jvikstrom added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64492/new/ https://reviews.llvm.org/D64492 Files: clang-tool

[PATCH] D64492: [clangd] Added highlightings for namespace specifiers.

2019-07-10 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:73 // This check is for not getting two entries when there are anonymous // structs. It also makes us not highlight namespace qualifiers. For // elaborated types the actu

[PATCH] D64274: [analyzer] VirtualCallChecker overhaul.

2019-07-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Please know that I'm currently out of town, so it'll be a while before I can formally accept. Its on top of my list when I get home though! :^) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64274/new/ https://reviews.llvm.org/D64274 ___

r365669 - [X86] Change the IR sequence for _mm_storeh_pi and _mm_storel_pi to perform the store as a <2 x float> instead of i64.

2019-07-10 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Jul 10 10:11:29 2019 New Revision: 365669 URL: http://llvm.org/viewvc/llvm-project?rev=365669&view=rev Log: [X86] Change the IR sequence for _mm_storeh_pi and _mm_storel_pi to perform the store as a <2 x float> instead of i64. This is similar to what we do for loadl_pi

[PATCH] D63846: [clang] Preserve names of addrspacecast'ed values.

2019-07-10 Thread Vyacheslav Zakharin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365666: [clang] Preserve names of addrspacecast'ed values. (authored by vzakhari, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://

r365668 - [X86] Add guards to some of the x86 intrinsic tests to skip 64-bit mode only intrinsics when compiled for 32-bit mode.

2019-07-10 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Jul 10 10:11:23 2019 New Revision: 365668 URL: http://llvm.org/viewvc/llvm-project?rev=365668&view=rev Log: [X86] Add guards to some of the x86 intrinsic tests to skip 64-bit mode only intrinsics when compiled for 32-bit mode. All the command lines are for 64-bit mode,

r365666 - [clang] Preserve names of addrspacecast'ed values.

2019-07-10 Thread Vyacheslav Zakharin via cfe-commits
Author: vzakhari Date: Wed Jul 10 10:10:05 2019 New Revision: 365666 URL: http://llvm.org/viewvc/llvm-project?rev=365666&view=rev Log: [clang] Preserve names of addrspacecast'ed values. Differential Revision: https://reviews.llvm.org/D63846 Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp

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

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

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

2019-07-10 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen 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)) && + (Args.hasArg(options::OPT_pg) || -

[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: lib/Sema/SemaType.cpp:7421 + // - template specialization as addr space in template argument doesn't + // affect specialization. + (T->isDependentType() && (!T->isPointerType() && !T->isReferenceType() && --

[PATCH] D63192: [Diagnostics] Implement -Wswitch-default

2019-07-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm wary of adding this as an on-by-default warning, despite its presence in MSVC (and despite submitting a similar patch years ago to implement the same functionality). Machine-generated code runs into this one frequently (we've been bitten by it numerous times w

  1   2   3   >