[clang] [attributes][analyzer] Generalize [[clang::suppress]] to declarations. (PR #80371)

2024-02-20 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: Ok gotcha thanks! In any case, I'll do my best to handle this more gracefully in the future. Your advice is always appreciated! https://github.com/llvm/llvm-project/pull/80371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Justin Stitt via cfe-commits
@@ -399,6 +399,9 @@ Moved checkers Sanitizers -- +- ``-fsanitize=signed-integer-overflow`` now instruments signed arithmetic even + when ``-fwrapv`` is enabled. Previously, only division checks were enabled. JustinStitt wrote: Gotcha, resolved with

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/82432 >From b02b09b9eb4f9a8ac60dd077d95c67b959db3b70 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 20 Feb 2024 22:21:02 + Subject: [PATCH 1/3] support fwrapv with signed int overflow sanitizer --- cl

[clang] [Clang][Sema] Defer instantiation of exception specification until after partial ordering when determining primary template (PR #82417)

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

[clang] [Clang][Sema] Defer instantiation of exception specification until after partial ordering when determining primary template (PR #82417)

2024-02-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: 1 nit, else LGTM. We should probably have a release note as well. https://github.com/llvm/llvm-project/pull/82417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [Clang][Sema] Defer instantiation of exception specification until after partial ordering when determining primary template (PR #82417)

2024-02-20 Thread Erich Keane via cfe-commits
@@ -9706,9 +9706,17 @@ bool Sema::CheckFunctionTemplateSpecialization( if (Result == Candidates.end()) return true; - // Ignore access information; it doesn't figure into redeclaration checking. FunctionDecl *Specialization = cast(*Result); + auto *SpecializationFP

[clang] [Driver,BareMetal] Replace -lclang_rt.builtins{,-$arch}.a with an absolute path (PR #82424)

2024-02-20 Thread via cfe-commits
https://github.com/abidh approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/82424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [attributes][analyzer] Generalize [[clang::suppress]] to declarations. (PR #80371)

2024-02-20 Thread Erich Keane via cfe-commits
erichkeane wrote: > Hmm, no, I landed it because I made an assumption that there's simply not > that much interest in this work (I'm quite depressed about this in general > lately) so as a code owner I just made a call that it's probably good enough > to go and rely on post-commit review. Now

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: LGTM https://github.com/llvm/llvm-project/pull/82432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread via cfe-commits
@@ -0,0 +1,232 @@ +// RUN: %check_clang_tidy %s bugprone-unsafe-crtp %t + +namespace class_implicit_ctor { +template +class CRTP {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: the implicit default constructor of the CRTP is publicly accessible [bugprone-unsafe-crtp] +// CHECK-

[clang] [NVPTX] Enable the _Float16 type for NVPTX compilation (PR #82436)

2024-02-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: The PTX target supports the f16 type natively and we alreaqdy have a few LLVM backend tests that support the LLVM-IR. We should be able to enable this for generic use. This is done prior the f16 math

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-20 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: Ah OK, so split every variadic definition and let the inliner sort it out afterwards. Yes, I'm good with that. Tests either get messier or add a call to the inliner. Will update the PR correspondingly, solid simplification, thanks! Discard the combinatorial testing comme

[clang] [NVPTX] Enable the _Float16 type for NVPTX compilation (PR #82436)

2024-02-20 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/82436 Summary: The PTX target supports the f16 type natively and we alreaqdy have a few LLVM backend tests that support the LLVM-IR. We should be able to enable this for generic use. This is done prior the f16 math func

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Vitaly Buka via cfe-commits
@@ -399,6 +399,9 @@ Moved checkers Sanitizers -- +- ``-fsanitize=signed-integer-overflow`` now instruments signed arithmetic even + when ``-fwrapv`` is enabled. Previously, only division checks were enabled. vitalybuka wrote: It should work, it's abo

[clang] [attributes][analyzer] Generalize [[clang::suppress]] to declarations. (PR #80371)

2024-02-20 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: Hmm, no, I landed it because I made an assumption that there's simply not that much interest in this work (I'm quite depressed about this in general lately) so as a code owner I just made a call that it's probably good enough to go and rely on post-commit review. Now that you bri

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-20 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/81514 >From 13fd73932251843173cbbc31ca93905ca0469277 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Mon, 12 Feb 2024 10:58:19 -0800 Subject: [PATCH 1/2] [CLANG] Full support of complex multiplication and division.

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Vitaly Buka via cfe-commits
@@ -723,7 +723,9 @@ class ScalarExprEmitter if (Ops.Ty->isSignedIntegerOrEnumerationType()) { switch (CGF.getLangOpts().getSignedOverflowBehavior()) { case LangOptions::SOB_Defined: -return Builder.CreateMul(Ops.LHS, Ops.RHS, "mul"); +if (!CGF.Sa

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Justin Stitt via cfe-commits
@@ -399,6 +399,9 @@ Moved checkers Sanitizers -- +- ``-fsanitize=signed-integer-overflow`` now instruments signed arithmetic even + when ``-fwrapv`` is enabled. Previously, only division checks were enabled. JustinStitt wrote: Doesn't `-fno-sanitizer

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Justin Stitt via cfe-commits
@@ -723,7 +723,9 @@ class ScalarExprEmitter if (Ops.Ty->isSignedIntegerOrEnumerationType()) { switch (CGF.getLangOpts().getSignedOverflowBehavior()) { case LangOptions::SOB_Defined: -return Builder.CreateMul(Ops.LHS, Ops.RHS, "mul"); +if (!CGF.Sa

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Vitaly Buka via cfe-commits
@@ -723,7 +723,9 @@ class ScalarExprEmitter if (Ops.Ty->isSignedIntegerOrEnumerationType()) { switch (CGF.getLangOpts().getSignedOverflowBehavior()) { case LangOptions::SOB_Defined: -return Builder.CreateMul(Ops.LHS, Ops.RHS, "mul"); +if (!CGF.Sa

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Fangrui Song via cfe-commits
MaskRay wrote: @efriedma-quic @rjmccall https://github.com/llvm/llvm-project/pull/82432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Fangrui Song via cfe-commits
MaskRay wrote: Thanks! This does look simpler than `-fsanitize=signed-integer-wrap` https://github.com/llvm/llvm-project/pull/82432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-20 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-20 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-20 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-20 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-20 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Justin Stitt via cfe-commits
JustinStitt wrote: > ⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️ > > You can test this locally with the following command: > View the diff from clang-format here. Fixed in [e5e92e6](https://github.com/llvm/llvm-project/pull/82432/commits/e5e92e6c07a9fbbac698a3b6bb4422f2

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Vitaly Buka via cfe-commits
@@ -399,6 +399,9 @@ Moved checkers Sanitizers -- +- ``-fsanitize=signed-integer-overflow`` now instruments signed arithmetic even + when ``-fwrapv`` is enabled. Previously, only division checks were enabled. vitalybuka wrote: Maybe suggest to add `-f

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 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 1219214a3bcc51022492928b8bb4ff4bdb75d0cb b02b09b9eb4f9a8ac60dd077d95c67b959db3b70 --

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt edited https://github.com/llvm/llvm-project/pull/82432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver,BareMetal] Replace -lclang_rt.builtins{,-$arch}.a with an absolute path (PR #82424)

2024-02-20 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/82424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/82432 >From b02b09b9eb4f9a8ac60dd077d95c67b959db3b70 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 20 Feb 2024 22:21:02 + Subject: [PATCH 1/2] support fwrapv with signed int overflow sanitizer --- cl

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Justin Stitt (JustinStitt) Changes **Reasoning** Clang has a `signed-integer-overflow` sanitizer to catch arithmetic overflow; however, most of its instrumentation [fails to apply](https://godbolt.org/z/ee41rE8o6) when `-fwrapv` i

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-02-20 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt created https://github.com/llvm/llvm-project/pull/82432 **Reasoning** Clang has a `signed-integer-overflow` sanitizer to catch arithmetic overflow; however, most of its instrumentation [fails to apply](https://godbolt.org/z/ee41rE8o6) when `-fwrapv` is enabled; t

[clang] [Driver] Improve error when a compiler-rt library is not found (PR #81037)

2024-02-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/81037 >From cebb8f03af527395ff82880173f4a45353efae75 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 20 Feb 2024 13:29:25 -0800 Subject: [PATCH 1/2] [Driver,BareMetal] Replace -lclang_rt.builtins{,-$arch}.a wit

[clang] [Driver,BareMetal] Replace -lclang_rt.builtins{,-$arch}.a with an absolute path (PR #82424)

2024-02-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/82424 >From 109d56601acf9bd84af3baf2f200c1f6fdd66d71 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 20 Feb 2024 13:42:54 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,167 @@ +//===--- UnsafeCrtpCheck.cpp - clang-tidy -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,232 @@ +// RUN: %check_clang_tidy %s bugprone-unsafe-crtp %t + +namespace class_implicit_ctor { +template +class CRTP {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: the implicit default constructor of the CRTP is publicly accessible [bugprone-unsafe-crtp] +// CHECK-

[clang] [attributes][analyzer] Generalize [[clang::suppress]] to declarations. (PR #80371)

2024-02-20 Thread Erich Keane via cfe-commits
erichkeane wrote: > did I miss something - it looks like this was committed without approval? It looks that way to me @haoNoQ : Did you commit this instead of something else? Can you revert this until we get approval? https://github.com/llvm/llvm-project/pull/80371 ___

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,62 @@ +.. title:: clang-tidy - bugprone-unsafe-crtp + +bugprone-unsafe-crtp + + +Finds CRTP used in an error-prone way. + +If the constructor of a class intended to be used in a CRTP is public, then +it allows users to construct that class on its own

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,232 @@ +// RUN: %check_clang_tidy %s bugprone-unsafe-crtp %t + +namespace class_implicit_ctor { +template +class CRTP {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: the implicit default constructor of the CRTP is publicly accessible [bugprone-unsafe-crtp] +// CHECK-

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread Piotr Zegar via cfe-commits
@@ -106,6 +106,11 @@ New checks Replaces certain conditional statements with equivalent calls to ``std::min`` or ``std::max``. +- New :doc:`bugprone-unsafe-crtp PiotrZSL wrote: sounds fine. https://github.com/llvm/llvm-project/pull/82403

[clang] [clang] Implement __builtin_popcountg (PR #82359)

2024-02-20 Thread via cfe-commits
https://github.com/overmighty updated https://github.com/llvm/llvm-project/pull/82359 >From c14dab5f9419507cc3d0ac803e1bfebb3f3b0f94 Mon Sep 17 00:00:00 2001 From: OverMighty Date: Tue, 20 Feb 2024 13:45:13 + Subject: [PATCH 1/3] [clang] Implement __builtin_popcountg Fixes #82058. --- cla

[clang] [Clang][Sema] Fix incorrect rejection default construction of union with nontrivial member (PR #82407)

2024-02-20 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/82407 >From 5fcaeaddccc0f7e370bf7bebce113d8d52e1b1bd Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Tue, 20 Feb 2024 11:22:39 -0800 Subject: [PATCH] [Clang][Sema] Fix incorrect rejection default construction of u

[clang] [clang] Implement __builtin_popcountg (PR #82359)

2024-02-20 Thread via cfe-commits
https://github.com/overmighty updated https://github.com/llvm/llvm-project/pull/82359 >From c14dab5f9419507cc3d0ac803e1bfebb3f3b0f94 Mon Sep 17 00:00:00 2001 From: OverMighty Date: Tue, 20 Feb 2024 13:45:13 + Subject: [PATCH 1/2] [clang] Implement __builtin_popcountg Fixes #82058. --- cla

[clang] [Clang][Sema] Fix incorrect rejection default construction of union with nontrivial member (PR #82407)

2024-02-20 Thread Shafik Yaghmour via cfe-commits
@@ -9442,9 +9442,21 @@ bool SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall( int DiagKind = -1; - if (SMOR.getKind() == Sema::SpecialMemberOverloadResult::NoMemberOrDeleted) -DiagKind = !Decl ? 0 : 1; - else if (SMOR.getKind() == Sema::SpecialMemberOverloadRe

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

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

[clang] [Driver,BareMetal] Replace -lclang_rt.builtins{,-$arch}.a with an absolute path (PR #82424)

2024-02-20 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/82424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-20 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: This is still WIP in progress, but I would like to get @MaskRay's opinion about the feasibility of getting this new option approved knowing that the 2 options being potentially replaced are already merged in clang18 and are probably already used by some users. https://github.c

[clang] [Driver] Improve error when a compiler-rt library is not found (PR #81037)

2024-02-20 Thread Fangrui Song via cfe-commits
@@ -44,9 +43,8 @@ // CHECK-V6M-DEFAULTCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]" // CHECK-V6M-DEFAULTCXX: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" "-EL" // CHECK-V6M-DEFAULTCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}Inputs{{[/\\]+}}baremetal_arm{{[/\\]+}}lib" -// CHECK-V6M-DEFAULTCXX-SAME

[clang] [Driver,BareMetal] Replace -lclang_rt.builtins{,-$arch}.a with an absolute path (PR #82424)

2024-02-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes The generic `tools::AddRunTimeLibs` uses an absolute path. Change BareMetal to match. I believe users are not supposed to place other files under the directory containing `libclang_rt.builtins-$arch.a`. If th

[clang] [Driver,BareMetal] Replace -lclang_rt.builtins{,-$arch}.a with an absolute path (PR #82424)

2024-02-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Fangrui Song (MaskRay) Changes The generic `tools::AddRunTimeLibs` uses an absolute path. Change BareMetal to match. I believe users are not supposed to place other files under the directory containing `libclang_rt.builtins-$arch.a`

[clang] [Driver,BareMetal] Replace -lclang_rt.builtins{,-$arch}.a with an absolute path (PR #82424)

2024-02-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/82424 The generic `tools::AddRunTimeLibs` uses an absolute path. Change BareMetal to match. I believe users are not supposed to place other files under the directory containing `libclang_rt.builtins-$arch.a`. If they r

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-20 Thread Axel Lundberg via cfe-commits
Zonotora wrote: @zygoloid what do you think? https://github.com/llvm/llvm-project/pull/75481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Make brief descriptions briefer (PR #82422)

2024-02-20 Thread Paul T Robinson via cfe-commits
pogo59 wrote: @cflores this is the upstream review I mentioned https://github.com/llvm/llvm-project/pull/82422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Make brief descriptions briefer (PR #82422)

2024-02-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Paul T Robinson (pogo59) Changes In Sony's document processing, the first "paragraph" of the description is copied to a Brief Description section. Add paragraph breaks to make those brief descriptions less

[clang] [Headers][X86] Make brief descriptions briefer (PR #82422)

2024-02-20 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 created https://github.com/llvm/llvm-project/pull/82422 In Sony's document processing, the first "paragraph" of the description is copied to a Brief Description section. Add paragraph breaks to make those brief descriptions less verbose. In fmaintrin.h we were includ

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-20 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 d08d3159d5ee0ee127d3581776ef569b8a6113af eb9a35c4b3c42b0caf3ce4759dd4b1b640a8 --

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-20 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/81514 >From 13fd73932251843173cbbc31ca93905ca0469277 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Mon, 12 Feb 2024 10:58:19 -0800 Subject: [PATCH 1/2] [CLANG] Full support of complex multiplication and division.

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread via cfe-commits
@@ -0,0 +1,62 @@ +.. title:: clang-tidy - bugprone-unsafe-crtp + +bugprone-unsafe-crtp + + +Finds CRTP used in an error-prone way. + +If the constructor of a class intended to be used in a CRTP is public, then +it allows users to construct that class on its own

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread via cfe-commits
@@ -0,0 +1,167 @@ +//===--- UnsafeCrtpCheck.cpp - clang-tidy -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [attributes][analyzer] Generalize [[clang::suppress]] to declarations. (PR #80371)

2024-02-20 Thread David Blaikie via cfe-commits
dwblaikie wrote: did I miss something - it looks like this was committed without approval? https://github.com/llvm/llvm-project/pull/80371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-20 Thread Michael Spencer via cfe-commits
@@ -67,7 +68,7 @@ static bool checkHeaderSearchPaths(const HeaderSearchOptions &HSOpts, if (LangOpts.Modules) { if (HSOpts.VFSOverlayFiles != ExistingHSOpts.VFSOverlayFiles) { if (Diags) { -Diags->Report(diag::err_pch_vfsoverlay_mismatch); +Diags->R

[clang] [HLSL][Doc] Add doc about expected differences (PR #82395)

2024-02-20 Thread S. Bharadwaj Yadavalli via cfe-commits
https://github.com/bharadwajy edited https://github.com/llvm/llvm-project/pull/82395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-20 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > I believe we can move forward by reusing > > `-fsanitize=signed-integer-overflow`, which adds least complexity to Clang > > and is very reasonable. > > I see a few problems with changing `-fsanitize=signed-integer-overflow`: > > 1. Clang no longer matches GCC's SIO function

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread via cfe-commits
@@ -0,0 +1,232 @@ +// RUN: %check_clang_tidy %s bugprone-unsafe-crtp %t + +namespace class_implicit_ctor { +template +class CRTP {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: the implicit default constructor of the CRTP is publicly accessible [bugprone-unsafe-crtp] +// CHECK-

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread via cfe-commits
@@ -0,0 +1,62 @@ +.. title:: clang-tidy - bugprone-unsafe-crtp + +bugprone-unsafe-crtp + + +Finds CRTP used in an error-prone way. + +If the constructor of a class intended to be used in a CRTP is public, then +it allows users to construct that class on its own

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread via cfe-commits
@@ -106,6 +106,11 @@ New checks Replaces certain conditional statements with equivalent calls to ``std::min`` or ``std::max``. +- New :doc:`bugprone-unsafe-crtp isuckatcs wrote: How about `bugprone-crtp-constructor-accessibility`? https://github.com/llvm

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread via cfe-commits
@@ -0,0 +1,232 @@ +// RUN: %check_clang_tidy %s bugprone-unsafe-crtp %t + +namespace class_implicit_ctor { +template +class CRTP {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: the implicit default constructor of the CRTP is publicly accessible [bugprone-unsafe-crtp] +// CHECK-

[clang] [HLSL][Doc] Add doc about expected differences (PR #82395)

2024-02-20 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -0,0 +1,107 @@ + +Expected Differences vs DXC and FXC +=== + +.. contents:: + :local: + +Introduction + + +HLSL currently has two reference compilers, the `DirectX Shader Compiler (DXC) +

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-20 Thread Axel Lundberg via cfe-commits
https://github.com/Zonotora updated https://github.com/llvm/llvm-project/pull/75481 >From a3de13f8356cd615534c759b6e24893d361e62e9 Mon Sep 17 00:00:00 2001 From: Zonotora Date: Sat, 16 Dec 2023 19:33:21 +0100 Subject: [PATCH 1/3] [clang] Extract negativity check lambda to function --- clang/l

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-20 Thread Jon Chesterfield via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

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

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread via cfe-commits
@@ -0,0 +1,232 @@ +// RUN: %check_clang_tidy %s bugprone-unsafe-crtp %t + +namespace class_implicit_ctor { +template +class CRTP {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: the implicit default constructor of the CRTP is publicly accessible [bugprone-unsafe-crtp] +// CHECK-

[clang-tools-extra] [run-clang-tidy.py] Add option to ignore source files from compilation database (PR #82416)

2024-02-20 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > Why "ignore" instead of "filter"? Why can't we make "filter" use a full regex that supports negative expressions instead? https://github.com/llvm/llvm-project/pull/82416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Defer instantiation of exception specification until after partial ordering when determining primary template (PR #82417)

2024-02-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/82417 >From 16b6ce3b1895c15ce896c5e8dcbe29ee1274d38b Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 20 Feb 2024 14:03:50 -0500 Subject: [PATCH] [Clang][Sema] Defer instantiation of exception specifica

[clang] [Clang][Sema] Defer instantiation of exception specification until after partial ordering when determining primary template (PR #82417)

2024-02-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes Consider the following: ```cpp struct A { static constexpr bool x = true; }; template void f(T, U) noexcept(T::y); // #1, error: no member named 'y' in 'A' template

[clang] [Clang][Sema] Defer instantiation of exception specification until after partial ordering when determining primary template (PR #82417)

2024-02-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/82417 Consider the following: ```cpp struct A { static constexpr bool x = true; }; template void f(T, U) noexcept(T::y); // #1, error: no member named 'y' in 'A' template void f(T, U*) noexcept(T::x); // #2 temp

[clang-tools-extra] [run-clang-tidy.py] Add option to ignore source files from compilation database (PR #82416)

2024-02-20 Thread Alexander Scholz via cfe-commits
https://github.com/duddel updated https://github.com/llvm/llvm-project/pull/82416 >From a3596bf357ef991abcaef04f8811958c0984d9f6 Mon Sep 17 00:00:00 2001 From: duddel Date: Tue, 20 Feb 2024 21:11:26 +0100 Subject: [PATCH 1/2] add -source-ignore option to run-clang-tidy.py --- .../clang-tidy/t

[clang-tools-extra] [run-clang-tidy.py] Add option to ignore source files from compilation database (PR #82416)

2024-02-20 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r f740366fa68d3cfceda7efe2d573348253fbb1e9...a3596bf357ef991abcaef04f8811958c0984d9f6 clang

[clang-tools-extra] [run-clang-tidy.py] Add option to ignore source files from compilation database (PR #82416)

2024-02-20 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-em

[clang-tools-extra] [run-clang-tidy.py] Add option to ignore source files from compilation database (PR #82416)

2024-02-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Alexander (duddel) Changes I added the option `-source-ignore` to the `run-clang-tidy.py` script in the clang-tools-extra. This option allows for handing over a regex, to ignore matching source

[clang] [HLSL][Doc] Add doc about expected differences (PR #82395)

2024-02-20 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/82395 >From 558dd6182a4dc6fc5c5383358cac422289a7a90b Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Tue, 20 Feb 2024 12:01:16 -0600 Subject: [PATCH 1/4] [HLSL][Doc] Add doc about expected differences This docu

[clang-tools-extra] [run-clang-tidy.py] Add option to ignore source files from compilation database (PR #82416)

2024-02-20 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang-tools-extra] [run-clang-tidy.py] Add option to ignore source files from compilation database (PR #82416)

2024-02-20 Thread via cfe-commits
https://github.com/duddel created https://github.com/llvm/llvm-project/pull/82416 I added the option `-source-ignore` to the `run-clang-tidy.py` script in the clang-tools-extra. This option allows for handing over a regex, to ignore matching source files from the compilation database (not run

[clang] [clang] Implement CWG1719 "Layout compatibility and cv-qualification revisited" (PR #82358)

2024-02-20 Thread Vlad Serebrennikov via cfe-commits
@@ -1711,13 +1711,13 @@ void is_layout_compatible(int n) { static_assert(__is_layout_compatible(void, void), ""); static_assert(!__is_layout_compatible(void, int), ""); - static_assert(!__is_layout_compatible(void, const void), ""); // FIXME: this is CWG1719 - static_ass

[clang] [clang] Implement CWG1719 "Layout compatibility and cv-qualification revisited" (PR #82358)

2024-02-20 Thread Vlad Serebrennikov via cfe-commits
@@ -120,6 +119,10 @@ Resolutions to C++ Defect Reports in the template parameters, but is deduced from a previous argument. (`#78449: `_). +- ``const`` and ``volatile`` qualifiers are now ignored when evaluating --

[clang] [clang] Implement CWG1719 "Layout compatibility and cv-qualification revisited" (PR #82358)

2024-02-20 Thread Vlad Serebrennikov via cfe-commits
@@ -120,6 +119,10 @@ Resolutions to C++ Defect Reports in the template parameters, but is deduced from a previous argument. (`#78449: `_). +- ``const`` and ``volatile`` qualifiers are now ignored when evaluating --

[clang] [clang] Implement CWG1719 "Layout compatibility and cv-qualification revisited" (PR #82358)

2024-02-20 Thread Vlad Serebrennikov via cfe-commits
@@ -66,11 +66,10 @@ struct CStructWithQualifiers { static_assert(__is_layout_compatible(CStruct, const CStruct2), ""); static_assert(__is_layout_compatible(CStruct, volatile CStruct2), ""); static_assert(__is_layout_compatible(const CStruct, volatile CStruct2), ""); -// FIXME:

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-20 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield dismissed https://github.com/llvm/llvm-project/pull/81921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-20 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield commented: Stalled on https://github.com/llvm/llvm-project/pull/81557, trying to remove the approve mark as otherwise i'll forget about this https://github.com/llvm/llvm-project/pull/81921 ___ cfe-commits mailing lis

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-20 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,160 @@ +//===--- UseDesignatedInitializersCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang] Implement CWG1719 "Layout compatibility and cv-qualification revisited" (PR #82358)

2024-02-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/82358 >From 15d9428a47ea5d7ba3b4ffd2e766406b16d781e0 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 20 Feb 2024 16:44:04 +0300 Subject: [PATCH 1/3] [clang] Implement CWG1719 "Layout compatibility and cv-

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,62 @@ +.. title:: clang-tidy - bugprone-unsafe-crtp + +bugprone-unsafe-crtp + + +Finds CRTP used in an error-prone way. + +If the constructor of a class intended to be used in a CRTP is public, then +it allows users to construct that class on its own

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,167 @@ +//===--- UnsafeCrtpCheck.cpp - clang-tidy -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,232 @@ +// RUN: %check_clang_tidy %s bugprone-unsafe-crtp %t + +namespace class_implicit_ctor { +template +class CRTP {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: the implicit default constructor of the CRTP is publicly accessible [bugprone-unsafe-crtp] +// CHECK-

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,232 @@ +// RUN: %check_clang_tidy %s bugprone-unsafe-crtp %t + +namespace class_implicit_ctor { +template +class CRTP {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: the implicit default constructor of the CRTP is publicly accessible [bugprone-unsafe-crtp] +// CHECK-

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-20 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,62 @@ +.. title:: clang-tidy - bugprone-unsafe-crtp + +bugprone-unsafe-crtp + + +Finds CRTP used in an error-prone way. + +If the constructor of a class intended to be used in a CRTP is public, then +it allows users to construct that class on its own

<    1   2   3   4   5   >