[mlir] [clang] [compiler-rt] [libcxx] [clang-tools-extra] [flang] [llvm] [lld] [lldb] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-13 Thread Hristo Hristov via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[libc] [mlir] [clang] [compiler-rt] [libcxx] [clang-tools-extra] [flang] [llvm] [lldb] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Phoebe Wang via cfe-commits
@@ -130,3 +130,7 @@ void pr40890(void) { __asm__ __volatile__("\n#define BEEF abcd%0\n" : : "n"((int*)0xdeadbeef)); #endif } + +void test_W(int i) { + asm("" : : "Wd"(test_W)); // expected-error{{invalid input constraint 'Wd' in asm}} phoebewang

[llvm] [clang] [lldb] [libcxx] [compiler-rt] [libc] [mlir] [flang] [clang-tools-extra] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Phoebe Wang via cfe-commits
@@ -130,3 +130,7 @@ void pr40890(void) { __asm__ __volatile__("\n#define BEEF abcd%0\n" : : "n"((int*)0xdeadbeef)); #endif } + +void test_W(int i) { + asm("" : : "Wd"(test_W)); // expected-error{{invalid input constraint 'Wd' in asm}} phoebewang

[mlir] [flang] [llvm] [lldb] [compiler-rt] [libc] [libcxx] [clang] [clang-tools-extra] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Phoebe Wang via cfe-commits
@@ -1418,6 +1418,14 @@ bool X86TargetInfo::validateAsmConstraint( case 'O': Info.setRequiresImmediate(0, 127); return true; + case 'W': +switch (*++Name) { +default: + return false; +case 's': + Info.setAllowsRegister();

[flang] [libc] [clang-tools-extra] [mlir] [clang] [compiler-rt] [lldb] [libcxx] [llvm] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang edited https://github.com/llvm/llvm-project/pull/77886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang-tools-extra] [llvm] [compiler-rt] [libc] [libcxx] [mlir] [flang] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM with some nits. https://github.com/llvm/llvm-project/pull/77886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -487,6 +487,10 @@ Changes in existing checks ` check to ignore false-positives in initializer list of record. +- Improved :doc:`readability-redundant-member-init + ` check to support PiotrZSL wrote: Done

[clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -18,52 +19,80 @@ using namespace clang::tidy::matchers; namespace clang::tidy::readability { +static SourceRange +getFullInitRangeInclWhitespaces(SourceRange Range, const SourceManager , +const LangOptions ) { + const Token PrevToken = +

[clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/77206 >From 66e4026ff568fbd805ddd777596102381e4e0066 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sat, 6 Jan 2024 18:04:57 + Subject: [PATCH 1/2] [clang-tidy] Add support for in-class initializers in

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qizhi Hu (jcsxky) Changes Try to fix [issue](https://github.com/llvm/llvm-project/issues/73619) 1. During transforming `FunctionProtoType`, if `ThisContext,` is `nullptr` and `CurrentContext` is `ClassTemplateSpecializationDecl`,

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-13 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/78088 Try to fix [issue](https://github.com/llvm/llvm-project/issues/73619) 1. During transforming `FunctionProtoType`, if `ThisContext,` is `nullptr` and `CurrentContext` is `ClassTemplateSpecializationDecl`,

[clang] [lldb] [lld] [clang-tools-extra] [llvm] [compiler-rt] [libcxx] [mlir] [flang] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-13 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov edited https://github.com/llvm/llvm-project/pull/77967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lld] [clang-tools-extra] [llvm] [compiler-rt] [libcxx] [mlir] [flang] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-13 Thread Hristo Hristov via cfe-commits
H-G-Hristov wrote: Thank you for the review! https://github.com/llvm/llvm-project/pull/77967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lld] [clang-tools-extra] [llvm] [compiler-rt] [libcxx] [mlir] [flang] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-13 Thread Hristo Hristov via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang-tools-extra] Fix 'newline in constant' encoding issue in clangd sources (PR #78085)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: BinVerse (BinVerse) Changes Files within clang-tools-extra/clangd encountered 'newline in constant' errors while compiling with Visual Studio Community 2022 Preview (amd64). The affected files were CodeComplete.h, Diagnostics.cpp, and

[clang-tools-extra] Fix 'newline in constant' encoding issue in clangd sources (PR #78085)

2024-01-13 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang-tools-extra] Fix 'newline in constant' encoding issue in clangd sources (PR #78085)

2024-01-13 Thread via cfe-commits
https://github.com/BinVerse created https://github.com/llvm/llvm-project/pull/78085 Files within clang-tools-extra/clangd encountered 'newline in constant' errors while compiling with Visual Studio Community 2022 Preview (amd64). The affected files were CodeComplete.h, Diagnostics.cpp, and

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,56 @@ +//===--- AvoidNestedConditionalOperatorCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,56 @@ +//===--- AvoidNestedConditionalOperatorCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,20 @@ +.. title:: clang-tidy - readability-avoid-nested-conditional-operator + +readability-avoid-nested-conditional-operator += + +Finds nested conditional operator. + +Nested conditional operators lead code hard to

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -337,6 +337,7 @@ Clang-Tidy Checks :doc:`portability-simd-intrinsics `, :doc:`portability-std-allocator-const `, :doc:`readability-avoid-const-params-in-decls `, "Yes" + :doc:`readability-avoid-nested-conditional-operator `, "Yes" PiotrZSL

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,20 @@ +.. title:: clang-tidy - readability-avoid-nested-conditional-operator + +readability-avoid-nested-conditional-operator += + +Finds nested conditional operator. PiotrZSL wrote: maybe: `Identifies

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,56 @@ +//===--- AvoidNestedConditionalOperatorCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,56 @@ +//===--- AvoidNestedConditionalOperatorCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,56 @@ +//===--- AvoidNestedConditionalOperatorCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Just few nits, from functional point of view check is good even now. https://github.com/llvm/llvm-project/pull/78022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/78022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] Fix 'newline in constant' encoding issue in clangd sources (PR #78082)

2024-01-13 Thread via cfe-commits
https://github.com/BinVerse closed https://github.com/llvm/llvm-project/pull/78082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Emit error for invalid friend functions under [temp.friend]p9 (PR #78083)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (antangelo) Changes Emits an error for friend FunctionDecls that either: * are not templates and have a requires clause * are templates, and have a constrained parameter that depends on a template parameter from an enclosing

[clang] [clang] Emit error for invalid friend functions under [temp.friend]p9 (PR #78083)

2024-01-13 Thread via cfe-commits
https://github.com/antangelo created https://github.com/llvm/llvm-project/pull/78083 Emits an error for friend FunctionDecls that either: * are not templates and have a requires clause * are templates, and have a constrained parameter that depends on a template parameter from an enclosing

[clang] [llvm] [SPARC] Support reserving arbitrary general purpose registers (PR #74927)

2024-01-13 Thread Sergei Barannikov via cfe-commits
@@ -29,6 +29,12 @@ namespace llvm { class StringRef; class SparcSubtarget : public SparcGenSubtargetInfo { + // Reserve*Register[i] - *#i is not available as a general purpose register. + BitVector ReserveGRegister; s-barannikov wrote: I was thinking about

[clang] [llvm] [SPARC] Support reserving arbitrary general purpose registers (PR #74927)

2024-01-13 Thread Sergei Barannikov via cfe-commits
@@ -98,9 +96,34 @@ BitVector SparcRegisterInfo::getReservedRegs(const MachineFunction ) const { for (unsigned n = 0; n < 31; n++) Reserved.set(SP::ASR1 + n); + for (size_t i = 0; i < SP::IntRegsRegClass.getNumRegs() / 4; ++i) { +// Mark both single register and

[clang] [Clang] Set the decl context to the instantiated constructor when instantiating the explicit specifier (PR #78053)

2024-01-13 Thread via cfe-commits
https://github.com/LYP951018 updated https://github.com/llvm/llvm-project/pull/78053 From ebd57b11fbce96a493c57d4c459baca6bcd6e9d2 Mon Sep 17 00:00:00 2001 From: letrec Date: Sun, 14 Jan 2024 00:59:23 +0800 Subject: [PATCH 1/3] add release notes --- clang/docs/ReleaseNotes.rst

[clang-tools-extra] [llvm] Fix 'newline in constant' encoding issue in clangd sources (PR #78082)

2024-01-13 Thread via cfe-commits
https://github.com/BinVerse updated https://github.com/llvm/llvm-project/pull/78082 >From d518576a24c2217bb42e5d7288e8f128f29219b1 Mon Sep 17 00:00:00 2001 From: cppcloud Date: Sun, 14 Jan 2024 13:38:45 +0800 Subject: [PATCH] Fix 'newline in constant' encoding issue in clangd sources Files

[clang-tools-extra] Fix 'newline in constant' encoding issue in clangd sources (PR #78082)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: BinVerse (BinVerse) Changes Files within clang-tools-extra/clangd encountered 'newline in constant' errors while compiling with Visual Studio Community 2022 Preview (amd64). The affected files were CodeComplete.h, Diagnostics.cpp, and

[clang-tools-extra] Fix 'newline in constant' encoding issue in clangd sources (PR #78082)

2024-01-13 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang-tools-extra] Fix 'newline in constant' encoding issue in clangd sources (PR #78082)

2024-01-13 Thread via cfe-commits
https://github.com/BinVerse created https://github.com/llvm/llvm-project/pull/78082 Files within clang-tools-extra/clangd encountered 'newline in constant' errors while compiling with Visual Studio Community 2022 Preview (amd64). The affected files were CodeComplete.h, Diagnostics.cpp, and

[clang] [libc] [Libc] Give more functions restrict qualifiers (PR #78061)

2024-01-13 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/78061 >From 41094bd07644aaf96159012245f95d9f74cec8cf Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Sat, 13 Jan 2024 14:09:17 -0500 Subject: [PATCH] [Libc] Give more

[clang] [clang-format] TableGen multi line string support. (PR #78032)

2024-01-13 Thread Hirofumi Nakamura via cfe-commits
@@ -763,6 +773,53 @@ void FormatTokenLexer::handleCSharpVerbatimAndInterpolatedStrings() { resetLexer(SourceMgr.getFileOffset(Lex->getSourceLocation(Offset + 1))); } +void FormatTokenLexer::handleTableGenMultilineString() { + FormatToken *MultiLineString = Tokens.back();

[libc] [llvm] [compiler-rt] [clang] [Libc] Give more functions restrict qualifiers (PR #78061)

2024-01-13 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 49138d97c0d8a6d1c6935da414a1f3fea839263b d281918249db16549b5a8c8bdd61c90007cbeab0 --

[clang] [clang-format] TableGen multi line string support. (PR #78032)

2024-01-13 Thread Hirofumi Nakamura via cfe-commits
@@ -1710,7 +1710,7 @@ class AnnotatingParser { TT_UnionLBrace, TT_RequiresClause, TT_RequiresClauseInARequiresExpression, TT_RequiresExpression, TT_RequiresExpressionLParen, TT_RequiresExpressionLBrace, -TT_BracedListLBrace)) { +

[clang] [compiler-rt] [libc] [llvm] [Libc] Give more functions restrict qualifiers (PR #78061)

2024-01-13 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/78061 >From d281918249db16549b5a8c8bdd61c90007cbeab0 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Sat, 13 Jan 2024 14:09:17 -0500 Subject: [PATCH] [Libc] Give more

[clang] [clang-format] TableGen multi line string support. (PR #78032)

2024-01-13 Thread Hirofumi Nakamura via cfe-commits
@@ -2193,6 +2193,11 @@ TEST_F(TokenAnnotatorTest, UnderstandTableGenTokens) { ASSERT_TRUE(Keywords.isTableGenDefinition(*Tokens[0])); ASSERT_TRUE(Tokens[0]->is(Keywords.kw_def)); ASSERT_TRUE(Tokens[1]->is(TT_StartOfName)); + + // Code, the multiline string token.

[clang] [clang-format] TableGen multi line string support. (PR #78032)

2024-01-13 Thread Hirofumi Nakamura via cfe-commits
@@ -272,6 +274,14 @@ void FormatTokenLexer::tryMergePreviousTokens() { return; } } + if (Style.isTableGen()) { +if (tryMergeTokens({tok::l_square, tok::l_brace}, hnakamura5 wrote: Followed this suggestion.

[clang] [clang-format] TableGen multi line string support. (PR #78032)

2024-01-13 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 updated https://github.com/llvm/llvm-project/pull/78032 >From d0767350f26215e86dee039427183630b3f02668 Mon Sep 17 00:00:00 2001 From: hnakamura5 Date: Sat, 13 Jan 2024 21:44:34 +0900 Subject: [PATCH 1/2] [clang-format] TableGen multi line string support. ---

[clang] [clang-format] Add PenaltyBreakScopeResolution option. (PR #78015)

2024-01-13 Thread via cfe-commits
rmarker wrote: Thanks, @rymiel, @HazardyKnusperkeks. I don't know whether you want to wait to give more time for others to review. In any case, I don't have write access, so it would be good if someone could merge this pull request when the time is right. Thanks.

[clang] [Clang][Sema] Extract ellipsis location from CXXFoldExpr for reattaching constraints on NTTPs (PR #78080)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes We build up a `CXXFoldExpr` for immediately declared constraints as per C++20 [temp.param]/4. This is done by `formImmediatelyDeclaredConstraint` where an `EllipsisLoc` is essential to determine whether

[clang] [Clang][Sema] Extract ellipsis location from CXXFoldExpr for reattaching constraints on NTTPs (PR #78080)

2024-01-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/78080 We build up a `CXXFoldExpr` for immediately declared constraints as per C++20 [temp.param]/4. This is done by `formImmediatelyDeclaredConstraint` where an `EllipsisLoc` is essential to determine whether this is

[libc] [clang] [Libc] Give more functions restrict qualifiers (PR #78061)

2024-01-13 Thread via cfe-commits
https://github.com/lntue commented: LGTM for the libc part. Thanks for adding the missing qualifiers! They were specified in our own generated header but not in the implementation: https://github.com/llvm/llvm-project/blob/main/libc/spec/bsd_ext.td#L21

[clang] Improve modeling of two functions in StdLibraryFunctionsChecker (PR #78079)

2024-01-13 Thread Ben Shi via cfe-commits
https://github.com/benshi001 edited https://github.com/llvm/llvm-project/pull/78079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Improve modeling of two functions in StdLibraryFunctionsChecker (PR #78079)

2024-01-13 Thread Ben Shi via cfe-commits
https://github.com/benshi001 edited https://github.com/llvm/llvm-project/pull/78079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Improve modeling of 'opendir' and 'fdopendir' in StdLibraryFunctionsChecker (PR #78079)

2024-01-13 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/78079 >From fd350eea466db33324f07e59469775e81479b33d Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Sun, 14 Jan 2024 12:44:45 +0800 Subject: [PATCH] [clang][analyzer] Improve modeling of two functions in

[clang] Improve modeling of 'opendir' and 'fdopendir' in StdLibraryFunctionsChecker (PR #78079)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ben Shi (benshi001) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/78079.diff 3 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp (+11-8) - (modified)

[clang] [clang-format] Add ShortReturnTypeLength option. (PR #78011)

2024-01-13 Thread via cfe-commits
https://github.com/rmarker updated https://github.com/llvm/llvm-project/pull/78011 >From c4d28f82e108f9f12ccd0375e2a3502025b8c1e8 Mon Sep 17 00:00:00 2001 From: rmarker Date: Thu, 11 Jan 2024 15:01:18 +1030 Subject: [PATCH 1/3] [clang-format] Add ShortReturnTypeLength option. ---

[clang] Improve modeling of 'opendir' and 'fdopendir' in StdLibraryFunctionsChecker (PR #78079)

2024-01-13 Thread Ben Shi via cfe-commits
https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/78079 None >From 2b3d2800be52fb28246c2b51fad7eafc106e3e20 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Sun, 14 Jan 2024 12:44:45 +0800 Subject: [PATCH] Improve modeling of 'opendir' and 'fdopendir' in

[flang] [libc] [clang] [libcxx] [compiler-rt] [lldb] [mlir] [llvm] [clang-tools-extra] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/77886 >From f5a33f9e6893250e3584a77630b771ee76693c20 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 11 Jan 2024 23:42:38 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[libcxx] [mlir] [compiler-rt] [flang] [llvm] [libc] [clang-tools-extra] [clang] [lldb] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/77886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [mlir] [flang] [llvm] [clang-tools-extra] [clang] [lldb] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Fangrui Song via cfe-commits
@@ -5336,6 +5336,7 @@ X86: operand in a SSE register. If AVX is also enabled, can also be a 256-bit vector operand in an AVX register. If AVX-512 is also enabled, can also be a 512-bit vector operand in an AVX512 register. Otherwise, an error. +- ``Ws``: A symbolic

[clang] [clang-format] Add ShortReturnTypeLength option. (PR #78011)

2024-01-13 Thread via cfe-commits
@@ -3928,6 +3928,13 @@ struct FormatStyle { /// \version 13 unsigned ShortNamespaceLines; + /// When AlwaysBreakAfterReturnType is None, line breaks are prevented after rmarker wrote: Done. https://github.com/llvm/llvm-project/pull/78011

[clang] [clang-format] Add ShortReturnTypeLength option. (PR #78011)

2024-01-13 Thread via cfe-commits
@@ -3928,6 +3928,13 @@ struct FormatStyle { /// \version 13 unsigned ShortNamespaceLines; + /// When AlwaysBreakAfterReturnType is None, line breaks are prevented after + /// short return types. This configures the character limit for a type to be + /// regarded as

[clang] [clang-format] Add ShortReturnTypeLength option. (PR #78011)

2024-01-13 Thread via cfe-commits
https://github.com/rmarker updated https://github.com/llvm/llvm-project/pull/78011 >From c4d28f82e108f9f12ccd0375e2a3502025b8c1e8 Mon Sep 17 00:00:00 2001 From: rmarker Date: Thu, 11 Jan 2024 15:01:18 +1030 Subject: [PATCH 1/2] [clang-format] Add ShortReturnTypeLength option. ---

[llvm] [clang] [SPARC] Support reserving arbitrary general purpose registers (PR #74927)

2024-01-13 Thread via cfe-commits
@@ -98,9 +96,34 @@ BitVector SparcRegisterInfo::getReservedRegs(const MachineFunction ) const { for (unsigned n = 0; n < 31; n++) Reserved.set(SP::ASR1 + n); + for (size_t i = 0; i < SP::IntRegsRegClass.getNumRegs() / 4; ++i) { +// Mark both single register and

[llvm] [clang] [SPARC] Support reserving arbitrary general purpose registers (PR #74927)

2024-01-13 Thread via cfe-commits
@@ -29,6 +29,12 @@ namespace llvm { class StringRef; class SparcSubtarget : public SparcGenSubtargetInfo { + // Reserve*Register[i] - *#i is not available as a general purpose register. + BitVector ReserveGRegister; koachan wrote: It should be possible,

[clang] [clang] SyntaxWarning: invalid escape sequence '\s' with Python3.12 (PR #78036)

2024-01-13 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/78036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-13 Thread Kelvin Li via cfe-commits
kkwli wrote: If the compiler is built with `DEFAULT_SYSROOT`, the `-isysroot` option is ignored. Is that the expected behavior? My local MacOS build (with `-DDEFAULT_SYSROOT="$(xcrun --show-sdk-path)"`) has `isysroot.f90` failed. https://github.com/llvm/llvm-project/pull/77365

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-13 Thread Fangrui Song via cfe-commits
@@ -78,3 +78,82 @@ // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/../../../../i686-gnu/bin/ld" {{.*}} "-m" "elf_i386" // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbegin.o" // CHECK-CROSS:

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-13 Thread Fangrui Song via cfe-commits
@@ -78,3 +78,82 @@ // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/../../../../i686-gnu/bin/ld" {{.*}} "-m" "elf_i386" // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbegin.o" // CHECK-CROSS:

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-13 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/78065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-13 Thread Fangrui Song via cfe-commits
@@ -78,3 +78,82 @@ // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/../../../../i686-gnu/bin/ld" {{.*}} "-m" "elf_i386" // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbegin.o" // CHECK-CROSS:

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-13 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/78065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-13 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/78065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-13 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/78065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-13 Thread Fangrui Song via cfe-commits
@@ -2477,7 +2477,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( "x86_64-redhat-linux","x86_64-suse-linux", "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux", "x86_64-unknown-linux", -

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-13 Thread Brad Smith via cfe-commits
brad0 wrote: Looks pretty good to me. https://github.com/llvm/llvm-project/pull/78065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [Libc] Give more functions restrict qualifiers (PR #78061)

2024-01-13 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/78061 >From 76f19bbeb404d0aa062f9677b9152db71f232dc3 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Sat, 13 Jan 2024 14:09:17 -0500 Subject: [PATCH] [Libc] Give more

[libc] [clang] [Libc] Give more functions restrict qualifiers (PR #78061)

2024-01-13 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/78061 >From eafa096fad4e26d140b542e0e6a8656ad6fdf089 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Sat, 13 Jan 2024 14:09:17 -0500 Subject: [PATCH] [Libc] Give more

[clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-13 Thread via cfe-commits
@@ -18,52 +19,80 @@ using namespace clang::tidy::matchers; namespace clang::tidy::readability { +static SourceRange +getFullInitRangeInclWhitespaces(SourceRange Range, const SourceManager , +const LangOptions ) { + const Token PrevToken = +

[clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-13 Thread via cfe-commits
@@ -487,6 +487,10 @@ Changes in existing checks ` check to ignore false-positives in initializer list of record. +- Improved :doc:`readability-redundant-member-init + ` check to support phyBrackets wrote: Probably a better description might be

[clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-13 Thread via cfe-commits
https://github.com/phyBrackets commented: Thank You @PiotrZSL . Patch looks good to me. Just a couple of nit picks if it's okay for you. https://github.com/llvm/llvm-project/pull/77206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-13 Thread via cfe-commits
https://github.com/phyBrackets edited https://github.com/llvm/llvm-project/pull/77206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AVX10][Doc] Add documentation about AVX10 options and their attentions (PR #77925)

2024-01-13 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/77925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0e93d04 - [AVX10][Doc] Add documentation about AVX10 options and their attentions (#77925)

2024-01-13 Thread via cfe-commits
Author: Phoebe Wang Date: 2024-01-14T08:59:25+08:00 New Revision: 0e93d04001e45f39cabf0ffb5093512a7f622cc0 URL: https://github.com/llvm/llvm-project/commit/0e93d04001e45f39cabf0ffb5093512a7f622cc0 DIFF: https://github.com/llvm/llvm-project/commit/0e93d04001e45f39cabf0ffb5093512a7f622cc0.diff

[clang] [AVX10][Doc] Add documentation about AVX10 options and their attentions (PR #77925)

2024-01-13 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > LGTM. Thanks! Thanks @e-kud ! https://github.com/llvm/llvm-project/pull/77925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AVX10][Doc] Add documentation about AVX10 options and their attentions (PR #77925)

2024-01-13 Thread Phoebe Wang via cfe-commits
@@ -3963,6 +3963,60 @@ implicitly included in later levels. - ``-march=x86-64-v3``: (close to Haswell) AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, XSAVE - ``-march=x86-64-v4``: AVX512F, AVX512BW, AVX512CD, AVX512DQ, AVX512VL +`Intel AVX10 ISA

[clang-tools-extra] [clang-tidy] Add option to ignore macros in `readability-simplify-boolean-expr` check (PR #78043)

2024-01-13 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny closed https://github.com/llvm/llvm-project/pull/78043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 5295ca1 - [clang-tidy] Add option to ignore macros in `readability-simplify-boolean-expr` check (#78043)

2024-01-13 Thread via cfe-commits
Author: Danny Mösch Date: 2024-01-14T01:14:38+01:00 New Revision: 5295ca1a8e5844b44d6b4140ea46405301e9c63f URL: https://github.com/llvm/llvm-project/commit/5295ca1a8e5844b44d6b4140ea46405301e9c63f DIFF: https://github.com/llvm/llvm-project/commit/5295ca1a8e5844b44d6b4140ea46405301e9c63f.diff

[clang] [llvm] [coverage] skipping code coverage for 'if constexpr' and 'if consteval' [WIP] (PR #78033)

2024-01-13 Thread Hana Dusíková via cfe-commits
hanickadot wrote: I was able to get rid of empty regions in front of `if constexpr` by checking if the region contains only whitespace characters in llvm-cov (not happy about it) so if someone know better. Please do help me. ![coverage-before

[clang] [llvm] [coverage] skipping code coverage for 'if constexpr' and 'if consteval' [WIP] (PR #78033)

2024-01-13 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/78033 From efcab4def5ed135f84791d5569081cbe750f57d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Sat, 13 Jan 2024 23:27:07 +0100 Subject: [PATCH 1/2] [coverage] skipping code

[clang-tools-extra] [clang-tidy] Add option to ignore macros in `readability-simplify-boolean-expr` check (PR #78043)

2024-01-13 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/78043 From 55d278f3f33716b5b18d46048df7e664bcdfed6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sat, 13 Jan 2024 16:36:48 +0100 Subject: [PATCH 1/8] [clang-tidy] Add option to ignore macros

[clang-tools-extra] [clang-tidy] Add option to ignore macros in `readability-simplify-boolean-expr` check (PR #78043)

2024-01-13 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/78043 From 55d278f3f33716b5b18d46048df7e664bcdfed6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sat, 13 Jan 2024 16:36:48 +0100 Subject: [PATCH 1/7] [clang-tidy] Add option to ignore macros

[libcxx] [libunwind] [libc] [flang] [lld] [lldb] [compiler-rt] [llvm] [clang-tools-extra] [clang] [libclc] [clang] Add tests for DRs about complete-class context (PR #77444)

2024-01-13 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: LGTM https://github.com/llvm/llvm-project/pull/77444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add test for CWG1350 (PR #78040)

2024-01-13 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: LGTM https://github.com/llvm/llvm-project/pull/78040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Use FileCheck for clang-format-ignore lit test (PR #77977)

2024-01-13 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/77977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] SyntaxWarning: invalid escape sequence '\s' with Python3.12 (PR #78036)

2024-01-13 Thread Jie Fu 傅杰 via cfe-commits
@@ -6,6 +6,6 @@ output_file = open(sys.argv[2], "w") for line in input_file: -m = re.search("^\s+(clang_[^;]+)", line) +m = re.search("^\\s+(clang_[^;]+)", line) DamonFool wrote: > Making it a raw string is a marginally cleaner fix Yes, agree.

[clang] [clang] SyntaxWarning: invalid escape sequence '\s' with Python3.12 (PR #78036)

2024-01-13 Thread Jie Fu 傅杰 via cfe-commits
https://github.com/DamonFool updated https://github.com/llvm/llvm-project/pull/78036 >From 57fa67bf86bea09b9c6011b8c9ec6f69fe11852f Mon Sep 17 00:00:00 2001 From: Jie Fu Date: Sat, 13 Jan 2024 21:51:36 +0800 Subject: [PATCH 1/2] [clang] SyntaxWarning: invalid escape sequence '\s' with

[clang] [clang] Add `clang::behaves_like_std(...)` attribute (PR #76596)

2024-01-13 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: It's not ready, but I have a draft for a much more general attribute: #78071 https://github.com/llvm/llvm-project/pull/76596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Add attribute [[clang::builtin]] (PR #78071)

2024-01-13 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/78071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add add attribute [[clang::builtin]] (PR #78071)

2024-01-13 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 54e2749609d7114f4a48f4146cddeecf76d935a4 f073a827ddbe728ced53a82431f517da58753776 --

[clang] [clang] Add add attribute [[clang::builtin]] (PR #78071)

2024-01-13 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/78071 None >From f073a827ddbe728ced53a82431f517da58753776 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 11 Dec 2023 12:51:07 +0100 Subject: [PATCH] [clang] Add add attribute [[clang::builtin]] ---

[clang] [llvm] [coverage] skipping code coverage for 'if constexpr' and 'if consteval' [WIP] (PR #78033)

2024-01-13 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/78033 From efcab4def5ed135f84791d5569081cbe750f57d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Sat, 13 Jan 2024 23:27:07 +0100 Subject: [PATCH] [coverage] skipping code coverage

  1   2   3   4   >