[clang] [flang] [flang][Driver] Support -nostdlib and -nodefaultlibs (PR #108868)

2024-09-16 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/108868 This partially addresses some requests in #89888 >From 612b93eda5695306293bb8ca6e27a810b06adf3d Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Mon, 16 Sep 2024 12:08:38 -0600 Subject: [PATCH] [flang][Dri

[clang] [flang] [flang][Driver] Support -nostdlib and -nodefaultlibs (PR #108868)

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-powerpc Author: Tarun Prabhu (tarunprabhu) Changes This partially addresses some requests in #89888 --- Full diff: https://github.com/llvm/llvm-project/pull/108868.diff 13 Files Affe

[clang] [Clang] Do not perform integral promotion if operands of expression `x ? : y` have the same type (PR #108837)

2024-09-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/108837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not perform integral promotion if operands of expression `x ? : y` have the same type (PR #108837)

2024-09-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I too am very concerned about the lack of tests here, there are some disappearing conditions I cannot help but think are there for a good reason, and would like to see some study as to why those where there and when. I'm also concerned about the constex

[clang] [Clang] Do not perform integral promotion if operands of expression `x ? : y` have the same type (PR #108837)

2024-09-16 Thread Erich Keane via cfe-commits
@@ -8785,14 +8785,11 @@ ExprResult Sema::ActOnConditionalOp(SourceLocation QuestionLoc, commonExpr = result.get(); } // We usually want to apply unary conversions *before* saving, except -// in the special case of a C++ l-value conditional. -if (!(getLang

[clang] [Clang] Do not perform integral promotion if operands of expression `x ? : y` have the same type (PR #108837)

2024-09-16 Thread Erich Keane via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s -fexperimental-new-constant-interpreter erichkeane wrote: Should run with BOTH constexpr interpreters. https://github.com/llvm/llvm-

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-16 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/108474 >From a1783d336a915c64af3533566b470ac3d55e4297 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Thu, 12 Sep 2024 17:13:57 -0700 Subject: [PATCH] [Clang] Propagate elide safe context through [[clang::coro

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-16 Thread Yuxuan Chen via cfe-commits
@@ -84,4 +84,35 @@ Task nonelidable() { co_return 1; } +// CHECK-LABEL: define{{.*}} @_Z8addTasksO4TaskIiES1_{{.*}} { +Task addTasks([[clang::coro_must_await]] Task &&t1, Task &&t2) { + int i1 = co_await t1; + int i2 = co_await t2; + co_return i1 + i2; +} + +// CHECK-LABE

[clang] [clang-tools-extra] [flang] Fix OOM in FormatDiagnostic (2nd attempt) (PR #108866)

2024-09-16 Thread Vakhurin Sergei via cfe-commits
https://github.com/igelbox updated https://github.com/llvm/llvm-project/pull/108866 >From aee4cf70dedaa3c8b7b6508238e01f92d60c631c Mon Sep 17 00:00:00 2001 From: Sergei Date: Tue, 10 Sep 2024 16:19:05 + Subject: [PATCH 1/5] fix quick OOM in FormatDiagnostic --- .../ClangTidyDiagnosticCons

[clang] [AArch64] Add missing ACLE predefined macros and update __ARM_ACLE. (PR #108857)

2024-09-16 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/108857 >From cc3f72918aadab7df7397c25de280e713d1257f2 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Mon, 16 Sep 2024 17:39:07 +0100 Subject: [PATCH 1/2] [AArch64] Add missing ACLE predefined macros and up

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-16 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-16 Thread via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [Clang] Propagate elide safe context through [[clang::coro_await_elidable_argument]] (PR #108474)

2024-09-16 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/108474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Propagate elide safe context through [[clang::coro_await_elidable_argument]] (PR #108474)

2024-09-16 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/108474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-09-16 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/106782 >From 99408f31a8946df7ef9efa223d0dba2ab876fcd0 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 30 Aug 2024 12:08:37 -0700 Subject: [PATCH 1/7] add diag and testing for space and global constants ---

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-09-16 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,66 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify bob80905 wrote: I will at least say it's simpler for a distinct file to test this, since we test multiple resource types (UDTs, basic, resources) w

[clang] Implementing `asfloat` using `bit_cast` (PR #108686)

2024-09-16 Thread via cfe-commits
joaosaffran wrote: Can someone merge this, please :) https://github.com/llvm/llvm-project/pull/108686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][Docs] Update function calls docs (PR #106860)

2024-09-16 Thread Sarah Spall via cfe-commits
https://github.com/spall approved this pull request. https://github.com/llvm/llvm-project/pull/106860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] Fix OOM in FormatDiagnostic (2nd attempt) (PR #108866)

2024-09-16 Thread Vakhurin Sergei via cfe-commits
igelbox wrote: Errors were fixed. If there's some other `make` target that could catch even more errors - please lemme know. cc: @AaronBallman I'm gonna remove Draft from this PR after `check-all` target finish with OK-state. https://github.com/llvm/llvm-project/pull/108866 __

[clang] [AArch64] Add missing ACLE predefined macros and update __ARM_ACLE. (PR #108857)

2024-09-16 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. Thanks! LGTM https://github.com/llvm/llvm-project/pull/108857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implementing `asfloat` using `bit_cast` (PR #108686)

2024-09-16 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/108686 >From 8a030f5271b4d27a160b21f285c14682c4817fa3 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Sat, 14 Sep 2024 06:23:08 + Subject: [PATCH] implementing asfloat using bit_cast --- clang/lib/Headers/h

[clang] [AArch64] Add missing ACLE predefined macros and update __ARM_ACLE. (PR #108857)

2024-09-16 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Thanks for reviewing! https://github.com/llvm/llvm-project/pull/108857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1bfc3d0 - Implementing `asfloat` using `bit_cast` (#108686)

2024-09-16 Thread via cfe-commits
Author: joaosaffran Date: 2024-09-16T14:42:52-04:00 New Revision: 1bfc3d0de591b6b4e18ee720bd24f58e45d597ef URL: https://github.com/llvm/llvm-project/commit/1bfc3d0de591b6b4e18ee720bd24f58e45d597ef DIFF: https://github.com/llvm/llvm-project/commit/1bfc3d0de591b6b4e18ee720bd24f58e45d597ef.diff L

[clang] Implementing `asfloat` using `bit_cast` (PR #108686)

2024-09-16 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/108686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix update-verify-tests test suite for AIX (PR #108871)

2024-09-16 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn created https://github.com/llvm/llvm-project/pull/108871 The diff command on AIX doesn't support the --strip-trailing-cr flag. The internal python implementation does, so execute the tests in the update-verify-tests test suite using the internal shell for compatibil

[clang] fix update-verify-tests test suite for AIX (PR #108871)

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrik G. Olsson (hnrklssn) Changes The diff command on AIX doesn't support the --strip-trailing-cr flag. The internal python implementation does, so execute the tests in the update-verify-tests test suite using the internal shell for com

[clang] Reland "[Utils] add update-verify-tests.py" (#108630)" (PR #108658)

2024-09-16 Thread Henrik G. Olsson via cfe-commits
hnrklssn wrote: > Hi, `--strip-trailing-cr` isn't a supported option with diff on AIX. Would > you be able to adapt the tests? > > https://lab.llvm.org/buildbot/#/builders/64/builds/985 This should fix it: https://github.com/llvm/llvm-project/pull/108871 https://github.com/llvm/llvm-project/p

[clang] [Clang] Propagate elide safe context through [[clang::coro_await_elidable_argument]] (PR #108474)

2024-09-16 Thread Adrian Vogelsgesang via cfe-commits
@@ -880,14 +898,12 @@ ExprResult Sema::BuildUnresolvedCoawaitExpr(SourceLocation Loc, Expr *Operand, } auto *RD = Promise->getType()->getAsCXXRecordDecl(); - bool AwaitElidable = - isCoroAwaitElidableCall(Operand) && - isAttributedCoroAwaitElidable( -

[clang] [clang-tools-extra] [flang] Fix OOM in FormatDiagnostic (2nd attempt) (PR #108866)

2024-09-16 Thread Vakhurin Sergei via cfe-commits
igelbox wrote: > Testing Time: 301.48s Total Discovered Tests: 105926 Skipped : 23 (0.02%) Unsupported : 2682 (2.53%) Passed : 103036 (97.27%) Expectedly Failed:185 (0.17%) 1 warning(s) in tests https://github.com/llvm/llvm-project/pull/108866 __

[clang] [clang-tools-extra] [flang] Fix OOM in FormatDiagnostic (2nd attempt) (PR #108866)

2024-09-16 Thread Vakhurin Sergei via cfe-commits
https://github.com/igelbox ready_for_review https://github.com/llvm/llvm-project/pull/108866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] Fix OOM in FormatDiagnostic (2nd attempt) (PR #108866)

2024-09-16 Thread Vakhurin Sergei via cfe-commits
https://github.com/igelbox edited https://github.com/llvm/llvm-project/pull/108866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-16 Thread Justin Holewinski via cfe-commits
jholewinski wrote: >> If you specify a flat address space, does that mean that all other address >> spaces are not flat, and thus cannot alias with other address spaces? > Yes, all other address spaces are not flat. A flat address space pointer can > still point to the same place as a non-flat

[clang] [clang-tools-extra] [flang] Fix OOM in FormatDiagnostic (2nd attempt) (PR #108866)

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Vakhurin Sergei (igelbox) Changes The last attempt failed - https://github.com/llvm/llvm-project/pull/108187#issuecomment-2353122096 so was reverted - #108838 Not quite sure how to build targets available, so I run the same `cmake` and

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-16 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/102199 >From 0c20bcdf35f3c15024986da50cafb2a8c155e3cf Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Tue, 6 Aug 2024 20:48:02 +0300 Subject: [PATCH 1/2] [PAC] Fix address discrimination for type info vtable poin

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-09-16 Thread Nikita Popov via cfe-commits
nikic wrote: FYI this is a measurable compile-time regression when compiling tiny files (e.g. see the red 7zip entries at the end of https://llvm-compile-time-tracker.com/compare.php?from=5c348f692a8dff98a3780d0b859fb0949eccbaca&to=f5ba3e1fa6b5f862789786fbb4b342dfc2c27c33&stat=instructions%3Au&

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-16 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @efriedma-quic @ahmedbougacha @ojhunt Would be glad to see your comments after the latest commit 0c20bcdf35f3c15024986da50cafb2a8c155e3cf which introduces using actual storage address instead of 'inttoptr 1' placeholder. https://github.com/llvm/llvm-project/pull/102199

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-16 Thread Daniil Kovalev via cfe-commits
@@ -1056,12 +1056,18 @@ class ConstantPtrAuth final : public Constant { return !getAddrDiscriminator()->isNullValue(); } - /// A constant value for the address discriminator which has special - /// significance to ctors/dtors lowering. Regular address discrimination c

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-16 Thread Daniil Kovalev via cfe-commits
@@ -3955,9 +3955,23 @@ void ItaniumRTTIBuilder::BuildVTablePointer(const Type *Ty) { VTable, Two); } - if (auto &Schema = CGM.getCodeGenOpts().PointerAuth.CXXTypeInfoVTablePointer) -VTable = CGM.getConstantSigne

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-16 Thread Artem Belevich via cfe-commits
Artem-B wrote: > I'm still concerned about the (no-)aliasing guarantees. It's useful to have > two non-flat address spaces that can alias, Another example for NVIDIA GPUs would be `.param` space. According to the [PTX spec](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#gen

[clang] [llvm] [CGData][ThinLTO][NFC] Prep for two-codegen rounds (PR #90934)

2024-09-16 Thread Mingming Liu via cfe-commits
@@ -56,6 +56,7 @@ Error thinBackend(const Config &C, unsigned Task, AddStreamFn AddStream, const FunctionImporter::ImportMapTy &ImportList, const GVSummaryMapTy &DefinedGlobals, MapVector *ModuleMap, + bool

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-16 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/102975 >From 4a37cec543f30bb122bf14573fdec8302a0afa3e Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Mon, 12 Aug 2024 14:32:08 -0600 Subject: [PATCH 1/3] [clang][flang][mlir] Support -frecord-command-line option

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-09-16 Thread Craig Topper via cfe-commits
@@ -59,16 +59,26 @@ let TargetPrefix = "riscv" in { [IntrNoMem, IntrWillReturn, IntrSpeculatable, ImmArg>, ImmArg>]>; + def int_riscv_cv_alu_slet : ScalarCoreVAluGprGprIntrinsic; topperc wrote: Remove

[clang] [clang][codegen] Don't mark "int" TBAA on FP libcalls with indirect args (PR #108853)

2024-09-16 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: Thanks for the fix! Unfortunately I'm way out of my depth when it comes to actually reviewing this change, so hopefully you can find someone else to check/review it - but I appreciate you finding the root cause so quickly! https://github.com/llvm/llvm-project/pull/108853 __

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-09-16 Thread Craig Topper via cfe-commits
@@ -792,17 +792,18 @@ let Predicates = [HasVendorXCValu, IsRV32], AddedComplexity = 1 in { def : Pat<(sext_inreg (XLenVT GPR:$rs1), i16), (CV_EXTHS GPR:$rs1)>; def : Pat<(sext_inreg (XLenVT GPR:$rs1), i8), (CV_EXTBS GPR:$rs1)>; def : Pat<(and (XLenVT GPR:$rs1), 0x),

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-09-16 Thread Craig Topper via cfe-commits
@@ -0,0 +1,253 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple riscv32 -target-feature +xcvalu -emit-llvm %s -o - \ +// RUN: | FileCheck %s + +#include + +// CHECK-LABEL: @test_abs( +// CHECK-NEXT: entry: +// CHEC

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-09-16 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/100684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add `[[hlsl::raw_buffer]]` attribute (PR #107954)

2024-09-16 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s hekota wrote: Yep, that would be `clang/test/ParserHLSL/hlsl_resource_handle_attrs.hlsl`. https://github.com/llvm/llvm-project/pull/107954

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-16 Thread Peilin Ye via cfe-commits
https://github.com/peilin-ye updated https://github.com/llvm/llvm-project/pull/108636 >From c23b4d2dde0e03051332604d18eaf3bd434e4d4e Mon Sep 17 00:00:00 2001 From: Peilin Ye Date: Thu, 15 Aug 2024 21:49:23 + Subject: [PATCH 1/3] [BPF] Refactor BPFSubtarget::initSubtargetFeatures() (NFC) R

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-16 Thread Peilin Ye via cfe-commits
https://github.com/peilin-ye ready_for_review https://github.com/llvm/llvm-project/pull/108636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Peilin Ye (peilin-ye) Changes As discussed in [1], introduce BPF instructions with load-acquire and store-release semantics under -mcpu=v5. A "load_acquire" is a BPF_LDX instruction with a new mode modifier, BPF_MEMACQ ("acquiring atomic l

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-16 Thread Carlos Galvez via cfe-commits
@@ -10,29 +10,32 @@ modernize-avoid-c-arrays Finds C-style array types and recommend to use ``std::array<>`` / ``std::vector<>``. All types of C arrays are diagnosed. +For parameters of incomplete C-style array type, it would be better to +use ``std::span`` / ``gsl::span`` as

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-16 Thread Carlos Galvez via cfe-commits
@@ -1,9 +1,9 @@ -// RUN: %check_clang_tidy %s modernize-avoid-c-arrays %t -- \ +// RUN: %check_clang_tidy -std=c++17 %s modernize-avoid-c-arrays %t -- \ // RUN: -config='{CheckOptions: { modernize-avoid-c-arrays.AllowStringArrays: true }}' const char name[] = "name"; const

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-16 Thread Carlos Galvez via cfe-commits
@@ -1,9 +1,9 @@ -// RUN: %check_clang_tidy %s modernize-avoid-c-arrays %t -- \ +// RUN: %check_clang_tidy -std=c++17 %s modernize-avoid-c-arrays %t -- \ // RUN: -config='{CheckOptions: { modernize-avoid-c-arrays.AllowStringArrays: true }}' const char name[] = "name"; const

[clang] [HLSL] Add `[[hlsl::contained_type()]]` attribute (PR #108456)

2024-09-16 Thread Helena Kotas via cfe-commits
@@ -30,15 +29,15 @@ RWBuffer Buffer; // CHECK-NEXT: CXXRecordDecl 0x{{[0-9A-Fa-f]+}} <> implicit class RWBuffer definition // CHECK: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final -// CHECK-NEXT: implicit h 'element_type * {{\[\[}}hlsl::resource_class(UAV)]]':'element_type *

[clang] [HLSL] Add `[[hlsl::contained_type()]]` attribute (PR #108456)

2024-09-16 Thread Helena Kotas via cfe-commits
@@ -30,15 +29,15 @@ RWBuffer Buffer; // CHECK-NEXT: CXXRecordDecl 0x{{[0-9A-Fa-f]+}} <> implicit class RWBuffer definition // CHECK: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final -// CHECK-NEXT: implicit h 'element_type * {{\[\[}}hlsl::resource_class(UAV)]]':'element_type *

[clang] Don't emit int TBAA metadata on more complex FP math libcalls. (PR #107598)

2024-09-16 Thread Zahira Ammarguellat via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 %s -O3 -fmath-errno -emit-llvm -triple x86_64-unknown-unknown -o - %s | FileCheck %s -check-prefixes=CHECK +// RUN: %clang_cc1 %s -O3 -fmath-errno -emit-llvm -triple x86_64-pc-win64 -o - %s | FileCheck %s -check-prefixes=CHECK +// RUN: %clan

[clang] [analyzer] Explicitly register NoStoreFuncVisitor from alpha.unix.cst… (PR #108373)

2024-09-16 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. The change looks good to me and as it is fairly innocent, I think we can merge it soon (assuming that we don't get additional remarks from somebody else). When you're merging this change please write a commit message that is self-contain

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/108662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add `[[hlsl::contained_type()]]` attribute (PR #108456)

2024-09-16 Thread Helena Kotas via cfe-commits
hekota wrote: > Why the name is contained_type instead of element_type? I am not sure if the name was discussed but `contained_type` seems a bit more general than `element_type`. We can always change it as we iron out details of other resources type like textures or samplers, and change it if

[clang] [llvm] [Utils] Add new --update-tests flag to llvm-lit (PR #108425)

2024-09-16 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn updated https://github.com/llvm/llvm-project/pull/108425 >From 451a178dbb461e6b3dd264be6ede0aa26283dbbe Mon Sep 17 00:00:00 2001 From: "Henrik G. Olsson" Date: Wed, 28 Aug 2024 23:30:49 -0700 Subject: [PATCH 1/3] [Utils] Add --update-tests to lit This adds a flag to

[clang] 0a7a1ef - [HLSL] Add `[[hlsl::contained_type()]]` attribute (#108456)

2024-09-16 Thread via cfe-commits
Author: Helena Kotas Date: 2024-09-16T13:39:13-07:00 New Revision: 0a7a1ef2205c45859b4179cef993e97e9f5b4d0d URL: https://github.com/llvm/llvm-project/commit/0a7a1ef2205c45859b4179cef993e97e9f5b4d0d DIFF: https://github.com/llvm/llvm-project/commit/0a7a1ef2205c45859b4179cef993e97e9f5b4d0d.diff

[clang] [HLSL] Add `[[hlsl::contained_type()]]` attribute (PR #108456)

2024-09-16 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/108456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Utils] Add new --update-tests flag to llvm-lit (PR #108425)

2024-09-16 Thread Henrik G. Olsson via cfe-commits
@@ -2,3 +2,15 @@ config.substitutions = list(config.substitutions) config.substitutions.insert( 0, (r"%clang\b", """*** Do not use the driver in Sema tests. ***""") ) + +if lit_config.update_tests: +import sys +import os + +curdir = os.path.dirname(os.path.realp

[clang] [HLSL] Add `[[hlsl::contained_type()]]` attribute (PR #108456)

2024-09-16 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/108456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CGData][ThinLTO][NFC] Prep for two-codegen rounds (PR #90934)

2024-09-16 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/90934 >From c1a0219457a3c162d7fa6b9d70750ba7a040d9f2 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Fri, 26 Apr 2024 20:02:52 -0700 Subject: [PATCH 1/2] [ThinLTO][NFC] Prep for two-codegen rounds --- clang/lib/

[clang] [analyzer] [MallocChecker] suspect all release functions as candidate for suppression (PR #104599)

2024-09-16 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > sorry to bother, but seems like this pr is stalled for 2 weeks I'm sorry that my comment delayed this PR -- next time when I write "wait a few days", feel free to merge the ticket after a few days :smile: https://github.com/llvm/llvm-project/pull/104599

[clang] [llvm] [Utils] Add new --update-tests flag to llvm-lit (PR #108425)

2024-09-16 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn updated https://github.com/llvm/llvm-project/pull/108425 >From 451a178dbb461e6b3dd264be6ede0aa26283dbbe Mon Sep 17 00:00:00 2001 From: "Henrik G. Olsson" Date: Wed, 28 Aug 2024 23:30:49 -0700 Subject: [PATCH 1/4] [Utils] Add --update-tests to lit This adds a flag to

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-16 Thread Shilei Tian via cfe-commits
shiltian wrote: > Just to clarify, does this mean any two non-flat address space pointers > _cannot_ alias? If I read it correctly, it is equivalent to ask, whether an AS X pointer can alias an AS Y pointer, assuming neither X nor Y is the flat address space. I think that is orthogonal to thi

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/108662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reject `this void` explicit object parameters (CWG2915) (PR #108817)

2024-09-16 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > LGTM but it would be nice to do the other changes to cxx_dr_status as a > separate (NFC) commit We should always strive to keep unrelated changes separate. There are a lot of good reasons for this. The most basic is that if we have to revert then we lose both set of changes bu

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-16 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/108849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] only diagnose definitions in readability-enum-initial-value (PR #107652)

2024-09-16 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/107652 >From 991b6a70b81a9bdef6edf931d26e9430c56bf0ca Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 7 Sep 2024 00:37:57 +0200 Subject: [PATCH 1/3] [clang-tidy] only diagnose definitions in readability-enum

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Joshua Batista via cfe-commits
@@ -12,7 +12,7 @@ // HALF: #define __HLSL_ENABLE_16_BIT 1 // NOHALF-NOT: __HLSL_ENABLE_16_BIT -// CHECK: #define __HLSL_VERSION 2021 +// CHECK: #define __HLSL_VERSION 2028 bob80905 wrote: I do not understand where this 2028 is coming from. Is 202x intended to

[clang] [HLSL] Add `[[hlsl::raw_buffer]]` attribute (PR #107954)

2024-09-16 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107954 >From 1c66d2767ca20f42b6edaae834cc186be7d23712 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 9 Sep 2024 19:39:02 -0700 Subject: [PATCH 1/8] [HLSL] Add `[[hlsl::row_access]]` attribute This PR introduces

[clang-tools-extra] [clang-tidy] fix false positive in modernize-min-max-use-initializer-list (PR #107649)

2024-09-16 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/107649 >From 097a679f33bdded29fa67833b7fcd4707057cbf3 Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 7 Sep 2024 00:10:08 +0200 Subject: [PATCH 1/3] [clang-tidy] fix false positive in modernize-min-max-use-i

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Greg Roth via cfe-commits
https://github.com/pow2clk edited https://github.com/llvm/llvm-project/pull/108662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Greg Roth via cfe-commits
https://github.com/pow2clk approved this pull request. I'm not objecting to anything, but I made a few comments out of interest https://github.com/llvm/llvm-project/pull/108662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Greg Roth via cfe-commits
@@ -12,7 +12,7 @@ // HALF: #define __HLSL_ENABLE_16_BIT 1 // NOHALF-NOT: __HLSL_ENABLE_16_BIT -// CHECK: #define __HLSL_VERSION 2021 +// CHECK: #define __HLSL_VERSION 2028 pow2clk wrote: 2028 == 202x and 2029 == 202y I expect? https://github.com/llvm/llvm-p

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Greg Roth via cfe-commits
@@ -37,7 +37,7 @@ _Static_assert(is_same<__decltype(4294967296), int64_t>::value, "4294967296 is i // Clang emits a warning that it is interpreting it as unsigned because that is // not conforming to the C standard. -// expected-warning@+1{{integer literal is too large to be

[clang] [clang][ExprConst] Allow comparisons with string literals (PR #106733)

2024-09-16 Thread Richard Smith via cfe-commits
zygoloid wrote: See https://github.com/llvm/llvm-project/issues/58754#issuecomment-2354048986 -- this introduces a miscompile by producing comparison results at compile time that differ from the results at runtime. Please can this be reverted? https://github.com/llvm/llvm-project/pull/106733 _

[clang-tools-extra] [clang-tidy] fix false positive in modernize-min-max-use-initializer-list (PR #107649)

2024-09-16 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/107649 >From 097a679f33bdded29fa67833b7fcd4707057cbf3 Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 7 Sep 2024 00:10:08 +0200 Subject: [PATCH 1/4] [clang-tidy] fix false positive in modernize-min-max-use-i

[clang-tools-extra] [clang-tidy] fix false positive in modernize-min-max-use-initializer-list (PR #107649)

2024-09-16 Thread Julian Schmidt via cfe-commits
@@ -72,7 +72,7 @@ static FindArgsResult findArgs(const CallExpr *Call) { return Result; } -static SmallVector +static std::pair> 5chmidti wrote: done https://github.com/llvm/llvm-project/pull/107649 ___ cfe-commi

[clang-tools-extra] [NFC][clang-tidy] reword diagnostic note in definitions-in-headers (PR #106862)

2024-09-16 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/106862 >From c641dd2a2cb6185b088e469a5f5db160e8c76bae Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 31 Aug 2024 18:44:37 +0200 Subject: [PATCH 1/3] [NFC][clang-tidy] reword diagnostic note in definitions-i

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-16 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Both in InferAddressSpaces, and in Attributor, you don't really care about whether a flat address-space exists. All you really need to know is whether, for a given pair of address-spaces "A" and "B", `addrspacecast ptr addrspace(A) %x to ptr addrspace(B)` should be optimi

[clang-tools-extra] [clang-tidy] fix nullptr dereference in bugprone-forwarding-reference (PR #106856)

2024-09-16 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/106856 >From f47b807598ed0e80d3e3bd2c05699f977a2395bf Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 31 Aug 2024 16:56:54 +0200 Subject: [PATCH] [clang-tidy] fix nullptr dereference in bugprone-forwarding-r

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-16 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: I think you should be able to avoid constructing the initializer twice if you restructure the code a bit to just construct the global before the call to BuildVTablePointer. I added GlobalVariable::replaceInitializer because I was looking at this rev

[clang] [clang][codegen] Don't mark "int" TBAA on FP libcalls with indirect args (PR #108853)

2024-09-16 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: How does this interact with #107598? https://github.com/llvm/llvm-project/pull/108853 ___ 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 nullptr dereference in bugprone-forwarding-reference (PR #106856)

2024-09-16 Thread Nicolas van Kempen via cfe-commits
@@ -119,7 +123,6 @@ Changes in existing checks ` check to avoid false positive when member initialization depends on a structured binging variable. - nicovank wrote: Probably unwanted deleted line here. https://github.com/llvm/llvm-project/pull/106856

[clang-tools-extra] [clang-tidy] fix nullptr dereference in bugprone-forwarding-reference (PR #106856)

2024-09-16 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/106856 >From f47b807598ed0e80d3e3bd2c05699f977a2395bf Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 31 Aug 2024 16:56:54 +0200 Subject: [PATCH 1/2] [clang-tidy] fix nullptr dereference in bugprone-forwardi

[clang-tools-extra] [clang-tidy] fix nullptr dereference in bugprone-forwarding-reference (PR #106856)

2024-09-16 Thread Julian Schmidt via cfe-commits
@@ -119,7 +123,6 @@ Changes in existing checks ` check to avoid false positive when member initialization depends on a structured binging variable. - 5chmidti wrote: thanks https://github.com/llvm/llvm-project/pull/106856 __

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Chris B via cfe-commits
@@ -12,7 +12,7 @@ // HALF: #define __HLSL_ENABLE_16_BIT 1 // NOHALF-NOT: __HLSL_ENABLE_16_BIT -// CHECK: #define __HLSL_VERSION 2021 +// CHECK: #define __HLSL_VERSION 2028 llvm-beanz wrote: 202x doesn't have a year yet, so to make it big and far out I gave it

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Chris B via cfe-commits
@@ -12,7 +12,7 @@ // HALF: #define __HLSL_ENABLE_16_BIT 1 // NOHALF-NOT: __HLSL_ENABLE_16_BIT -// CHECK: #define __HLSL_VERSION 2021 +// CHECK: #define __HLSL_VERSION 2028 llvm-beanz wrote: Yea. Subject to revision once we have an actual year. https://github

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Chris B via cfe-commits
@@ -37,7 +37,7 @@ _Static_assert(is_same<__decltype(4294967296), int64_t>::value, "4294967296 is i // Clang emits a warning that it is interpreting it as unsigned because that is // not conforming to the C standard. -// expected-warning@+1{{integer literal is too large to be

[clang] [HLSL] Vector Usual Arithmetic Conversions (PR #108659)

2024-09-16 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp commented: LGTM - reviewed mostly to see if I could read and get a high level gist of what it was doing. I'm afraid I've not carefully looked through the real meat of this change. https://github.com/llvm/llvm-project/pull/108659 _

[clang] [HLSL] Vector Usual Arithmetic Conversions (PR #108659)

2024-09-16 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/108659 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Vector Usual Arithmetic Conversions (PR #108659)

2024-09-16 Thread Damyan Pepper via cfe-commits
@@ -12881,6 +12886,12 @@ QualType Sema::CheckVectorLogicalOperands(ExprResult &LHS, ExprResult &RHS, if (!getLangOpts().CPlusPlus && !(isa(vType->getAs( return InvalidLogicalVectorOperands(Loc, LHS, RHS); + if (getLangOpts().HLSL && + getLangOpts().getHLS

[clang] [HLSL] Vector Usual Arithmetic Conversions (PR #108659)

2024-09-16 Thread Damyan Pepper via cfe-commits
@@ -12881,6 +12886,12 @@ QualType Sema::CheckVectorLogicalOperands(ExprResult &LHS, ExprResult &RHS, if (!getLangOpts().CPlusPlus && !(isa(vType->getAs( return InvalidLogicalVectorOperands(Loc, LHS, RHS); + if (getLangOpts().HLSL && + getLangOpts().getHLS

[clang] [clang][codegen] Don't mark "int" TBAA on FP libcalls with indirect args (PR #108853)

2024-09-16 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: > How does this interact with #107598? I think it's solving the same problem, but a different way (looking at the final LLVM function type rather than checking the ABI information). https://github.com/llvm/llvm-project/pull/108853 ___ c

[clang] [compiler-rt] [libcxx] [cmake] Add hexagon-linux cmake cache files (PR #98712)

2024-09-16 Thread Brian Cain via cfe-commits
https://github.com/androm3da updated https://github.com/llvm/llvm-project/pull/98712 >From 3d8388d723b3c5dc3d51a6d3e80051dfe7da8a4c Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Fri, 12 Jul 2024 21:34:56 -0700 Subject: [PATCH] [cmake] Add hexagon-linux cmake cache files These can be used to

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-16 Thread via cfe-commits
gonzalobg wrote: Another example for PTX targets is `.generic`, `.shared::cluster`, and `.shared::cta`, where `.generic` covers `.shared::cluster` which covers `.shared::cta`. https://github.com/llvm/llvm-project/pull/108786 ___ cfe-commits mailing l

<    1   2   3   4   5   >