[clang-tools-extra] [clang-tidy] fix false positives for the functions with the same name as standard library functions in misc-include-cleaner (PR #94923)

2024-06-10 Thread Congcong Cai via cfe-commits
@@ -15,3 +15,5 @@ std::string HelloString; // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: no header providing "std::string" is directly included [misc-include-cleaner] int FooBarResult = foobar(); // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: no header providing "foobar" is direc

[clang-tools-extra] [clang-tidy] fix false positives for the functions with the same name as standard library functions in misc-include-cleaner (PR #94923)

2024-06-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/94923 >From e467b03cc120eedc580c185232f000e0d8aa0cc7 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 10 Jun 2024 09:04:27 +0800 Subject: [PATCH 1/2] [clang-tidy] fix false positives for the functions with t

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-10 Thread Yingwei Zheng via cfe-commits
@@ -381,3 +381,21 @@ def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu", TuneZExtHFusion, TuneZExtWFusion, TuneShiftedZExtWFusion]>; + +

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-10 Thread Yingwei Zheng via cfe-commits
@@ -381,3 +381,21 @@ def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu", TuneZExtHFusion, TuneZExtWFusion, TuneShiftedZExtWFusion]>; + +

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-10 Thread NAKAMURA Takumi via cfe-commits
@@ -484,10 +484,31 @@ MC/DC Instrumentation - When instrumenting for Modified Condition/Decision Coverage (MC/DC) using the -clang option ``-fcoverage-mcdc``, users are limited to at most **six** leaf-level -conditions in a boolean expression. A warning w

[clang] [llvm] [RISCV] Add riscv_atomic.h and Zawrs/Zalrsc builtins (PR #94578)

2024-06-10 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: If we are talking about the necessariness of adding these intrinsics, please refer to the ARM implementations in DPDK (https://github.com/DPDK/dpdk/blob/76cef1af8bdaeaf67a5c4ca5df3f221df994dc46/lib/eal/arm/include/rte_pause_64.h).We want to use https://github.com/llvm/llvm-p

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-06-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/94981 >From 68791782b7a1a0eafa98950f6e03aa1585be5223 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 20 May 2024 01:15:03 -0300 Subject: [PATCH] [clang] Implement CWG2398 provisional TTP matching to class t

[clang] [llvm] [RISCV] Add support for getHostCPUFeatures using hwprobe (PR #94352)

2024-06-10 Thread Pengcheng Wang via cfe-commits
@@ -86,8 +86,14 @@ void riscv::getRISCVTargetFeatures(const Driver &D, const llvm::Triple &Triple, // and other features (ex. mirco architecture feature) from mcpu if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) { StringRef CPU = A->getValue(); -if (CPU == "nat

[clang] [llvm] [RISCV] Add support for getHostCPUFeatures using hwprobe (PR #94352)

2024-06-10 Thread Yingwei Zheng via cfe-commits
@@ -86,8 +86,14 @@ void riscv::getRISCVTargetFeatures(const Driver &D, const llvm::Triple &Triple, // and other features (ex. mirco architecture feature) from mcpu if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) { StringRef CPU = A->getValue(); -if (CPU == "nat

[clang] [Driver] Add winsysroot alias to the GNU driver (PR #94731)

2024-06-10 Thread via cfe-commits
https://github.com/Andarwinux updated https://github.com/llvm/llvm-project/pull/94731 >From 3545f2690f5efdb0a5c2d54824287d779ec9be58 Mon Sep 17 00:00:00 2001 From: Andarwinux <144242044+andarwi...@users.noreply.github.com> Date: Fri, 7 Jun 2024 07:07:40 + Subject: [PATCH] [Driver] Add winsys

[clang] [Clang][Sanitizers] Add numerical sanitizer (PR #93783)

2024-06-10 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov updated https://github.com/llvm/llvm-project/pull/93783 >From 8c5199181b94d1ae79f3ca7758ed8574774da551 Mon Sep 17 00:00:00 2001 From: Alexander Shaposhnikov Date: Thu, 30 May 2024 08:15:44 + Subject: [PATCH] [Clang][Sanitizers] Add numerical sanitiz

[clang] 48f8130 - [Clang][Sanitizers] Add numerical sanitizer (#93783)

2024-06-10 Thread via cfe-commits
Author: Alexander Shaposhnikov Date: 2024-06-10T22:14:26-07:00 New Revision: 48f8130a49aad715ff6d5136dad2447d41e9537b URL: https://github.com/llvm/llvm-project/commit/48f8130a49aad715ff6d5136dad2447d41e9537b DIFF: https://github.com/llvm/llvm-project/commit/48f8130a49aad715ff6d5136dad2447d41e95

[clang] [Clang][Sanitizers] Add numerical sanitizer (PR #93783)

2024-06-10 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov closed https://github.com/llvm/llvm-project/pull/93783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add riscv_atomic.h and Zawrs/Zalrsc builtins (PR #94578)

2024-06-10 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: > If we are talking about the necessariness of adding these intrinsics, please > refer to the ARM implementations in DPDK > (https://github.com/DPDK/dpdk/blob/76cef1af8bdaeaf67a5c4ca5df3f221df994dc46/lib/eal/arm/include/rte_pause_64.h). > > We want to use Zawrs&Zalrsc instruction

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-10 Thread Jessica Paquette via cfe-commits
@@ -484,10 +484,31 @@ MC/DC Instrumentation - When instrumenting for Modified Condition/Decision Coverage (MC/DC) using the -clang option ``-fcoverage-mcdc``, users are limited to at most **six** leaf-level -conditions in a boolean expression. A warning w

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-10 Thread Jessica Paquette via cfe-commits
https://github.com/ornata edited https://github.com/llvm/llvm-project/pull/82448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-10 Thread Jessica Paquette via cfe-commits
https://github.com/ornata commented: Some nits on documentation wording. Code looks fine to me. https://github.com/llvm/llvm-project/pull/82448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-10 Thread Jessica Paquette via cfe-commits
@@ -484,10 +484,31 @@ MC/DC Instrumentation - When instrumenting for Modified Condition/Decision Coverage (MC/DC) using the -clang option ``-fcoverage-mcdc``, users are limited to at most **six** leaf-level -conditions in a boolean expression. A warning w

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-10 Thread NAKAMURA Takumi via cfe-commits
@@ -484,10 +484,31 @@ MC/DC Instrumentation - When instrumenting for Modified Condition/Decision Coverage (MC/DC) using the -clang option ``-fcoverage-mcdc``, users are limited to at most **six** leaf-level -conditions in a boolean expression. A warning w

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-10 Thread NAKAMURA Takumi via cfe-commits
@@ -484,10 +484,31 @@ MC/DC Instrumentation - When instrumenting for Modified Condition/Decision Coverage (MC/DC) using the -clang option ``-fcoverage-mcdc``, users are limited to at most **six** leaf-level -conditions in a boolean expression. A warning w

[clang] [clang-tools-extra] [clangd] Support parsing comments without ASTContext (PR #78491)

2024-06-10 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > What's "ping PR"? Do you mean pinging the LLVM organization? It just means posting a comment on the PR that says "ping", as a reminder for reviewers. (But please only do that if you're the patch author, or, in the case of a patch author who's not active any more, if yo

[clang] [llvm] [RISCV] Add riscv_atomic.h and Zawrs/Zalrsc builtins (PR #94578)

2024-06-10 Thread Craig Topper via cfe-commits
topperc wrote: > Compilers are free to insert whatever stack spills and reloads they want in > between your inline assembly blocks or intrinsic calls Especially with -O0. https://github.com/llvm/llvm-project/pull/94578 ___ cfe-commits mailing list cf

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-10 Thread Christian Ulmann via cfe-commits
https://github.com/Dinistro commented: This is missing tests for the LLVM import and export. I suspect that this is currently still part of the function's passthrough dictionary, which should be changed. https://github.com/llvm/llvm-project/pull/95043 __

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-10 Thread Christian Ulmann via cfe-commits
https://github.com/Dinistro edited https://github.com/llvm/llvm-project/pull/95043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-10 Thread Christian Ulmann via cfe-commits
@@ -411,6 +412,13 @@ void Flang::addTargetOptions(const ArgList &Args, } // TODO: Add target specific flags, ABI, mtune option etc. + if (const Arg *A = Args.getLastArg(options::OPT_mtune_EQ)) { +CmdArgs.push_back("-tune-cpu"); +if (strcmp(A->getValue(), "native")

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-10 Thread Christian Ulmann via cfe-commits
@@ -58,6 +58,15 @@ def FramePointerKindAttr : LLVM_Attr<"FramePointerKind", "framePointerKind"> { let assemblyFormat = "`<` $framePointerKind `>`"; } +//===--===// +// TuneCPUAttr +//===

[clang] 41c650e - [clang] Don't use -Wno-nested-anon-types on GCC (#95029)

2024-06-10 Thread via cfe-commits
Author: Martin Storsjö Date: 2024-06-11T09:03:41+03:00 New Revision: 41c650e8208f7804eb5ecd8749d6b31b6e518bb7 URL: https://github.com/llvm/llvm-project/commit/41c650e8208f7804eb5ecd8749d6b31b6e518bb7 DIFF: https://github.com/llvm/llvm-project/commit/41c650e8208f7804eb5ecd8749d6b31b6e518bb7.diff

[clang] [clang] Don't use -Wno-nested-anon-types on GCC (PR #95029)

2024-06-10 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo closed https://github.com/llvm/llvm-project/pull/95029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-10 Thread Shao-Ce SUN via cfe-commits
https://github.com/sunshaoce updated https://github.com/llvm/llvm-project/pull/94564 >From 363e29385277c049bc91a86e76ff6f6ae70ceaa9 Mon Sep 17 00:00:00 2001 From: Shao-Ce SUN Date: Thu, 6 Jun 2024 12:05:33 +0800 Subject: [PATCH 1/7] [RISCV] Add processor definition for Spacemit-K1 --- clang/t

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-10 Thread Shao-Ce SUN via cfe-commits
@@ -381,3 +381,21 @@ def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu", TuneZExtHFusion, TuneZExtWFusion, TuneShiftedZExtWFusion]>; + +

[clang] [llvm] Revert "[llvm][IR] Extend BranchWeightMetadata to track provenance of weights" (PR #95060)

2024-06-10 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/95060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add B extension (PR #76893)

2024-06-10 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/76893 >From 9ab05b9f68def57e9abb9d5ac65293b84aacc95a Mon Sep 17 00:00:00 2001 From: wangpc Date: Thu, 4 Jan 2024 13:05:53 +0800 Subject: [PATCH] [RISCV] Add B extension It seems that we have `B` extension again: htt

[clang] [llvm] Revert "[llvm][IR] Extend BranchWeightMetadata to track provenance of weights" (PR #95060)

2024-06-10 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/95060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 607afa0 - Revert "[llvm][IR] Extend BranchWeightMetadata to track provenance of weights" (#95060)

2024-06-10 Thread via cfe-commits
Author: Paul Kirth Date: 2024-06-11T08:06:06+02:00 New Revision: 607afa0b6375e4837fef298a798f5534e783d777 URL: https://github.com/llvm/llvm-project/commit/607afa0b6375e4837fef298a798f5534e783d777 DIFF: https://github.com/llvm/llvm-project/commit/607afa0b6375e4837fef298a798f5534e783d777.diff LO

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-10 Thread Mark Zhuang via cfe-commits
@@ -381,3 +381,21 @@ def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu", TuneZExtHFusion, TuneZExtWFusion, TuneShiftedZExtWFusion]>; + +

[clang] 1bebb99 - [RISCV] Add B extension (#76893)

2024-06-10 Thread via cfe-commits
Author: Pengcheng Wang Date: 2024-06-11T14:06:23+08:00 New Revision: 1bebb99324a1cd85e18e1907c7afdde5d2bc4593 URL: https://github.com/llvm/llvm-project/commit/1bebb99324a1cd85e18e1907c7afdde5d2bc4593 DIFF: https://github.com/llvm/llvm-project/commit/1bebb99324a1cd85e18e1907c7afdde5d2bc4593.diff

[clang] [llvm] [RISCV] Add B extension (PR #76893)

2024-06-10 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp closed https://github.com/llvm/llvm-project/pull/76893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 34033dc - [clangd] Use clang_target_link_libraries() for clang libs (#94937)

2024-06-10 Thread via cfe-commits
Author: Nikita Popov Date: 2024-06-11T08:08:03+02:00 New Revision: 34033dc1610982570328b39a38596a9968e3c7b2 URL: https://github.com/llvm/llvm-project/commit/34033dc1610982570328b39a38596a9968e3c7b2 DIFF: https://github.com/llvm/llvm-project/commit/34033dc1610982570328b39a38596a9968e3c7b2.diff

[clang-tools-extra] [clangd] Use clang_target_link_libraries() for clang libs (PR #94937)

2024-06-10 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/94937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-06-10 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: To be clear and reiterate my previous comment: this check should NOT require users to use at(). That behavior should be opt-in. It should only warn about using operator[]. It's up to the users to figure out what the best replacement is. https://github.com/llvm/llvm-projec

[clang] [clang-tools-extra] [llvm] [RISCV][MC] Warn if SEW/LMUL may not be compatible (PR #94313)

2024-06-10 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/94313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [RISCV][MC] Warn if SEW/LMUL may not be compatible (PR #94313)

2024-06-10 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp closed https://github.com/llvm/llvm-project/pull/94313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-10 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/75912 >From cf8be3c418dde67b74d4a5a4ea98a33f0e2fbd72 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 19 Dec 2023 17:00:59 +0800 Subject: [PATCH 1/4] [C++20] [Modules] [Itanium ABI] Generate the vtable in the m

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-10 Thread Chuanqi Xu via cfe-commits
@@ -3219,7 +3219,8 @@ void CodeGenModule::EmitVTablesOpportunistically() { for (const CXXRecordDecl *RD : OpportunisticVTables) { assert(getVTables().isVTableExternal(RD) && "This queue should only contain external vtables"); -if (getCXXABI().canSpeculative

[clang] 2825342 - [clang][dataflow] Handle `AtomicExpr` in `ResultObjectVisitor`. (#94963)

2024-06-10 Thread via cfe-commits
Author: martinboehme Date: 2024-06-11T08:38:03+02:00 New Revision: 282534268e3be0949fcac1589b1004bc5672b434 URL: https://github.com/llvm/llvm-project/commit/282534268e3be0949fcac1589b1004bc5672b434 DIFF: https://github.com/llvm/llvm-project/commit/282534268e3be0949fcac1589b1004bc5672b434.diff

[clang] [clang][dataflow] Handle `AtomicExpr` in `ResultObjectVisitor`. (PR #94963)

2024-06-10 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/94963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][nullability] Don't return null fields from `getReferencedDecls()`. (PR #94983)

2024-06-10 Thread via cfe-commits
martinboehme wrote: > Thanks! I'm once again struck by how much this project would benefit from > Nullability annotations/checking. Indeed -- that was my thought too. https://github.com/llvm/llvm-project/pull/94983 ___ cfe-commits mailing list cfe-co

[clang] 275196d - [clang][nullability] Don't return null fields from `getReferencedDecls()`. (#94983)

2024-06-10 Thread via cfe-commits
Author: martinboehme Date: 2024-06-11T08:40:02+02:00 New Revision: 275196d866c86d95fc46b3324876ccbea09da79b URL: https://github.com/llvm/llvm-project/commit/275196d866c86d95fc46b3324876ccbea09da79b DIFF: https://github.com/llvm/llvm-project/commit/275196d866c86d95fc46b3324876ccbea09da79b.diff

[clang] [llvm] [clang][nullability] Don't return null fields from `getReferencedDecls()`. (PR #94983)

2024-06-10 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/94983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-10 Thread Chuanqi Xu via cfe-commits
@@ -6853,6 +6853,13 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { if (ES->hasExternalDefinitions(D) == ExternalASTSource::EK_Never) DI->completeUnusedClass(*CRD); } +// If we're emitting a dynamic class from the importable module we're +// emi

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-10 Thread Chuanqi Xu via cfe-commits
@@ -1830,6 +1830,9 @@ void ItaniumCXXABI::emitVTableDefinitions(CodeGenVTables &CGVT, if (VTable->hasInitializer()) return; + if (RD->shouldEmitInExternalSource()) +return; ChuanqiXu9 wrote: Yes and agreed. I just don't have an idea for how do tha

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-10 Thread Mike Hommey via cfe-commits
glandium wrote: This broke building wasi-libc, with a crash: ``` Stack dump: 0. Program arguments: /builds/worker/fetches/clang/bin/clang-19 -cc1 -triple wasm32-unknown-wasi -emit-obj -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name ctanh.

[clang] [ObjC][CodeGen] Assume a for-in loop is in bounds and cannot overflow (PR #94885)

2024-06-10 Thread David Chisnall via cfe-commits
https://github.com/davidchisnall approved this pull request. https://github.com/llvm/llvm-project/pull/94885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BinPackBinaryOperations configuration (PR #95013)

2024-06-10 Thread via cfe-commits
@@ -27492,6 +27492,86 @@ TEST_F(FormatTest, SpaceBetweenKeywordAndLiteral) { verifyFormat("return sizeof \"5\";"); } +TEST_F(FormatTest, BinPackBinaryOperations) { + auto Style = getLLVMStyle(); + Style.BinPackBinaryOperations = false; + + // Logical operations + verifyF

[clang] [clang-format] Add BinPackBinaryOperations configuration (PR #95013)

2024-06-10 Thread via cfe-commits
@@ -1203,6 +1214,10 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State, } } + if (!Style.BinPackBinaryOperations && Previous.is(TT_BinaryOperator) && + (Previous.getPrecedence() > prec::Conditional)) { +CurrentState.BreakBeforeParameter = tru

[clang] [clang-format] Add BinPackBinaryOperations configuration (PR #95013)

2024-06-10 Thread via cfe-commits
@@ -27492,6 +27492,86 @@ TEST_F(FormatTest, SpaceBetweenKeywordAndLiteral) { verifyFormat("return sizeof \"5\";"); } +TEST_F(FormatTest, BinPackBinaryOperations) { + auto Style = getLLVMStyle(); + Style.BinPackBinaryOperations = false; mydeveloperday wrote

<    1   2   3   4   5