[clang] [clang-tools-extra] [clang-tidy] Warn about misuse of sizeof operator in loops. (PR #143205)

2025-06-12 Thread Baranov Victor via cfe-commits
@@ -164,6 +164,53 @@ int Test2(MyConstChar* A) { return sum; } +struct A { + int array[10]; +}; + +struct B { + struct A a; +}; + +void loop_access_elements(int num, struct B b) { +struct A arr[10]; +char buf[20]; + +// CHECK-MESSAGES: :[[@LINE+1]]:5: warning:

[clang] [clang-format] Fix an off-by-1 bug with -length option (PR #143302)

2025-06-12 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/143302 >From 68f668608d800c1411fd259be569bd3db36d1b12 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 8 Jun 2025 00:36:08 -0700 Subject: [PATCH] [clang-format] Fix an off-by-1 bug with -length option Also validate t

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-06-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/131804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add support for -mlong-calls code generation (PR #142982)

2025-06-12 Thread dong jianqiang via cfe-commits
dongjianqiang2 wrote: > > > My understanding is that this will make all calls to global functions > > > into long calls. > > > In AArch64 static linkes are required to insert range extension thunks > > > for out of range BLs. In the best case this is just another direct > > > branch, at wor

[clang] [clang-tools-extra] [clang-tidy] Warn about misuse of sizeof operator in loops. (PR #143205)

2025-06-12 Thread Congcong Cai via cfe-commits
@@ -219,6 +219,12 @@ Changes in existing checks tolerating fix-it breaking compilation when functions is used as pointers to avoid matching usage of functions within the current compilation unit. +- Improved :doc: `bugprone-sizeof-expression + ` check. + + Introduced WarnO

[clang] [clang-tools-extra] [clang-tidy] Warn about misuse of sizeof operator in loops. (PR #143205)

2025-06-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM exception release note and doc. https://github.com/llvm/llvm-project/pull/143205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang-tools-extra] [clang-tidy] Warn about misuse of sizeof operator in loops. (PR #143205)

2025-06-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/143205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Remove B and Zbc extension from Andes series cpus. (PR #144022)

2025-06-12 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. https://github.com/llvm/llvm-project/pull/144022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Implement LSP 3.17 positionEncoding (PR #142903)

2025-06-12 Thread via cfe-commits
https://github.com/someoneinjd updated https://github.com/llvm/llvm-project/pull/142903 >From 662bb44584d4b9a89692e16f376986a460cb5a2a Mon Sep 17 00:00:00 2001 From: someoneinjd Date: Thu, 5 Jun 2025 13:51:40 +0800 Subject: [PATCH] [clangd] Implement LSP 3.17 positionEncoding --- clang-tools-

[clang-tools-extra] [clangd] Implement LSP 3.17 positionEncoding (PR #142903)

2025-06-12 Thread via cfe-commits
https://github.com/someoneinjd updated https://github.com/llvm/llvm-project/pull/142903 >From 253df03ad468cb899778e6f9e25b55147e6aa7b3 Mon Sep 17 00:00:00 2001 From: someoneinjd Date: Thu, 5 Jun 2025 13:51:40 +0800 Subject: [PATCH] [clangd] Implement LSP 3.17 positionEncoding --- clang-tools-

[clang] [clang] Add managarm support (PR #139271)

2025-06-12 Thread Brad Smith via cfe-commits
brad0 wrote: @MaskRay https://github.com/llvm/llvm-project/pull/139271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Remove B and Zbc extension from Andes series cpus. (PR #144022)

2025-06-12 Thread Jim Lin via cfe-commits
https://github.com/tclin914 updated https://github.com/llvm/llvm-project/pull/144022 >From f1fdf9d521e1af3c0b96bedde95ac27d6ed3c58e Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Thu, 12 Jun 2025 15:18:09 +0800 Subject: [PATCH] [RISCV] Remove B and Zbc extension from Andes series cpus. The Andes

[clang] [llvm] [AArch64] Add support for -mlong-calls code generation (PR #142982)

2025-06-12 Thread dong jianqiang via cfe-commits
https://github.com/dongjianqiang2 updated https://github.com/llvm/llvm-project/pull/142982 >From cf005a3e475893da88dbee53701edf147997cfff Mon Sep 17 00:00:00 2001 From: dong jianqiang Date: Thu, 5 Jun 2025 22:46:26 +0800 Subject: [PATCH] [AArch64] Add support for -mlong-calls code generation MI

[clang] [llvm] [RISCV] Remove B and Zbc extension from Andes series cpus. (PR #144022)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jim Lin (tclin914) Changes The Andes CPU is configurable with optional extensions. The minimal required extension set does not include `B` and `Zbc` extensions. So we decided to remove them. --- Full diff: https://github.com/llvm/llvm-pr

[clang] [llvm] [RISCV] Remove B and Zbc extension from Andes series cpus. (PR #144022)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-backend-risc-v Author: Jim Lin (tclin914) Changes The Andes CPU is configurable with optional extensions. The minimal required extension set does not include `B` and `Zbc` extensions. So we decided to remove them. ---

[clang] [llvm] [RISCV] Remove B and Zbc extension from Andes series cpus. (PR #144022)

2025-06-12 Thread Jim Lin via cfe-commits
https://github.com/tclin914 created https://github.com/llvm/llvm-project/pull/144022 The Andes CPU is configurable with optional extensions. The minimal required extension set does not include `B` and `Zbc` extensions. So we decided to remove them. >From 3ac3e3ec2a9fb1f69e75969bde5eae1ebadb16

[clang] [llvm] [AArch64] Add support for -mlong-calls code generation (PR #142982)

2025-06-12 Thread dong jianqiang via cfe-commits
https://github.com/dongjianqiang2 updated https://github.com/llvm/llvm-project/pull/142982 >From e828099b2daa6c4f092b7428318fc9b12a85514d Mon Sep 17 00:00:00 2001 From: dong jianqiang Date: Thu, 5 Jun 2025 22:46:26 +0800 Subject: [PATCH] [AArch64] Add support for -mlong-calls code generation MI

[clang] 432d06a - [NFC][AMDGPU] Fix stale links to ROCm repositories (#143949)

2025-06-12 Thread via cfe-commits
Author: Saiyedul Islam Date: 2025-06-13T11:33:52+05:30 New Revision: 432d06ab919ae18c4ed1e94148448501578a6c85 URL: https://github.com/llvm/llvm-project/commit/432d06ab919ae18c4ed1e94148448501578a6c85 DIFF: https://github.com/llvm/llvm-project/commit/432d06ab919ae18c4ed1e94148448501578a6c85.diff

[clang] [llvm] [mlir] [NFC][AMDGPU] Fix stale links to ROCm repositories (PR #143949)

2025-06-12 Thread Saiyedul Islam via cfe-commits
https://github.com/saiislam closed https://github.com/llvm/llvm-project/pull/143949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add support for -mlong-calls code generation (PR #142982)

2025-06-12 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 HEAD~1 HEAD --extensions h,cpp -- clang/lib/Driver/ToolChains/Arch/AArch64.cpp llvm/

[clang] [Clang] Added explanation why `is_constructible` evaluated to false. (PR #143309)

2025-06-12 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM. Thanks a lot. Will you need us to merge that for you? https://github.com/llvm/llvm-project/pull/143309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 Thread Corentin Jabot via cfe-commits
@@ -15121,6 +15155,21 @@ ASTContext::baseForVTableAuthentication(const CXXRecordDecl *ThisClass) { return PrimaryBase; } +bool ASTContext::hasAddressDiscriminatedVTableAuthentication( cor3ntin wrote: `hasAddressDiscriminatedVTableAuthentication` https://g

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 Thread Corentin Jabot via cfe-commits
@@ -1705,6 +1705,40 @@ void ASTContext::setRelocationInfoForCXXRecord( RelocatableClasses.insert({D, Info}); } +bool ASTContext::containsAddressDiscriminatedPointerAuth(QualType T) { + if (!LangOpts.PointerAuthCalls && !LangOpts.PointerAuthIntrinsics) +return false; + +

[clang] [CIR] Function calls with aggregate arguments and return values (PR #143377)

2025-06-12 Thread Sirui Mu via cfe-commits
@@ -312,8 +329,47 @@ RValue CIRGenFunction::emitCall(const CIRGenFunctionInfo &funcInfo, assert(!cir::MissingFeatures::opCallBitcastArg()); cirCallArgs[argNo] = v; } else { - assert(!cir::MissingFeatures::opCallAggregateArgs()); - cgm.errorNYI("emitCa

[clang] [CIR] Function calls with aggregate arguments and return values (PR #143377)

2025-06-12 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/143377 >From f524308595a06833b7e58f0138f281c7da84 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Mon, 9 Jun 2025 18:35:08 +0800 Subject: [PATCH] [CIR] Function calls with aggregate arguments and return values This

[clang] [CIR] Function calls with aggregate arguments and return values (PR #143377)

2025-06-12 Thread Sirui Mu via cfe-commits
@@ -312,8 +329,47 @@ RValue CIRGenFunction::emitCall(const CIRGenFunctionInfo &funcInfo, assert(!cir::MissingFeatures::opCallBitcastArg()); cirCallArgs[argNo] = v; } else { - assert(!cir::MissingFeatures::opCallAggregateArgs()); - cgm.errorNYI("emitCa

[clang] [CIR] Function calls with aggregate arguments and return values (PR #143377)

2025-06-12 Thread via cfe-commits
@@ -312,8 +329,47 @@ RValue CIRGenFunction::emitCall(const CIRGenFunctionInfo &funcInfo, assert(!cir::MissingFeatures::opCallBitcastArg()); cirCallArgs[argNo] = v; } else { - assert(!cir::MissingFeatures::opCallAggregateArgs()); - cgm.errorNYI("emitCa

[clang] [CIR] Function calls with aggregate arguments and return values (PR #143377)

2025-06-12 Thread via cfe-commits
https://github.com/sm813471 deleted https://github.com/llvm/llvm-project/pull/143377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Function calls with aggregate arguments and return values (PR #143377)

2025-06-12 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/143377 >From e45c2ad46d7589ae1c7aa78b3ea19f7c6e5df094 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Mon, 9 Jun 2025 18:35:08 +0800 Subject: [PATCH] [CIR] Function calls with aggregate arguments and return values This

[clang] [Clang] Allow Finding across only parts of an AST. (PR #127423)

2025-06-12 Thread via cfe-commits
matts1 wrote: Can confirm that this approach appears to work. https://github.com/llvm/llvm-project/pull/127423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow Finding across only parts of an AST. (PR #127423)

2025-06-12 Thread via cfe-commits
https://github.com/matts1 closed https://github.com/llvm/llvm-project/pull/127423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Suppress gnu-line-marker when saving temps (PR #134621)

2025-06-12 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay commented: LGTM! https://github.com/llvm/llvm-project/pull/134621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement address sanitizer on AIX (PR #129925)

2025-06-12 Thread Fangrui Song via cfe-commits
@@ -1635,8 +1656,13 @@ bool tools::addSanitizerRuntimes(const ToolChain &TC, const ArgList &Args, } // If there is a static runtime with no dynamic list, force all the symbols // to be dynamic to be sure we export sanitizer interface functions. - if (AddExportDynamic) -

[clang] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-06-12 Thread Shafik Yaghmour via cfe-commits
@@ -5223,6 +5230,24 @@ enum EvalStmtResult { }; } +static bool EvaluateInitForDeclOfReferenceType(EvalInfo &Info, + const ValueDecl *D, + const Expr *Init, LValue &Result, +

[clang] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-06-12 Thread Shafik Yaghmour via cfe-commits
@@ -4426,7 +4431,7 @@ static CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, // Unless we're looking at a local variable or argument in a constexpr call, // the variable we're reading must be const. -if (!Frame) { +if (AK != clang::AK_Referen

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-06-12 Thread Shafik Yaghmour via cfe-commits
@@ -1547,6 +1547,58 @@ ExprResult Sema::ActOnTypeTrait(TypeTrait Kind, SourceLocation KWLoc, return BuildTypeTrait(Kind, KWLoc, ConvertedArgs, RParenLoc); } +bool Sema::BuiltinIsBaseOf(SourceLocation RhsTLoc, QualType LhsT, + QualType RhsT) { + //

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-06-12 Thread Shafik Yaghmour via cfe-commits
@@ -1547,6 +1547,58 @@ ExprResult Sema::ActOnTypeTrait(TypeTrait Kind, SourceLocation KWLoc, return BuildTypeTrait(Kind, KWLoc, ConvertedArgs, RParenLoc); } +bool Sema::BuiltinIsBaseOf(SourceLocation RhsTLoc, QualType LhsT, + QualType RhsT) { + //

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang` at step 6 "test-build-unified-tree-check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/30141 Here is the r

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-x86_64-debian-fast` running on `gribozavr4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/56/builds/28320 Here is the rel

[clang] [CIR] Change default assumption about allowing builtins (PR #144004)

2025-06-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Seems like a reasonable assumption for now. THOUGH, I wonder if we'd be better off at one point instead to figure out which ones we DO know how to handle, and use the 'nobuiltin' as a fallback instead? That way we can exercise the bui

[clang] [Clang] Explain why is_standard_layout evaluated to false (PR #143722)

2025-06-12 Thread Samarth Narang via cfe-commits
@@ -488,3 +488,83 @@ static_assert(__is_trivially_copyable(S12)); // expected-note@-1 {{'S12' is not trivially copyable}} \ // expected-note@#tc-S12 {{'S12' defined here}} } + +namespace standard_layout_tests { +struct WithVirtual { // #sl-Virtual + virtual void foo(); +};

[clang] [CIR] Upstream support for emitting constructors (PR #143639)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-debug-reverse-iteration` running on `linaro-flang-aarch64-debug-reverse-iteration` while building `clang` at step 6 "test-build-unified-tree-check-flang". Full details are available at: https://lab.llvm.org/bui

[clang] [Clang] Explain why is_standard_layout evaluated to false (PR #143722)

2025-06-12 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/143722 >From b92f63bcd8b9910278102353bed4db6b433629ce Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Mon, 2 Jun 2025 19:30:39 -0400 Subject: [PATCH 1/2] Add std layout diagnostics Add diagnostic test cases ---

[clang] [-Wunterminated-string-initialization] Handle C string literals ending with explicit '\0' (PR #143487)

2025-06-12 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/143487 >From 5825b324e47c78a939d8e62d1101e1574fd04638 Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Tue, 10 Jun 2025 15:50:10 +0800 Subject: [PATCH 1/5] [-Wunterminated-string-initialization] Handle C string li

[clang] [ASTReader] Remove assert in GetExternalDeclStmt (PR #143739)

2025-06-12 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > I think we shouldn't remove the assertion. Your test passes with the > > removal of the assertion since the initializers are not complex. So it ends > > quickly. But if it is a complex initialization which triggers more > > deserialization, I feel it will be problematic.

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/34690 Here is

[clang] 7232c07 - Reland [HIP] use offload wrapper for non-device-only non-rdc (#143964)

2025-06-12 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-06-12T21:41:41-04:00 New Revision: 7232c07eb97d5c21d47a661c9cca8981c7f91698 URL: https://github.com/llvm/llvm-project/commit/7232c07eb97d5c21d47a661c9cca8981c7f91698 DIFF: https://github.com/llvm/llvm-project/commit/7232c07eb97d5c21d47a661c9cca8981c7f91698.dif

[clang] 8890706 - Revert "Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (#143964)"

2025-06-12 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-06-12T21:33:05-04:00 New Revision: 8890706db67384a423773cc921302dd63d950ef5 URL: https://github.com/llvm/llvm-project/commit/8890706db67384a423773cc921302dd63d950ef5 DIFF: https://github.com/llvm/llvm-project/commit/8890706db67384a423773cc921302dd63d950ef5.dif

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-linux-multistage` running on `ppc64le-clang-multistage-test` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/builds/10425 Here is th

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-key-instructions` running on `sie-linux-worker5` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/208/builds/1948 Here

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-global-isel` running on `linaro-clang-aarch64-global-isel` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/125/builds/8357 Here is the

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 Thread Oliver Hunt via cfe-commits
@@ -628,10 +628,13 @@ class ASTContext : public RefCountedBase { getRelocationInfoForCXXRecord(const CXXRecordDecl *) const; void setRelocationInfoForCXXRecord(const CXXRecordDecl *, CXXRecordDeclRelocationInfo); + bool containsAddressD

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 Thread Oliver Hunt via cfe-commits
@@ -15121,6 +15155,21 @@ ASTContext::baseForVTableAuthentication(const CXXRecordDecl *ThisClass) { return PrimaryBase; } +bool ASTContext::hasAddressDiscriminatedVTableAuthentication( ojhunt wrote: Which function? https://github.com/llvm/llvm-project/pull

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 Thread Oliver Hunt via cfe-commits
@@ -1705,6 +1705,40 @@ void ASTContext::setRelocationInfoForCXXRecord( RelocatableClasses.insert({D, Info}); } +bool ASTContext::containsAddressDiscriminatedPointerAuth(QualType T) { + if (!LangOpts.PointerAuthCalls && !LangOpts.PointerAuthIntrinsics) +return false; + +

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/143969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Change default assumption about allowing builtins (PR #144004)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes The code to read the "nobuiltins" attributes hasn't been implemented yet, but we were defaulting to the assumption that use of builtins is allowed for function calls that we recognize as standard C libra

[clang] [CIR] Change default assumption about allowing builtins (PR #144004)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes The code to read the "nobuiltins" attributes hasn't been implemented yet, but we were defaulting to the assumption that use of builtins is allowed for function calls that we recognize as standard C library

[clang] [CIR] Change default assumption about allowing builtins (PR #144004)

2025-06-12 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/144004 The code to read the "nobuiltins" attributes hasn't been implemented yet, but we were defaulting to the assumption that use of builtins is allowed for function calls that we recognize as standard C library c

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/143969 >From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 12 Jun 2025 13:17:11 -0700 Subject: [PATCH 1/2] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-linux-test-suite` running on `ppc64le-clang-test-suite` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/95/builds/144

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 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 HEAD~1 HEAD --extensions cpp,h -- clang/test/SemaCXX/trivially-relocatable-ptrauth.cp

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/143969 >From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 12 Jun 2025 13:17:11 -0700 Subject: [PATCH 1/2] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-gcc-ubuntu` running on `sie-linux-worker3` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/19330 Her

[clang] [clang][scan-deps] Add option to disable caching stat failures (PR #144000)

2025-06-12 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 HEAD~1 HEAD --extensions cpp,h -- clang/include/clang/Tooling/DependencyScanning/Depe

[clang] [clang][scan-deps] Add option to disable caching stat failures (PR #144000)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Spencer (Bigcheese) Changes While the source code isn't supposed to change during a build, in some environments it does. This adds an option that disables caching of stat failures, meaning that source files can be added to the bui

[clang] [clang][scan-deps] Add option to disable caching stat failures (PR #144000)

2025-06-12 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/144000 While the source code isn't supposed to change during a build, in some environments it does. This adds an option that disables caching of stat failures, meaning that source files can be added to the build dur

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/143980 >From 3041ad6f68f4097dadf0870177eed4e749e915cc Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 4 Jun 2025 10:27:48 -0700 Subject: [PATCH 1/2] [CIR] Support for static variables This adds support for em

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/143964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 22f9b4a - Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (#143964)

2025-06-12 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-06-12T20:08:55-04:00 New Revision: 22f9b4aa1dad597d908be77be1e10ba4c77330ce URL: https://github.com/llvm/llvm-project/commit/22f9b4aa1dad597d908be77be1e10ba4c77330ce DIFF: https://github.com/llvm/llvm-project/commit/22f9b4aa1dad597d908be77be1e10ba4c77330ce.dif

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Erich Keane via cfe-commits
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { return emitAutoVarDecl(d); } +static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) { + if (cgm.getLangOpts().CPlusPlus) +return cgm.getMangledName(&d).str(); + + // If this

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Erich Keane via cfe-commits
@@ -208,8 +208,25 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { if (d.hasExternalStorage()) return; - if (d.getStorageDuration() != SD_Automatic) -cgm.errorNYI(d.getSourceRange(), "emitVarDecl automatic storage duration"); + if (d.getStorageDuration() !=

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/143964 >From ff3a9dd0765e499573d8d0049aca1d4568ac586f Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Wed, 11 Jun 2025 14:02:59 -0400 Subject: [PATCH 1/3] Revert "Revert "[HIP] use offload wrapper for non-devi

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Andy Kaylor via cfe-commits
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { return emitAutoVarDecl(d); } +static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) { + if (cgm.getLangOpts().CPlusPlus) +return cgm.getMangledName(&d).str(); + + // If this

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Andy Kaylor via cfe-commits
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { return emitAutoVarDecl(d); } +static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) { + if (cgm.getLangOpts().CPlusPlus) +return cgm.getMangledName(&d).str(); + + // If this

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Andy Kaylor via cfe-commits
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { return emitAutoVarDecl(d); } +static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) { + if (cgm.getLangOpts().CPlusPlus) +return cgm.getMangledName(&d).str(); + + // If this

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Andy Kaylor via cfe-commits
@@ -208,8 +208,25 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { if (d.hasExternalStorage()) return; - if (d.getStorageDuration() != SD_Automatic) -cgm.errorNYI(d.getSourceRange(), "emitVarDecl automatic storage duration"); + if (d.getStorageDuration() !=

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread Yaxun Liu via cfe-commits
@@ -9249,8 +9249,20 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA, // Add the linker arguments to be forwarded by the wrapper. CmdArgs.push_back(Args.MakeArgString(Twine("--linker-path=") + LinkCommand->getEx

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/143964 >From 5f3cc287ff2c3c84ba840ebaa0931773341a02b2 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Wed, 11 Jun 2025 14:02:59 -0400 Subject: [PATCH 1/3] Revert "Revert "[HIP] use offload wrapper for non-devi

[clang] [llvm] [mlir] [NFC][AMDGPU] Fix stale links to ROCm repositories (PR #143949)

2025-06-12 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/143949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reset FileID based diag state mappings (PR #143695)

2025-06-12 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: FWIW, I am seeing an assertion failure when running `check-clang` after this change. ``` $ cmake \ -B build \ -G Ninja \ -S llvm \ -Wno-dev \ -DCLANG_ENABLE_STATIC_ANALYZER=OFF \ -DCLANG_PLUGIN_SUPPORT=OFF \ -DCMAKE_BUILD_TYPE=Releas

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for requiring unwind v2 to be used (equivalent to MSVC's /d2epilogunwindrequirev2) (PR #143577)

2025-06-12 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello updated https://github.com/llvm/llvm-project/pull/143577 >From 082514ffe8cd9086d82cbe0a114dfc736b0518dc Mon Sep 17 00:00:00 2001 From: Daniel Paoliello Date: Fri, 6 Jun 2025 16:39:07 -0700 Subject: [PATCH 1/2] Add support for requiring Win x64 Unwind V2 --- clang

[clang] [CIR][NFC] Fix build problems with [[maybe_unused]] (PR #143994)

2025-06-12 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/143994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 32e1360 - [CIR][NFC] Fix build problems with [[maybe_unused]] (#143994)

2025-06-12 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-06-12T16:16:14-07:00 New Revision: 32e1360aaa9fbf5e388f9d061fa004b02c0a1359 URL: https://github.com/llvm/llvm-project/commit/32e1360aaa9fbf5e388f9d061fa004b02c0a1359 DIFF: https://github.com/llvm/llvm-project/commit/32e1360aaa9fbf5e388f9d061fa004b02c0a1359.diff L

[clang] [CIR][NFC] Fix build problems with [[maybe_unused]] (PR #143994)

2025-06-12 Thread Morris Hafner via cfe-commits
https://github.com/mmha approved this pull request. This fixes the build on my machine with clang 19.1. Thanks! https://github.com/llvm/llvm-project/pull/143994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [CIR][NFC] Fix build problems with [[maybe_unused]] (PR #143994)

2025-06-12 Thread Andy Kaylor via cfe-commits
andykaylor wrote: I should mention that the problem was introduced by https://github.com/llvm/llvm-project/pull/143932 Top-of-trunk clang doesn't report an error for this situation. https://github.com/llvm/llvm-project/pull/143994 ___ cfe-commits mai

[clang] [CIR][NFC] Fix build problems with [[maybe_unused]] (PR #143994)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes A recent commit introduced the use of [[maybe_unused]] following LLVM_PREFFERED_TYPE(bool) on a member variable declaration. I compiled it with clang 14.0, which doesn't support the `preferred_type` attr

[clang] [CIR][NFC] Fix build problems with [[maybe_unused]] (PR #143994)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes A recent commit introduced the use of [[maybe_unused]] following LLVM_PREFFERED_TYPE(bool) on a member variable declaration. I compiled it with clang 14.0, which doesn't support the `preferred_type` attrib

[clang] [CIR][NFC] Fix build problems with [[maybe_unused]] (PR #143994)

2025-06-12 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/143994 A recent commit introduced the use of [[maybe_unused]] following LLVM_PREFFERED_TYPE(bool) on a member variable declaration. I compiled it with clang 14.0, which doesn't support the `preferred_type` attribut

[clang] [flang] [llvm] Fix and reapply IR PGO support for Flang (PR #142892)

2025-06-12 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Thanks. I'll merge this tomorrow morning (my time), so I can keep an eye on the buildbots, just in case. https://github.com/llvm/llvm-project/pull/142892 ___ cfe-commits mailing list cfe-commi

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-12 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Other than the one comment, the frontend related parts LGTM, but please wait for someone more familiar with the OpenMP side of things. https://github.com/llvm/llvm-project/pull/143441 ___ cfe-

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-12 Thread Tarun Prabhu via cfe-commits
@@ -88,6 +88,44 @@ void fir::setTuneCPU(mlir::ModuleOp mod, llvm::StringRef cpu) { mod->setAttr(tuneCpuName, mlir::StringAttr::get(ctx, cpu)); } +static constexpr const char *amdgpuIgnoreDenormalModeName = +"fir.amdgpu.ignore.denormal.mode"; +void fir::setAmdgpuIgnoreDe

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-12 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/143441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-12 Thread Morris Hafner via cfe-commits
@@ -76,3 +76,21 @@ float constant_fp_builtin_single() { // OGCG: define {{.*}}float @_Z26constant_fp_builtin_singlev() // OGCG: ret float 0x3FB9A000 // OGCG: } + +void library_builtins() { + __builtin_printf(nullptr); mmha wrote: I added `builtin_prin

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-12 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/143984 >From c60378591a7d8d156306ff9c840aa319396c4f00 Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Fri, 13 Jun 2025 00:04:24 +0200 Subject: [PATCH 1/3] [CIR] Add Support For Library Builtins This patch upstreams sup

[clang] [clang] Add diagnostic for usage of implicit constructor with pointer to bool convertion (PR #143990)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Ralender) Changes This emits warnings for this code instead of silently creating a new B in place. ```c++ struct B { B(bool V) {} }; void test(const B& b); void test0(B* b) { test(b); // HERE } ``` --- Full diff: https://gith

[clang] [clang] Add diagnostic for usage of implicit constructor with pointer to bool convertion (PR #143990)

2025-06-12 Thread via cfe-commits
https://github.com/Ralender created https://github.com/llvm/llvm-project/pull/143990 This emits warnings for this code instead of silently creating a new B in place. ```c++ struct B { B(bool V) {} }; void test(const B& b); void test0(B* b) { test(b); // HERE } ``` >From f2744c89892d2803

[clang] [clang-format] Handle templates in qualified typenames (PR #143194)

2025-06-12 Thread Ben Dunkin via cfe-commits
@@ -3651,6 +3674,21 @@ static FormatToken *getFunctionName(const AnnotatedLine &Line, continue; } +// Skip past template typename declarations that may precede the +// constructor/destructor name bdunkin wrote: Done. https://github.com/llv

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread Yaxun Liu via cfe-commits
@@ -310,8 +310,8 @@ Error relocateOffloadSection(const ArgList &Args, StringRef Output) { // Remove the old .llvm.offloading section to prevent further linking. ObjcopyArgs.emplace_back("--remove-section"); ObjcopyArgs.emplace_back(".llvm.offloading"); - for (StringRef

[clang] [clang-format] Handle templates in qualified typenames (PR #143194)

2025-06-12 Thread Ben Dunkin via cfe-commits
https://github.com/bdunkin updated https://github.com/llvm/llvm-project/pull/143194 >From 839d068df748189470f2c69eb47714425de9524b Mon Sep 17 00:00:00 2001 From: Ben Dunkin Date: Fri, 6 Jun 2025 12:29:13 -0700 Subject: [PATCH] Fix identifiers not being marked as constructor/destructor names if

[clang] [clang-format] Handle templates in qualified typenames (PR #143194)

2025-06-12 Thread Ben Dunkin via cfe-commits
@@ -3659,9 +3697,23 @@ static FormatToken *getFunctionName(const AnnotatedLine &Line, } // Skip to the unqualified part of the name. -while (Tok->startsSequence(tok::identifier, tok::coloncolon)) { - assert(Tok->Next); - Tok = Tok->Next->Next; +while

  1   2   3   4   5   >