[clang-tools-extra] [clang-tidy] Add readability-redundant-casting check (PR #70595)

2024-01-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Rebased code, changed utils::fixit::needParens into recently added more generic utils::fixit::areParensNeededForStatement. Renamed areTypesEquals into areTypesEqual.git dif https://github.com/llvm/llvm-project/pull/70595 __

[clang-tools-extra] [clang-tidy] Add readability-redundant-casting check (PR #70595)

2024-01-16 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,242 @@ +//===--- RedundantCastingCheck.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 readability-redundant-casting check (PR #70595)

2024-01-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/70595 ___ 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 readability-redundant-casting check (PR #70595)

2024-01-16 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,200 @@ +// RUN: %check_clang_tidy -std=c++11-or-later %s readability-redundant-casting %t +// RUN: %check_clang_tidy -std=c++11-or-later -check-suffix=,MACROS %s readability-redundant-casting %t -- \ +// RUN: -config='{CheckOptions: { readability-redundant-casting.

[clang-tools-extra] [clang-tidy] Add readability-redundant-casting check (PR #70595)

2024-01-16 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,242 @@ +//===--- RedundantCastingCheck.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 readability-redundant-casting check (PR #70595)

2024-01-16 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,242 @@ +//===--- RedundantCastingCheck.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] Warning for incorrect useof 'pure' attribute (PR #78200)

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

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The changes should also come with a release note so users know about the improved diagnostics. https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-16 Thread Aaron Ballman via cfe-commits
@@ -692,6 +692,13 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_pure_attr_on_cxx_constructor : Warning< + "constructor cannot be 'pure' (undefined behavior

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/78243 >From b5d814abf6241d3e9cdfcc64109c33c56a896172 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 12 Jan 2024 13:45:15 -0500 Subject: [PATCH 1/2] [Clang][Parse] Diagnose member template declarations

[clang] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl. (PR #78311)

2024-01-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM thank you for the fix! I'm on the fence about this getting a release note, but leaning towards mentioning it as fixing a memory leak (I don't expect this to be observable for most folks because cleaning up the ASTContext generally

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
@@ -3167,6 +3167,15 @@ Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, DeclaratorInfo.complete(ThisDecl); +if (TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate) { + if (Tok.is(tok::comma)) { +Diag(Tok, diag::err_multiple_template_declarato

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/78243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/78243 >From b5d814abf6241d3e9cdfcc64109c33c56a896172 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 12 Jan 2024 13:45:15 -0500 Subject: [PATCH 1/2] [Clang][Parse] Diagnose member template declarations

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-16 Thread via cfe-commits
@@ -1389,7 +1389,11 @@ bool CXXRecordDecl::isLiteral() const { : hasTrivialDestructor())) return false; - if (isLambda() && !LangOpts.CPlusPlus17) + // Lambdas are literal types since C++17. cor3ntin wrote: And aggregate can

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/78243 >From b5d814abf6241d3e9cdfcc64109c33c56a896172 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 12 Jan 2024 13:45:15 -0500 Subject: [PATCH 1/2] [Clang][Parse] Diagnose member template declarations

[clang] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (PR #78323)

2024-01-16 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/78323 This contains compiler-rt builtins and llvm-libc for baremetal use. Differential Revision: https://reviews.llvm.org/D155337 >From 900df95c16d8bef6f9758cd53db39bb885097cc7 Mon Sep 17 00:00:00 2001 From: Petr Ho

[clang] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (PR #78323)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes This contains compiler-rt builtins and llvm-libc for baremetal use. Differential Revision: https://reviews.llvm.org/D155337 --- Full diff: https://github.com/llvm/llvm-project/pull/78323.diff 2 Files Affec

[clang] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (PR #78323)

2024-01-16 Thread Petr Hosek via cfe-commits
petrhosek wrote: This is a reland of 78550bef98347bccbf0e8e5fb66dc59718fc35ec, the cross-compilation issues should be resolved now. https://github.com/llvm/llvm-project/pull/78323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/78274 >From 90d66e29f3550d50bd114d68fc8b12156e26de18 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Jan 2024 08:05:33 -0500 Subject: [PATCH] [Clang][Sema] Diagnose function/variable templates that

[clang] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl. (PR #78311)

2024-01-16 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/78311 >From a8345976354bff4a05a7e0ff28bae152039f5458 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 15 Jan 2024 22:43:55 -0800 Subject: [PATCH 1/2] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-16 Thread Erich Keane via cfe-commits
@@ -1389,7 +1389,11 @@ bool CXXRecordDecl::isLiteral() const { : hasTrivialDestructor())) return false; - if (isLambda() && !LangOpts.CPlusPlus17) + // Lambdas are literal types since C++17. erichkeane wrote: Hmm... this is

[clang] [Clang][Sema][NFC] Remove unused Scope* parameter from Sema::GetTypeForDeclarator and Sema::ActOnTypeName (PR #78325)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/78325 Split from #78274 >From 03e0e75c2793de4429b15acdbd04382ee45b7952 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Jan 2024 06:28:35 -0500 Subject: [PATCH] [Clang][Sema][NFC] Remove unused Scop

[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/78274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (PR #78323)

2024-01-16 Thread via cfe-commits
https://github.com/zeroomega approved this pull request. https://github.com/llvm/llvm-project/pull/78323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-16 Thread Leandro Lupori via cfe-commits
luporl wrote: > > As for the `isysroot.f90` test, I guess it would need to be removed, unless > > there is some way to run it only when `DEFAULT_SYSROOT` is not set. > > You could also use `DEFAULT_SYSROOT` to define a LIT "feature" and check for > that (via e.g. `REQUIRES`) in the test file.

[clang] [Clang][Sema][NFC] Remove unused Scope* parameter from Sema::GetTypeForDeclarator and Sema::ActOnTypeName (PR #78325)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes Split from #78274 --- Patch is 20.20 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/78325.diff 16 Files Affected: - (modified) clang/include/clang/Se

[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
@@ -6070,7 +6070,7 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, /// /// The result of this call will never be null, but the associated /// type may be a null type if there's an unrecoverable error. -TypeSourceInfo *Sema::GetTypeForDeclarator(D

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-16 Thread via cfe-commits
kelbon wrote: > The changes should also come with a release note so users know about the > improved diagnostics. Dont know how to do it, can you please reference what i need to do? > How about: '%select{pure|const}0' attribute applied to a function which > %select{returns 'void'|has no return

[clang] [Clang][Sema][NFC] Remove unused Scope* parameter from Sema::GetTypeForDeclarator and Sema::ActOnTypeName (PR #78325)

2024-01-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/78325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

2024-01-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/78274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-16 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/78195 >From f354ca458c1fa3cebb375f756f1a87fcf0586c3c Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 15 Jan 2024 18:09:48 +0100 Subject: [PATCH 1/5] [Clang] Implement CWG2598: Union of non-literal types A un

[clang] 8d7bba0 - [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (#78323)

2024-01-16 Thread via cfe-commits
Author: Petr Hosek Date: 2024-01-16T10:49:56-08:00 New Revision: 8d7bba0d5a8f024f44995adb9f3286c00b316689 URL: https://github.com/llvm/llvm-project/commit/8d7bba0d5a8f024f44995adb9f3286c00b316689 DIFF: https://github.com/llvm/llvm-project/commit/8d7bba0d5a8f024f44995adb9f3286c00b316689.diff LO

[clang] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (PR #78323)

2024-01-16 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek closed https://github.com/llvm/llvm-project/pull/78323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/78195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #75647)

2024-01-16 Thread Jun Wang via cfe-commits
jwanggit86 wrote: @krzysz00 So, instead of 1 number as in the current implementation, you want 3 numbers, i.e., 3 lines like the following in the metadata section? ``` .num_workgroups_x: 1 .num_workgroups_y: 2 .num_workgroups_z: 3 ``` https://github.com/llvm/llvm-project/pull/75647 ___

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis updated https://github.com/llvm/llvm-project/pull/71313 >From 2cf3b28661ca28f4858bda0e933c48a71b3125ba Mon Sep 17 00:00:00 2001 From: Robin Caloudis <53619127+robincalou...@users.noreply.github.com> Date: Sun, 5 Nov 2023 13:34:29 +0100 Subject: [PATCH] [clang][do

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis edited https://github.com/llvm/llvm-project/pull/71313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis edited https://github.com/llvm/llvm-project/pull/71313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis edited https://github.com/llvm/llvm-project/pull/71313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis edited https://github.com/llvm/llvm-project/pull/71313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis edited https://github.com/llvm/llvm-project/pull/71313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
@@ -22,8 +22,8 @@ started guide `_. .. code-block:: console - cd ~/clang-llvm - git clone https://github.com/llvm/llvm-project.git + mkdir ~/clang-llvm && cd ~/clang-llvm + git clone https://github.com/llvm/llvm-p

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-16 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > The changes should also come with a release note so users know about the > > improved diagnostics. > > Dont know how to do it, can you please reference what i need to do? Modify https://github.com/llvm/llvm-project/blob/main/clang/docs/ReleaseNotes.rst to have a new e

[clang] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl. (PR #78311)

2024-01-16 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/78311 >From a8345976354bff4a05a7e0ff28bae152039f5458 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 15 Jan 2024 22:43:55 -0800 Subject: [PATCH 1/3] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis updated https://github.com/llvm/llvm-project/pull/71313 >From 78dba920a2a714461c054b83554230b3d73c9e28 Mon Sep 17 00:00:00 2001 From: Robin Caloudis <53619127+robincalou...@users.noreply.github.com> Date: Sun, 5 Nov 2023 13:34:29 +0100 Subject: [PATCH] [clang][do

[llvm] [clang] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #75647)

2024-01-16 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: How does this attribute relate to `reqd_work_group_size` and related existing attributes? Is `amdgpu_num_work_groups` the best way to expose this given that other technologies also have the notion of work groups that aren't related to AMD GPUs? CC @bader @jdoerfert https:

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis updated https://github.com/llvm/llvm-project/pull/71313 >From 1f9e58d79dd25a2ddeb1252a53950ae4cee961a2 Mon Sep 17 00:00:00 2001 From: Robin Caloudis <53619127+robincalou...@users.noreply.github.com> Date: Sun, 5 Nov 2023 13:34:29 +0100 Subject: [PATCH] [clang][do

[clang] [llvm] [clang-tools-extra] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis updated https://github.com/llvm/llvm-project/pull/71313 >From 1f9e58d79dd25a2ddeb1252a53950ae4cee961a2 Mon Sep 17 00:00:00 2001 From: Robin Caloudis <53619127+robincalou...@users.noreply.github.com> Date: Sun, 5 Nov 2023 13:34:29 +0100 Subject: [PATCH] [clang][do

[clang] Fixed a bug in Smith's algorithm and made sure last option (PR #78330)

2024-01-16 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam created https://github.com/llvm/llvm-project/pull/78330 in command line rules. >From 8f8917528e30d2ba67f669cfd1a893bc85c21121 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Tue, 16 Jan 2024 11:24:03 -0800 Subject: [PATCH] Fixed a bug in Smith's algorithm and made

[clang] Fixed a bug in Smith's algorithm (PR #78330)

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

[clang] Fixed a bug in Smith's algorithm (PR #78330)

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

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #75647)

2024-01-16 Thread Alexey Bader via cfe-commits
bader wrote: > How does this attribute relate to `reqd_work_group_size` and related existing > attributes? They seems to be different/"unrelated". Based on the description of the `amdgpu-num-work-groups` attribute it provides "number of work-groups", whereas `reqd_work_group_size` provides "n

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-01-16 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only \ +// RUN: -isystem %S/Inputs -verify %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only \ +// RUN: -isystem %S/Inputs -fcuda-is-device -verify %s +// RUN: %clang_cc1 -triple x86_

[clang] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (PR #78333)

2024-01-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/78333 We can directly call `clang -c -x cl -target amdgcn -mcpu=gfx90a test.cl -o test.o` to compile an OpenCL kernel file. However, when `--save-temps` is enabled, it doesn't work because the preprocessed file (`.i`

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis updated https://github.com/llvm/llvm-project/pull/71313 >From a23a5aa4027a8b98c71b0d42c14789d8f0c0b33e Mon Sep 17 00:00:00 2001 From: Robin Caloudis <53619127+robincalou...@users.noreply.github.com> Date: Sun, 5 Nov 2023 13:34:29 +0100 Subject: [PATCH] [clang][do

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-01-16 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only \ +// RUN: -isystem %S/Inputs -verify %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only \ +// RUN: -isystem %S/Inputs -fcuda-is-device -verify %s +// RUN: %clang_cc1 -triple x86_

[clang] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (PR #78333)

2024-01-16 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 da6806dcb45d311efceaba0d770d9027d68a0de9 9fa50ffb330ef9b77eac6f7b63be5b91dd153e85 --

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis edited https://github.com/llvm/llvm-project/pull/71313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3973955 - [OpenACC] Implement 'reduction' clause parsing.

2024-01-16 Thread via cfe-commits
Author: erichkeane Date: 2024-01-16T11:37:56-08:00 New Revision: 3973955282121cf97fb3b77c4bac0a89dcf82591 URL: https://github.com/llvm/llvm-project/commit/3973955282121cf97fb3b77c4bac0a89dcf82591 DIFF: https://github.com/llvm/llvm-project/commit/3973955282121cf97fb3b77c4bac0a89dcf82591.diff LO

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis edited https://github.com/llvm/llvm-project/pull/71313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (PR #78333)

2024-01-16 Thread Shilei Tian via cfe-commits
shiltian wrote: I'm working on a test case. https://github.com/llvm/llvm-project/pull/78333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix a bug in Smith's algorithm used in complex div/mul. (PR #78330)

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

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-01-16 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only \ +// RUN: -isystem %S/Inputs -verify %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only \ +// RUN: -isystem %S/Inputs -fcuda-is-device -verify %s +// RUN: %clang_cc1 -triple x86_

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-01-16 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/77359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis updated https://github.com/llvm/llvm-project/pull/71313 >From 5e9e94d33342fb8aec1b7b864f2344790e392d4a Mon Sep 17 00:00:00 2001 From: Robin Caloudis <53619127+robincalou...@users.noreply.github.com> Date: Sun, 5 Nov 2023 13:34:29 +0100 Subject: [PATCH] [clang][do

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis edited https://github.com/llvm/llvm-project/pull/71313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis edited https://github.com/llvm/llvm-project/pull/71313 ___ 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 bugprone-chained-comparison check (PR #76365)

2024-01-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/76365 >From 5ece73a5b14e86172b900f4ae9d63d8fa1590d4a Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Mon, 25 Dec 2023 16:18:45 + Subject: [PATCH 1/2] [clang-tidy] Add bugprone-chained-comparison check Check that

[clang-tools-extra] [clang-tidy] Add bugprone-chained-comparison check (PR #76365)

2024-01-16 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,161 @@ +//===--- ChainedComparisonCheck.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 bugprone-chained-comparison check (PR #76365)

2024-01-16 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,161 @@ +//===--- ChainedComparisonCheck.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 bugprone-chained-comparison check (PR #76365)

2024-01-16 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,161 @@ +//===--- ChainedComparisonCheck.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 bugprone-chained-comparison check (PR #76365)

2024-01-16 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,161 @@ +//===--- ChainedComparisonCheck.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-tools-extra] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-16 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 created https://github.com/llvm/llvm-project/pull/78338 This pull request aims to solve the issue mentioned [here](https://github.com/llvm/llvm-project/issues/58290) I have made the necessary changes to the best of my knowledge and updated tests for the same. Ple

[clang] [clang-tools-extra] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-16 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 i

[clang] [clang-tools-extra] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shourya Goel (Sh0g0-1758) Changes This pull request aims to solve the issue mentioned [here](https://github.com/llvm/llvm-project/issues/58290) I have made the necessary changes to the best of my knowledge and updated tests for the same.

[clang-tools-extra] [clang] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Shourya Goel (Sh0g0-1758) Changes This pull request aims to solve the issue mentioned [here](https://github.com/llvm/llvm-project/issues/58290) I have made the necessary changes to the best of my knowledge and updated tests for the same.

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-01-16 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only \ +// RUN: -isystem %S/Inputs -verify %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only \ +// RUN: -isystem %S/Inputs -fcuda-is-device -verify %s +// RUN: %clang_cc1 -triple x86_

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-01-16 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/77359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The changes look reasonable to me as far as they go, but I don't have much expertise in Python. I added @Endilll to hopefully help give it a second set of eyes. You should add a release note (clang/docs/ReleaseNotes.rst) about the new bindings so oth

[clang] 4737959 - [AST] Use APIntStorage to fix memory leak in EnumConstantDecl. (#78311)

2024-01-16 Thread via cfe-commits
Author: Craig Topper Date: 2024-01-16T12:10:38-08:00 New Revision: 4737959d91fab7673b1bb642f88658bb2a24d723 URL: https://github.com/llvm/llvm-project/commit/4737959d91fab7673b1bb642f88658bb2a24d723 DIFF: https://github.com/llvm/llvm-project/commit/4737959d91fab7673b1bb642f88658bb2a24d723.diff

[clang] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl. (PR #78311)

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

[llvm] [openmp] [clang] [compiler-rt] [libcxxabi] [libcxx] [lld] [mlir] [runtimes] Use LLVM libunwind from libc++abi by default (PR #77687)

2024-01-16 Thread Mark de Wever via cfe-commits
mordante wrote: FYI I think this change broke the documentation CI builder. Fixed in https://github.com/llvm/llvm-project/commit/7e909d58d1862686375a0a71fd907151b109c2db https://github.com/llvm/llvm-project/pull/77687 ___ cfe-commits mailing list cfe-

[clang] [flang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-16 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: > > Can you remind me the benefits of using `-isysroot` over `-sysroot` to > > begin with? I think that switching to `-sysroot` is fine, but I also want > > to make sure we're not missing anything. > > It seems to me that Apple prefers to use `-isysroot` to select the SDK:

[clang] [clang][AST] Invalidate DecompositionDecl if it has invalid initializer. (PR #72428)

2024-01-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM with a tiny nit. https://github.com/llvm/llvm-project/pull/72428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Invalidate DecompositionDecl if it has invalid initializer. (PR #72428)

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

[clang] [clang][AST] Invalidate DecompositionDecl if it has invalid initializer. (PR #72428)

2024-01-16 Thread Aaron Ballman via cfe-commits
@@ -13570,6 +13570,15 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { CreateRecoveryExpr(Init->getBeginLoc(), Init->getEndLoc(), Args); if (RecoveryExpr.get()) VDecl->setInit(RecoveryExpr.get()); + // In general, f

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-16 Thread Eli Friedman via cfe-commits
@@ -1038,11 +1038,14 @@ void CodeGenFunction::EmitNewArrayInitializer( return true; }; + const InitListExpr *ILE = dyn_cast(Init); + const CXXParenListInitExpr *CPLIE = dyn_cast(Init); + const StringLiteral *SL = dyn_cast(Init); // If the initializer is an initiali

[clang] [llvm] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-16 Thread Alan Phipps via cfe-commits
@@ -298,7 +298,7 @@ struct CounterMappingRegion { unsigned ExpandedFileID, unsigned LineStart, unsigned ColumnStart, unsigned LineEnd, unsigned ColumnEnd, RegionKind Kind) - : MCDCParams(MCDCParams), Expa

[clang] [Clang] Support MSPropertyRefExpr as placement arg to new-expression (PR #75883)

2024-01-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/75883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-16 Thread Alan Phipps via cfe-commits
@@ -298,7 +298,7 @@ struct CounterMappingRegion { unsigned ExpandedFileID, unsigned LineStart, unsigned ColumnStart, unsigned LineEnd, unsigned ColumnEnd, RegionKind Kind) - : MCDCParams(MCDCParams), Expa

[clang] [clang-format] Add parse tests for SeparateDefinitionBlocks option (PR #78256)

2024-01-16 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/78256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 59a2653 - [clang-format] Add parse tests for SeparateDefinitionBlocks option (#78256)

2024-01-16 Thread via cfe-commits
Author: serbanu Date: 2024-01-16T21:22:04+01:00 New Revision: 59a265311a072437232767c228263bea0c0074b5 URL: https://github.com/llvm/llvm-project/commit/59a265311a072437232767c228263bea0c0074b5 DIFF: https://github.com/llvm/llvm-project/commit/59a265311a072437232767c228263bea0c0074b5.diff LOG:

[clang] [clang-format] Add parse tests for SeparateDefinitionBlocks option (PR #78256)

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

[clang] [clang-format] TableGen multi line string support. (PR #78032)

2024-01-16 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/78032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-16 Thread Alan Phipps via cfe-commits
evodius96 wrote: > I've found this change fails with the expression; `((a && (b || c) || (d && > e)) && f)`. Thank you for pointing this out. I think you figured out the point I was struggling to get right -- when to actually "pop" the child Decision from the stack, and also to separate the

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 approved this pull request. Thanks, this looks better now https://github.com/llvm/llvm-project/pull/71313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-16 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: Though please make sure to update the PR message (which will become the commit message) before merging, as it's no longer accurate https://github.com/llvm/llvm-project/pull/71313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [llvm] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-16 Thread Alan Phipps via cfe-commits
https://github.com/evodius96 updated https://github.com/llvm/llvm-project/pull/78202 >From 8751417f4889a120193a604e2ea91627f3b064e8 Mon Sep 17 00:00:00 2001 From: Alan Phipps Date: Mon, 15 Jan 2024 12:24:36 -0600 Subject: [PATCH 1/3] [clang][CoverageMapping] Refactor when setting MC/DC True/Fa

[llvm] [clang] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #75647)

2024-01-16 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: We are back to the duplication. The attribute here, num-work-groups, exist in IR as: NVPTX: minctasm -> min work groups NVPTX: maxclusterrank -> max work groups OpenMP: omp_target_num_teams -> right now exact = num work groups @bader This is not the same as the intrinsics but we

<    1   2   3   4   5   6   >