[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -1213,6 +1213,194 @@ static bool isRemark(const Record &Diag) { return ClsName == "CLASS_REMARK"; } +// Presumes the text has been split at the first whitespace or hyphen. +static bool isExemptAtStart(StringRef Text) { + // Fast path, the first character is lowercase or

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Louis Dionne via cfe-commits
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/93233 1. Remove the format-checking job from the BuildKite pipeline. We now have a monorepo-wide format checker implemented with Github Actions, so that should not be necessary anymore. 2. Stop building and testing C

[clang] cc1: Report an error for multiple actions unless separated by -main-file-name (PR #91140)

2024-05-23 Thread Justin Bogner via cfe-commits
bogner wrote: I don't really understand the rationale for this, and it's kind of annoying. Most of the compiler's flags behave in the "last one wins" fashion (such as `-O2` and `-O0`) and it's always been convenient to add the flag you want at the end. Why treat action flags any differently? A

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Louis Dionne (ldionne) Changes 1. Remove the format-checking job from the BuildKite pipeline. We now have a monorepo-wide format checker implemented with Github Actions, so that should not be necessary anymore. 2. Stop building and testi

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Tom Stellard via cfe-commits
https://github.com/tstellar commented: If we aren't running the tests any more, can we build clang with `-DLLVM_TARGETS_TO_BUILD=Native` https://github.com/llvm/llvm-project/pull/93233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Do we even need to build Clang and run libc++ jobs? I don't even see them linked in libc++ PR, even besides the fact that I think libc++ is fully tested with GitHub Actions. https://github.com/llvm/llvm-project/pull/93233 ___ cfe-commi

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/93233 >From 89afeebd55e0ae1167f5af803eb192b73a6e6799 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Thu, 23 May 2024 15:31:11 -0400 Subject: [PATCH 1/2] [clang][ci] Remove unnecessary BuildKite jobs for Clang 1. Re

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Louis Dionne via cfe-commits
ldionne wrote: > Do we even need to build Clang and run libc++ jobs? I don't even see them > linked in libc++ PR, even besides the fact that I think libc++ is fully > tested with GitHub Actions. What we're testing is that the changes to Clang didn't break libc++. We're testing Clang via libc+

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. OK, I'll try to add this testing to "GitHub Pull Requests" later so that we can avoid building Clang twice. https://github.com/llvm/llvm-project/pull/93233 ___ cfe-commits mailing list cfe-commits

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-05-23 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: This patch seems to break the following example (works in trunk, breaks after this patch). Could you please add a test case for this? https://godbolt.org/z/rdn74xn9M ``` struct S { bool operator==(const S&) const = default; }; struct Derived : S { int j_ = 0; }; static_assert(

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Tom Stellard via cfe-commits
https://github.com/tstellar approved this pull request. LGTM. Thanks, this should help free up some builder resources. https://github.com/llvm/llvm-project/pull/93233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [MSVC, ARM64] Fix signature for __prefetch (PR #93235)

2024-05-23 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello created https://github.com/llvm/llvm-project/pull/93235 #67174 added the `__prefetch` intrinsic, however it used the wrong signature: the argument should be `const void*`, not `void*`. Docs: https://learn.microsoft.com/en-us/cpp/intrinsics/arm64-intrinsics?view=m

[clang] 10be6c9 - Fix an accidental escape sequence in a unit test

2024-05-23 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-05-23T15:52:15-04:00 New Revision: 10be6c96b831a3511d2b381d5e1130d6b7e3e2ff URL: https://github.com/llvm/llvm-project/commit/10be6c96b831a3511d2b381d5e1130d6b7e3e2ff DIFF: https://github.com/llvm/llvm-project/commit/10be6c96b831a3511d2b381d5e1130d6b7e3e2ff.diff

[clang] [MSVC, ARM64] Fix signature for __prefetch (PR #93235)

2024-05-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Daniel Paoliello (dpaoliello) Changes #67174 added the `__prefetch` intrinsic, however it used the wrong signature: the argument should be `const void*`, not `void*`. Docs: https://learn.microsoft.com/en-us/cpp/intrinsics/arm64-int

[clang] [MSVC, ARM64] Fix signature for __prefetch (PR #93235)

2024-05-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Paoliello (dpaoliello) Changes #67174 added the `__prefetch` intrinsic, however it used the wrong signature: the argument should be `const void*`, not `void*`. Docs: https://learn.microsoft.com/en-us/cpp/intrinsics/arm64-intrinsic

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/93229 >From 38d6d9b809e1cf9d6a8f577630c838421486cd04 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 23 May 2024 14:55:16 -0400 Subject: [PATCH] Diagnose problematic diagnostic messages Clang has some unw

[clang-tools-extra] [clang-tidy] Optimize realpath in readability-identifier-naming (PR #92659)

2024-05-23 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin approved this pull request. https://github.com/llvm/llvm-project/pull/92659 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Louis Dionne via cfe-commits
ldionne wrote: I will merge once the CI has passed. If someone else sees the CI green, feel free to merge too. @Endilll We could indeed "flatten" the `clang-ci` pipeline into the `github-pull-requests` pipeline. Basically, instead of triggering the `clang-ci` pipeline like this: https://gith

[libunwind] [libunwind][AIX] Cast NULL as type uintptr_t. (PR #93204)

2024-05-23 Thread Xing Xue via cfe-commits
https://github.com/xingxue-ibm closed https://github.com/llvm/llvm-project/pull/93204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] 42b5dab - [libunwind][AIX] Cast NULL as type uintptr_t. (#93204)

2024-05-23 Thread via cfe-commits
Author: Xing Xue Date: 2024-05-23T16:06:21-04:00 New Revision: 42b5daba504a8b4fd60a57dde93ee5d0118abf0b URL: https://github.com/llvm/llvm-project/commit/42b5daba504a8b4fd60a57dde93ee5d0118abf0b DIFF: https://github.com/llvm/llvm-project/commit/42b5daba504a8b4fd60a57dde93ee5d0118abf0b.diff LOG:

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Aaron Ballman via cfe-commits
@@ -1213,6 +1213,194 @@ static bool isRemark(const Record &Diag) { return ClsName == "CLASS_REMARK"; } +// Presumes the text has been split at the first whitespace or hyphen. +static bool isExemptAtStart(StringRef Text) { + // Fast path, the first character is lowercase or

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/93229 >From 38d6d9b809e1cf9d6a8f577630c838421486cd04 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 23 May 2024 14:55:16 -0400 Subject: [PATCH 1/2] Diagnose problematic diagnostic messages Clang has some

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -1302,7 +1302,8 @@ static void verifyDiagnosticWording(const Record &Diag) { // closing '}', skipping intermediary {} pairs. size_t BraceCount = 1; -auto Iter = FullDiagText.begin() + /*%select{*/ 8; +constexpr size_t PercentSelectBraceLen = sizeof("%select{

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Erich Keane via cfe-commits
@@ -1355,7 +1357,7 @@ static void verifyDiagnosticWording(const Record &Diag) { if (isDigit(FullDiagText.back()) && *(FullDiagText.end() - 2) == '}') { // Scan backwards to find the opening curly brace. size_t BraceCount = 1; -auto Iter = FullDiagText.end() - /*}0

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Aaron Ballman via cfe-commits
@@ -1355,7 +1357,7 @@ static void verifyDiagnosticWording(const Record &Diag) { if (isDigit(FullDiagText.back()) && *(FullDiagText.end() - 2) == '}') { // Scan backwards to find the opening curly brace. size_t BraceCount = 1; -auto Iter = FullDiagText.end() - /*}0

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-23 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92704 >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH 1/6] HLSL Default and Relaxed Availability Diagnostics (#3) --- cl

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Dan Liew via cfe-commits
@@ -4944,6 +4944,26 @@ void Parser::ParseStructDeclaration( } } +// TODO: All callers of this function should be moved to +// `Parser::ParseLexedAttributeList`. +void Parser::ParseLexedCAttributeList(LateParsedAttrList &LAs, bool EnterScope, +

[clang] [MSVC, ARM64] Fix signature for __prefetch (PR #93235)

2024-05-23 Thread Amy Huang via cfe-commits
https://github.com/amykhuang approved this pull request. Thanks for the fix https://github.com/llvm/llvm-project/pull/93235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-05-23 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: @nicovank Overall looks fine from functionality point of view. Problem A) Getting bunch of ``` task: wait_for= cb=[as_completed.._on_completion() at /usr/lib/python3.12/asyncio/tasks.py:618]> Task was destroyed but it is pending! ``` When CTR+C a script. More graceful shutdow

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Henrik G. Olsson via cfe-commits
@@ -4944,6 +4944,26 @@ void Parser::ParseStructDeclaration( } } +// TODO: All callers of this function should be moved to +// `Parser::ParseLexedAttributeList`. +void Parser::ParseLexedCAttributeList(LateParsedAttrList &LAs, bool EnterScope, +

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Dan Liew via cfe-commits
@@ -4944,6 +4944,26 @@ void Parser::ParseStructDeclaration( } } +// TODO: All callers of this function should be moved to +// `Parser::ParseLexedAttributeList`. +void Parser::ParseLexedCAttributeList(LateParsedAttrList &LAs, bool EnterScope, +

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -1213,6 +1213,197 @@ static bool isRemark(const Record &Diag) { return ClsName == "CLASS_REMARK"; } +// Presumes the text has been split at the first whitespace or hyphen. +static bool isExemptAtStart(StringRef Text) { + // Fast path, the first character is lowercase or

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Henrik G. Olsson via cfe-commits
@@ -4944,6 +4944,26 @@ void Parser::ParseStructDeclaration( } } +// TODO: All callers of this function should be moved to +// `Parser::ParseLexedAttributeList`. +void Parser::ParseLexedCAttributeList(LateParsedAttrList &LAs, bool EnterScope, +

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/93121 >From bc5b8bc34b50e2e98d2c6103c7b1c232a3e765b4 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Fri, 17 May 2024 12:07:40 -0700 Subject: [PATCH] [BoundsSafety] Reland #93121 Allow 'counted_by' attribute on pointe

[clang] [clang] Report erroneous floating point results in _Complex math (PR #90588)

2024-05-23 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel commented: After banging my head on the desk trying to figure out why the tests were giving such strange results, I realized the issue... Could you please use `__builtin_complex` in the test to construct the complex infinities instead of `__builtin_infinity()

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/93121 >From f9c8abdb243096b6fe0c2ad1a42023039ca7f1f2 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Fri, 17 May 2024 12:07:40 -0700 Subject: [PATCH] [BoundsSafety] Reland #93121 Allow 'counted_by' attribute on pointe

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/93121 >From 9e1a9e49b33d4b77d75cee243244dd66a40ea209 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Fri, 17 May 2024 12:07:40 -0700 Subject: [PATCH] [BoundsSafety] Reland #93121 Allow 'counted_by' attribute on pointe

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/93121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/93121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][objectsize] Generate object size calculation for sub-objects (PR #86858)

2024-05-23 Thread Eli Friedman via cfe-commits
@@ -1062,6 +1063,159 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, return Builder.CreateSelect(Cmp, Res, ConstantInt::get(ResType, 0, IsSigned)); } +namespace { + +class ObjectSizeVisitor +: public ConstStmtVisitor { + bool SkipASE; + +

[clang] [Clang][objectsize] Generate object size calculation for sub-objects (PR #86858)

2024-05-23 Thread Eli Friedman via cfe-commits
@@ -1062,6 +1063,159 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, return Builder.CreateSelect(Cmp, Res, ConstantInt::get(ResType, 0, IsSigned)); } +namespace { + +class ObjectSizeVisitor +: public ConstStmtVisitor { + bool SkipASE; + +

[clang] [Clang][objectsize] Generate object size calculation for sub-objects (PR #86858)

2024-05-23 Thread Eli Friedman via cfe-commits
@@ -1052,6 +1053,165 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, return Builder.CreateSelect(Cmp, Res, ConstantInt::get(ResType, 0, IsSigned)); } +namespace { + +class ObjectSizeVisitor +: public ConstStmtVisitor { + bool SkipASE; + +

[clang] [Clang][objectsize] Generate object size calculation for sub-objects (PR #86858)

2024-05-23 Thread Eli Friedman via cfe-commits
@@ -1062,6 +1063,159 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, return Builder.CreateSelect(Cmp, Res, ConstantInt::get(ResType, 0, IsSigned)); } +namespace { + +class ObjectSizeVisitor +: public ConstStmtVisitor { + bool SkipASE; + +

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-23 Thread via cfe-commits
https://github.com/isuckatcs edited https://github.com/llvm/llvm-project/pull/86448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-23 Thread via cfe-commits
@@ -0,0 +1,68 @@ +//===--- ExceptionRethrowCheck.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: Apa

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-23 Thread via cfe-commits
@@ -0,0 +1,83 @@ +.. title:: clang-tidy - bugprone-exception-rethrow + +bugprone-exception-rethrow +== + +Identifies problematic exception rethrowing, especially with caught exception +variables or empty throw statements outside catch blocks. + +In C++ exce

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-23 Thread via cfe-commits
@@ -0,0 +1,83 @@ +.. title:: clang-tidy - bugprone-exception-rethrow + +bugprone-exception-rethrow +== + +Identifies problematic exception rethrowing, especially with caught exception +variables or empty throw statements outside catch blocks. + +In C++ exce

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-23 Thread via cfe-commits
https://github.com/isuckatcs requested changes to this pull request. Apart from some docs changes and the lambda false positive, the check looks good. https://github.com/llvm/llvm-project/pull/86448 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-23 Thread via cfe-commits
@@ -0,0 +1,103 @@ +// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions + +struct exception {}; + +namespace std { + template + T&& move(T &&x) { +return static_cast(x); + } +} + +void correct() { + try { + throw exception(); + } catch(const

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-23 Thread via cfe-commits
@@ -0,0 +1,68 @@ +//===--- ExceptionRethrowCheck.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: Apa

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-23 Thread via cfe-commits
@@ -0,0 +1,83 @@ +.. title:: clang-tidy - bugprone-exception-rethrow + +bugprone-exception-rethrow +== + +Identifies problematic exception rethrowing, especially with caught exception +variables or empty throw statements outside catch blocks. + +In C++ exce

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-23 Thread via cfe-commits
@@ -0,0 +1,68 @@ +//===--- ExceptionRethrowCheck.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: Apa

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-23 Thread via cfe-commits
@@ -0,0 +1,103 @@ +// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions + +struct exception {}; + +namespace std { + template + T&& move(T &&x) { +return static_cast(x); + } +} + +void correct() { + try { + throw exception(); + } catch(const

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-23 Thread via cfe-commits
@@ -0,0 +1,83 @@ +.. title:: clang-tidy - bugprone-exception-rethrow + +bugprone-exception-rethrow +== + +Identifies problematic exception rethrowing, especially with caught exception +variables or empty throw statements outside catch blocks. + +In C++ exce

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-23 Thread via cfe-commits
@@ -0,0 +1,83 @@ +.. title:: clang-tidy - bugprone-exception-rethrow + +bugprone-exception-rethrow +== + +Identifies problematic exception rethrowing, especially with caught exception +variables or empty throw statements outside catch blocks. + +In C++ exce

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-23 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni approved this pull request. I'd like other approvals by clang guys. @AaronBallman Could you nominate anyone? https://github.com/llvm/llvm-project/pull/89869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-23 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/89869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] dc1bfbc - [clang][ci] Remove unnecessary BuildKite jobs for Clang (#93233)

2024-05-23 Thread via cfe-commits
Author: Louis Dionne Date: 2024-05-24T01:21:55+04:00 New Revision: dc1bfbc9735ba82bf319e6aa2209e1a795fb659f URL: https://github.com/llvm/llvm-project/commit/dc1bfbc9735ba82bf319e6aa2209e1a795fb659f DIFF: https://github.com/llvm/llvm-project/commit/dc1bfbc9735ba82bf319e6aa2209e1a795fb659f.diff

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/93233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 Thread Derek Schuff via cfe-commits
@@ -90,6 +90,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyTargetInfo : public TargetInfo { StringRef getABI() const override; bool setABI(const std::string &Name) override; + bool useFP16ConversionIntrinsics() const override { return false; } dschuff wr

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-23 Thread Maryam Moghadas via cfe-commits
maryammo wrote: In `PPCTargetMachine::PPCABI computeTargetABI` it specifies the ABI with this ``` switch (TT.getArch()) { case Triple::ppc64le: return PPCTargetMachine::PPC_ABI_ELFv2; case Triple::ppc64: if (TT.isPPC64ELFv2ABI()) return PPCTargetMachine::PPC_ABI_ELFv2; else return

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

2024-05-23 Thread James Y Knight via cfe-commits
jyknight wrote: Heads up: this commit has triggered some weird errors for a compile, but only when clang header modules are enabled. A std::vector, that's built through a large amount of template gunk that definitely involves template template parameter matching, ends up failing vector's "Allo

[clang] [Clang] Throw error when calling atomic with pointer to zero size object (PR #91057)

2024-05-23 Thread Hendrik Hübner via cfe-commits
https://github.com/HendrikHuebner updated https://github.com/llvm/llvm-project/pull/91057 From 487ec3df346924f71b66e5753c844c97991e Mon Sep 17 00:00:00 2001 From: hhuebner Date: Sat, 4 May 2024 13:49:38 +0200 Subject: [PATCH] [Clang] Throw error when calling atomic with pointer to zero siz

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-23 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92704 >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH 1/6] HLSL Default and Relaxed Availability Diagnostics (#3) --- cl

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

2024-05-23 Thread Davide Italiano via cfe-commits
dcci wrote: I am seeing something similar in vector (without modules). I'm reducing a test case now. https://github.com/llvm/llvm-project/pull/92855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

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

2024-05-23 Thread Davide Italiano via cfe-commits
dcci wrote: Example error while I reduce: ``` fbcode/third-party-buck/platform010/build/libgcc/include/c++/trunk/bits/stl_vector.h:404:21: error: static assertion failed due to requirement 'is_same, std::allocator>, quic::Interval>::value': std::vector must have the same value_type as its al

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 Thread Brendan Dahl via cfe-commits
@@ -90,6 +90,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyTargetInfo : public TargetInfo { StringRef getABI() const override; bool setABI(const std::string &Name) override; + bool useFP16ConversionIntrinsics() const override { return false; } brendandah

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-23 Thread Chris Apple via cfe-commits
cjappl wrote: Weekly ping of reviewers @yln @vitalybuka @Sirraide @AaronBallman @zygoloid @compnerd @petrhosek @isanbard Looking for weighing in on any of the code as it stands now, or the naming question posed by MaskRay [here](https://discourse.llvm.org/t/rfc-nolock-and-noalloc-attributes/

[clang] [clang] fix(92759): clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp: 6 * Function parameter should be passed by const reference (PR #93252)

2024-05-23 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/93252 Fixes #92759 >From 994791b862dfecf7bb370f32834645011e69137d Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 24 May 2024 01:39:35 +0300 Subject: [PATCH] fix(92759): use const references --- .../Fronten

[clang] [clang] fix(92759): clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp: 6 * Function parameter should be passed by const reference (PR #93252)

2024-05-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #92759 --- Full diff: https://github.com/llvm/llvm-project/pull/93252.diff 1 Files Affected: - (modified) clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp (+17-14) ``diff diff --git a/c

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 Thread Heejin Ahn via cfe-commits
@@ -90,6 +90,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyTargetInfo : public TargetInfo { StringRef getABI() const override; bool setABI(const std::string &Name) override; + bool useFP16ConversionIntrinsics() const override { return false; } aheejin wr

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin approved this pull request. LGTM % `!HasHalfPrecision` thing By the way I guess you can try getting a commit access soon? I think it is still "Send an an email to Chris" though... https://github.com/llvm/llvm-project/pull/93228 ___

[clang] [clang] fix(92759): clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp: 6 * Function parameter should be passed by const reference (PR #93252)

2024-05-23 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 6d2b23c46e6ad174d16721c4c42a00a2835eab92 994791b862dfecf7bb370f32834645011e69137d --

[clang] [clang] fix(92759): clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp: 6 * Function parameter should be passed by const reference (PR #93252)

2024-05-23 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/93252 >From 994791b862dfecf7bb370f32834645011e69137d Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 24 May 2024 01:39:35 +0300 Subject: [PATCH 1/2] fix(92759): use const references --- .../Frontend/Rewrite/

[clang-tools-extra] [clang-tidy] Fix handling of members in readability-redundant-member-init (PR #93217)

2024-05-23 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/93217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix handling of members in readability-redundant-member-init (PR #93217)

2024-05-23 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM, with a release note nit. https://github.com/llvm/llvm-project/pull/93217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix handling of members in readability-redundant-member-init (PR #93217)

2024-05-23 Thread Julian Schmidt via cfe-commits
@@ -387,6 +387,11 @@ Changes in existing checks ` check to properly emit warnings for static data member with an in-class initializer. +- Improved :doc:`readability-redundant-member-init + ` check to avoid + false-positives when type of the member does not match type of

[clang] d03e56b - [Driver] Simplify -f[no-]sized-deallocation forwarding. NFC

2024-05-23 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-23T16:03:46-07:00 New Revision: d03e56b27cd992e29482a21d88693f626f3dfffb URL: https://github.com/llvm/llvm-project/commit/d03e56b27cd992e29482a21d88693f626f3dfffb DIFF: https://github.com/llvm/llvm-project/commit/d03e56b27cd992e29482a21d88693f626f3dfffb.diff

[clang] [clang][driver] Support `-x` for all languages in CL mode (PR #89772)

2024-05-23 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @huangqinjin Try rebasing you changes on top of latest main. Looks like Windows CI is passing there including flang commits which are the source files that are causing msvc to run out of heap space. https://github.com/llvm/llvm-project/pull/89772 ___

[clang] [clang][Driver] Fix enabling strict alising by default when the environment is MSVC (PR #91689)

2024-05-23 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/91689 >From b43a6302009b9a11ef672f3bd01e10342102de44 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Thu, 9 May 2024 21:21:22 -0400 Subject: [PATCH 1/2] [clang][Driver] Fix enabling strict alising by default when the e

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 Thread Brendan Dahl via cfe-commits
https://github.com/brendandahl updated https://github.com/llvm/llvm-project/pull/93228 >From 28cc678038feefffceba8cbe24349e1885b24c75 Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Tue, 21 May 2024 21:15:14 + Subject: [PATCH 1/2] [WebAssembly] Implement prototype f16x8.splat instruction

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/93228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

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

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-23 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -fsyntax-only -verify %s + +// expected-error@+1 {{'patchable_function_entry' attribute is not yet supported on AIX}} +__attribute__((patchable_function_entry(0))) void f(); MaskRay wrote: Some

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-23 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,49 @@ +; RUN: llc -mtriple=powerpc-unknown-linux-gnu %s -o - | FileCheck %s --check-prefixes=CHECK,PPC32 +; RUN: llc -mtriple=powerpc64-unknown-linux-gnu %s -o - | FileCheck %s --check-prefixes=CHECK,PPC64 + +define void @f0() { +; CHECK-LABEL: f0: +; CHECK-NOT: nop

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-23 Thread Fangrui Song via cfe-commits
@@ -6,15 +6,20 @@ // RUN: %clang -target loongarch64 %s -fpatchable-function-entry=1,0 -c -### 2>&1 | FileCheck %s // RUN: %clang -target riscv32 %s -fpatchable-function-entry=1,0 -c -### 2>&1 | FileCheck %s // RUN: %clang -target riscv64 %s -fpatchable-function-entry=1,0 -c

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-23 Thread Fangrui Song via cfe-commits
@@ -6681,7 +6681,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, StringRef S0 = A->getValue(), S = S0; unsigned Size, Offset = 0; if (!Triple.isAArch64() && !Triple.isLoongArch() && !Triple.isRISCV() && -!Triple.isX86()) +!Triple.

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-23 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,49 @@ +; RUN: llc -mtriple=powerpc-unknown-linux-gnu %s -o - | FileCheck %s --check-prefixes=CHECK,PPC32 MaskRay wrote: `-mtriple=powerpc`. Prefer a generic ELF triple to a Linux specific one. Suggest 2 RUN lines, `powerpc` and `powerpc64le`, to catc

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-23 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay requested changes to this pull request. https://github.com/llvm/llvm-project/pull/92997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2024-05-23 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 approved this pull request. LGTM! @xbjfk Let us know if you require one of us to commit on your behalf due to not having commit access. https://github.com/llvm/llvm-project/pull/68690 ___ cfe-commits mailing list cfe-commi

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-23 Thread Fangrui Song via cfe-commits
MaskRay wrote: > So PPC64 can use ELFv2 for `Triple::OpenBSD`. We probably want to diagnose > this OS for PPC64, since with ELFv2 we might emit separate local and global > entry points which means only certain values can be passed to > `-fpatchable-function-entry` option. This patch matches t

[clang] [clang][Driver] Fix enabling strict alising by default when the environment is MSVC (PR #91689)

2024-05-23 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/91689 >From 3b0967e0a8f564d761ea10858854776ede396bdf Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Thu, 9 May 2024 21:21:22 -0400 Subject: [PATCH 1/2] [clang][Driver] Fix enabling strict alising by default when the e

[clang] [alpha.webkit.UncountedLocalVarsChecker] Detect assignments to uncounted local variable and parameters. (PR #92639)

2024-05-23 Thread Artem Dergachev via cfe-commits
@@ -135,7 +135,19 @@ class UncountedLocalVarsChecker bool shouldVisitImplicitCode() const { return false; } bool VisitVarDecl(VarDecl *V) { -Checker->visitVarDecl(V); +auto *Init = V->getInit(); +if (Init && V->isLocalVarDecl()) + C

[clang] [alpha.webkit.UncountedLocalVarsChecker] Detect assignments to uncounted local variable and parameters. (PR #92639)

2024-05-23 Thread Artem Dergachev via cfe-commits
@@ -135,7 +135,19 @@ class UncountedLocalVarsChecker bool shouldVisitImplicitCode() const { return false; } bool VisitVarDecl(VarDecl *V) { -Checker->visitVarDecl(V); +auto *Init = V->getInit(); +if (Init && V->isLocalVarDecl())

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

2024-05-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Thanks for the heads up, this does look like a problem. I am reverting it for now. https://github.com/llvm/llvm-project/pull/92855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] Revert "[clang] Implement CWG2398 provisional TTP matching to class templates" (PR #93258)

2024-05-23 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/93258 Reverts llvm/llvm-project#92855 This is causing issues, there are still being reduced, but does look like a problem. >From 8871ef58ece10234b8cd97c5e7199dee7d7a8b08 Mon Sep 17 00:00:00 2001 From: Matheus Izveko

[clang] Revert "[clang] Implement CWG2398 provisional TTP matching to class templates" (PR #93258)

2024-05-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes Reverts llvm/llvm-project#92855 This is causing issues, there are still being reduced, but does look like a problem. --- Full diff: https://github.com/llvm/llvm-project/pull/93258.diff 4 Files Affecte

[clang] Revert "[clang] Implement CWG2398 provisional TTP matching to class templates" (PR #93258)

2024-05-23 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/93258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 06aadbe - Revert "[clang] Implement CWG2398 provisional TTP matching to class templates" (#93258)

2024-05-23 Thread via cfe-commits
Author: Matheus Izvekov Date: 2024-05-23T21:33:35-03:00 New Revision: 06aadbeb2538c3e28cca7c82db102dffc7bdc269 URL: https://github.com/llvm/llvm-project/commit/06aadbeb2538c3e28cca7c82db102dffc7bdc269 DIFF: https://github.com/llvm/llvm-project/commit/06aadbeb2538c3e28cca7c82db102dffc7bdc269.dif

[clang] Revert "[clang] Implement CWG2398 provisional TTP matching to class templates" (PR #93258)

2024-05-23 Thread Davide Italiano via cfe-commits
dcci wrote: Thanks. I'll try to get a repro (it's reducing from a large codebase so it might take some time) https://github.com/llvm/llvm-project/pull/93258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

<    1   2   3   4   5   6   >