[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. How does this handle cases where a macro is Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:106 + +bool hasBlankLines(const std::string &Text) { + enum class WhiteSpaceState { Comment at: cl

[PATCH] D117409: [clang-tidy] Move IncludeInserter into ClangTidyContext

2022-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/IncludeInserter.h:20 namespace tidy { -namespace utils { LegalizeAdulthood wrote: > njames93 wrote: > > LegalizeAdulthood wrote: > > > What's th

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-01-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.h:19 + +/// FIXME: Write a short description. +/// njames93 wrote: > FIXME Please do this :-) Comment at: clang-tools-extra/clang-tidy/mod

[PATCH] D117529: [clangd][NFC] Cache ClangTidy check globs to speed up createChecks

2022-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Build a fast factory

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/modernize-macro-to-enum.rst:45 + enum { + RED = 0xFF, + GREEN = 0x00FF00, Eugene.Zelenko wrote: > It'll be reasonable to support indentation. Option could be used to spec

[PATCH] D115060: [clang-format][NFC] Code Tidies in UnwrappedLineFormatter

2022-01-17 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:215 +const auto &NextLine = *I[1]; +const auto *PreviousLine = I != AnnotatedLines.begin() ? I[-1] : nullptr; +if (NextLine.Type == LT_Invalid || NextLine.First->MustBreakBefore) --

[PATCH] D115060: [clang-format][NFC] Code Tidies in UnwrappedLineFormatter

2022-01-17 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:215 +const auto &NextLine = *I[1]; +const auto *PreviousLine = I != AnnotatedLines.begin() ? I[-1] : nullptr; +if (NextLine.Type == LT_Invalid || NextLine.First->MustBreakBefore) --

[PATCH] D70401: [RISCV] Complete RV32E/ilp32e implementation

2022-01-17 Thread Wang Pengcheng via Phabricator via cfe-commits
pcwang-thead added a comment. Herald added subscribers: alextsao1999, eopXD. Gentle ping. We are testing this patch and I'd like to get some nice advice. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70401/new/ https://reviews.llvm.org/D70401 ___

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread Elliott Maguire via Phabricator via cfe-commits
glotchimo updated this revision to Diff 400696. glotchimo marked an inline comment as done. glotchimo added a comment. Simplify by removing look-ahead (unnecessary b/c of difference between ident and tokens). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D70401: [RISCV] Complete RV32E/ilp32e implementation

2022-01-17 Thread Zakk Chen via Phabricator via cfe-commits
khchen added a comment. 1. please add a check here and a clang cc1 test for it. 2. Have you try to run llvm-test-suite with rv32e config on qemu? Commen

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-01-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 13 inline comments as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:134 + +bool MacroToEnumCallbacks::isConsecutiveMacro(const MacroDirective *MD) const { + if (LastMacroLocation.is

[PATCH] D117398: [clang-format] Fix bug in parsing `operator<` with template

2022-01-17 Thread Jino Park via Phabricator via cfe-commits
pjessesco updated this revision to Diff 400697. pjessesco marked 2 inline comments as done. pjessesco added a comment. Fix to accept feedbacks. 1. `Forth` -> `Fourth` 2. Add unit test `verifyFormat("< <>");` 3. Fix to avoid undefined behavior CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-01-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:192-194 + if (LastFile != CurrentFile) { +LastFile = CurrentFile; +newEnum(); LegalizeAdulthood wrote: > njames93 wrote: > > This seems a str

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-01-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 400700. LegalizeAdulthood added a comment. Addresses most of the review comments, still need to: - Verify that include guards don't interfere with analysis of headers CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117522/new/ https://revie

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-01-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:182 + MD->getMacroInfo()->isUsedForHeaderGuard() || + MD->getMacroInfo()->isBuiltinMacro() || ConditionScope > 0) +return; LegalizeAdult

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

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 400704. psigillito added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Removed old approach and started initial changes to add C language Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

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

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 400706. psigillito added a comment. revert changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint Index: .arclint

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

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 400708. psigillito added a comment. Hopefully this revision works Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint clang/include/clang/Format/Fo

[PATCH] D117409: [clang-tidy] Move IncludeInserter into ClangTidyContext

2022-01-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/IncludeInserter.h:20 namespace tidy { -namespace utils { njames93 wrote: > LegalizeAdulthood wrote: > > njames93 wrote: > > > LegalizeAdulthood wrote: > > > > What's the guidance

[PATCH] D70401: [RISCV] Complete RV32E/ilp32e implementation

2022-01-17 Thread Wang Pengcheng via Phabricator via cfe-commits
pcwang-thead added inline comments. Comment at: llvm/lib/Support/TargetParser.cpp:339 +if (ISAInfo.hasExtension("d")) + return "ilp32d"; return "ilp32"; khchen wrote: > why do we need to change the order? IMO, when `e` is combined with `d`, `e` shou

[PATCH] D117535: [clang-tidy] Force LF newlines when writing files

2022-01-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood created this revision. LegalizeAdulthood added reviewers: alexfh, Quuxplusone, aaron.ballman. LegalizeAdulthood added a project: clang-tools-extra. Herald added subscribers: carlosgalvezp, xazax.hun. LegalizeAdulthood requested review of this revision. The recommendation on Windo

[PATCH] D117536: Handle C variables with name that matches c++ access specifier

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito created this revision. psigillito requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. revert old changes, breakout c into own language initial changes revert arclint changes revert bad arclint change Repository: rG LLVM Github

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

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 400715. psigillito added a comment. Include multiple commits in review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint clang/include/clang/Form

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

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 400717. psigillito added a comment. - undo delete Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint clang/include/clang/Format/Format.h clang/l

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

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 400718. psigillito added a comment. - annoying arc changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint clang/include/clang/Format/Format.h

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

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito added a comment. These are just initial changes, there is still a lot of work and test cases to write. I figured I would put this out there to see if this is the direction we were thinking. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2504 nextToken();

[PATCH] D112646: [clang-tidy] Add `readability-container-contains` check

2022-01-17 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Hi! Overall the check looks good to me, I have only one problem. We usually try to emit fixes if some parts of the replaced text is a macro, e.g.: #define MYMACRO(X) count(X) if (myCont.MYMACRO(X)) ... In the above code snippet, we want to avoid modifying t

[PATCH] D116518: [ast-matchers] Add hasSubstatementSequence matcher

2022-01-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood abandoned this revision. LegalizeAdulthood added a comment. Based on discussion, I'm going to move this as a private matcher in the check where I intend to use it. Therefore, I'm abandoning this review. I look forward to seeing Yitzhak's generalized matcher `:)` CHANGES SINCE

[PATCH] D116521: [CMake] Factor out config prefix finding logic

2022-01-17 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 marked an inline comment as done. Ericson2314 added inline comments. Comment at: llvm/CMakeLists.txt:209 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" + "${LLVM_COMMON_CMAKE_UTILS}/Modules" ) Ericson2314 wrote: > sebastian-ne wrote: > > Hi, addin

[libunwind] f16a4a0 - [libcxx][libcxxabi][libunwind][cmake] Use `GNUInstallDirs` to support custom installation dirs

2022-01-17 Thread John Ericson via cfe-commits
Author: John Ericson Date: 2022-01-18T06:44:57Z New Revision: f16a4a034a279f52c33f41cafb7d9751ee8a01dd URL: https://github.com/llvm/llvm-project/commit/f16a4a034a279f52c33f41cafb7d9751ee8a01dd DIFF: https://github.com/llvm/llvm-project/commit/f16a4a034a279f52c33f41cafb7d9751ee8a01dd.diff LOG:

[PATCH] D117496: [clang][dataflow] Add transfer function for addrof

2022-01-17 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. The address-of part looks good to me. However, just realized that I'm not convinced whether the dereference operator, or references, in general, are correctly handled. ===

[PATCH] D93298: [RISCV] add the MC layer support of Zfinx extension

2022-01-17 Thread Shao-Ce SUN via Phabricator via cfe-commits
achieveartificialintelligence updated this revision to Diff 400733. achieveartificialintelligence added a comment. Herald added subscribers: alextsao1999, eopXD. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93298/new/ https://reviews.llvm.o

[clang] 782eced - [clang][dataflow] Replace initValueInStorageLocation with createValue

2022-01-17 Thread Stanislav Gatev via cfe-commits
Author: Stanislav Gatev Date: 2022-01-18T07:09:35Z New Revision: 782eced561492c74f7b4409d6ee7eee84a1647c7 URL: https://github.com/llvm/llvm-project/commit/782eced561492c74f7b4409d6ee7eee84a1647c7 DIFF: https://github.com/llvm/llvm-project/commit/782eced561492c74f7b4409d6ee7eee84a1647c7.diff LO

[PATCH] D117493: [clang][dataflow] Replace initValueInStorageLocation with createValue

2022-01-17 Thread Stanislav Gatev 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 rG782eced56149: [clang][dataflow] Replace initValueInStorageLocation with createValue (authored by sgatev). Herald added a subscriber: steakhal. Repos

[PATCH] D115124: [clang-tidy] Fix `readability-container-size-empty` check for smart pointers

2022-01-17 Thread gehry via Phabricator via cfe-commits
Sockke accepted this revision. Sockke added a comment. This revision is now accepted and ready to land. I think it looks great and safe enough. It would be better to turn `!(*ptr).empty()` into `!ptr->empty()`, but I have no particular opinions at this point. Let's see if @aaron.ballman has an

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Thanks for contributing! Let's wait a day or two before landing to let other reviewers chime in. Do you need help landing? If so please provide your name and email address that you'd

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

2022-01-17 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added a comment. This revision now requires changes to proceed. I'm not a fan of this approach of adding a "C" language, mainly because of the `.h` problem so ultimately it doesn't solve your problem. I think this is overkill for

[clang] 966f24e - [clang-format] Add a BlockIndent option to AlignAfterOpenBracket

2022-01-17 Thread Björn Schäpers via cfe-commits
Author: Cameron Mulhern Date: 2022-01-17T09:03:23+01:00 New Revision: 966f24e5a62a9f5df518357c2d4b0e361244a624 URL: https://github.com/llvm/llvm-project/commit/966f24e5a62a9f5df518357c2d4b0e361244a624 DIFF: https://github.com/llvm/llvm-project/commit/966f24e5a62a9f5df518357c2d4b0e361244a624.dif

[PATCH] D109557: Adds a BlockIndent option to AlignAfterOpenBracket

2022-01-17 Thread Björn Schäpers 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 rG966f24e5a62a: [clang-format] Add a BlockIndent option to AlignAfterOpenBracket (authored by csmulhern, committed by HazardyKnusperkeks). Changed pri

[PATCH] D117456: [clangd] Avoid a code completion crash

2022-01-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This is a workaround (adding a newline t

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread Elliott Maguire via Phabricator via cfe-commits
glotchimo updated this revision to Diff 400455. glotchimo marked an inline comment as done. glotchimo added a comment. Add equality operator tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117421/new/ https://reviews.llvm.org/D117421 Files:

[PATCH] D115060: [clang-format][NFC] Code Tidies in UnwrappedLineFormatter

2022-01-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115060/new/ https://reviews.llvm.org/D115060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Could you check if your patch fixes https://github.com/llvm/llvm-project/issues/33044 as well? If so, please add tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117421/new/ https://reviews.llvm.org/D117421 _

[clang-tools-extra] 64c108c - [clangd] Better handling `\n` in the synthesized diagnostic message.

2022-01-17 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2022-01-17T09:27:58+01:00 New Revision: 64c108c9e4e0525328ceb4da55e4ab4b765d4c27 URL: https://github.com/llvm/llvm-project/commit/64c108c9e4e0525328ceb4da55e4ab4b765d4c27 DIFF: https://github.com/llvm/llvm-project/commit/64c108c9e4e0525328ceb4da55e4ab4b765d4c27.diff LO

[PATCH] D117294: [clangd] Better handling `\n` in the synthesized diagnostic message.

2022-01-17 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG64c108c9e4e0: [clangd] Better handling `\n` in the synthesized diagnostic message. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117294

[PATCH] D117428: [docs] Clarify & update JSONCompilationDatabase docs

2022-01-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang/docs/JSONCompilationDatabase.rst:95 + + Either **arguments** or **command** is required. **arguments** is preferred, + as shell (un)escaping is a po

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D117421#3246627 , @glotchimo wrote: > I don't know why, but `clang-format` reformatted most if not all of the > long/block comments in `WhitespaceManager.cpp`. Will it be necessary for me > to revert the changes to tho

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:16172 + "int &operator() = default;\n" + "int &operator=() {", + Alignment); can you add a test showing what happens when you don't h

[PATCH] D117456: [clangd] Avoid a code completion crash

2022-01-17 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. This isn't an ideal fix but it's simple, we know the real fix is invasive, and 14 is upon us. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[clang] 1694976 - [docs] Clarify & update JSONCompilationDatabase docs

2022-01-17 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-01-17T09:51:55+01:00 New Revision: 16949762dc6a670d2f3a1f5043262ec31e09c556 URL: https://github.com/llvm/llvm-project/commit/16949762dc6a670d2f3a1f5043262ec31e09c556 DIFF: https://github.com/llvm/llvm-project/commit/16949762dc6a670d2f3a1f5043262ec31e09c556.diff LO

[PATCH] D117428: [docs] Clarify & update JSONCompilationDatabase docs

2022-01-17 Thread Sam McCall 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 rG16949762dc6a: [docs] Clarify & update JSONCompilationDatabase docs (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. With your patch I still see the bug in this case: struct S { constexpr S(const S &) = default; void f() = default; S &operator/**/=(S) {} }; Mind the `operator =`. It happens every time that `operator=` has only declaration (no def

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/WhitespaceManager.cpp:735 +// Do not align operator= overloads. +if (C.Tok->Previous && C.Tok->Previous->is(tok::kw_operator)) { + FormatToken *Next = C.Tok->Next; This should f

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/WhitespaceManager.cpp:735-742 +if (C.Tok->Previous && C.Tok->Previous->is(tok::kw_operator)) { + FormatToken *Next = C.Tok->Next; + while (Next && Next->NewlinesBefore == 0) { +if (

[PATCH] D116025: [analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap

2022-01-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 400464. gamesh411 marked 7 inline comments as done. gamesh411 added a comment. Fixes round two Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116025/new/ https://reviews.llvm.org/D116025 Files: clang/lib/St

[PATCH] D117460: [clang-tidy][NFC] Reduce map lookups in IncludeSorter

2022-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: LegalizeAdulthood, alexfh, aaron.ballman. Herald added subscribers: carlosgalvezp, xazax.hun. njames93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Because StringMapEn

[PATCH] D116025: [analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap

2022-01-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. Applied typo and naming fixes, introduced 2 move operations, and re-introduced short circuiting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116025/new/ https://reviews.llvm.org/D116025 ___

[PATCH] D114706: [analyzer] Fix sensitive argument logic in GenericTaintChecker

2022-01-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 abandoned this revision. gamesh411 added a comment. This is superseded by D116025 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114706/new/ https://reviews.llvm.org/D114706

[PATCH] D117405: [AArch64] CodeGen for Armv8.8/9.3 MOPS

2022-01-17 Thread Dave Green via Phabricator via cfe-commits
dmgreen added a comment. This looks like a large patch. It may be better split up into a base/isel part, a clang part and a global isel part (which may require different reviewers). Comment at: llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp:836 + // inside a bundle to p

[PATCH] D117306: [clang-tidy] Add new check 'shared-ptr-array-mismatch'.

2022-01-17 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I am not sure if it is correct to have replacement (fixit) for a part of the cases only. It is not possible to make a fixit for every use. In a case like `shared_ptr p1{new int}, p2{new int[10]};` the type can not be changed without other changes. For this reason the r

[PATCH] D117306: [clang-tidy] Add new check 'shared-ptr-array-mismatch'.

2022-01-17 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Is there a fast way to find single-variable field declaration? class A { shared_ptr F1{new int}, F2{new int[10]}; }; The `FieldDecl` does not contain information like `DeclStmt::isSingleDecl`. The only way looks like to check the source locations. Repository:

[PATCH] D95046: [clangd] Add option to use dirty file contents when building preambles.

2022-01-17 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. Sorry about letting this sit. I think this is good to go, with a naming tweak. For the 14 cycle, it should be hidden: we may want to tweak the interactions with `didSave` reparsing etc,

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

2022-01-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. a drive by concern around possible flakiness of the interaction. have you checked how does it look like when the user is still forming the initializer? it might be annoying if their cursor kept jumping around while they're editing the (possibly half-formed) initializer

[PATCH] D115060: [clang-format][NFC] Code Tidies in UnwrappedLineFormatter

2022-01-17 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:215 +const auto &NextLine = *I[1]; +const auto *PreviousLine = I != AnnotatedLines.begin() ? I[-1] : nullptr; +if (NextLine.Type == LT_Invalid || NextLine.First->MustBreakBefore) --

[PATCH] D117456: [clangd] Avoid a code completion crash

2022-01-17 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG884832407e47: [clangd] Avoid a code completion crash (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117456/new/ https://reviews.llvm.or

[clang-tools-extra] 8848324 - [clangd] Avoid a code completion crash

2022-01-17 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2022-01-17T10:35:55+01:00 New Revision: 884832407e47579a28e8c363492a620901f2eab4 URL: https://github.com/llvm/llvm-project/commit/884832407e47579a28e8c363492a620901f2eab4 DIFF: https://github.com/llvm/llvm-project/commit/884832407e47579a28e8c363492a620901f2eab4.diff LO

[PATCH] D116377: [libTooling] Adds more support for constructing object access expressions.

2022-01-17 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Tooling/Transformer/SourceCodeBuilders.cpp:78 + returns(qualType(references(type())); + const auto SmartPo

[PATCH] D95046: [clangd] Add option to use dirty file contents when building preambles.

2022-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D95046#3247793 , @sammccall wrote: > Sorry about letting this sit. I think this is good to go, with a naming tweak. > > For the 14 cycle, it should be hidden: we may want to tweak the interactions > with `didSave` reparsing et

[PATCH] D95046: [clangd] Add option to use dirty file contents when building preambles.

2022-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 400473. njames93 added a comment. Update name Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95046/new/ https://reviews.llvm.org/D95046 Files: clang-tools-extra/clangd/ClangdServer.cpp clang-tools-extra/cl

[PATCH] D117306: [clang-tidy] Add new check 'shared-ptr-array-mismatch'.

2022-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D117306#3247417 , @LegalizeAdulthood wrote: > In D117306#3245915 , @njames93 > wrote: > >> How does this check play with the `modernize-make-shared` check? > > Wouldn't it be orthogo

[PATCH] D117461: [clangd] IncludeCleaner: Attach "insert prgama keep" fix-it to diagnostic

2022-01-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: sammccall. Herald added subscribers: usaxena95, arphaman. kbobyrev requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Now that IWYU pragma: keep supr

[clang-tools-extra] ab3f100 - Reland (2) "[AST] Add RParen loc for decltype AutoTypeloc.""

2022-01-17 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2022-01-17T11:33:11+01:00 New Revision: ab3f100bec03d72ecee947a323c51698d4b95207 URL: https://github.com/llvm/llvm-project/commit/ab3f100bec03d72ecee947a323c51698d4b95207 DIFF: https://github.com/llvm/llvm-project/commit/ab3f100bec03d72ecee947a323c51698d4b95207.diff LO

[PATCH] D116919: [AST] Add RParen loc for decltype AutoTypeloc.

2022-01-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks, everyone! I manage to figure out the cause, the crash was caused by an arbitrary RPareLoc -- we missed to set the RPareLoc in `TreeTransform::TransformAutoType`. I reland the patch in ab3f100bec03d72ecee947a323c51698d4b95207

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

2022-01-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Repository: rG LLVM Github Monorepo h

[PATCH] D95046: [clangd] Add option to use dirty file contents when building preambles.

2022-01-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D95046#3247844 , @njames93 wrote: > In D95046#3247793 , @sammccall wrote: > >> Sorry about letting this sit. I think this is good to go, with a naming >> tweak. >> >> For the 14 cycle,

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

2022-01-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I'm missing some context on this patch. 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... Comment at: clang-tools-extra/clangd/refactor/tweaks

[PATCH] D95046: [clangd] Add option to use dirty file contents when building preambles.

2022-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 400479. njames93 added a comment. Nit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95046/new/ https://reviews.llvm.org/D95046 Files: clang-tools-extra/clangd/ClangdServer.cpp clang-tools-extra/clangd/Cla

[clang-tools-extra] 8b88ff0 - [clangd] Add option to use dirty file contents when building preambles.

2022-01-17 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2022-01-17T10:55:35Z New Revision: 8b88ff08038c5525bdb5d22b050550ca3b34ad77 URL: https://github.com/llvm/llvm-project/commit/8b88ff08038c5525bdb5d22b050550ca3b34ad77 DIFF: https://github.com/llvm/llvm-project/commit/8b88ff08038c5525bdb5d22b050550ca3b34ad77.diff LOG:

[PATCH] D95046: [clangd] Add option to use dirty file contents when building preambles.

2022-01-17 Thread Nathan James 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 rG8b88ff08038c: [clangd] Add option to use dirty file contents when building preambles. (authored by njames93). Repository: rG LLVM Github Monorepo

[PATCH] D117409: [clang-tidy] Move IncludeInserter into ClangTidyContext

2022-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: carlosgalvezp, usaxena95, kadircet, arphaman, kbarton, xazax.hun, mgorny, nemanjai. Eugene.Zelenko added reviewers: aaron.ballman, LegalizeAdulthood. Eugene.Zelenko added a project: clang-tools-extra. njames93 updated this revision to Diff

[PATCH] D117306: [clang-tidy] Add new check 'shared-ptr-array-mismatch'.

2022-01-17 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 2 inline comments as done. balazske added a comment. In D117306#3247859 , @njames93 wrote: > In D117306#3247417 , > @LegalizeAdulthood wrote: > >> In D117306#3245915

[PATCH] D86546: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls

2022-01-17 Thread Ayke via Phabricator via cfe-commits
aykevl accepted this revision. aykevl added a comment. This revision is now accepted and ready to land. I've looked through the code again. It looks correct and (in past testing) it fixed a bug I had, so I'm going to accept this. @atrosinenko do you have commit access? If not, I can commit it fo

[PATCH] D117468: [RISCV] Add intrinsic for Zbt extension

2022-01-17 Thread Chenbing.Zheng via Phabricator via cfe-commits
Chenbing.Zheng created this revision. Chenbing.Zheng added reviewers: craig.topper, LevyHsu, asb, benshi001. Chenbing.Zheng added a project: LLVM. Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton

[PATCH] D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z

2022-01-17 Thread Ayke via Phabricator via cfe-commits
aykevl accepted this revision. aykevl added a comment. This revision is now accepted and ready to land. Looks good to me. Comment at: compiler-rt/lib/builtins/fp_extend.h:32-39 #if defined __LP64__ return __builtin_clzl(a); #else if (a & REP_C(0x)) -

[PATCH] D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z

2022-01-17 Thread Ayke via Phabricator via cfe-commits
aykevl added inline comments. Comment at: compiler-rt/lib/builtins/fp_extend.h:32-39 #if defined __LP64__ return __builtin_clzl(a); #else if (a & REP_C(0x)) -return __builtin_clz(a >> 32); +return clzsi(a >> 32); else +return 32 + clzsi(a &

[PATCH] D116025: [analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap

2022-01-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 400498. gamesh411 added a comment. All commits were exluded in the previous patch upload Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116025/new/ https://reviews.llvm.org/D116025 Files: clang/include/clan

[PATCH] D116919: [AST] Add RParen loc for decltype AutoTypeloc.

2022-01-17 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D116919#3247887 , @hokein wrote: > Thanks, everyone! > > I manage to figure out the cause, the crash was caused by an arbitrary > RPareLoc -- we missed to set the RPareLoc in > `TreeTransform::TransformAutoType`. I reland th

[PATCH] D116025: [analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap

2022-01-17 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116025/new/ https://reviews.llvm.org/D116025 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D116521: [CMake] Factor out config prefix finding logic

2022-01-17 Thread Sebastian Neubauer via Phabricator via cfe-commits
sebastian-ne added inline comments. Comment at: llvm/CMakeLists.txt:209 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" + "${LLVM_COMMON_CMAKE_UTILS}/Modules" ) Hi, adding this module path overwrites the `llvm_check_linker_flag` from `llvm/cmake/modules/LLVMC

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2022-01-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This appears to have triggered some buildbot failures: https://lab.llvm.org/buildbot/#/builders/5/builds/17461/steps/10/logs/stdio e.g. in path-mappings.test: "message": "Unknown argument: '-enable-noundef-analysis'", This flag isn't being added by clangd code, I'm

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2022-01-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a subscriber: vitalybuka. sammccall added a comment. Ah, this seems to be coming from the buildbot configuration. https://github.com/llvm/llvm-zorg/blob/38ab06456f7302b4eab53e5b6f1e2eaf4f127132/zorg/buildbot/builders/sanitizers/buildbot_functions.sh#L140-L149 @vitalybuka looks li

[PATCH] D71026: Fix LLVM_ENABLE_MODULES=ON + BUILD_SHARED_LIBS=ON build

2022-01-17 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson abandoned this revision. arichardson added a comment. I believe this is no longer necessary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71026/new/ https://reviews.llvm.org/D71026 ___ cfe-c

[PATCH] D116919: [AST] Add RParen loc for decltype AutoTypeloc.

2022-01-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D116919#3248113 , @mstorsjo wrote: > In D116919#3247887 , @hokein wrote: > >> Thanks, everyone! >> >> I manage to figure out the cause, the crash was caused by an arbitrary >> RPareLoc

[PATCH] D117472: [clangd] Bring back early-claim approach to fix a selection-tree regression.

2022-01-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. The early-claim hack was removed in 96f5

[clang-tools-extra] 192f8d9 - [clangd] Don't rename on symbols from system headers.

2022-01-17 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2022-01-17T15:08:53+01:00 New Revision: 192f8d97002f13ab5a74ee11c4d5559b5ca693a8 URL: https://github.com/llvm/llvm-project/commit/192f8d97002f13ab5a74ee11c4d5559b5ca693a8 DIFF: https://github.com/llvm/llvm-project/commit/192f8d97002f13ab5a74ee11c4d5559b5ca693a8.diff LO

[PATCH] D116643: [clangd] Don't rename on symbols from system headers.

2022-01-17 Thread Haojian Wu 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 rG192f8d97002f: [clangd] Don't rename on symbols from system headers. (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D11664

[PATCH] D117472: [clangd] Bring back early-claim approach to fix a selection-tree regression.

2022-01-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/Selection.cpp:758 + // ranges of children are not overlapped with their parent's. + // But there are some AST-weird c

[PATCH] D117475: [clangd] NFC, emit source ranges in selection debug messages.

2022-01-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. It will make the output more versbose, b

[PATCH] D116748: [AArch64][ARM][Clang] PerfMon Extension Added

2022-01-17 Thread Mubashar Ahmad via Phabricator via cfe-commits
mubashar_ updated this revision to Diff 400518. mubashar_ marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116748/new/ https://reviews.llvm.org/D116748 Files: clang/test/Driver/aarch64-perfmon.c llvm/include/llvm/Support/AArch64TargetParser.def llvm/i

[clang-tools-extra] 4dedd82 - Re-land [clangd] Elide even more checks in SelectionTree.

2022-01-17 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-01-17T15:26:28+01:00 New Revision: 4dedd82cc99341d757a9cc07a8b7b22c8bb61d19 URL: https://github.com/llvm/llvm-project/commit/4dedd82cc99341d757a9cc07a8b7b22c8bb61d19 DIFF: https://github.com/llvm/llvm-project/commit/4dedd82cc99341d757a9cc07a8b7b22c8bb61d19.diff LO

  1   2   >