[clang] [CGData] Clang Options (PR #90304)

2024-09-12 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/90304 >From 966922b9921669d48eb750c36ce3c9b792ba8161 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Fri, 26 Apr 2024 12:58:54 -0700 Subject: [PATCH 1/4] [CGData] Clang Optinos --- clang/include/clang/Driver/Opt

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Mainak Sil via cfe-commits
@@ -19,20 +19,23 @@ Example: .. code-block:: c++ struct Base { -virtual void ~Base(); +virtual ~Base(); +int i; }; - MainakSil wrote: Do you mean like this? ![image](https://github.com/user-attachments/assets/9ea57dc0-0820-4147-bf08-ec3bb96f

[clang] [llvm] [HLSL] Implement elementwise popcount (PR #108121)

2024-09-12 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/108121 >From 4a892930ab4d97b5621d8066b23c48c7278d14e0 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Fri, 6 Sep 2024 21:03:05 + Subject: [PATCH 1/2] implement elementwise popcount to implement countbits --- clang

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

2024-09-12 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] Fix OOM in FormatDiagnostic (PR #108187)

2024-09-12 Thread Aaron Ballman via cfe-commits
@@ -571,8 +571,7 @@ DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc, } // If explicitly requested, map fatal errors to errors. - if (Result == diag::Severity::Fatal && - Diag.CurDiagID != diag::fatal_too_many_errors && Diag.FatalsAsError) --

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

2024-09-12 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] [DebugInfo] Correct the line attribution for IF branches (PR #108300)

2024-09-12 Thread David Blaikie via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 -debug-info-kind=limited -gno-column-info -triple=x86_64-pc-linux -emit-llvm %s -o - | FileCheck %s + +// The important thing is that the compare and the conditional branch have +// locs with the same scope (the lexical block for the 'if'). B

[clang] [clang-tools-extra] Fix OOM in FormatDiagnostic (PR #108187)

2024-09-12 Thread Aaron Ballman via cfe-commits
@@ -538,24 +511,51 @@ bool DiagnosticsEngine::EmitCurrentDiagnostic(bool Force) { Emitted = (DiagLevel != DiagnosticIDs::Ignored); if (Emitted) { // Emit the diagnostic regardless of suppression level. - Diags->EmitDiag(*this, DiagLevel); + Diags->EmitD

[clang-tools-extra] [clang-tidy] Improve documentation of bugprone-pointer-arithmetic-on-polymorphic-object (PR #108324)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
@@ -19,20 +19,23 @@ Example: .. code-block:: c++ struct Base { -virtual void ~Base(); +virtual ~Base(); +int i; }; - nicovank wrote: Yes LGTM. My nit was to not have any whitespace on blank lines, but I don't care that much. https://github.

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-libcxx` running on `linaro-flang-aarch64-libcxx` while building `clang-tools-extra,clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/89/builds/6211

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify ls64, ls64_v and ls64_accdata. (PR #108024)

2024-09-12 Thread via cfe-commits
@@ -73,8 +73,6 @@ enum CPUFeatures { FEAT_SSBS, FEAT_SSBS2, FEAT_BTI, - FEAT_LS64, - FEAT_LS64_V, Wilco1 wrote: We **absolutely** must keep the values the same since they are now ABI and used in the ifunc resolvers in the object files: ``` bl

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `clang-tools-extra,clang` at step 5 "compile-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/6429

[clang] Reland "[clang] Add nuw attribute to GEPs (#105496)" (PR #107257)

2024-09-12 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Reproduced: https://godbolt.org/z/G4jrhdjef . Looks like an instcombine bug. https://github.com/llvm/llvm-project/pull/107257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

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

2024-09-12 Thread Зишан Мирза via cfe-commits
zimirza wrote: Sure, I will try to run the full build mode. I will let you know when this is ready. https://github.com/llvm/llvm-project/pull/107285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ppc64le-flang-rhel-clang` running on `ppc64le-flang-rhel-test` while building `clang-tools-extra,clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/157/builds/7578

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-12 Thread Justin Bogner via cfe-commits
@@ -10,6 +10,7 @@ #define _HLSL_HLSL_INTRINSICS_H_ namespace hlsl { +#include "hlsl_details.h" bogner wrote: We shouldn't `#include` a file inside a namespace. Instead, "hlsl_details.h" should also have a `namespace hlsl {}` block around the `__detail` names

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,35 @@ +//===- hlsl_intrinsics.h - HLSL definitions for intrinsics --===// bogner wrote: This comment needs updating. https://github.com/llvm/llvm-project/pull/107292 ___ cfe-commits mailing list

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,35 @@ +//===- hlsl_intrinsics.h - HLSL definitions for intrinsics --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,35 @@ +//===- hlsl_intrinsics.h - HLSL definitions for intrinsics --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected bogner wrote: This still has `-verify-ignore-unexpected`... https:

[clang] [llvm] [NVPTX] Remove nvvm.bitcast.* intrinsics (PR #107936)

2024-09-12 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/107936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV][FMV] Support target_clones (PR #85786)

2024-09-12 Thread Philip Reames via cfe-commits
https://github.com/preames edited https://github.com/llvm/llvm-project/pull/85786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-12 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/107598 >From 0763f8d25194e18a040d4cd4cde7c88b6fccbb44 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Fri, 6 Sep 2024 08:01:25 -0700 Subject: [PATCH 1/5] Don't emit int TBAA metadata on more complex FP math

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-12 Thread via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected joaosaffran wrote: I am seeing some issues when testing without it,

[clang] [RISCV][FMV] Support target_clones (PR #85786)

2024-09-12 Thread Philip Reames via cfe-commits
https://github.com/preames approved this pull request. LGTM (I only did a quick pass on this version assuming mostly unchanged from prior. Wanted to explicitly chime in with support for the priority syntax.) https://github.com/llvm/llvm-project/pull/85786 _

[clang] [HLSL] Add HLSL 202y language mode (PR #108437)

2024-09-12 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/108437 This change adds a new HLSL 202y language mode. Currently HLSL 202y is planned to add `auto` and `constexpr`. This change updates extension diagnostics to state that lambadas are a "clang HLSL" extension (s

[clang] [HLSL] Add HLSL 202y language mode (PR #108437)

2024-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes This change adds a new HLSL 202y language mode. Currently HLSL 202y is planned to add `auto` and `constexpr`. This change updates extension diagnostics to state that lambadas are a "clang HLSL" extension (sin

[clang] [llvm] [HLSL] Implement elementwise popcount (PR #108121)

2024-09-12 Thread Sarah Spall via cfe-commits
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/108121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Aaron Ballman via cfe-commits
@@ -6784,6 +6784,11 @@ def warn_arc_lifetime_result_type : Warning< "ARC %select{unused|__unsafe_unretained|__strong|__weak|__autoreleasing}0 " "lifetime qualifier on return type is ignored">, InGroup; +def warn_excess_precision_not_supported : Warning< + "excess precisi

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: We're currently only tracking the precision loss for complex division, but doesn't it also apply to any use of a floating-point type? e.g., ``` double foo(); double d = 2.0 * foo(); ``` would still not use the higher precision, right? The only differenc

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/107397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Aaron Ballman via cfe-commits
@@ -1180,6 +1180,14 @@ void Sema::PrintPragmaAttributeInstantiationPoint() { diag::note_pragma_attribute_applied_decl_here); } +void Sema::DiagnoseExcessPrecision() { + if (NumExcessPrecisionNotSatisfied > 0) { +for (auto &[Loc, Type, Num] : ExcessPrecision

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Aaron Ballman via cfe-commits
@@ -7964,6 +7964,12 @@ class Sema final : public SemaBase { /// Do an explicit extend of the given block pointer if we're in ARC. void maybeExtendBlockObject(ExprResult &E); + std::vector> + ExcessPrecisionNotSatisfied; + unsigned NumExcessPrecisionNotSatisfied = 0;

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Aaron Ballman via cfe-commits
@@ -6784,6 +6784,11 @@ def warn_arc_lifetime_result_type : Warning< "ARC %select{unused|__unsafe_unretained|__strong|__weak|__autoreleasing}0 " "lifetime qualifier on return type is ignored">, InGroup; +def warn_excess_precision_not_supported : Warning< + "excess precisi

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Aaron Ballman via cfe-commits
@@ -21,6 +25,7 @@ void a() { EVALF((2. + 3i) + (4. + 5i), 6. + 8i); EVALF((2. + 3i) - (4. + 5i), -2. - 2i); EVALF((2. + 3i) * (4. + 5i), -7. + 22i); + // div-precision-warning@+1 {{excess precision is requested but the target does not support excess precision which may

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Aaron Ballman via cfe-commits
@@ -6784,6 +6784,11 @@ def warn_arc_lifetime_result_type : Warning< "ARC %select{unused|__unsafe_unretained|__strong|__weak|__autoreleasing}0 " "lifetime qualifier on return type is ignored">, InGroup; +def warn_excess_precision_not_supported : Warning< + "excess precisi

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Aaron Ballman via cfe-commits
@@ -7964,6 +7964,12 @@ class Sema final : public SemaBase { /// Do an explicit extend of the given block pointer if we're in ARC. void maybeExtendBlockObject(ExprResult &E); + std::vector> AaronBallman wrote: I don't think we need the `SourceLocation` an

[clang] [DebugInfo] Correct the line attribution for IF branches (PR #108300)

2024-09-12 Thread Paul T Robinson via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 -debug-info-kind=limited -gno-column-info -triple=x86_64-pc-linux -emit-llvm %s -o - | FileCheck %s + +// The important thing is that the compare and the conditional branch have +// locs with the same scope (the lexical block for the 'if'). B

[clang] [CGData] Clang Options (PR #90304)

2024-09-12 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/90304 >From 966922b9921669d48eb750c36ce3c9b792ba8161 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Fri, 26 Apr 2024 12:58:54 -0700 Subject: [PATCH 1/4] [CGData] Clang Optinos --- clang/include/clang/Driver/Opt

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

2024-09-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/106733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e0cd11e - Revert "[clang] Extend diagnose_if to accept more detailed warning information (#70976)"

2024-09-12 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-09-12T12:19:26-07:00 New Revision: e0cd11eba526234ca14a0b91f5598ca3363b6aca URL: https://github.com/llvm/llvm-project/commit/e0cd11eba526234ca14a0b91f5598ca3363b6aca DIFF: https://github.com/llvm/llvm-project/commit/e0cd11eba526234ca14a0b91f5598ca3363b6aca.diff L

[clang] 87e1104 - [clang-scan-deps] Infer the target from the executable name (#108189)

2024-09-12 Thread via cfe-commits
Author: Martin Storsjö Date: 2024-09-12T22:20:14+03:00 New Revision: 87e1104cf0e2de0d04bee2944893fa7897277b2f URL: https://github.com/llvm/llvm-project/commit/87e1104cf0e2de0d04bee2944893fa7897277b2f DIFF: https://github.com/llvm/llvm-project/commit/87e1104cf0e2de0d04bee2944893fa7897277b2f.diff

[clang] [clang-scan-deps] Infer the target from the executable name (PR #108189)

2024-09-12 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo closed https://github.com/llvm/llvm-project/pull/108189 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-12 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: The build bots seem to be complaining about the same spot: ``` flang/lib/Frontend/TextDiagnosticPrinter.cpp:42:29: error: call to non-static member function without an object argument clang::DiagnosticIDs::getWarningOptionForDiag(info.getID()); ``` Maybe you need to

[clang-tools-extra] [NFC][clang-tidy] Add type annotations to rename_check.py (PR #108443)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank created https://github.com/llvm/llvm-project/pull/108443 None >From 0127c0ecc7cbc8dc8a4b67d142487f29dbce93a6 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Thu, 12 Sep 2024 15:27:11 -0400 Subject: [PATCH] [NFC][clang-tidy] Add type annotations to rename_che

[clang-tools-extra] [NFC][clang-tidy] Add type annotations to rename_check.py (PR #108443)

2024-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Nicolas van Kempen (nicovank) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/108443.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/rename_check.py (+18-14) ``diff diff --git a/clang-t

[clang-tools-extra] [NFC][clang-tidy] Add type annotations to rename_check.py (PR #108443)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
@@ -311,7 +315,7 @@ def main(): "Check name '%s' not found in %s. Exiting." % (check_name_camel, cmake_lists) ) -return 1 +sys.exit(1) nicovank wrote: Technically, this is a functional change.

[clang-tools-extra] [NFC][clang-tidy] Add type annotations to rename_check.py (PR #108443)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/108443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > double foo(); > double d = 2.0 * foo(); That's correct. Only for division and only `-fcomplex-arithmetic=promoted` and when the higher precision type of a target is the same than the current precision type. https://github.com/llvm/llvm-project/pull/107397 ___

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-09-12 Thread Daniel Thornburgh via cfe-commits
https://github.com/mysterymath edited https://github.com/llvm/llvm-project/pull/76838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-09-12 Thread Daniel Thornburgh via cfe-commits
https://github.com/mysterymath commented: LGTM from my POV. https://github.com/llvm/llvm-project/pull/76838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-09-12 Thread Daniel Thornburgh via cfe-commits
@@ -0,0 +1,3 @@ +// RUN: %clang -target x86_64-unknown-uefi -S -emit-llvm -o - %s | \ +// RUN: FileCheck --check-prefix=X86_64_UEFI %s +// X86_64_UEFI: target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" myste

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Zahira Ammarguellat via cfe-commits
@@ -6784,6 +6784,11 @@ def warn_arc_lifetime_result_type : Warning< "ARC %select{unused|__unsafe_unretained|__strong|__weak|__autoreleasing}0 " "lifetime qualifier on return type is ignored">, InGroup; +def warn_excess_precision_not_supported : Warning< + "excess precisi

[clang] [clang] Add -Wimplicit-fallthrough to -Wextra (PR #97926)

2024-09-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Sorry for the long wait on this review! A related issue cropped up regarding compile time performance of `-Wall` (https://github.com/llvm/llvm-project/issues/105959) and it seems to be caused by CFG creation. I think we should run the test case from

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Aaron Ballman via cfe-commits
@@ -6784,6 +6784,11 @@ def warn_arc_lifetime_result_type : Warning< "ARC %select{unused|__unsafe_unretained|__strong|__weak|__autoreleasing}0 " "lifetime qualifier on return type is ignored">, InGroup; +def warn_excess_precision_not_supported : Warning< + "excess precisi

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > double foo(); > > double d = 2.0 * foo(); > > That's correct. Only for division and only `-fcomplex-arithmetic=promoted` > and when the higher precision type of a target is the same than the current > precision type. Okay, then I think there's a bit more work to be don

[clang] Fix the behavior of __COUNT__ macros when PCH is enabled (PR #105591)

2024-09-12 Thread Shafik Yaghmour via cfe-commits
@@ -1243,12 +1247,19 @@ bool ASTUnit::Parse(std::shared_ptr PCHContainerOps, } std::unique_ptr Act( - new TopLevelDeclTrackerAction(*this)); + new TopLevelDeclTrackerAction(*this, true)); shafik wrote: We should use [bugprone-argument-comment]

[clang-tools-extra] [NFC][clang-tidy] Add type annotations to rename_check.py (PR #108443)

2024-09-12 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/108443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Fix move assignment of `this` (PR #108445)

2024-09-12 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/108445 Under HLSL 202x+ move assignment can occur and when targeting `this` move assignment was generating some really odd errors. This corrects the errors by properly generating the `this` object reference for HLS

[clang] [HLSL] Fix move assignment of `this` (PR #108445)

2024-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes Under HLSL 202x+ move assignment can occur and when targeting `this` move assignment was generating some really odd errors. This corrects the errors by properly generating the `this` object reference for HLSL

[clang] aa34657 - [clang-scan-deps] Fix builds with BUILD_SHARED_LIBS=ON

2024-09-12 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2024-09-12T23:12:54+03:00 New Revision: aa3465793a250faa5426ac626989375465256658 URL: https://github.com/llvm/llvm-project/commit/aa3465793a250faa5426ac626989375465256658 DIFF: https://github.com/llvm/llvm-project/commit/aa3465793a250faa5426ac626989375465256658.diff

[clang] Reland "[clang] Add nuw attribute to GEPs (#105496)" (PR #107257)

2024-09-12 Thread Nikita Popov via cfe-commits
nikic wrote: Reduced: https://llvm.godbolt.org/z/TPdd9qore I believe the problem is this line: https://github.com/llvm/llvm-project/blob/c05e29bff036060f0811b887a92715104abdceb5/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp#L2513 This does an in-place modification of the GEP, but on

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Zahira Ammarguellat via cfe-commits
@@ -21,6 +25,7 @@ void a() { EVALF((2. + 3i) + (4. + 5i), 6. + 8i); EVALF((2. + 3i) - (4. + 5i), -2. - 2i); EVALF((2. + 3i) * (4. + 5i), -7. + 22i); + // div-precision-warning@+1 {{excess precision is requested but the target does not support excess precision which may

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Zahira Ammarguellat via cfe-commits
@@ -21,6 +25,7 @@ void a() { EVALF((2. + 3i) + (4. + 5i), 6. + 8i); EVALF((2. + 3i) - (4. + 5i), -2. - 2i); EVALF((2. + 3i) * (4. + 5i), -7. + 22i); + // div-precision-warning@+1 {{excess precision is requested but the target does not support excess precision which may

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-12 Thread Chris B via cfe-commits
@@ -2502,9 +2505,16 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, ShouldAddOptNone &= !D->hasAttr(); ShouldAddOptNone &= !D->hasAttr(); - // Add optnone, but do so only if the function isn't always_inline. - if ((ShouldAddOptNone || D->has

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-09-12 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/76838 >From 7cc2e01a4a272934861e0d36791985e9604d9794 Mon Sep 17 00:00:00 2001 From: prabhukr Date: Mon, 4 Dec 2023 08:54:14 -0800 Subject: [PATCH 1/2] [UEFI] X86_64 UEFI Clang Driver Introduce changes necessary for UE

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-12 Thread Chris B via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -emit-llvm-only %s -verify llvm-beanz wrote: We should not need to emit IR to test a warning. This should work with `-fsyntax-only` or without the `-emit-llvm-only` flag. https://githu

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-09-12 Thread via cfe-commits
@@ -0,0 +1,3 @@ +// RUN: %clang -target x86_64-unknown-uefi -S -emit-llvm -o - %s | \ +// RUN: FileCheck --check-prefix=X86_64_UEFI %s +// X86_64_UEFI: target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" Prabh

[clang] [HLSL] generate hlsl.wavesize attribute (PR #107176)

2024-09-12 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/107176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] [HLSL] Add HLSL 202y language mode (PR #108437)

2024-09-12 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/108437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add HLSL 202y language mode (PR #108437)

2024-09-12 Thread Justin Bogner via cfe-commits
@@ -12397,6 +12397,9 @@ def warn_attr_min_eq_max: Warning< def err_hlsl_attribute_number_arguments_insufficient_shader_model: Error< "attribute %0 with %1 arguments requires shader model %2 or greater">; +def ext_hlsl_auto_type_specifier : ExtWarn< + "'auto' type specifier

[clang] [HLSL] Add HLSL 202y language mode (PR #108437)

2024-09-12 Thread Justin Bogner via cfe-commits
@@ -1347,6 +1347,8 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer( Diag(LambdaBeginLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_lambda : diag::ext_lambda); + if (getLangOpts().HLSL) +Diag(Lambd

[clang] [HLSL] Add HLSL 202y language mode (PR #108437)

2024-09-12 Thread Xiang Li via cfe-commits
@@ -12397,6 +12397,9 @@ def warn_attr_min_eq_max: Warning< def err_hlsl_attribute_number_arguments_insufficient_shader_model: Error< "attribute %0 with %1 arguments requires shader model %2 or greater">; +def ext_hlsl_auto_type_specifier : ExtWarn< python3k

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-12 Thread Chris B via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected llvm-beanz wrote: what messages are seen but not expected? https:/

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-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 447b32fb192b90be00164a027f990e16c0325de3 d2f55b360d65b8fea16aaab6bba9d7da284d6e49 --e

[clang] [HLSL] Fix move assignment of `this` (PR #108445)

2024-09-12 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/108445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Fix move assignment of `this` (PR #108445)

2024-09-12 Thread Justin Bogner via cfe-commits
@@ -43,3 +53,18 @@ void main() { // CHECK-NEXT:call void @llvm.memset.p0.i32(ptr align 4 %ref.tmp, i8 0, i32 8, i1 false) // CHECK-NEXT:call void @llvm.memcpy.p0.p0.i32(ptr align 4 %this1, ptr align 4 %ref.tmp, i32 8, i1 false) // CHECK-NEXT:%Second = getelementptr inbounds n

[clang] [clang][test] Fix some windows driver tests with legacy runtime dir layout (PR #108452)

2024-09-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/108452 With the legacy runtime directory layout, the runtime libraries are under `lib/clang/20/lib/windows` and have an arch suffix. >From c45f5df3c0ba7afd6c5e14e8e49ffa853abc7147 Mon Sep 17 00:00:00 2001 From: Arthu

[clang] [clang-tools-extra] [flang] Reapply "[clang] Extend diagnose_if to accept more detailed warning information (#70976)" (PR #108453)

2024-09-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/108453 This reverts commit e0cd11eba526234ca14a0b91f5598ca3363b6aca. Fix flang >From b429f137f3c1e2b2a72c9f3f444f6d43a8b5e35d Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 12 Sep 2024 21:27:27 +0200 S

[clang] [clang-tools-extra] [flang] Reapply "[clang] Extend diagnose_if to accept more detailed warning information (#70976)" (PR #108453)

2024-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Nikolas Klauser (philnik777) Changes This reverts commit e0cd11eba526234ca14a0b91f5598ca3363b6aca. Fix flang --- Patch is 65.53 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pul

[clang] [clang-tools-extra] [flang] Reapply "[clang] Extend diagnose_if to accept more detailed warning information (#70976)" (PR #108453)

2024-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang-tools-extra Author: Nikolas Klauser (philnik777) Changes This reverts commit e0cd11eba526234ca14a0b91f5598ca3363b6aca. Fix flang --- Patch is 65.53 KiB, truncated to 20.00 KiB below,

[clang] Reland: [clang] Diagnose dangling issues for the "Container" case. #107213 (PR #108344)

2024-09-12 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/108344 >From d1096323a87897b917ede2c29afd42c9f2674cd7 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 12 Sep 2024 09:27:03 +0200 Subject: [PATCH 1/3] Reapply "[clang] Diagnose dangling issues for the "Container" c

[clang] [clang-tools-extra] [flang] Reapply "[clang] Extend diagnose_if to accept more detailed warning information (#70976)" (PR #108453)

2024-09-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 d37d05795dbbdd1b7e629e966013df5967d2da5b b429f137f3c1e2b2a72c9f3f444f6d43a8b5e35d --e

[clang] [clang][test] Fix some windows driver tests with legacy runtime dir layout (PR #108452)

2024-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Arthur Eubanks (aeubanks) Changes With the legacy runtime directory layout, the runtime libraries are under `lib/clang/20/lib/windows` and have an arch suffix. --- Full diff: https://github.com/llvm/llvm-project/pull/108452.diff 2 Files

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

2024-09-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/108456 Introducing a new HLSL resource type attribute `[[contained_type(T)]]` which describes the "contained type" of a buffer or resource type. Specifically, the attribute will be used on the resource handle in templa

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

2024-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes Introducing a new HLSL resource type attribute `[[contained_type(T)]]` which describes the "contained type" of a buffer or resource type. Specifically, the attribute will be used on

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

2024-09-12 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/5] [HLSL] Add `[[hlsl::row_access]]` attribute This PR introduces

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

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

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-SATCVT-DS new instructions. (PR #102592)

2024-09-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-solaris11-sparcv9` running on `solaris11-sparcv9` while building `clang,llvm` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/13/builds/2175 Here is the relevant piec

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

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

[clang-tools-extra] [clang-tidy] remove type annotations that require python3.9 in add_new_check.py (PR #107850)

2024-09-12 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti closed https://github.com/llvm/llvm-project/pull/107850 ___ 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-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/108456 >From 9906af110af550643d816b1ed729c19e16027288 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 10 Sep 2024 14:38:19 -0700 Subject: [PATCH 1/3] [HLSL] Add `[[hlsl::contained_type()]]` resource type attribu

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

2024-09-12 Thread Justin Bogner via cfe-commits
@@ -942,6 +942,7 @@ class BTFTagAttributedTypeLoc struct HLSLAttributedResourceLocInfo { SourceRange Range; + TypeSourceInfo *ContainedTyTSI; bogner wrote: `ContainedTyInfo` might be a better name - we usually only use type abbreviations if its the whole

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

2024-09-12 Thread Justin Bogner via cfe-commits
@@ -30,9 +31,9 @@ class Scope; // FIXME: This can be hidden (as static function in SemaHLSL.cpp) once we no // longer need to create builtin buffer types in HLSLExternalSemaSource. -bool CreateHLSLAttributedResourceType(Sema &S, QualType Wrapped, -

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

2024-09-12 Thread Justin Bogner via cfe-commits
@@ -114,19 +115,30 @@ struct BuiltinTypeDeclBuilder { AccessSpecifier Access = AccessSpecifier::AS_private) { if (Record->isCompleteDefinition()) return *this; + +TypeSourceInfo *ElementTypeTSI = nullptr; bogner wrote: Same nami

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

2024-09-12 Thread Justin Bogner via cfe-commits
@@ -563,18 +566,23 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -bool clang::CreateHLSLAttributedResourceType(Sema &S, QualType Wrapped, - ArrayRef AttrList, -

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

2024-09-12 Thread Justin Bogner via cfe-commits
@@ -563,18 +566,23 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -bool clang::CreateHLSLAttributedResourceType(Sema &S, QualType Wrapped, - ArrayRef AttrList, -

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

2024-09-12 Thread Justin Bogner via cfe-commits
@@ -114,19 +115,30 @@ struct BuiltinTypeDeclBuilder { AccessSpecifier Access = AccessSpecifier::AS_private) { if (Record->isCompleteDefinition()) return *this; + +TypeSourceInfo *ElementTypeTSI = nullptr; + QualType Ty = Record->getASTContex

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

2024-09-12 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/6] [HLSL] Add `[[hlsl::row_access]]` attribute This PR introduces

<    1   2   3   4   5   6   >