[clang] [Clang] Allow raw string literals in C as an extension (PR #88265)

2024-04-22 Thread via cfe-commits
Sirraide wrote: > I don't think we should allow it for C++11 and later modes To clarify, should we allow enabling them in e.g. `c++03` mode if `-fraw-string-literals` is passed? I don’t see why not, but I’m not entirely sure whether you’re saying we should not support that flag in C++ (neither

[clang] [Clang] Allow raw string literals in C as an extension (PR #88265)

2024-04-22 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/88265 >From 40e533e6f58acbe832b3fa4e14ca9fd600cf77cf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 10 Apr 2024 14:36:23 +0200 Subject: [PATCH 1/2] [Clang] Allow raw string literals in C as an extension --- clan

[clang] [clang-tools-extra] [compiler-rt] [flang] [libc] [libclc] [libcxx] [libcxxabi] [libunwind] [lld] [lldb] [llvm] [mlir] [openmp] [polly] [pstl] Update IDE Folders (PR #89153)

2024-04-22 Thread Felipe de Azevedo Piovezan via cfe-commits
@@ -406,5 +426,13 @@ function(llvm_ExternalProject_Add name source_dir) WORKING_DIRECTORY ${BINARY_DIR} VERBATIM USES_TERMINAL) +if (ARG_FOLDER) + set_target_properties(${target} PROPERTIES FOLDER "${ARG_FOLDER}") +endif () endforeach() + + #s

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-22 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/89639 >From b95304b22915217ad149c1b22a6517c585067acf Mon Sep 17 00:00:00 2001 From: erichkeane Date: Mon, 22 Apr 2024 10:35:13 -0700 Subject: [PATCH 1/2] [NFC] Factor out common parts of ArraySections into its own

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-22 Thread Erich Keane via cfe-commits
@@ -6610,6 +6610,111 @@ class TypoExpr : public Expr { }; +// This is a sub-class for OpenMP and OpenACC array sections. OpenACC uses a +// very small subset of the functionality, so this class only exposes the things +// the two have in common. This type is not expected to

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-22 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/89639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIR-V] Always add convervence intrinsics (PR #88918)

2024-04-22 Thread Justin Bogner via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -3101,3 +3130,68 @@ CodeGenFunction::GenerateCapturedStmtFunction(const CapturedStmt &S) { return F; } + +namespace { +// Returns the first convergence entry/loop/anchor instruction found in

[clang] [clang][SPIR-V] Always add convervence intrinsics (PR #88918)

2024-04-22 Thread Justin Bogner via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -3101,3 +3130,68 @@ CodeGenFunction::GenerateCapturedStmtFunction(const CapturedStmt &S) { return F; } + +namespace { +// Returns the first convergence entry/loop/anchor instruction found in

[clang] [clang-tools-extra] [compiler-rt] [flang] [libc] [libclc] [libcxx] [libcxxabi] [libunwind] [lld] [lldb] [llvm] [mlir] [openmp] [polly] [pstl] Update IDE Folders (PR #89153)

2024-04-22 Thread via cfe-commits
@@ -56,11 +56,13 @@ endfunction() # Use provided strip tool instead of the default one. # TARGET_TRIPLE triple # Optional target triple to pass to the compiler +# FOLDER +# For IDEs, the Folder to put the targets into.= whisperity wrote: Maybe

[clang] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-22 Thread Xiang Li via cfe-commits
@@ -9,7 +9,7 @@ cbuffer A : register(b0, space2) { } // CHECK: @[[TB:.+]] = external constant { float, double } -tbuffer A : register(t2, space1) { +tbuffer A : register(b2, space1) { python3kgae wrote: This is tbuffer, it should use 't' instead of 'b'. http

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-04-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/86586 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ca1f1c9 - [BitInt] Expose a _BitInt literal suffix in C++ (#86586)

2024-04-22 Thread via cfe-commits
Author: js324 Date: 2024-04-22T14:42:57-04:00 New Revision: ca1f1c957232b05d6529916bcd769ae1c57ff935 URL: https://github.com/llvm/llvm-project/commit/ca1f1c957232b05d6529916bcd769ae1c57ff935 DIFF: https://github.com/llvm/llvm-project/commit/ca1f1c957232b05d6529916bcd769ae1c57ff935.diff LOG: [B

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-04-22 Thread via cfe-commits
github-actions[bot] wrote: @js324 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build, y

[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-22 Thread Aaron Ballman via cfe-commits
@@ -89,6 +89,19 @@ sections with improvements to Clang's support for those languages. C++ Language Changes +C++17 Feature Support +^ +- Clang now exposes ``__GCC_DESTRUCTIVE_SIZE`` and ``__GCC_CONSTRUCTIVE_SIZE`` + predefined macros t

[clang] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-22 Thread Justin Bogner via cfe-commits
@@ -7334,6 +7334,81 @@ static void handleHLSLShaderAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +static void DiagnoseHLSLResourceRegType(Sema &S, SourceLocation &ArgLoc, +Decl *D, StringRef &Slot) { + // Sa

[clang] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-22 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,74 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// the below will cause an llvm unreachable, because RWBuffers don't have resource attributes yet +// NOT YET IMPLEMENTED : {{invalid register name prefix 'b' for

[clang] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-22 Thread Justin Bogner via cfe-commits
@@ -478,33 +478,35 @@ void HLSLExternalSemaSource::defineTrivialHLSLTypes() { /// Set up common members and attributes for buffer types static BuiltinTypeDeclBuilder setupBufferType(CXXRecordDecl *Decl, Sema &S, - ResourceClass RC,

[clang] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-22 Thread Justin Bogner via cfe-commits
@@ -45,7 +45,7 @@ void foo2() { extern RWBuffer U2 : register(u5); } // FIXME: expect-error once fix https://github.com/llvm/llvm-project/issues/57886. -float b : register(u0, space1); +// float b : register(u0, space1) {} bogner wrote: Shouldn't we be addi

[clang] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-22 Thread Justin Bogner via cfe-commits
@@ -7334,6 +7334,81 @@ static void handleHLSLShaderAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +static void DiagnoseHLSLResourceRegType(Sema &S, SourceLocation &ArgLoc, +Decl *D, StringRef &Slot) { + // Sa

[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-22 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. We probably want more feedback on that but otherwise, LGTM https://github.com/llvm/llvm-project/pull/89446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-22 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Unless you want this to be merged as 115098653+ealc...@users.noreply.github.com, change your email privacy settings. https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-22 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/89639 >From b95304b22915217ad149c1b22a6517c585067acf Mon Sep 17 00:00:00 2001 From: erichkeane Date: Mon, 22 Apr 2024 10:35:13 -0700 Subject: [PATCH 1/3] [NFC] Factor out common parts of ArraySections into its own

[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-22 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Here are the values that I found for GCC that don't match the defaults. |Platform|Constructive|Destructive|Link |-|-|-|-| |ARM64|64|256|https://godbolt.org/z/G7arf9nPP| |AVR|32|32|https://godbolt.org/z/Yq64f9Koj| |BPF|32|32|https://godbolt.org/z/zezK71zoe| |M68K|32|32|https:/

[clang] [clang-tools-extra] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-22 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > It's also possible that merging `PointerAuthQualifier` into `Mask` inside > `Qualifiers` would make some of the low-level handling more efficient. I'm now applying this approach and it looks like that the overhead becomes significantly lower. A new invariant has to be introdu

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/85060 >From 07248879092c0e752811b4c33b98c50d42230d14 Mon Sep 17 00:00:00 2001 From: Daniel Alcaide Nombela Date: Wed, 13 Mar 2024 11:28:34 +0100 Subject: [PATCH] [clang-tidy] Avoid overflow when dumping unsigned integ

[clang] 6b1b4c1 - [RISCV][clang] Don't enable -mrelax-all for -O0 on RISC-V (#88538)

2024-04-22 Thread via cfe-commits
Author: Craig Topper Date: 2024-04-22T12:04:15-07:00 New Revision: 6b1b4c1c54d4276409c336eaf6d47b3bc04035c3 URL: https://github.com/llvm/llvm-project/commit/6b1b4c1c54d4276409c336eaf6d47b3bc04035c3 DIFF: https://github.com/llvm/llvm-project/commit/6b1b4c1c54d4276409c336eaf6d47b3bc04035c3.diff

[clang] [RISCV][clang] Don't enable -mrelax-all for -O0 on RISC-V (PR #88538)

2024-04-22 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/88538 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-22 Thread Björn Schäpers via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName); +

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-22 Thread Björn Schäpers via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName); -

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-22 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks commented: The question is, is there any real benefit of putting the commented style in the output? https://github.com/llvm/llvm-project/pull/89228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-22 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks edited https://github.com/llvm/llvm-project/pull/89228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-22 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @AaronBallman thanks for picking this up! I agree with @cor3ntin and @ldionne that we should provide the macros unconditionally. This brings us one step closer to finally making libc++ fully conforming in C++17. With the PSTL finally making steady progress, we're probably onl

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-04-22 Thread Benson Chu via cfe-commits
https://github.com/pestctrl created https://github.com/llvm/llvm-project/pull/89654 The interrupt attribute currently doesn't save floating-point related registers in the frame setup and destroy. This patch adds a new interrupt_save_fp attribute that will save floating-point registers as wel

[clang] Add clang_elementwise_builtin_alias (PR #86175)

2024-04-22 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 converted_to_draft https://github.com/llvm/llvm-project/pull/86175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-04-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-arm @llvm/pr-subscribers-clang Author: Benson Chu (pestctrl) Changes The interrupt attribute currently doesn't save floating-point related registers in the frame setup and destroy. This patch adds a new interrupt_save_fp attribute that will sa

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-04-22 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff dd7963239e94bcd46e56ae90b08d2d0c9904ff00 0616e7c04d64e2be323bb39904d41a35c3992537 --

[clang] [clang][CodeGen][NFC] Make ConstExprEmitter a ConstStmtVisitor (PR #89041)

2024-04-22 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. https://github.com/llvm/llvm-project/pull/89041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-04-22 Thread Benson Chu via cfe-commits
https://github.com/pestctrl updated https://github.com/llvm/llvm-project/pull/89654 >From bcd01dbcbbb8950228005fadfa73bbeb49b7381d Mon Sep 17 00:00:00 2001 From: Jake Vossen Date: Wed, 30 Jun 2021 15:13:13 -0500 Subject: [PATCH 1/2] [ARM] Save floating point registers with save_fp function att

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-04-22 Thread Benson Chu via cfe-commits
https://github.com/pestctrl updated https://github.com/llvm/llvm-project/pull/89654 >From bcd01dbcbbb8950228005fadfa73bbeb49b7381d Mon Sep 17 00:00:00 2001 From: Jake Vossen Date: Wed, 30 Jun 2021 15:13:13 -0500 Subject: [PATCH 1/2] [ARM] Save floating point registers with save_fp function att

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,274 @@ +//===--- MinMaxUseInitializerListCheck.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] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

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

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Except few pointed out nits, looks fine to me. Would be nice to run it on some bigger project like llvm or something. https://github.com/llvm/llvm-project/pull/85572 ___ cfe-commits mailing list c

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,274 @@ +//===--- MinMaxUseInitializerListCheck.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] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,274 @@ +//===--- MinMaxUseInitializerListCheck.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] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,274 @@ +//===--- MinMaxUseInitializerListCheck.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] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,45 @@ +.. title:: clang-tidy - modernize-min-max-use-initializer-list + +modernize-min-max-use-initializer-list +== + +Replaces nested ``std::min`` and ``std::max`` calls with an initializer list where applicable. + +For instance, co

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,274 @@ +//===--- MinMaxUseInitializerListCheck.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] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,45 @@ +.. title:: clang-tidy - modernize-min-max-use-initializer-list + +modernize-min-max-use-initializer-list +== + +Replaces nested ``std::min`` and ``std::max`` calls with an initializer list where applicable. + +For instance, co

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,274 @@ +//===--- MinMaxUseInitializerListCheck.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] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-04-22 Thread Benson Chu via cfe-commits
https://github.com/pestctrl updated https://github.com/llvm/llvm-project/pull/89654 >From 45cb75575e807b576476e6822587af5c10c9c77f Mon Sep 17 00:00:00 2001 From: Jake Vossen Date: Wed, 30 Jun 2021 15:13:13 -0500 Subject: [PATCH 1/2] [ARM] Save floating point registers with save_fp function att

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-04-22 Thread Benson Chu via cfe-commits
https://github.com/pestctrl updated https://github.com/llvm/llvm-project/pull/89654 >From 45cb75575e807b576476e6822587af5c10c9c77f Mon Sep 17 00:00:00 2001 From: Jake Vossen Date: Wed, 30 Jun 2021 15:13:13 -0500 Subject: [PATCH 1/2] [ARM] Save floating point registers with save_fp function att

[clang] forCallable should not erase binding on success (PR #89657)

2024-04-22 Thread Marco Borgeaud via cfe-commits
https://github.com/marco-antognini-sonarsource created https://github.com/llvm/llvm-project/pull/89657 Do not erase Builder when the first check fails because it could succeed on the second stack frame. The problem was that `InnerMatcher.matches` erases the bindings when it returns false. The

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-04-22 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-04-22 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/89005 >From 45e7409a92546aab4cf8c79ce0ba40133e4dfe4c Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 16 Apr 2024 17:08:28 -0700 Subject: [PATCH] [clang][modules] HeaderSearch::MarkFileModuleHeader sets

[clang] forCallable should not erase binding on success (PR #89657)

2024-04-22 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-email

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-04-22 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASTMatchers] forCallable should not erase binding on success (PR #89657)

2024-04-22 Thread Marco Borgeaud via cfe-commits
https://github.com/marco-antognini-sonarsource edited https://github.com/llvm/llvm-project/pull/89657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-04-22 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: I guess https://github.com/llvm/llvm-project/pull/89441 is the real issue that https://github.com/llvm/llvm-project/pull/83660 caused, but we should still fix this for correctness, even though I'm not sure what the visible consequence is of this bug. https://github.co

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-22 Thread Andy Kaylor via cfe-commits
@@ -318,12 +320,12 @@ // RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \ // RUN: -fno-trapping-math -ftrapping-math -c %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-NO-REASSOC-NO-UNSAFE-MATH %s +// RUN: | FileCheck --check-prefix=CHECK-N

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-04-22 Thread Benson Chu via cfe-commits
https://github.com/pestctrl updated https://github.com/llvm/llvm-project/pull/89654 >From b9efa107018daba0d45248d42043c191b28f190c Mon Sep 17 00:00:00 2001 From: Jake Vossen Date: Wed, 30 Jun 2021 15:13:13 -0500 Subject: [PATCH 1/2] [ARM] Save floating point registers with save_fp function att

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-22 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/86618 >From 10ee32826fc2acb6bd993c88bdb7142360b6f263 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH 01/11] implement wraps attribute Signed-off-by: Justin Stitt -

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-22 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/86618 >From 50e7b1039e514dacc05bb8cd9ff9a3e3df9ed24d Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH 01/11] implement wraps attribute Signed-off-by: Justin Stitt -

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-22 Thread Justin Stitt via cfe-commits
JustinStitt wrote: Ping! I've rebased this PR onto bcd150d2906ac83ea0ab680e981770a71c021a03 and fixed the issues with the docs not building because of faulty code-blocks. Bigger picture, for the Linux Kernel, the current plan is to only enable certain integer sanitizers if support for this wr

[clang] [clang][SPIR-V] Always add convervence intrinsics (PR #88918)

2024-04-22 Thread Chris B via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -3101,3 +3130,68 @@ CodeGenFunction::GenerateCapturedStmtFunction(const CapturedStmt &S) { return F; } + +namespace { +// Returns the first convergence entry/loop/anchor instruction found in

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-22 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/89051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-22 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/89051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-22 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,194 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +fullbf16 -S -emit-llvm %s -o - | FileCheck %s +// CHECK-LABEL: define dso_local half @test

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-04-22 Thread David Blaikie via cfe-commits
@@ -1787,7 +1787,26 @@ Value *ScalarExprEmitter::VisitMemberExpr(MemberExpr *E) { } } - return EmitLoadOfLValue(E); + llvm::Value *Result = EmitLoadOfLValue(E); + + // If -fdebug_info_for_profiling is specified, emit a pseudo variable and its dwblaik

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-04-22 Thread David Blaikie via cfe-commits
@@ -5636,6 +5636,84 @@ void CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var, Var->addDebugInfo(GVE); } +void CGDebugInfo::EmitPseudoVariable(CGBuilderTy &Builder, + llvm::Instruction *Value, QualType Ty) { + // Only when -g2

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-04-22 Thread David Blaikie via cfe-commits
@@ -5636,6 +5636,84 @@ void CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var, Var->addDebugInfo(GVE); } +void CGDebugInfo::EmitPseudoVariable(CGBuilderTy &Builder, + llvm::Instruction *Value, QualType Ty) { + // Only when -g2

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-22 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Looks like automation didn't trigger, but: > ⚠️ 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 > Dis

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-22 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/88978 >From 3acc848f4fcc68445dfc849f9c6f8d384d3692af Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Tue, 16 Apr 2024 13:09:58 -0700 Subject: [PATCH 1/2] Adding C23 constexpr math functions fmin and frexp. -

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-22 Thread Zahira Ammarguellat via cfe-commits
@@ -2922,7 +2922,7 @@ static bool handleFloatFloatBinOp(EvalInfo &Info, const BinaryOperator *E, // If during the evaluation of an expression, the result is not // mathematically defined [...], the behavior is undefined. // FIXME: C++ rules require us to not conform

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

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

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Zahira Ammarguellat (zahiraam) Changes Add support for for fmin and frexp. --- Full diff: https://github.com/llvm/llvm-project/pull/88978.diff 4 Files Affected: - (modified) clang/include/clang/Basic/Builtins.td (+2-2) - (modified) cla

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-04-22 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/79230 >From 95200f3bb3859738981240a9d8c503a13ede9601 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Tue, 16 Jan 2024 13:18:09 -0800 Subject: [PATCH 01/12] Add support for builtin_verbose_trap The builtin causes

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-04-22 Thread via cfe-commits
shraiysh wrote: I see. Thanks for the reply. https://github.com/llvm/llvm-project/pull/80343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-22 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/89473 >From 100fc9dfb2b071877d758ce71bddeec693d986da Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 19 Apr 2024 16:35:00 -0700 Subject: [PATCH 1/2] Fix -fno-unsafe-math-optimizations behavior This changes th

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-04-22 Thread David Blaikie via cfe-commits
@@ -3424,6 +3445,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor( dwblaikie wrote: I think I agree

[clang] [Clang] Improve testing for the flexible array member (PR #89462)

2024-04-22 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/89462 >From 2a6b3356a977132459bed84fb4e4add631e181cb Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 19 Apr 2024 15:06:34 -0700 Subject: [PATCH 1/2] [Clang][NFC] Improve testing for the flexible array member

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-22 Thread Zahira Ammarguellat via cfe-commits
@@ -318,12 +320,12 @@ // RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \ // RUN: -fno-trapping-math -ftrapping-math -c %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-NO-REASSOC-NO-UNSAFE-MATH %s +// RUN: | FileCheck --check-prefix=CHECK-N

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-22 Thread Zahira Ammarguellat via cfe-commits
@@ -271,30 +271,32 @@ // RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s // RUN: %clang -### -funsafe-math-optimizations -fno-reciprocal-math -c %s \ -// RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s +// RUN: 2>&1 | FileCheck --check-prefix=CH

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-22 Thread Andy Kaylor via cfe-commits
andykaylor wrote: I've made some minor changes to clean up the LIT test checks for this PR. I started to clean up the entire test, but it quickly became obvious that I should put that into a separate PR. I will submit a new PR to clean up the entire fast-math.c test. I have an idea that I thi

[clang] [clang-tools-extra] [compiler-rt] [flang] [libc] [libclc] [libcxx] [libcxxabi] [libunwind] [lld] [lldb] [llvm] [mlir] [openmp] [polly] [pstl] Update IDE Folders (PR #89153)

2024-04-22 Thread Michael Kruse via cfe-commits
@@ -56,11 +56,13 @@ endfunction() # Use provided strip tool instead of the default one. # TARGET_TRIPLE triple # Optional target triple to pass to the compiler +# FOLDER +# For IDEs, the Folder to put the targets into.= Meinersbur wrote: It's a

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-04-22 Thread Akira Hatanaka via cfe-commits
@@ -3424,6 +3445,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor( ahatanaka wrote: OK, I'll make it

[clang] [llvm] [AArch64] Add intrinsics for 16-bit non-widening FMLA/FMLS (PR #88553)

2024-04-22 Thread Hassnaa Hamdi via cfe-commits
@@ -458,6 +458,40 @@ let TargetGuard = "sme2,sme-f64f64" in { def SVMLS_LANE_VG1x4_F64 : Inst<"svmls_lane_za64[_{d}]_vg1x4", "vm4di", "d", MergeNone, "aarch64_sme_fmls_lane_vg1x4", [IsStreaming, IsInOutZA], [ImmCheck<3, ImmCheck0_1>]>; } +let TargetGuard = "sme2p1,sme-f16f

[clang] [clang-tools-extra] [compiler-rt] [flang] [libc] [libclc] [libcxx] [libcxxabi] [libunwind] [lld] [lldb] [llvm] [mlir] [openmp] [polly] [pstl] Update IDE Folders (PR #89153)

2024-04-22 Thread Michael Kruse via cfe-commits
@@ -406,5 +426,13 @@ function(llvm_ExternalProject_Add name source_dir) WORKING_DIRECTORY ${BINARY_DIR} VERBATIM USES_TERMINAL) +if (ARG_FOLDER) + set_target_properties(${target} PROPERTIES FOLDER "${ARG_FOLDER}") +endif () endforeach() + + #s

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-04-22 Thread David Blaikie via cfe-commits
@@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fcxx-exceptions -verify %s + +#if !__has_builtin(__builtin_verbose_trap) +#error +#endif + +constexpr char const* constMsg1 = "hello"; +char const* const constMsg2 = "hello"; +char const constMsg3[] = "hello"; + +templ

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-22 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I'm still not happy with the AST representation here. The current representation is likely to cause unpredictable results in edge cases, and compatibility constraints mean whatever result the current version happens to produce for those cases is locked in forever. And th

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-04-22 Thread David Blaikie via cfe-commits
@@ -3379,6 +3379,60 @@ Query for this feature with ``__has_builtin(__builtin_debugtrap)``. Query for this feature with ``__has_builtin(__builtin_trap)``. +``__builtin_verbose_trap`` dwblaikie wrote: Ah, OK - that seems like more reason the prefix should be

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-22 Thread Bill Wendling via cfe-commits
@@ -156,6 +156,10 @@ struct BinOpInfo { } return false; } + + /// Does the BinaryOperator have the wraps attribute? + /// If so, we can ellide overflow sanitizer checks. bwendling wrote: s/ellide/elide/ https://github.com/llvm/llvm-project/pull/86

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-22 Thread Bill Wendling via cfe-commits
@@ -4093,6 +4109,11 @@ Value *ScalarExprEmitter::EmitAdd(const BinOpInfo &op) { op.RHS->getType()->isPointerTy()) return emitPointerArithmetic(CGF, op, CodeGenFunction::NotSubtraction); + if ((op.Ty->isSignedIntegerOrEnumerationType() || bwendling w

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-22 Thread Bill Wendling via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 %s -verify -fsyntax-only -triple x86_64-pc-linux-gnu +// expected-no-diagnostics +typedef int __attribute__((wraps)) wrapping_int; + +void foo(void) { + const wrapping_int A = 1; + int D = 2147483647 + A; bwendling wrote: How

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-22 Thread Bill Wendling via cfe-commits
@@ -4455,6 +4455,14 @@ void Sema::AddAlignValueAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E) { D->addAttr(::new (Context) AlignValueAttr(Context, CI, E)); } +static void handleWrapsAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + S.AddWrapsAttr(D, AL); +} + +void S

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-22 Thread Bill Wendling via cfe-commits
@@ -2831,6 +2840,9 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV, } else if (type->isIntegerType()) { QualType promotedType; bool canPerformLossyDemotionCheck = false; +BinOpInfo Ops = (createBinOpInfoFromIncDec(

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-22 Thread Bill Wendling via cfe-commits
@@ -4249,6 +4270,10 @@ Value *ScalarExprEmitter::EmitFixedPointBinOp(const BinOpInfo &op) { Value *ScalarExprEmitter::EmitSub(const BinOpInfo &op) { // The LHS is always a pointer if either side is. if (!op.LHS->getType()->isPointerTy()) { +if ((op.Ty->isSignedIntegerO

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-22 Thread Bill Wendling via cfe-commits
@@ -4077,6 +4077,9 @@ class BinaryOperator : public Expr { static unsigned sizeOfTrailingObjects(bool HasFPFeatures) { return HasFPFeatures * sizeof(FPOptionsOverride); } + + /// Do one of the subexpressions have the wraps attribute? bwendling wrote:

[clang-tools-extra] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

2024-04-22 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,34 @@ +//===--- ReturnConstRefFromParameterCheck.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: Apa

[clang] [clang-tools-extra] [compiler-rt] [flang] [libc] [libclc] [libcxx] [libcxxabi] [libunwind] [lld] [lldb] [llvm] [mlir] [openmp] [polly] [pstl] Update IDE Folders (PR #89153)

2024-04-22 Thread Jonas Devlieghere via cfe-commits
JDevlieghere wrote: This looks like a nice improvement for folks using those generators. Even though most of these changes look straightforward, it would be a lot easier to review if this was broken up per subproject. Is there any reason that's not possible? https://github.com/llvm/llvm-proj

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-22 Thread via cfe-commits
@@ -0,0 +1,274 @@ +//===--- MinMaxUseInitializerListCheck.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

<    1   2   3   4   5   >