[clang] [llvm] [OpenMPIRBuilder][Clang][NFC] - Combine `emitOffloadingArrays` and `emitOffloadingArraysArgument` in OpenMPIRBuilder (PR #97088)

2024-07-22 Thread Pranav Bhandarkar via cfe-commits
@@ -9536,18 +9506,65 @@ static void emitTargetCallKernelLaunch( MEHandler.adjustMemberOfForLambdaCaptures( OMPBuilder, LambdaPointers, CombinedInfo.BasePointers, CombinedInfo.Pointers, CombinedInfo.Types); +} +static void +genMapInfo(MappableExprsHandler &MEHandle

[clang] [clang][headers] Including stddef.h always redefines NULL (PR #99727)

2024-07-22 Thread Ian Anderson via cfe-commits
@@ -20,19 +20,18 @@ * modules. */ #if defined(__MVS__) && __has_include_next() -#include <__stdarg_header_macro.h> #undef __need___va_list #undef __need_va_list #undef __need_va_arg #undef __need___va_copy #undef __need_va_copy +#include <__stdarg_header_macro.h> ---

[clang-tools-extra] 9d76231 - [clang-tidy] Ensure functions are anchored in the global namespace (for cert-err-33) (#99380)

2024-07-22 Thread via cfe-commits
Author: matthew-f Date: 2024-07-22T20:26:54+02:00 New Revision: 9d76231fcd3f6ddf9bd6aafe7f143404cad7e4a1 URL: https://github.com/llvm/llvm-project/commit/9d76231fcd3f6ddf9bd6aafe7f143404cad7e4a1 DIFF: https://github.com/llvm/llvm-project/commit/9d76231fcd3f6ddf9bd6aafe7f143404cad7e4a1.diff LOG

[clang-tools-extra] Ensure functions are anchored in the global namespace (for cert-err-33) (PR #99380)

2024-07-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/99380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test] Add missing test file to cmake (PR #99907)

2024-07-22 Thread Keith Smiley via cfe-commits
@@ -58,7 +58,7 @@ Bar s(1); DeductionGuideVisitor::Lang_CXX2a)); } -TEST(RecursiveASTVisitor, DeductionGuideImplicitMode) { +TEST(RecursiveASTVisitor, DISABLED_DeductionGuideImplicitMode) { DeductionGuideVisitor Visitor(/*ShouldVisitImplicitCode*/ true); Visitor.Ex

[clang] 2ef12b5 - [clang] Fix the broken DeductionGuide ToolingTests after c7bfc41860a6abe5c92dc5afb47348b0c9e69963

2024-07-22 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2024-07-22T20:31:25+02:00 New Revision: 2ef12b55b2a655262b03204581076522261d5eb3 URL: https://github.com/llvm/llvm-project/commit/2ef12b55b2a655262b03204581076522261d5eb3 DIFF: https://github.com/llvm/llvm-project/commit/2ef12b55b2a655262b03204581076522261d5eb3.diff LO

[clang] [clang][test] Add missing test file to cmake (PR #99907)

2024-07-22 Thread Haojian Wu via cfe-commits
@@ -58,7 +58,7 @@ Bar s(1); DeductionGuideVisitor::Lang_CXX2a)); } -TEST(RecursiveASTVisitor, DeductionGuideImplicitMode) { +TEST(RecursiveASTVisitor, DISABLED_DeductionGuideImplicitMode) { DeductionGuideVisitor Visitor(/*ShouldVisitImplicitCode*/ true); Visitor.Ex

[clang] [clang][headers] Including stddef.h always redefines NULL (PR #99727)

2024-07-22 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > These changes should come with a release note so users know about the fix. > > Does it need a release note? It was introduced in 19 with #90676, and this > will fix it in 19 too. Ah nope, no need for a release note then! https://github.com/llvm/llvm-project/pull/99727

[clang] [clang-tools-extra] [llvm] [mlir] [clang][lldb][mlir] Fix some identical sub-expressions warnings (NFC) (PR #95715)

2024-07-22 Thread Piotr Zegar via cfe-commits
@@ -96,7 +96,7 @@ bool areStatementsIdentical(const Stmt *FirstStmt, const Stmt *SecondStmt, if (FirstStmt == SecondStmt) return true; - if (FirstStmt->getStmtClass() != FirstStmt->getStmtClass()) + if (FirstStmt->getStmtClass() != SecondStmt->getStmtClass())

[clang] [clang][test] Add missing test file to cmake (PR #99907)

2024-07-22 Thread Keith Smiley via cfe-commits
https://github.com/keith updated https://github.com/llvm/llvm-project/pull/99907 >From 82a1e48e7643b552f898f6866f768a78ea3ba7da Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Mon, 22 Jul 2024 17:29:46 + Subject: [PATCH 1/2] [clang][test] Add missing test file to cmake Seems like this tes

[clang] [clang][headers] Including stddef.h always redefines NULL (PR #99727)

2024-07-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: With additional test coverage, the changes LGTM but I'd appreciate it if @zygoloid or @ChuanqiXu9 could validate the modules logic. https://github.com/llvm/llvm-project/pull/99727 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-07-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Option should be implemented properly, except that, looks fine https://github.com/llvm/llvm-project/pull/99477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-07-22 Thread Piotr Zegar via cfe-commits
@@ -129,15 +131,25 @@ void MissingStdForwardCheck::registerMatchers(MatchFinder *Finder) { unless(anyOf(hasAncestor(typeLoc()), hasAncestor(expr(hasUnevaluatedContext()); + auto StaticCast = + Options.get("IgnoreStaticCasts", false)

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

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

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-07-22 Thread Piotr Zegar via cfe-commits
@@ -38,3 +38,14 @@ Example: This check implements `F.19 `_ from the C++ Core Guidelines. + + +Options +--- + +.. option:: IgnoreStaticCasts + +Boolean flag to allow users who want to use the forwarding

[clang-tools-extra] [libc] clang-tidy: readability-redundant-smartptr-get does not remove -> (#97964) (PR #98757)

2024-07-22 Thread Piotr Zegar via cfe-commits
@@ -235,3 +276,13 @@ void Negative() { if (MACRO(x) == nullptr) ; } + +void test_redundant_get() { + std::vector> v; + auto f = [](int) {}; + for (auto i = v.begin(); i != v.end(); ++i) { +f(*i->get()); PiotrZSL wrote: add method getValue in examp

[clang] [ASTContext] Add a break to nested switch in `encodeTypeForFunctionPointerAuth` (PR #99763)

2024-07-22 Thread Brandon Wu via cfe-commits
@@ -3363,6 +3363,7 @@ static void encodeTypeForFunctionPointerAuth(const ASTContext &Ctx, #include "clang/Basic/RISCVVTypes.def" llvm_unreachable("not yet implemented"); } +break; 4vtomat wrote: I also agree with you that it should not reach the

[clang] [clang][test] Add missing test file to cmake (PR #99907)

2024-07-22 Thread Keith Smiley via cfe-commits
@@ -58,7 +58,7 @@ Bar s(1); DeductionGuideVisitor::Lang_CXX2a)); } -TEST(RecursiveASTVisitor, DeductionGuideImplicitMode) { +TEST(RecursiveASTVisitor, DISABLED_DeductionGuideImplicitMode) { DeductionGuideVisitor Visitor(/*ShouldVisitImplicitCode*/ true); Visitor.Ex

[clang-tools-extra] [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (PR #99773)

2024-07-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Except bug in release notes looks fine for me. https://github.com/llvm/llvm-project/pull/99773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang-tools-extra] [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (PR #99773)

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

[clang-tools-extra] [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (PR #99773)

2024-07-22 Thread Piotr Zegar via cfe-commits
@@ -245,6 +245,10 @@ Changes in existing checks where source is already a ``void``` pointer, making middle ``void`` pointer casts bug-free. +- Improved :doc:`exception-escape ` + check to correctly detect exception handler of type ``CV void *`` as catching all + ``CV`

[clang-tools-extra] [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (PR #99773)

2024-07-22 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/99773 From ebf1c6996f18cbd706ec3d76a1887c58c9ce3230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Sat, 20 Jul 2024 20:12:45 +0200 Subject: [PATCH 1/2] [clang-tidy] `bugprone-exception-

[clang] [llvm] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-07-22 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > and lack of upstream runtime linker (rtld) support > > @MaskRay We actually have proof-of-concept support for musl > [access-softek/musl@cbf25fb](https://github.com/access-softek/musl/commit/cbf25fbb2aaff125e232d5126dce7936f70a6453) > (probably not ready for meaningful produ

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-22 Thread via cfe-commits
https://github.com/azhan92 updated https://github.com/llvm/llvm-project/pull/99511 >From 52100e3378c86eddb9a4757f8f3e175804a6dc76 Mon Sep 17 00:00:00 2001 From: Alison Zhang Date: Thu, 18 Jul 2024 10:27:40 -0400 Subject: [PATCH 01/10] Add support for -mcpu=pwr11 / -mtune=pwr11 --- clang/lib/B

[clang-tools-extra] 52dd4db - [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (#99773)

2024-07-22 Thread via cfe-commits
Author: Hana Dusíková Date: 2024-07-22T20:49:25+02:00 New Revision: 52dd4dbb1ad30ed057c532148cc95f34efe34aa0 URL: https://github.com/llvm/llvm-project/commit/52dd4dbb1ad30ed057c532148cc95f34efe34aa0 DIFF: https://github.com/llvm/llvm-project/commit/52dd4dbb1ad30ed057c532148cc95f34efe34aa0.diff

[clang-tools-extra] [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (PR #99773)

2024-07-22 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot closed https://github.com/llvm/llvm-project/pull/99773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 50c4e03 - [clang][test] Add missing test file to cmake (#99907)

2024-07-22 Thread via cfe-commits
Author: Keith Smiley Date: 2024-07-22T11:49:37-07:00 New Revision: 50c4e0392a42d1203fc17339c86216d7c378b21f URL: https://github.com/llvm/llvm-project/commit/50c4e0392a42d1203fc17339c86216d7c378b21f DIFF: https://github.com/llvm/llvm-project/commit/50c4e0392a42d1203fc17339c86216d7c378b21f.diff

[clang] [clang][test] Add missing test file to cmake (PR #99907)

2024-07-22 Thread Keith Smiley via cfe-commits
https://github.com/keith closed https://github.com/llvm/llvm-project/pull/99907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement f16x8.replace_lane instruction. (PR #99388)

2024-07-22 Thread Derek Schuff via cfe-commits
@@ -702,6 +702,19 @@ defm "" : ReplaceLane; defm "" : ReplaceLane; defm "" : ReplaceLane; +// For now use an instrinsic for f16x8.replace_lane instead of ReplaceLane above +// since LL generated with half type arguments is not well supported and creates dsch

[clang-tools-extra] [libc] clang-tidy: readability-redundant-smartptr-get does not remove -> (#97964) (PR #98757)

2024-07-22 Thread via cfe-commits
@@ -235,3 +276,13 @@ void Negative() { if (MACRO(x) == nullptr) ; } + +void test_redundant_get() { + std::vector> v; + auto f = [](int) {}; + for (auto i = v.begin(); i != v.end(); ++i) { +f(*i->get()); akshaykumars614 wrote: can you give example

[clang] [llvm] [WebAssembly] Implement f16x8.replace_lane instruction. (PR #99388)

2024-07-22 Thread Derek Schuff via cfe-commits
https://github.com/dschuff approved this pull request. otherwise LGTM https://github.com/llvm/llvm-project/pull/99388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][performance-unnecessary-value-param] Make `handleMoveFix` virtual (PR #99867)

2024-07-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Please note that at any time in future those functions could be changed no non-virtual again, as there are no tests to guard this. I'm fine with the change, as it provides tiny refactoring. https://github.com/llvm/llvm-project/pull/99867 _

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-07-22 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Looks like there are still some merge conflicts, duplicated lines and so on. https://github.com/llvm/llvm-project/pull/67467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-22 Thread Oliver Hunt via cfe-commits
@@ -71,6 +71,15 @@ void has_ptrauth_vtable_pointer_type_discrimination() {} void no_ptrauth_vtable_pointer_type_discrimination() {} #endif +// This is always enabled when ptrauth_calls is enabled, on new enough clangs. ojhunt wrote: Weird mismerge I guess? -

[clang] [ASTContext] Add a break to nested switch in `encodeTypeForFunctionPointerAuth` (PR #99763)

2024-07-22 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/99763 >From f4292accb12bcd2dbe951079cf2601f867bb4f96 Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Sat, 20 Jul 2024 07:27:53 -0700 Subject: [PATCH] [ASTContext] Make the end of the switch unreachable in `encodeTypeF

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-22 Thread Oliver Hunt via cfe-commits
@@ -1036,9 +1155,32 @@ llvm::Constant *ItaniumCXXABI::BuildMemberPointer(const CXXMethodDecl *MD, // least significant bit of adj then makes exactly the same // discrimination as the least significant bit of ptr does for // Itanium. - MemPtr[0] = l

[clang] [ASTContext] Make the end of the switch unreachable in `encodeTypeForFunctionPointerAuth` (PR #99763)

2024-07-22 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat edited https://github.com/llvm/llvm-project/pull/99763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASTContext] Make the end of the switch case unreachable in `encodeTypeForFunctionPointerAuth` (PR #99763)

2024-07-22 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat edited https://github.com/llvm/llvm-project/pull/99763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASTContext] Make the end of the switch case unreachable in `encodeTypeForFunctionPointerAuth` (PR #99763)

2024-07-22 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/99763 >From 1ca71c8ed8b9f0cee9887ad81c03fd6a502f Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Sat, 20 Jul 2024 07:27:53 -0700 Subject: [PATCH] [ASTContext] Make the end of the switch case unreachable in `encode

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-22 Thread Fangrui Song via cfe-commits
@@ -1721,11 +1721,13 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { Diag(Tok.getLocation(), diag::warn_pp_date_time); // MSVC, ICC, GCC, VisualAge C++ extension. The generated string should be // of the form "Ddd Mmm dd hh::mm::ss ", which is returned b

[clang] [Clang] Introduce 'clang-nvlink-wrapper' to work around 'nvlink' (PR #96561)

2024-07-22 Thread Joseph Huber via cfe-commits
jhuber6 wrote: ping https://github.com/llvm/llvm-project/pull/96561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Draft: Create a new check to look for mis-use in calls that take iterators (PR #99917)

2024-07-22 Thread Nathan James via cfe-commits
https://github.com/njames93 created https://github.com/llvm/llvm-project/pull/99917 Looks for various patterns of functions that take arguments calling begin/end or similar for common mistakes. Still needs a bit of work, but open to suggestions of how this check could be improved >From a8eb

[clang-tools-extra] Draft: Create a new check to look for mis-use in calls that take iterators (PR #99917)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Nathan James (njames93) Changes Looks for various patterns of functions that take arguments calling begin/end or similar for common mistakes. Still needs a bit of work, but open to suggestions of how this check could be improved -

[clang-tools-extra] Draft: Create a new check to look for mis-use in calls that take iterators (PR #99917)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Nathan James (njames93) Changes Looks for various patterns of functions that take arguments calling begin/end or similar for common mistakes. Still needs a bit of work, but open to suggestions of how this check could be impro

[clang] [llvm] [RISCV] Mark zacas as experimental again due to unresolved ABI issue (PR #99898)

2024-07-22 Thread Alex Bradbury via cfe-commits
https://github.com/asb updated https://github.com/llvm/llvm-project/pull/99898 >From 7862d7e5fc63749f68bfdc0f0d8c226d341c55e1 Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Mon, 22 Jul 2024 17:58:05 +0100 Subject: [PATCH 1/2] [RISCV] Mark zacas as experimental again due to unresolved ABI is

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -71,6 +71,15 @@ void has_ptrauth_vtable_pointer_type_discrimination() {} void no_ptrauth_vtable_pointer_type_discrimination() {} #endif +// This is always enabled when ptrauth_calls is enabled, on new enough clangs. kovdan01 wrote: > Weird mismerge I guess

[clang-tools-extra] Draft: Create a new check to look for mis-use in calls that take iterators (PR #99917)

2024-07-22 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 e77a01d79a48e15c94c89e4aa4bd27424a96b49b a8eb65dd46e9fff572963cc980bf5ea582085ef1 --e

[clang] [llvm] [RISCV] Mark zacas as experimental again due to unresolved ABI issue (PR #99898)

2024-07-22 Thread Alex Bradbury via cfe-commits
asb wrote: > Please update this line :) > > https://github.com/llvm/llvm-project/blob/90569e02e63ff5d0915446919f564e9b3638fe2a/llvm/lib/TargetParser/Host.cpp#L2070 I've tentatively removed the line, on the basis that even when requesting "native" detection, the user probably doesn't want exper

[clang] thread-safety: Support the new capability-based names for all related attributes. (PR #99919)

2024-07-22 Thread Pierre d'Herbemont via cfe-commits
https://github.com/pdherbemont created https://github.com/llvm/llvm-project/pull/99919 For some reason some attributes weren't renamed in code but were documented with the new names. I am not sure why this was the case and maybe I am missing something. Those are: - scoped_lockable -> scoped_cap

[clang] thread-safety: Support the new capability-based names for all related attributes. (PR #99919)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis @llvm/pr-subscribers-clang Author: Pierre d'Herbemont (pdherbemont) Changes For some reason some attributes weren't renamed in code but were documented with the new names. I am not sure why this was the case and maybe I am missing somethin

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -1036,9 +1155,32 @@ llvm::Constant *ItaniumCXXABI::BuildMemberPointer(const CXXMethodDecl *MD, // least significant bit of adj then makes exactly the same // discrimination as the least significant bit of ptr does for // Itanium. - MemPtr[0] = l

[clang-tools-extra] Draft: Create a new check to look for mis-use in calls that take iterators (PR #99917)

2024-07-22 Thread Piotr Zegar via cfe-commits
@@ -400,15 +401,14 @@ Clang-Tidy Checks :doc:`readability-use-std-min-max `, "Yes" :doc:`zircon-temporary-objects `, -Check aliases -- -.. csv-table:: +.. csv-table:: Aliases.. :header: "Name", "Redirect", "Offers fixes" :doc:`bugprone-narrowing-c

[clang-tools-extra] [libc] clang-tidy: readability-redundant-smartptr-get does not remove -> (#97964) (PR #98757)

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

[clang-tools-extra] [libc] clang-tidy: readability-redundant-smartptr-get does not remove -> (#97964) (PR #98757)

2024-07-22 Thread Piotr Zegar via cfe-commits
@@ -235,3 +276,13 @@ void Negative() { if (MACRO(x) == nullptr) ; } + +void test_redundant_get() { + std::vector> v; + auto f = [](int) {}; + for (auto i = v.begin(); i != v.end(); ++i) { +f(*i->get()); PiotrZSL wrote: `f(i->get()->get()->getValue

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-22 Thread David Tenty via cfe-commits
https://github.com/daltenty approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/99511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Add metadata for load from reference (PR #98746)

2024-07-22 Thread John McCall via cfe-commits
@@ -2799,9 +2799,37 @@ CodeGenFunction::EmitLoadOfReference(LValue RefLVal, llvm::LoadInst *Load = Builder.CreateLoad(RefLVal.getAddress(), RefLVal.isVolatile()); CGM.DecorateInstructionWithTBAA(Load, RefLVal.getTBAAInfo()); - return makeNaturalAddressForPointer(Load

[clang] [Clang][CodeGen] Add metadata for load from reference (PR #98746)

2024-07-22 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/98746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 04d5003 - [clang-tidy][DOC] Update check documentation

2024-07-22 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2024-07-22T19:31:00Z New Revision: 04d5003f59c1ef10a036d2158f1aa61de506e707 URL: https://github.com/llvm/llvm-project/commit/04d5003f59c1ef10a036d2158f1aa61de506e707 DIFF: https://github.com/llvm/llvm-project/commit/04d5003f59c1ef10a036d2158f1aa61de506e707.diff LOG: [

[clang] [clang][headers] Including stddef.h always redefines NULL (PR #99727)

2024-07-22 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/99727 >From 58361b689ba66c5cc7142e22843d5a08471ad3e0 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Fri, 19 Jul 2024 17:53:44 -0700 Subject: [PATCH] [clang][headers] Including stddef.h always redefines NUL

[clang] [clang][headers] Including stddef.h always redefines NULL (PR #99727)

2024-07-22 Thread Ian Anderson via cfe-commits
@@ -20,19 +20,18 @@ * modules. */ #if defined(__MVS__) && __has_include_next() -#include <__stdarg_header_macro.h> #undef __need___va_list #undef __need_va_list #undef __need_va_arg #undef __need___va_copy #undef __need_va_copy +#include <__stdarg_header_macro.h> ---

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-22 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/99655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][headers] Including stddef.h always redefines NULL (PR #99727)

2024-07-22 Thread Ian Anderson via cfe-commits
@@ -49,7 +48,25 @@ #define __need_rsize_t #endif #define __need_wchar_t +#if !defined(__STDDEF_H) && !__building_module(_Builtin_stddef) ian-twilightcoder wrote: clang/test/Modules/stddef.cpp shows how even if we've already had a full include of the entirety

[clang] [llvm] Revert "[PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE t… (PR #99711)

2024-07-22 Thread David Blaikie via cfe-commits
dwblaikie wrote: also, if you're sending a pull request just because it's convenient (via the web UI "revert" button) or to run presubmits but not for review, please include the skip-presubmit-approval label so it's clear something isn't getting committed without needed review https://github.

[clang-tools-extra] [clang-tidy] fix misc-const-correctness to work with function-try-blocks (PR #99925)

2024-07-22 Thread Thomas Schenker via cfe-commits
https://github.com/schenker created https://github.com/llvm/llvm-project/pull/99925 Make the clang-tidy check misc-const-correctness work with function-try-blocks. Fixes #99860. >From f16be0b63d6cd9728354c5f71cf3831482b6ec25 Mon Sep 17 00:00:00 2001 From: Thomas Schenker Date: Mon, 22 Jul 202

[clang-tools-extra] [clang-tidy] fix misc-const-correctness to work with function-try-blocks (PR #99925)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Thomas Schenker (schenker) Changes Make the clang-tidy check misc-const-correctness work with function-try-blocks. Fixes #99860. --- Full diff: https://github.com/llvm/llvm-project/pull/99925.di

[clang] Remove FiniteMathOnly and use only NoHonorINFs and NoHonorNANs. (PR #97342)

2024-07-22 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/97342 >From aea6519809340024226d587303e26c800c1a3756 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Mon, 1 Jul 2024 12:56:07 -0700 Subject: [PATCH 01/14] [NFC] Add assertion to ensure that FiniteMathOnly to

[clang] Remove FiniteMathOnly and use only NoHonorINFs and NoHonorNANs. (PR #97342)

2024-07-22 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/97342 >From aea6519809340024226d587303e26c800c1a3756 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Mon, 1 Jul 2024 12:56:07 -0700 Subject: [PATCH 01/13] [NFC] Add assertion to ensure that FiniteMathOnly to

[clang-tools-extra] [clang-tidy] fix misc-const-correctness to work with function-try-blocks (PR #99925)

2024-07-22 Thread Piotr Zegar via cfe-commits
@@ -120,6 +120,9 @@ Improvements to clang-tidy - Improved :program:`check_clang_tidy.py` script. Added argument `-export-fixes` to aid in clang-tidy and test development. +- Improved :doc:`misc-const-correctness PiotrZSL wrote: wrong place, this should be

[clang] [clang][driver][clang-cl] Support `--precompile` and `-fmodule-*` options in Clang-CL (PR #98761)

2024-07-22 Thread Sharadh Rajaraman via cfe-commits
https://github.com/sharadhr updated https://github.com/llvm/llvm-project/pull/98761 >From 1fed92a00f0d732a2575861c2bf6a6d053407255 Mon Sep 17 00:00:00 2001 From: Sharadh Rajaraman Date: Sat, 13 Jul 2024 19:25:47 +0100 Subject: [PATCH 1/6] Allow `--precompile` and `-fprebuilt-module-path` to be

[clang-tools-extra] [clang-tidy] fix misc-const-correctness to work with function-try-blocks (PR #99925)

2024-07-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Release notes need small fix, except that looks fine https://github.com/llvm/llvm-project/pull/99925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [llvm] [OpenMP] Ensure the actual kernel is annotated with launch bounds (PR #99927)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Johannes Doerfert (jdoerfert) Changes In debug mode there is a wrapper (the kernel) around the function in which we generate the kernel code. We worked around this before to get the correct kernel name, but now we really distingui

[clang] [clang][driver][clang-cl] Support `--precompile` and `-fmodule-*` options in Clang-CL (PR #98761)

2024-07-22 Thread Sharadh Rajaraman via cfe-commits
@@ -0,0 +1,65 @@ +// REQUIRES: system-windows + +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t + +// RUN: %clang_cl /std:c++20 --precompile "%/t/Hello.cppm" "/Fo%/t/Hello.pcm" sharadhr wrote: So, I've tried to write the test like you've suggest

[clang-tools-extra] [clang-tidy] fix misc-const-correctness to work with function-try-blocks (PR #99925)

2024-07-22 Thread Thomas Schenker via cfe-commits
https://github.com/schenker updated https://github.com/llvm/llvm-project/pull/99925 >From f16be0b63d6cd9728354c5f71cf3831482b6ec25 Mon Sep 17 00:00:00 2001 From: Thomas Schenker Date: Mon, 22 Jul 2024 21:39:28 +0200 Subject: [PATCH 1/2] improve clang-tidy misc-const-correctness to work with fu

[clang-tools-extra] [clang-tidy] fix misc-const-correctness to work with function-try-blocks (PR #99925)

2024-07-22 Thread Thomas Schenker via cfe-commits
@@ -120,6 +120,9 @@ Improvements to clang-tidy - Improved :program:`check_clang_tidy.py` script. Added argument `-export-fixes` to aid in clang-tidy and test development. +- Improved :doc:`misc-const-correctness schenker wrote: done https://github.com/llv

[clang] [llvm] [OpenMP] Ensure the actual kernel is annotated with launch bounds (PR #99927)

2024-07-22 Thread Joseph Huber via cfe-commits
@@ -4569,7 +4569,17 @@ OpenMPIRBuilder::createTargetInit(const LocationDescription &Loc, bool IsSPMD, Constant *MayUseNestedParallelismVal = ConstantInt::getSigned(Int8, true); Constant *DebugIndentionLevelVal = ConstantInt::getSigned(Int16, 0); - Function *Kernel = Buil

[clang] [llvm] [CodeGen][AArch64][FMV] PAC the stub_helper's frame on arm64e (PR #84704)

2024-07-22 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/84704 >From b352a41e1788819afbb15a5b6d79cbf2968dc5dc Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Sun, 10 Mar 2024 16:46:50 -0700 Subject: [PATCH 1/3] [CodeGen][AArch64][FMV] PAC the stub_helper's frame on arm64e

[clang] [llvm] [CodeGen][AArch64][FMV] PAC the stub_helper's frame on arm64e (PR #84704)

2024-07-22 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 bee2654300a8f524e05dd4cad41411d597246ac0 492d65f2bb5cea2ae3492cf8634684aeb8146b54 --e

[clang-tools-extra] [clang-tidy] fix misc-const-correctness to work with function-try-blocks (PR #99925)

2024-07-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/99925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][headers] Including stddef.h always redefines NULL (PR #99727)

2024-07-22 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/99727 >From 29915cdec1c596767f63eb164cf96180dfcd3bc7 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Fri, 19 Jul 2024 17:53:44 -0700 Subject: [PATCH] [clang][headers] Including stddef.h always redefines NUL

[clang] [clang][headers] Including stddef.h always redefines NULL (PR #99727)

2024-07-22 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/99727 >From af616b8a6406636f9ac91b1a5b92194315012ba1 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Fri, 19 Jul 2024 17:53:44 -0700 Subject: [PATCH] [clang][headers] Including stddef.h always redefines NUL

[clang] [llvm] [OpenMP] Ensure the actual kernel is annotated with launch bounds (PR #99927)

2024-07-22 Thread Johannes Doerfert via cfe-commits
@@ -4569,7 +4569,17 @@ OpenMPIRBuilder::createTargetInit(const LocationDescription &Loc, bool IsSPMD, Constant *MayUseNestedParallelismVal = ConstantInt::getSigned(Int8, true); Constant *DebugIndentionLevelVal = ConstantInt::getSigned(Int16, 0); - Function *Kernel = Buil

[clang] [llvm] [OpenMP] Ensure the actual kernel is annotated with launch bounds (PR #99927)

2024-07-22 Thread Joseph Huber via cfe-commits
@@ -4569,7 +4569,17 @@ OpenMPIRBuilder::createTargetInit(const LocationDescription &Loc, bool IsSPMD, Constant *MayUseNestedParallelismVal = ConstantInt::getSigned(Int8, true); Constant *DebugIndentionLevelVal = ConstantInt::getSigned(Int16, 0); - Function *Kernel = Buil

[clang] [llvm] [OpenMP] Ensure the actual kernel is annotated with launch bounds (PR #99927)

2024-07-22 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. I guess we did this debugging stuff before, so nothing really changed here. https://github.com/llvm/llvm-project/pull/99927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [clang][headers] Including stddef.h always redefines NULL (PR #99727)

2024-07-22 Thread Richard Smith via cfe-commits
@@ -49,7 +48,24 @@ #define __need_rsize_t #endif #define __need_wchar_t +#if !defined(__STDDEF_H) || __has_feature(modules) +/* + * __stddef_null.h is special when building without modules: if __need_NULL is + * set, then it will unconditionally redefine NULL. To avoid stepping

[clang-tools-extra] d48d480 - [clang-tidy][NFC] Fix tiny bug in areStatementsIdentical

2024-07-22 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2024-07-22T20:46:48Z New Revision: d48d4805f792adbdac58d480f890449def4964ea URL: https://github.com/llvm/llvm-project/commit/d48d4805f792adbdac58d480f890449def4964ea DIFF: https://github.com/llvm/llvm-project/commit/d48d4805f792adbdac58d480f890449def4964ea.diff LOG: [

[clang-tools-extra] [libc] clang-tidy: readability-redundant-smartptr-get does not remove -> (#97964) (PR #98757)

2024-07-22 Thread via cfe-commits
@@ -235,3 +276,13 @@ void Negative() { if (MACRO(x) == nullptr) ; } + +void test_redundant_get() { + std::vector> v; + auto f = [](int) {}; + for (auto i = v.begin(); i != v.end(); ++i) { +f(*i->get()); akshaykumars614 wrote: struct Inner { int

[clang] Fix issue https://github.com/llvm/llvm-project/issues/98018. (PR #99672)

2024-07-22 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/99672 >From 452bc424b7e6d63c50af1ed8f3623ad84e9b091c Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Fri, 19 Jul 2024 10:31:18 -0700 Subject: [PATCH 1/2] Fix issue https://github.com/llvm/llvm-project/issues

[clang] [Clang][Driver] Warn about `-c/-S` with `-fsyntax-only` (PR #98607)

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

[clang] [llvm] [PowerPC] Add builtin_cpu_is P11 support (PR #99550)

2024-07-22 Thread via cfe-commits
https://github.com/azhan92 updated https://github.com/llvm/llvm-project/pull/99550 >From a2cf264bc8b08364544407650c630c11a475fcab Mon Sep 17 00:00:00 2001 From: Alison Zhang Date: Thu, 18 Jul 2024 14:32:30 -0400 Subject: [PATCH 1/2] support P11 with builtin_cpu_is --- clang/test/CodeGen/aix-b

[clang] Fix issue https://github.com/llvm/llvm-project/issues/98018. (PR #99672)

2024-07-22 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 f6e01b9ece1e73f6eda6e1dbff3aa72e917f4007 523f73d029f83b6454ec656042a3fc2c97e72c05 --e

[clang] Template Diagnostic Improvements (PR #99933)

2024-07-22 Thread Braden Helmer via cfe-commits
https://github.com/bradenhelmer created https://github.com/llvm/llvm-project/pull/99933 This is for #17959. It turns out `SemaTemplate` handles this type of diagnostic already, however when template gets encountered, it never gets parsed as a possible statement or declaration, only as an ex

[clang] Template Diagnostic Improvements (PR #99933)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Braden Helmer (bradenhelmer) Changes This is for #17959. It turns out `SemaTemplate` handles this type of diagnostic already, however when template gets encountered, it never gets parsed as a possible statement or declaration, only as

[clang] [CLANG] Emit warning in finite math mode when INF and NAN are used. (PR #99672)

2024-07-22 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/99672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][PAC] Sign block addresses used in indirectbr. (PR #97647)

2024-07-22 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl requested changes to this pull request. https://github.com/llvm/llvm-project/pull/97647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][PAC] Sign block addresses used in indirectbr. (PR #97647)

2024-07-22 Thread Anton Korobeynikov via cfe-commits
@@ -10685,6 +10689,26 @@ SDValue AArch64TargetLowering::LowerBR_JT(SDValue Op, return DAG.getNode(ISD::BRIND, DL, MVT::Other, JTInfo, SDValue(Dest, 0)); } +SDValue AArch64TargetLowering::LowerBRIND(SDValue Op, SelectionDAG &DAG) const { + MachineFunction &MF = DAG.getMachi

[clang] [SPARC][clang] Add -m(no-)v8plus flags handling (PR #98713)

2024-07-22 Thread Fangrui Song via cfe-commits
@@ -179,6 +179,13 @@ void sparc::getSparcTargetFeatures(const Driver &D, const ArgList &Args, Features.push_back("-hard-quad-float"); } + if (Arg *A = Args.getLastArg(options::OPT_mv8plus, options::OPT_mno_v8plus)) { +if (A->getOption().matches(options::OPT_mv8p

[clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

2024-07-22 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: Do we have to fix this just to appease gcc 9.2? It looks like newer versions of gcc (after 9.3) don't emit the warning. https://github.com/llvm/llvm-project/pull/93906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [CLANG] Emit warning in finite math mode when INF and NAN are used. (PR #99672)

2024-07-22 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/99672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG] Emit warning in finite math mode when INF and NAN are used. (PR #99672)

2024-07-22 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/99672 >From 452bc424b7e6d63c50af1ed8f3623ad84e9b091c Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Fri, 19 Jul 2024 10:31:18 -0700 Subject: [PATCH 1/3] Fix issue https://github.com/llvm/llvm-project/issues

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-22 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/99576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   7   >