[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/91119 >From 78a2afab67eef9a8a05ced89df0aadb56a2ec2b8 Mon Sep 17 00:00:00 2001 From: Rajveer Date: Sun, 5 May 2024 18:05:00 +0530 Subject: [PATCH 1/2] [clang][analyzer] Check for label location bindings in `Dereferenc

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-13 Thread Balazs Benics via cfe-commits
steakhal wrote: This one looks good to me. I wanna hear your opinion @NagyDonat https://github.com/llvm/llvm-project/pull/91119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Move LeftRightQualifierAlignmentFixer::is...() (PR #91930)

2024-05-13 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/91930 Move static member functions LeftRightQualifierAlignmentFixer::is...() out the class so that #91712 can reland. >From 6d346a4ec253110288a806fabde093678228184b Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 1

[clang] [clang-format][NFC] Move LeftRightQualifierAlignmentFixer::is...() (PR #91930)

2024-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Move static member functions LeftRightQualifierAlignmentFixer::is...() out the class so that #91712 can reland. --- Full diff: https://github.com/llvm/llvm-project/pull/91930.diff 3 Files Affected: - (m

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/91119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] CTAD alias: fix the transformation for the require-clause expr (PR #90961)

2024-05-13 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/90961 >From 0bdb18c0ffc37b38e81487b45e0e00e4480473aa Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 3 May 2024 11:04:21 +0200 Subject: [PATCH 1/2] [clang] CTAD alias: refine the transformation for the require-cla

[clang] [serialization] no transitive decl change (PR #91914)

2024-05-13 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/91914 >From 8ec79e4a7fdf0d75030e81d713ac9fe629ee97eb Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 10 May 2024 15:36:31 +0800 Subject: [PATCH] [serialization] no transitive decl change --- clang/include/cla

[clang] [clang] CTAD alias: fix the transformation for the require-clause expr (PR #90961)

2024-05-13 Thread Haojian Wu via cfe-commits
hokein wrote: I'm merging it now (happy to address any post-comments). https://github.com/llvm/llvm-project/pull/90961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d182877 - [clang] CTAD alias: fix the transformation for the require-clause expr (#90961)

2024-05-13 Thread via cfe-commits
Author: Haojian Wu Date: 2024-05-13T09:33:35+02:00 New Revision: d182877ba3f5ad93e061f68a9ecce38cb8cec418 URL: https://github.com/llvm/llvm-project/commit/d182877ba3f5ad93e061f68a9ecce38cb8cec418 DIFF: https://github.com/llvm/llvm-project/commit/d182877ba3f5ad93e061f68a9ecce38cb8cec418.diff LO

[clang] [clang] CTAD alias: fix the transformation for the require-clause expr (PR #90961)

2024-05-13 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/90961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add amdgpu-as MMRA for fences (PR #78572)

2024-05-13 Thread Pierre van Houtryve via cfe-commits
@@ -18365,6 +18366,28 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, return nullptr; } +void CodeGenFunction::AddAMDGCNFenceAddressSpaceMMRA(llvm::Instruction *Inst, + const CallExpr *E) { + constexpr

[clang] [Clang] Added check for unexpanded pack in attribute [[assume]] (PR #91893)

2024-05-13 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM! Thanks for working on this https://github.com/llvm/llvm-project/pull/91893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Move `CTUPhase1InliningMode` option to String analyzer options category (PR #91932)

2024-05-13 Thread via cfe-commits
https://github.com/shenjunjiekoda created https://github.com/llvm/llvm-project/pull/91932 The `CTUPhase1InliningMode`option was originally placed under Unsigned analyzer options, but its value is a string. This move aligns the option with its actual type. >From 4d7485bf955d04eb83960b7b590750

[clang] [analyzer] Move `CTUPhase1InliningMode` option to String analyzer options category (PR #91932)

2024-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: JOSTAR (shenjunjiekoda) Changes The `CTUPhase1InliningMode`option was originally placed under Unsigned analyzer options, but its value is a string. This move aligns the option with its actual type. --- Full diff: https://github.com/llvm

[clang] [llvm] [AMDGPU] Add amdgpu-as MMRA for fences (PR #78572)

2024-05-13 Thread Pierre van Houtryve via cfe-commits
@@ -4408,6 +4409,42 @@ Target-Specific Extensions Clang supports some language features conditionally on some targets. +AMDGPU Language Extensions +-- + +__builtin_amdgcn_fence +^^ + +``__builtin_amdgcn_fence`` emits a fence. + +* `

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread via cfe-commits
@@ -45,10 +45,10 @@ # RUN: ld.lld -Ttext 0x201000 %t.o -o %t4 # RUN: llvm-readelf -S -l %t4 | FileCheck %s --check-prefix=USER3 # USER3: .text PROGBITS 00201000 001000 01 -# USER3-NEX: .rodata PROGBITS 00202000 002000 08 -# USER3-NEX: .aw PROGB

[clang] [clang-format][NFC] Move LeftRightQualifierAlignmentFixer::is...() (PR #91930)

2024-05-13 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/91930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix dependency computation for pack indexing expression (PR #91933)

2024-05-13 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/91933 Given `foo...[idx]` if idx is value dependent, the expression is type dependent. Fixes #91885 Fixes #91884 >From 066e23de6ef0b3bb44513c1d239981e7d0f4453e Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon

[clang] [Clang] Fix dependency computation for pack indexing expression (PR #91933)

2024-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes Given `foo...[idx]` if idx is value dependent, the expression is type dependent. Fixes #91885 Fixes #91884 --- Full diff: https://github.com/llvm/llvm-project/pull/91933.diff 2 Files Affected: - (modified) c

[clang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [mlir] [openmp] [polly] fix(python): fix comparison to None (PR #91857)

2024-05-13 Thread David Spickett via cfe-commits
DavidSpickett wrote: LLVM uses a GitHub setting where the PR is squashed, and the commit message is taken from the PR description rather than the commits themselves. So all you have to do here is copy the commit message you updated into the PR's description. https://github.com/llvm/llvm-proje

[clang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [mlir] [openmp] [polly] fix(python): fix comparison to None (PR #91857)

2024-05-13 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett approved this pull request. LLDB changes look good to me. https://github.com/llvm/llvm-project/pull/91857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [clang] Allow pack expansions when partial ordering against template template parameters (PR #91833)

2024-05-13 Thread via cfe-commits
cor3ntin wrote: I have confirmed that with this change, `stdexec` compiles successfully, addressing both #89807 and #91787 https://github.com/llvm/llvm-project/pull/91833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] d4f5cf2 - [Clang] Added check for unexpanded pack in attribute [[assume]] (#91893)

2024-05-13 Thread via cfe-commits
Author: Azmat Yusuf Date: 2024-05-13T10:31:10+02:00 New Revision: d4f5cf267936a082196b0c22fe45c730b24b9fe0 URL: https://github.com/llvm/llvm-project/commit/d4f5cf267936a082196b0c22fe45c730b24b9fe0 DIFF: https://github.com/llvm/llvm-project/commit/d4f5cf267936a082196b0c22fe45c730b24b9fe0.diff L

[clang] [Clang] Added check for unexpanded pack in attribute [[assume]] (PR #91893)

2024-05-13 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/91893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added check for unexpanded pack in attribute [[assume]] (PR #91893)

2024-05-13 Thread via cfe-commits
github-actions[bot] wrote: @azmat-y 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,

[clang] [Clang] Fix dependency computation for pack indexing expression (PR #91933)

2024-05-13 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/91933 >From 4cadff527e02ae03aa5850ee713fe57aee663a52 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 13 May 2024 10:00:19 +0200 Subject: [PATCH] [Clang] Fix dependency computation for pack indexing expressio

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-13 Thread kadir çetinkaya via cfe-commits
@@ -572,32 +572,43 @@ struct FragmentCompiler { #else static llvm::Regex::RegexFlags Flags = llvm::Regex::NoFlags; #endif -auto Filters = std::make_shared>(); -for (auto &HeaderPattern : F.IgnoreHeader) { - // Anchor on the right. - std::string AnchoredPat

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-13 Thread kadir çetinkaya via cfe-commits
@@ -572,32 +572,43 @@ struct FragmentCompiler { #else static llvm::Regex::RegexFlags Flags = llvm::Regex::NoFlags; #endif -auto Filters = std::make_shared>(); -for (auto &HeaderPattern : F.IgnoreHeader) { - // Anchor on the right. - std::string AnchoredPat

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-13 Thread kadir çetinkaya via cfe-commits
@@ -135,6 +135,21 @@ TEST(IncludeCleaner, GetUnusedHeaders) { Pointee(writtenInclusion("\"dir/unused.h\""; } +TEST(IncludeCleaner, SystemUnusedHeaders) { + auto TU = TestTU::withCode(R"cpp( +#include +#include +SystemClass x; + )c

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-13 Thread kadir çetinkaya via cfe-commits
@@ -135,6 +135,21 @@ TEST(IncludeCleaner, GetUnusedHeaders) { Pointee(writtenInclusion("\"dir/unused.h\""; } +TEST(IncludeCleaner, SystemUnusedHeaders) { + auto TU = TestTU::withCode(R"cpp( +#include +#include +SystemClass x; + )c

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-13 Thread kadir çetinkaya via cfe-commits
@@ -68,24 +68,32 @@ bool isIgnored(llvm::StringRef HeaderPath, HeaderFilter IgnoreHeaders) { } bool mayConsiderUnused(const Inclusion &Inc, ParsedAST &AST, - const include_cleaner::PragmaIncludes *PI) { + const include_cleaner::Prag

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks a lot, LGTM! it'd be great if you can also follow up with a change to https://github.com/llvm/clangd-www/blob/main/config.md https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commit

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-13 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. Emitting a note to the location where the first part of the detected pattern (the `setuid(getuid())` call) seems like useful information, but this patch is great as it is. You could also add it in another patch if it is not trivial. http

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. LGTM. My only significant observation is that `BugReporterVisitors.cpp` must be cleaned up eventually, as it is currently a heap of ad-hoc special cases. However, it would be unreasonable to wait for that difficult cleanup with this sim

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread David Green via cfe-commits
https://github.com/davemgreen edited https://github.com/llvm/llvm-project/pull/91854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread David Green via cfe-commits
https://github.com/davemgreen commented: The Arm/AArch64 tests looks OK for the most part. I might be able to help with some of them if that is easier than trying to sort them all here. https://github.com/llvm/llvm-project/pull/91854 ___ cfe-commits m

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread David Green via cfe-commits
@@ -22,7 +22,7 @@ define signext i8 @test1(i32 %A) { ; CHECK-V7: @ %bb.0: ; CHECK-V7-NEXT:sbfx r0, r0, #8, #8 ; CHECK-V7-NEXT:bx lr -; CHECk-V7: sbfx r0, r0, #8, #8 +; CHECK-V7: sbfx r0, r0, #8, #8 davemgreen wrote: I believe we can delete this l

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread David Green via cfe-commits
@@ -217,42 +217,42 @@ define <4 x i32> @load_v3i8_to_4xi32_const_offset_3(ptr %src) { } define <4 x i32> @volatile_load_v3i8_to_4xi32(ptr %src) { -; check-label: volatile_load_v3i8_to_4xi32: +; check-LABEL: volatile_load_v3i8_to_4xi32: davemgreen wrote: I th

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread David Green via cfe-commits
@@ -189,15 +189,15 @@ define i32 @shr(i32 %a, i32 %b) { define i1 @outer_and1(i1 %a) { -; check-label: @outer_and1( -; check-not: call i1 @and1 +; check-LABEL: @outer_and1( davemgreen wrote: Should all these be "CHECK"? https://github.com/llvm/llvm-project/

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread David Green via cfe-commits
@@ -121,7 +121,7 @@ define i32 @test_orr_extract_from_mul_1(i32 %x, i32 %y) { ; CHECK-THUMB-NEXT:orrs r0, r1 ; CHECK-THUMB-NEXT:bx lr entry: -; CHECk-THUMB: orrs r0, r1 davemgreen wrote: I believe we can delete this line, it was left in from the old ch

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

2024-05-13 Thread Nathan Gauër via cfe-commits
@@ -1586,6 +1586,12 @@ class CodeGenModule : public CodeGenTypeCache { void AddGlobalDtor(llvm::Function *Dtor, int Priority = 65535, bool IsDtorAttrFunc = false); + // Return whether structured convergence intrinsics should be generated for + // this

[clang] [clang] Allow pack expansions when partial ordering against template template parameters (PR #91833)

2024-05-13 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/91833 ___ 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 convergence intrinsics (PR #88918)

2024-05-13 Thread Nathan Gauër via cfe-commits
Keenuts wrote: Thanks for the reviews. Waiting for 1 approval from MS and I'll merge https://github.com/llvm/llvm-project/pull/88918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread David Green via cfe-commits
@@ -189,15 +189,15 @@ define i32 @shr(i32 %a, i32 %b) { define i1 @outer_and1(i1 %a) { -; check-label: @outer_and1( -; check-not: call i1 @and1 +; check-LABEL: @outer_and1( davemgreen wrote: I've regenerated the check lines in 220756f1f92b335cbafdff67c570d09

[clang] [flang] [flang] New -fdebug-unparse-with-modules option (PR #91660)

2024-05-13 Thread via cfe-commits
https://github.com/jeanPerier approved this pull request. Looks great and useful! https://github.com/llvm/llvm-project/pull/91660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add support for [[msvc::noinline]] attribute. (PR #91720)

2024-05-13 Thread Xu Zhang via cfe-commits
simonzgx wrote: Hi @cor3ntin, could you please help review this patch? https://github.com/llvm/llvm-project/pull/91720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-13 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,197 @@ +//===-- SetgidSetuidOrderChecker.cpp - check privilege revocation calls ---===// +// +// 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] Fix dependency computation for pack indexing expression (PR #91933)

2024-05-13 Thread Younan Zhang via cfe-commits
@@ -376,6 +376,9 @@ ExprDependence clang::computeDependence(PackExpansionExpr *E) { ExprDependence clang::computeDependence(PackIndexingExpr *E) { ExprDependence D = E->getIndexExpr()->getDependence(); + if (D & ExprDependence::Value) +D |= ExprDependence::TypeInstanti

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-13 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,170 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,security.SetgidSetuidOrder -verify %s + +#include "Inputs/system-header-simulator-setgid-setuid.h" + +void correct_order() { + if (setgid(getgid()) == -1) +return; + if (setuid(getuid()) == -1) +return

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/91445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Report erroneous floating point results in _Complex math (PR #90588)

2024-05-13 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/90588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix dependency computation for pack indexing expression (PR #91933)

2024-05-13 Thread Younan Zhang via cfe-commits
@@ -376,6 +376,9 @@ ExprDependence clang::computeDependence(PackExpansionExpr *E) { ExprDependence clang::computeDependence(PackIndexingExpr *E) { ExprDependence D = E->getIndexExpr()->getDependence(); + if (D & ExprDependence::Value) +D |= ExprDependence::TypeInstanti

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-13 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,196 @@ +//===-- SetgidSetuidOrderChecker.cpp - check privilege revocation calls ---===// +// +// 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] Add attribute for consteval builtins; Declare constexpr builtins as constexpr in C++ (PR #91894)

2024-05-13 Thread via cfe-commits
@@ -14,13 +14,18 @@ void __builtin_va_copy(double d); // expected-error@+2 {{cannot redeclare builtin function '__builtin_va_end'}} // expected-note@+1 {{'__builtin_va_end' is a builtin with type}} void __builtin_va_end(__builtin_va_list); -// RUN: %clang_cc1 %s -fsyntax-only -

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread via cfe-commits
klensy wrote: > The Arm/AArch64 tests looks OK for the most part. I might be able to help > with some of them if that is easier than trying to sort them all here. It will be nice if you can list tests exactly so i can copy them into separate pr; or if you prefer, you can copy them yourself. h

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg approved this pull request. LGTM to me for the ExtractAPI one. https://github.com/llvm/llvm-project/pull/91854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Thanks for updating your commit! Now there are only two remaining issues and they are both very minor (marked by inline comments: renaming `CallExpr *CE` and explaining the reason why "trying to set the gid again" appears as a special case in the SEI-CER

[clang] [llvm] [AMDGPU] Add amdgpu-as MMRA for fences (PR #78572)

2024-05-13 Thread Matt Arsenault via cfe-commits
@@ -4408,6 +4409,42 @@ Target-Specific Extensions Clang supports some language features conditionally on some targets. +AMDGPU Language Extensions +-- + +__builtin_amdgcn_fence +^^ + +``__builtin_amdgcn_fence`` emits a fence. + +* `

[clang] [Clang] Ensure ``if consteval`` consititute an immediate function context (PR #91939)

2024-05-13 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/91939 We did not set the correct evaluation context for the compound statement of an ``if consteval`` statement in a templated entity in TreeTransform. Fixes #91509 >From e84c8c5e0f1bc9e094dfef961763db825234f7aa Mon

[clang] [Clang] Ensure ``if consteval`` consititute an immediate function context (PR #91939)

2024-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes We did not set the correct evaluation context for the compound statement of an ``if consteval`` statement in a templated entity in TreeTransform. Fixes #91509 --- Full diff: https://github.com/llvm/llvm-projec

[clang] 61d4ca8 - [clang][ExtractAPI] Distinguish between record kind for display and for RTTI (#91466)

2024-05-13 Thread via cfe-commits
Author: Daniel Grumberg Date: 2024-05-13T10:37:09+01:00 New Revision: 61d4ca872215d3dfff0b3c92151dcbdc546a0aab URL: https://github.com/llvm/llvm-project/commit/61d4ca872215d3dfff0b3c92151dcbdc546a0aab DIFF: https://github.com/llvm/llvm-project/commit/61d4ca872215d3dfff0b3c92151dcbdc546a0aab.dif

[clang] [clang][ExtractAPI] Distinguish between record kind for display and for RTTI (PR #91466)

2024-05-13 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/91466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/91588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Processing real directories added as virtual ones (PR #91645)

2024-05-13 Thread Ivan Murashko via cfe-commits
ivanmurashko wrote: Hi @sam-mccall, The patch touches some fairly old code that hasn't been modified for a long time. You are one of the few people who worked on it recently, around two years ago. I would appreciate any comments and a review of the suggested patch. https://github.com/llvm/ll

[clang] [Clang] Ensure ``if consteval`` consititute an immediate function context (PR #91939)

2024-05-13 Thread Mital Ashok via cfe-commits
@@ -7964,6 +7964,15 @@ TreeTransform::TransformIfStmt(IfStmt *S) { // Transform the "then" branch. StmtResult Then; if (!ConstexprConditionValue || *ConstexprConditionValue) { +Sema::ExpressionEvaluationContext Context = +S->isNonNegatedConsteval() +

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-13 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/87208 >From 35db92dfd0c2b43fc7afde5b093598763c4b8c89 Mon Sep 17 00:00:00 2001 From: Vadim Dudkin Date: Mon, 1 Apr 2024 02:26:14 +0300 Subject: [PATCH 1/6] Add config option to analyze unused system headers --- clan

[clang] [Clang] Ensure ``if consteval`` consititute an immediate function context (PR #91939)

2024-05-13 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/91939 >From e84c8c5e0f1bc9e094dfef961763db825234f7aa Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 13 May 2024 11:26:40 +0200 Subject: [PATCH 1/2] [Clang] Ensure ``if consteval`` consititute an immediate f

[clang] [Clang] Ensure ``if consteval`` consititute an immediate function context (PR #91939)

2024-05-13 Thread via cfe-commits
@@ -7964,6 +7964,15 @@ TreeTransform::TransformIfStmt(IfStmt *S) { // Transform the "then" branch. StmtResult Then; if (!ConstexprConditionValue || *ConstexprConditionValue) { +Sema::ExpressionEvaluationContext Context = +S->isNonNegatedConsteval() +

[clang] [Clang] Add attribute for consteval builtins; Declare constexpr builtins as constexpr in C++ (PR #91894)

2024-05-13 Thread Mital Ashok via cfe-commits
@@ -14,13 +14,18 @@ void __builtin_va_copy(double d); // expected-error@+2 {{cannot redeclare builtin function '__builtin_va_end'}} // expected-note@+1 {{'__builtin_va_end' is a builtin with type}} void __builtin_va_end(__builtin_va_list); -// RUN: %clang_cc1 %s -fsyntax-only -

[clang] [Clang] Fix dependency computation for pack indexing expression (PR #91933)

2024-05-13 Thread via cfe-commits
@@ -376,6 +376,9 @@ ExprDependence clang::computeDependence(PackExpansionExpr *E) { ExprDependence clang::computeDependence(PackIndexingExpr *E) { ExprDependence D = E->getIndexExpr()->getDependence(); + if (D & ExprDependence::Value) +D |= ExprDependence::TypeInstanti

[clang] [Clang] Fix dependency computation for pack indexing expression (PR #91933)

2024-05-13 Thread via cfe-commits
@@ -376,6 +376,9 @@ ExprDependence clang::computeDependence(PackExpansionExpr *E) { ExprDependence clang::computeDependence(PackIndexingExpr *E) { ExprDependence D = E->getIndexExpr()->getDependence(); + if (D & ExprDependence::Value) +D |= ExprDependence::TypeInstanti

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread Thomas Preud'homme via cfe-commits
@@ -58,7 +58,7 @@ CHECK-CNT3-NOT: {{^}}this is duplicate CHECK-CNT4-COUNT-5: this is duplicate CHECK-CNT4-EMPTY: -Many-label: +Many-LABEL: RoboTux wrote: IMO this makes it harder to spot that this is *not* a FileCheck directive. I think we should drop al

[clang-tools-extra] [clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-13 Thread Danny Mösch via cfe-commits
@@ -337,6 +337,10 @@ Changes in existing checks ` check by excluding include directives that form the filename using macro. +- Improved :doc:`readability-else-after-return + ` check to ignore + `consteval if` condition, where need to retain the else statement. --

[clang-tools-extra] [clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-13 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny approved this pull request. https://github.com/llvm/llvm-project/pull/91588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread Matt Arsenault via cfe-commits
@@ -58,7 +58,7 @@ CHECK-CNT3-NOT: {{^}}this is duplicate CHECK-CNT4-COUNT-5: this is duplicate CHECK-CNT4-EMPTY: -Many-label: +Many-LABEL: arsenm wrote: I would be careful about touching FileCheck tests. The point might be the wrong label https://githu

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread via cfe-commits
@@ -58,7 +58,7 @@ CHECK-CNT3-NOT: {{^}}this is duplicate CHECK-CNT4-COUNT-5: this is duplicate CHECK-CNT4-EMPTY: -Many-label: +Many-LABEL: klensy wrote: I think i changed this file accidentally in process of fixing other things, i'll remove this changes.

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Oops, we used to diagnose this until Clang 17 (I think I accidentally regressed this behavior when implementing empty inits for C23). Thank you for the fix! Please be sure to add a release note to clang/docs/ReleaseNotes.rst so users know about the fi

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Aaron Ballman via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic -Wno-comment %s AaronBallman wrote: Why did this test need to add `-Wno-comment`? https://github.com/llvm/llvm-project/pu

[clang] [clang] Disallow VLA type compound literals (PR #91891)

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

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Aaron Ballman via cfe-commits
@@ -3371,6 +3371,8 @@ def err_field_with_address_space : Error< "field may not be qualified with an address space">; def err_compound_literal_with_address_space : Error< "compound literal in function scope may not be qualified with an address space">; +def err_compound_lit

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-13 Thread Sam McCall via cfe-commits
sam-mccall wrote: @mizvekov Thank you! With that patch, clang not only doesn't crash on stdexec with `-frelaxed-template-template-args`, but in fact accepts the code. https://github.com/llvm/llvm-project/pull/89807 ___ cfe-commits mailing list cfe-co

[clang] [Clang] Added check for unexpanded pack in attribute [[assume]] (PR #91893)

2024-05-13 Thread Azmat Yusuf via cfe-commits
azmat-y wrote: It was a pleasure working on this. I have received two emails from llvm build bot regarding failed builds, though the commit shows 8 build fails. How to go about investigating the cause of failures? Can you give me some pointers regarding this. And do the failures means this

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
@@ -3371,6 +3371,8 @@ def err_field_with_address_space : Error< "field may not be qualified with an address space">; def err_compound_literal_with_address_space : Error< "compound literal in function scope may not be qualified with an address space">; +def err_compound_lit

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
https://github.com/J-MR-T updated https://github.com/llvm/llvm-project/pull/91891 From 9aab9284fc094d22e12a2ee1217a3bc99e5837b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jim=20M=2E=20R=2E=20Teichgr=C3=A4ber?= Date: Sun, 12 May 2024 13:33:37 +0200 Subject: [PATCH 1/2] [clang] Disallow VLA type c

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-13 Thread Rajveer Singh Bharadwaj via cfe-commits
Rajveer100 wrote: Thanks for the approval, could you land this for me? https://github.com/llvm/llvm-project/pull/91119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic -Wno-comment %s J-MR-T wrote: [This line](https://github.com/llvm/llvm-project/pull/91891/files#diff-7d0182b6392ee774cf19

[clang] efe91cf - [clang][analyzer] Check for label location bindings in `DereferenceChecker` (#91119)

2024-05-13 Thread via cfe-commits
Author: Rajveer Singh Bharadwaj Date: 2024-05-13T13:43:35+02:00 New Revision: efe91cf78bccda90637c817e3e592b5f34e891d0 URL: https://github.com/llvm/llvm-project/commit/efe91cf78bccda90637c817e3e592b5f34e891d0 DIFF: https://github.com/llvm/llvm-project/commit/efe91cf78bccda90637c817e3e592b5f34e8

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/91119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-13 Thread via cfe-commits
eaeltsin wrote: Hi, This seems to break the following combination with overloaded -> operator - https://godbolt.org/z/jc6chKTdv ``` template class Clone { public: Clone(const Clone&); T* operator->() const; T* ptr_; }; // Assume T* T::clone()

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
J-MR-T wrote: > Please be sure to add a release note to clang/docs/ReleaseNotes.rst so users > know about the fix. Oh, sorry, I didn't find anything know how release notes were handled - will do! A question on that, would you classify this as a breaking change? Technically, it could break the

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Aaron Ballman via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic -Wno-comment %s AaronBallman wrote: Ah! That's a perfectly fine reason to use `-Wno-comment` and you can leave the test a

[clang] [clang] Disallow VLA type compound literals (PR #91891)

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

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Btw, you can probably move this PR out of Draft status, it seems awfully close to finished https://github.com/llvm/llvm-project/pull/91891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-13 Thread Sam McCall via cfe-commits
sam-mccall wrote: I'm sorry that I wasn't able to more usefully reduce the failure cases. When such regressions show up, we usually don't have any meaningful context on the code. For our own code, we have guidelines to try to limit complexity which makes reduction more tractable, but third-par

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
https://github.com/J-MR-T updated https://github.com/llvm/llvm-project/pull/91891 From 9aab9284fc094d22e12a2ee1217a3bc99e5837b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jim=20M=2E=20R=2E=20Teichgr=C3=A4ber?= Date: Sun, 12 May 2024 13:33:37 +0200 Subject: [PATCH 1/3] [clang] Disallow VLA type c

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-05-13 Thread via cfe-commits
Discookie wrote: Should be ready for another round of review. Simplified a lot of the logic, implemented most of the changes requested, added support for `p != nullptr`, and `void f(int **ptr)` invalidating the value of `*ptr`. I've been experimenting with trying to remove `TK_IgnoreUnlessSpe

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic -Wno-comment %s J-MR-T wrote: Ah, that's good to know! Seeing as I had to modify the test again anyway, it seems nicer to

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread Jim M . R . Teichgräber via cfe-commits
J-MR-T wrote: > Btw, you can probably move this PR out of Draft status, it seems awfully > close to finished I'll finish implementing your suggestions, run the tests again locally and then move it out of draft, if that's alright with you :). https://github.com/llvm/llvm-project/pull/91891 __

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-13 Thread via cfe-commits
Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?Message-ID: In-Reply-To: Sirraide wrote: > A question on that, would you classify this as a breaking change? This is just a bug fix, so no. Rejecting code that we would erroneously accept (and miscompile in the process) is not

[clang] Implementation of '#pragma STDC FENV_ROUND' (PR #89617)

2024-05-13 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff updated https://github.com/llvm/llvm-project/pull/89617 >From ec8838685fb7af618445c3ff1bae953778996c37 Mon Sep 17 00:00:00 2001 From: Serge Pavlov Date: Thu, 14 Apr 2022 18:00:14 +0700 Subject: [PATCH 1/3] Implementation of '#pragma STDC FENV_ROUND' This pragma is i

  1   2   3   4   5   6   >