[PATCH] D119098: [clang-tidy] Ignore variable template partial specializations in `misc-definitions-in-headers`

2022-02-06 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119098/new/ https://reviews.llvm.org/D119098

[PATCH] D119067: [clang-format] Fix DefinitionBlockSeparator extra empty lines

2022-02-06 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. Comment at: clang/unittests/Format/DefinitionBlockSeparatorTest.cpp:305 " int r = j / k;\n" + " if (struct S =

[PATCH] D119103: [NFC][Analyzer] Use range based for loop.

2022-02-06 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D119103#3300037 , @steakhal wrote: > Hmm, I guess you must take it by mutable reference since you push it to > `LocalTUDecls`. > Thanks for the patch. Do you have push permissions? Otherwise, send me your > `name ` to let me

[PATCH] D119103: [NFC][Analyzer] Use range based for loop.

2022-02-06 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. This revision is now accepted and ready to land. Hmm, I guess you must take it by mutable reference since you push it to `LocalTUDecls`. Thanks for the patch. Do you have push permissions? Otherwise, send me your `name ` to let me

[PATCH] D118225: [RISCV] Decouple Zve* extensions.

2022-02-06 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. Discussion on riscv-v-spec : https://github.com/riscv/riscv-v-spec/issues/723#issuecomment-922153867, although v-spec and isa-spec still not clearly describe that, but seems ISA folks prefer having those implication relationship between those zve* and v extensions.

[PATCH] D118977: [NVPTX] Add more FMA intriniscs/builtins

2022-02-06 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added a comment. In D118977#3297465 , @tra wrote: >> They all require PTX 7.0, SM_80. > > According to > https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#half-precision-floating-point-instructions-fma > only `fma.relu` and

[PATCH] D118977: [NVPTX] Add more FMA intriniscs/builtins

2022-02-06 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda updated this revision to Diff 406322. jchlanda added a comment. Set correct SM and PTX version. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118977/new/ https://reviews.llvm.org/D118977 Files:

[PATCH] D119004: [NFC][analyzer] Allow CallDescriptions to be matched with CallExprs

2022-02-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. The original `lookup()` isn't exactly precise either, it's just slightly more precise as it has better access to path-sensitive information such as current values of function pointers, but this doesn't necessarily help given that these pointers can still be unknown. And

[PATCH] D117989: [RISCV] Add the passthru operand for RVV nomask binary intrinsics.

2022-02-06 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:4503 case Intrinsic::riscv_vslide1down_mask: { // We need to special case these when the scalar is larger than XLen. unsigned NumOps = Op.getNumOperands();

[PATCH] D119103: [NFC][Analyzer] Use range based for loop.

2022-02-06 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. junaire added reviewers: zaks.anna, dcoughlin. Herald added subscribers: manas, steakhal, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. junaire requested review of this revision. Herald

[PATCH] D118437: [NFC] [Modules] Refactor ODR checking for default template argument in ASTReader

2022-02-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. gentle ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118437/new/ https://reviews.llvm.org/D118437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D115610: [C++20] [Modules] Don't create multiple global module fragment

2022-02-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 406315. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115610/new/ https://reviews.llvm.org/D115610 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaModule.cpp

[PATCH] D117087: [C++20] [Coroutines] Implement return value optimization for get_return_object

2022-02-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. gentle ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117087/new/ https://reviews.llvm.org/D117087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D115867: [C++20] [Coroutines] Warning for always_inline coroutine

2022-02-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 406314. ChuanqiXu added a comment. Apply Aaron's opinion in: https://github.com/llvm/llvm-project/issues/53413#issuecomment-1024910619. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115867/new/ https://reviews.llvm.org/D115867 Files:

[PATCH] D118632: [WIP][Clang]OpenMP] Add the codegen support for `atomic compare`

2022-02-06 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/test/OpenMP/atomic_compare_codegen.cpp:1 +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex

[PATCH] D118632: [WIP][Clang]OpenMP] Add the codegen support for `atomic compare`

2022-02-06 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 406310. tianshilei1992 added a comment. add tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118632/new/ https://reviews.llvm.org/D118632 Files: clang/include/clang/AST/StmtOpenMP.h

[PATCH] D119067: [clang-format] Fix DefinitionBlockSeparator extra empty lines

2022-02-06 Thread ksyx via Phabricator via cfe-commits
ksyx updated this revision to Diff 406309. ksyx added a comment. Use for loop to go through tokens in a line. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119067/new/ https://reviews.llvm.org/D119067 Files: clang/lib/Format/DefinitionBlockSeparator.cpp

[PATCH] D119067: [clang-format] Fix DefinitionBlockSeparator extra empty lines

2022-02-06 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/DefinitionBlockSeparator.cpp:50-64 FormatToken *CurrentToken = Line->First; +int BracketLevel = 0; while (CurrentToken) { - if (CurrentToken->isOneOf(tok::kw_class, tok::kw_struct) || -

[PATCH] D119098: [clang-tidy] Ignore variable template partial specializations in `misc-definitions-in-headers`

2022-02-06 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added a comment. A copy-pasted message below, as usual =) //If this review is eventually approved, kindly please merge the commit on my behalf =) As I don't have merge access. My name is `Evgeny Shulgin` and email is `izaronpl...@gmail.com`. Sorry for inconvenience!// Repository: rG

[PATCH] D119098: [clang-tidy] Ignore variable template partial specializations in `misc-definitions-in-headers`

2022-02-06 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron created this revision. Izaron added reviewers: njames93, hokein, LegalizeAdulthood. 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. Variable template partial

[PATCH] D117929: [XRay] Add support for RISCV

2022-02-06 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. In D117929#3276843 , @ashwin98 wrote: > Fixed another lint issue, they should all be done for now hopefully. > > @dberris Sorry, I'm a little confused, do you mean I need to update some of > the clang tests for XRay

[PATCH] D119095: [clang] Fix redundant functional cast in ConstantExpr

2022-02-06 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added a comment. There are some godbolt links in the github issues. Expression `A{}.f();` generates the call of the move constructor from nowhere as well - https://godbolt.org/z/MceYedKzj With the patch this node (that lives inside an another `ConstantExpr` node): MemberExpr

[PATCH] D119095: [clang] Fix redundant functional cast in ConstantExpr

2022-02-06 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron created this revision. Izaron added reviewers: aaron.ballman, cor3ntin. Izaron requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When removing nested ConstantExprs, the tree transformer doesn't remove redundant CXXFunctionalCasts that

[PATCH] D119094: [clang] Don't emit redundant warnings for 'return;'

2022-02-06 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone created this revision. Quuxplusone added reviewers: rsmith, sammccall, mizvekov, majnemer, riccibruno, clang. Quuxplusone added a project: clang. Quuxplusone requested review of this revision. Herald added a subscriber: cfe-commits. ...when the function declaration's return type is

[PATCH] D119067: [clang-format] Fix DefinitionBlockSeparator extra empty lines

2022-02-06 Thread ksyx via Phabricator via cfe-commits
ksyx updated this revision to Diff 406271. ksyx added a comment. - Remove return after else CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119067/new/ https://reviews.llvm.org/D119067 Files: clang/lib/Format/DefinitionBlockSeparator.cpp

[PATCH] D119067: [clang-format] Fix DefinitionBlockSeparator extra empty lines

2022-02-06 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/DefinitionBlockSeparator.cpp:41 + return 1; +else if (Tok->isOneOf(tok::r_brace, tok::r_paren, tok::r_square)) + return -1; This is also an else after return. ;) CHANGES SINCE

[PATCH] D117391: [AST] Ignore implicit nodes in CastExpr::getConversionFunction

2022-02-06 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. I have now convinced myself that including `FullExpr` in `skipImplicitTemporary` gives an improvement in `consteval` diagnostics. But I'm still not sure why. Motivating example, derived from cxx2a-consteval.cpp: struct A { int *p = new int(42); consteval A

[clang] 631b94c - [Driver] Remove redundant string initialization (NFC)

2022-02-06 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-02-06T10:54:42-08:00 New Revision: 631b94cc22a83205c1d26baadb579b9c5576c8eb URL: https://github.com/llvm/llvm-project/commit/631b94cc22a83205c1d26baadb579b9c5576c8eb DIFF: https://github.com/llvm/llvm-project/commit/631b94cc22a83205c1d26baadb579b9c5576c8eb.diff

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

2022-02-06 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon updated this revision to Diff 406264. RKSimon added a comment. rebase, simplify description in documentation and add _BitInt test coverage Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117898/new/ https://reviews.llvm.org/D117898 Files:

[clang] 1ab7d43 - [clang][CodeGen] Add _BitInt test coverage to builtins-elementwise-math.c

2022-02-06 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-02-06T17:17:28Z New Revision: 1ab7d43bf9e0e77b38ae558907451a8295531986 URL: https://github.com/llvm/llvm-project/commit/1ab7d43bf9e0e77b38ae558907451a8295531986 DIFF: https://github.com/llvm/llvm-project/commit/1ab7d43bf9e0e77b38ae558907451a8295531986.diff

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

2022-02-06 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Ok, thanks for the explanation! I'm mostly interested on the warning message, we've had situations before where the warning describes the problem **and** the solution, which can easily lead to confusion. From the tests I can see the message is quite generic "use

[PATCH] D119067: [clang-format] Fix DefinitionBlockSeparator extra empty lines

2022-02-06 Thread ksyx via Phabricator via cfe-commits
ksyx updated this revision to Diff 406245. ksyx marked 3 inline comments as done. ksyx edited the summary of this revision. ksyx added a comment. - Add or remove empty lines surrounding `union`s. - Move new test location. - Remove else immediately above return. CHANGES SINCE LAST ACTION

[PATCH] D119077: clangd SemanticHighlighting: added support for highlighting overloaded operators

2022-02-06 Thread Iannis de Zwart via Phabricator via cfe-commits
iannisdezwart updated this revision to Diff 406244. iannisdezwart added a comment. Fixed a bug I introduced by removing a null-check. I added the null-check back in again. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119077/new/ https://reviews.llvm.org/D119077 Files:

[PATCH] D119077: clangd SemanticHighlighting: added support for highlighting overloaded operators

2022-02-06 Thread Iannis de Zwart via Phabricator via cfe-commits
iannisdezwart created this revision. iannisdezwart added a reviewer: nridge. iannisdezwart added a project: clang-tools-extra. Herald added subscribers: usaxena95, kadircet, arphaman. iannisdezwart requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.

[PATCH] D119067: [clang-format] Fix DefinitionBlockSeparator extra empty lines

2022-02-06 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/DefinitionBlockSeparator.cpp:39 + auto GetBracketLevelChange = [](const FormatToken *Tok) { +if (Tok->isOneOf(tok::l_brace, tok::l_paren, tok::l_square)) + return 1; I would prefer

[PATCH] D111100: enable plugins for clang-tidy

2022-02-06 Thread Michał Górny via Phabricator via cfe-commits
mgorny reopened this revision. mgorny added a comment. This revision is now accepted and ready to land. This breaks build of clang against system-installed LLVM: CMake Error at /usr/lib/llvm/14/lib64/cmake/llvm/AddLLVM.cmake:1821 (add_dependencies): The dependency target "LLVMHello" of

[PATCH] D117500: [clang] Mention MS on-demand TLS initialization in release notes

2022-02-06 Thread Maurice Heumann via Phabricator via cfe-commits
momo5502 added a comment. Seems like this can be merged, right? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117500/new/ https://reviews.llvm.org/D117500 ___ cfe-commits mailing list

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2022-02-06 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D59254#3299150 , @Dan wrote: > Hi @void, @connorkuehl > > Reminding that I also participated in working on this, and back then in 2019 > I did manage to compile and boot a working Linux kernel with this feature > enabled in

[PATCH] D119067: [clang-format] Fix DefinitionBlockSeparator extra empty lines

2022-02-06 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius requested changes to this revision. curdeius added a comment. This revision now requires changes to proceed. Looks ok but please rework the tests to keep previous cases untouched. Comment at: clang/unittests/Format/DefinitionBlockSeparatorTest.cpp:305

[PATCH] D119071: [Driver][OpenBSD] -r: imply -nostdlib like GCC

2022-02-06 Thread Brad Smith via Phabricator via cfe-commits
brad updated this revision to Diff 406236. brad added a comment. formating. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119071/new/ https://reviews.llvm.org/D119071 Files: clang/lib/Driver/ToolChains/OpenBSD.cpp clang/test/Driver/openbsd.c

[PATCH] D119071: [Driver][OpenBSD] -r: imply -nostdlib like GCC

2022-02-06 Thread Brad Smith via Phabricator via cfe-commits
brad created this revision. brad added a reviewer: MaskRay. brad added a project: clang. brad requested review of this revision. Similar to D116843 . Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D119071 Files:

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2022-02-06 Thread Dan Aloni via Phabricator via cfe-commits
Dan added a comment. Hi @void, @connorkuehl Reminding that I also participated in working on this, and back then in 2019 I did manage to compile and boot a working Linux kernel with this feature enabled in Clang. It was a fully built Fedora Linux 5.3 kernel. I remember though that