[PATCH] D118016: [clang-tidy] Change code of SignalHandlerCheck (NFC).

2022-01-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: carlosgalvezp, steakhal, martong, gamesh411, Szelethus, dkrupp, xazax.hun. balazske requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Using clang::CallGraph to get the cal

[clang] 670a721 - [clang-format] Assert Line->First. NFC.

2022-01-23 Thread Marek Kurdej via cfe-commits
Author: Marek Kurdej Date: 2022-01-24T08:54:55+01:00 New Revision: 670a721de2a19d0307ceea47349fd9e986a8484f URL: https://github.com/llvm/llvm-project/commit/670a721de2a19d0307ceea47349fd9e986a8484f DIFF: https://github.com/llvm/llvm-project/commit/670a721de2a19d0307ceea47349fd9e986a8484f.diff

[clang] ea2112e - [clang-format] Remove unused assignment. NFC.

2022-01-23 Thread Marek Kurdej via cfe-commits
Author: Marek Kurdej Date: 2022-01-24T08:34:24+01:00 New Revision: ea2112ea15a0f43cb469b29e00cda3d7a48ae875 URL: https://github.com/llvm/llvm-project/commit/ea2112ea15a0f43cb469b29e00cda3d7a48ae875 DIFF: https://github.com/llvm/llvm-project/commit/ea2112ea15a0f43cb469b29e00cda3d7a48ae875.diff

[PATCH] D112906: [PowerPC] Emit warning for ieeelongdouble on older GNU toolchain

2022-01-23 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc5590396d041: [PowerPC] Emit warning for ieeelongdouble on older GNU toolchain (authored by qiucf). Repository: rG LLVM Github Monorepo CHANGES S

[clang] c559039 - [PowerPC] Emit warning for ieeelongdouble on older GNU toolchain

2022-01-23 Thread Qiu Chaofan via cfe-commits
Author: Qiu Chaofan Date: 2022-01-24T15:23:28+08:00 New Revision: c5590396d041e77a84101cdcc4249788403e4e40 URL: https://github.com/llvm/llvm-project/commit/c5590396d041e77a84101cdcc4249788403e4e40 DIFF: https://github.com/llvm/llvm-project/commit/c5590396d041e77a84101cdcc4249788403e4e40.diff L

[PATCH] D112906: [PowerPC] Emit warning for ieeelongdouble on older GNU toolchain

2022-01-23 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 402405. qiucf marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112906/new/ https://reviews.llvm.org/D112906 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/lib/Dr

[PATCH] D118015: [RISCV][NFC] Rename RequiredExtensions to RequiredFeatures.

2022-01-23 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan created this revision. jacquesguan added reviewers: craig.topper, asb, luismarques, frasercrmck, HsiangKai, khchen, benshi001. Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, P

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-23 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. Thanks, I'm happy to try the array designators and see how they work out in practice. The issue of hints appearing and disappearing as you type a function call is one I've noticed, but I've g

[PATCH] D117854: [RISCV] Decouple Zve* extensions and the V extension.

2022-01-23 Thread Jianjian Guan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGba16e3c31f66: [RISCV] Decouple Zve* extensions and the V extension. (authored by jacquesguan). Changed prior to commit: https://reviews.llvm.org/D

[clang] ba16e3c - [RISCV] Decouple Zve* extensions and the V extension.

2022-01-23 Thread via cfe-commits
Author: jacquesguan Date: 2022-01-24T14:55:21+08:00 New Revision: ba16e3c31f66f02df08ec41394b765aa568a3107 URL: https://github.com/llvm/llvm-project/commit/ba16e3c31f66f02df08ec41394b765aa568a3107 DIFF: https://github.com/llvm/llvm-project/commit/ba16e3c31f66f02df08ec41394b765aa568a3107.diff L

[PATCH] D117854: [RISCV] Decouple Zve* extensions and the V extension.

2022-01-23 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan updated this revision to Diff 402401. jacquesguan added a comment. Rebase main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117854/new/ https://reviews.llvm.org/D117854 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang

[PATCH] D117520: [clang-format] Fix SeparateDefinitionBlocks issues

2022-01-23 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. Just this small detail. :) Comment at: clang/lib/Format/DefinitionBlockSeparator.cpp:131 + + // A single line identifier that is not in the last line + if (OperateLine->First->is(tok::ident

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-23 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/FormatToken.h:125 +/// Operators that can follow a C variable. +static const std::set C_OperatorsFollowingVar = { +tok::l_square, tok::r_square, And maybe choose a different container:

[clang] 90abe18 - Add missing function implementation from DWARF default change

2022-01-23 Thread David Blaikie via cfe-commits
Author: David Blaikie Date: 2022-01-23T21:10:16-08:00 New Revision: 90abe181da7c61d982e4873c97fd12bc06fefe09 URL: https://github.com/llvm/llvm-project/commit/90abe181da7c61d982e4873c97fd12bc06fefe09 DIFF: https://github.com/llvm/llvm-project/commit/90abe181da7c61d982e4873c97fd12bc06fefe09.diff

[clang] d3b26de - Clang: Change the default DWARF version to 5

2022-01-23 Thread David Blaikie via cfe-commits
Author: David Blaikie Date: 2022-01-23T20:49:57-08:00 New Revision: d3b26dea16108c427b19b5480c9edc76edf8f5b4 URL: https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4 DIFF: https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4.diff

[PATCH] D117854: [RISCV] Decouple Zve* extensions and the V extension.

2022-01-23 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117854/new/ https://reviews.llvm.org/D117854 ___

[PATCH] D117854: [RISCV] Decouple Zve* extensions and the V extension.

2022-01-23 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan updated this revision to Diff 402385. jacquesguan added a comment. Herald added a subscriber: pcwang-thead. Address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117854/new/ https://reviews.llvm.org/D117854 Files: clang/inclu

[PATCH] D117854: [RISCV] Decouple Zve* extensions and the V extension.

2022-01-23 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVSubtarget.h:185 + bool hasVInstructionsF16() const { +return HasStdExtV || (HasStdExtZve32f && HasStdExtZfh); + } This should be `(HasStdExtV || HasStdExtZve32f) && HasStdExtZfh`. V

[PATCH] D117913: [Clang][RISCV] Guard vmulh, vsmul correctly

2022-01-23 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117913/new/ https://reviews.llvm.org/D117913 ___

[PATCH] D112903: [C++20] [Module] Fix bug47116 and implement [module.interface]/p6

2022-01-23 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3a3af2bbc97e: [C++20] [Module] fix bug 47716 and implement [module.interface]/p6 (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHA

[clang] 3a3af2b - [C++20] [Module] fix bug 47716 and implement [module.interface]/p6

2022-01-23 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-01-24T10:25:25+08:00 New Revision: 3a3af2bbc97e7db045eccb8683e93b9aa7ef562b URL: https://github.com/llvm/llvm-project/commit/3a3af2bbc97e7db045eccb8683e93b9aa7ef562b DIFF: https://github.com/llvm/llvm-project/commit/3a3af2bbc97e7db045eccb8683e93b9aa7ef562b.diff LO

[PATCH] D117463: [clangd] Disable expand-auto action on constrained auto.

2022-01-23 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D117463#3247915 , @sammccall wrote: > My intuition is that constrained auto is unlikely to be used in deducible > contexts, but maybe some people will like `Iterator auto I = > foo.begin()` or so... I expect this to be fairly

LLVM build master will be restarted soon

2022-01-23 Thread Galina Kistanova via cfe-commits
Hello, LLVM build master will be restarted at 7pm PST today. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D117423: [AVR][clang] Reject non assembly source files for the avr1 family

2022-01-23 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 402379. benshi001 marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117423/new/ https://reviews.llvm.org/D117423 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/lib/Driver/ToolChains/AVR.cpp clang

[PATCH] D118010: [clang-tidy] Fix nested namespaces in `readability-static-definition-in-anonymous-namespace` check

2022-01-23 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron created this revision. Izaron added reviewers: hokein, alexfh. Herald added subscribers: carlosgalvezp, xazax.hun. Izaron requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. The check previously inspected only the immediate p

[clang] fa90fc6 - [Sema] Fix a bugprone argument comment (NFC)

2022-01-23 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-01-23T14:00:01-08:00 New Revision: fa90fc6e0566a245cafa0afa4da4967cf4831779 URL: https://github.com/llvm/llvm-project/commit/fa90fc6e0566a245cafa0afa4da4967cf4831779 DIFF: https://github.com/llvm/llvm-project/commit/fa90fc6e0566a245cafa0afa4da4967cf4831779.diff L

[PATCH] D56303: [clang-tidy] Recognize labelled statements when simplifying boolean exprs

2022-01-23 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 402370. LegalizeAdulthood retitled this revision from "[clang-tidy] Handle case/default statements when simplifying boolean expressions" to "[clang-tidy] Recognize labelled statements when simplifying boolean exprs". LegalizeAdulthood edited the sum

[clang] e59964b - [clang] Remove unused forward declarations (NFC)

2022-01-23 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-01-23T13:28:06-08:00 New Revision: e59964b67e026cde7a1438a8e91ca077a90810e0 URL: https://github.com/llvm/llvm-project/commit/e59964b67e026cde7a1438a8e91ca077a90810e0 DIFF: https://github.com/llvm/llvm-project/commit/e59964b67e026cde7a1438a8e91ca077a90810e0.diff L

[clang-tools-extra] ee591a6 - [clang] Forward-declare DynTypedNode (NFC)

2022-01-23 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-01-23T13:28:04-08:00 New Revision: ee591a64a795995fad96d8c16484baa7cacce99f URL: https://github.com/llvm/llvm-project/commit/ee591a64a795995fad96d8c16484baa7cacce99f DIFF: https://github.com/llvm/llvm-project/commit/ee591a64a795995fad96d8c16484baa7cacce99f.diff L

[clang] ab1add6 - [clang] Move the definition of ASTDiff (NFC)

2022-01-23 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-01-23T13:28:02-08:00 New Revision: ab1add6adc444371268ddbcb169a509559abd9dc URL: https://github.com/llvm/llvm-project/commit/ab1add6adc444371268ddbcb169a509559abd9dc DIFF: https://github.com/llvm/llvm-project/commit/ab1add6adc444371268ddbcb169a509559abd9dc.diff L

[PATCH] D118005: [hmaptool] Fix string decoding for Python 3

2022-01-23 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. smeenai added a reviewer: bruno. smeenai requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Our "strings" were actually bytes, which made verbose dumping fail. Decode them so they actually become strings. Repos

[PATCH] D118004: [hmaptool] Fix dumping

2022-01-23 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. smeenai added a reviewer: bruno. smeenai requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. It was complaining about too many values to unpack, since our struct unpack format string specified six members, but we

[PATCH] D116328: [ast-matchers] Add hasSubstatement() traversal matcher for caseStmt(), defaultStmt(), labelStmt()

2022-01-23 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood abandoned this revision. LegalizeAdulthood added a comment. Abandoning this in favor of a private matcher where it is needed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116328/new/ https://reviews.llvm.org/D116328 ___ cfe

[PATCH] D117129: [clang-tidy] Extract Class IncluderClangTidyCheck

2022-01-23 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood abandoned this revision. LegalizeAdulthood added a comment. Abandoning this in favor of https://reviews.llvm.org/D117409 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117129/new/ https://reviews.llvm.org/D117129 ___ cfe-comm

[PATCH] D117994: [Clang] Implement multidimentional subscript operator

2022-01-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 402353. cor3ntin added a comment. Fix typos in commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117994/new/ https://reviews.llvm.org/D117994 Files: clang-tools-extra/clang-tidy/modernize/LoopCon

[PATCH] D117994: [Clang] Implement multidimentional subscript operator

2022-01-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 402349. cor3ntin added a comment. Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117994/new/ https://reviews.llvm.org/D117994 Files: clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp

[PATCH] D117994: [Clang] Implement multidimentional subscript operator

2022-01-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added a subscriber: carlosgalvezp. cor3ntin requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added projects: clang, clang-tools-extra. Implement P2128R6 in C++23 mode. Unlike GCC's

[PATCH] D117423: [AVR][clang] Reject non assembly source files for the avr1 family

2022-01-23 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked an inline comment as done. benshi001 added inline comments. Comment at: clang/lib/Driver/ToolChains/AVR.h:22 class LLVM_LIBRARY_VISIBILITY AVRToolChain : public Generic_ELF { + std::string AVRMcu; + aykevl wrote: > I think I would have called t

[PATCH] D7982: [clang-tidy] Add readability-duplicate-include check

2022-01-23 Thread Richard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd2e8fb331835: [clang-tidy] Add readability-duplicate-include check (authored by LegalizeAdulthood). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7982/new/

[clang-tools-extra] d2e8fb3 - [clang-tidy] Add readability-duplicate-include check

2022-01-23 Thread via cfe-commits
Author: Richard Date: 2022-01-23T09:23:04-07:00 New Revision: d2e8fb331835fcc565929720781a5fd64e66fc17 URL: https://github.com/llvm/llvm-project/commit/d2e8fb331835fcc565929720781a5fd64e66fc17 DIFF: https://github.com/llvm/llvm-project/commit/d2e8fb331835fcc565929720781a5fd64e66fc17.diff LOG:

[PATCH] D117423: [AVR][clang] Reject non assembly source files for the avr1 family

2022-01-23 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 402338. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117423/new/ https://reviews.llvm.org/D117423 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/lib/Driver/ToolChains/AVR.cpp clang/lib/Driver/ToolChains/AVR.h clang/lib/Dri

[PATCH] D117857: [clang-tidy] Remove gsl::at suggestion from cppcoreguidelines-pro-bounds-constant-array-index

2022-01-23 Thread Carlos Galvez via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGeb3f20e8fa4b: [clang-tidy] Remove gsl::at suggestion from cppcoreguidelines-pro-bounds… (authored by carlosgalvezp). Repository: rG LLVM Github Mo

[clang-tools-extra] eb3f20e - [clang-tidy] Remove gsl::at suggestion from cppcoreguidelines-pro-bounds-constant-array-index

2022-01-23 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2022-01-23T15:52:42Z New Revision: eb3f20e8fa4b76e0103f15623a2fc3b27fb03f85 URL: https://github.com/llvm/llvm-project/commit/eb3f20e8fa4b76e0103f15623a2fc3b27fb03f85 DIFF: https://github.com/llvm/llvm-project/commit/eb3f20e8fa4b76e0103f15623a2fc3b27fb03f85.diff LOG:

[PATCH] D117205: [clang-tidy] Support custom fix hint for cppcoreguidelines-pro-bounds-constant-array-index

2022-01-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp abandoned this revision. carlosgalvezp added a comment. Abandoned in favor of https://reviews.llvm.org/D117857 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117205/new/ https://reviews.llvm.org/D117205 ___

[PATCH] D117857: [clang-tidy] Remove gsl::at suggestion from cppcoreguidelines-pro-bounds-constant-array-index

2022-01-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Fixed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117857/new/ https://reviews.llvm.org/D117857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[PATCH] D117857: [clang-tidy] Remove gsl::at suggestion from cppcoreguidelines-pro-bounds-constant-array-index

2022-01-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 402333. carlosgalvezp marked 2 inline comments as done. carlosgalvezp edited the summary of this revision. carlosgalvezp added a comment. Fixed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D7982: [clang-tidy] Add readability-duplicate-include check

2022-01-23 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. OK, removing Alex has cleared it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7982/new/ https://reviews.llvm.org/D7982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[PATCH] D7982: [clang-tidy] Add readability-duplicate-include check

2022-01-23 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. In D7982#3264009 , @carlosgalvezp wrote: > In D7982#3263920 , @LegalizeAdulthood > wrote: > >> In D7982#3263790 , @carlosgalvezp >> wrote: >

[PATCH] D117939: [clang-tidy] Add more documentation about check development

2022-01-23 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 402317. LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added a comment. Update from review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117939/new/ https://reviews.llvm.org/D117939 Files: clang-tools-ext

[PATCH] D117939: [clang-tidy] Add more documentation about check development

2022-01-23 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 2 inline comments as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/Contributing.rst:232 + +If your check applies only to specific dialect of C or C++, you will +want to override the method ``isLanguageVersion

[PATCH] D117939: [clang-tidy] Add more documentation about check development

2022-01-23 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/Contributing.rst:76 +When you `configure the CMake build `_, +make sure that you enable the ``clang-tools-extra`` project to b

[clang-tools-extra] df0fd1c - [clangd] Use castAs<> instead of getAs<> to avoid dereference of nullptr

2022-01-23 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-01-23T13:24:36Z New Revision: df0fd1c301d6a17c1cdeea1f19154e60a5b29f47 URL: https://github.com/llvm/llvm-project/commit/df0fd1c301d6a17c1cdeea1f19154e60a5b29f47 DIFF: https://github.com/llvm/llvm-project/commit/df0fd1c301d6a17c1cdeea1f19154e60a5b29f47.diff LOG:

[clang-tools-extra] 8649702 - [clang-tidy] Use cast<>/castAs<> instead of dyn_cast<>/getAs<> to avoid dereference of nullptr

2022-01-23 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-01-23T12:57:12Z New Revision: 86497026a266f153d1c2b823fe7758acc4ab959d URL: https://github.com/llvm/llvm-project/commit/86497026a266f153d1c2b823fe7758acc4ab959d DIFF: https://github.com/llvm/llvm-project/commit/86497026a266f153d1c2b823fe7758acc4ab959d.diff LOG:

[PATCH] D117857: [clang-tidy] Remove gsl::at suggestion from cppcoreguidelines-pro-bounds-constant-array-index

2022-01-23 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz accepted this revision. salman-javed-nz added a comment. This revision is now accepted and ready to land. LGTM besides a couple of nits. I think the diagnostic message should just say what the problem is, not what the fix is - that's what the FixitHint is for.

[PATCH] D116085: [clang-tidy] Performance improvements for NOLINTBEGIN/END blocks

2022-01-23 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz added a comment. Every review comment so far should be addressed now, with the exception of the following 2 points. Comment at: clang-tools-extra/clang-tidy/NoLintPragmaHandler.cpp:420 + // file if it is a . + Optional FileName = SrcMgr.getNonBuiltinFilenameF

[PATCH] D117898: [Clang] Add elementwise saturated add/sub builtins

2022-01-23 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon updated this revision to Diff 402313. RKSimon added a comment. address feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117898/new/ https://reviews.llvm.org/D117898 Files: clang/docs/LanguageExtensions.rst clang/include/clang/Bas

[PATCH] D116514: [clangd] Add code action to generate a constructor for a C++ class

2022-01-23 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/MemberwiseConstructor.cpp:38 + std::string title() const override { +return llvm::formatv("define constructor"); + } `Define constructor` (first letter uppercase) At

[PATCH] D116085: [clang-tidy] Performance improvements for NOLINTBEGIN/END blocks

2022-01-23 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:349 + if (Context.shouldSuppressDiagnostic(DiagLevel, Info, SuppressionErrors, + EnableNolintBlocks)) { ++Context.Stats.Erro

[PATCH] D116085: [clang-tidy] Performance improvements for NOLINTBEGIN/END blocks

2022-01-23 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz marked an inline comment as done. salman-javed-nz added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:448 +/// this line. +static std::pair getLineStartAndEnd(StringRef S, size_t From) { + size_t StartPos = S.find_last_

[PATCH] D116085: [clang-tidy] Performance improvements for NOLINTBEGIN/END blocks

2022-01-23 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz marked 12 inline comments as done. salman-javed-nz added inline comments. Comment at: clang-tools-extra/clang-tidy/NoLintPragmaHandler.cpp:63 +// as parsed from the file's character contents. +class NoLintToken { +public: kadircet wrote: > kadirce

[PATCH] D116085: [clang-tidy] Performance improvements for NOLINTBEGIN/END blocks

2022-01-23 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz marked 4 inline comments as done. salman-javed-nz added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h:84 + bool AllowEnablingAnalyzerAlphaCheckers = false, + bool AllowIO = true, bool En

[PATCH] D116085: [clang-tidy] Performance improvements for NOLINTBEGIN/END blocks

2022-01-23 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz updated this revision to Diff 402308. salman-javed-nz changed the visibility from "Only User: salman-javed-nz (Salman Javed)" to "Public (No Login Required)". salman-javed-nz added a comment. Pass the `NoLintErrors` SmallVector all the way through the call stack, instead of stori