[libclc] 25c0554 - [libclc] Move conversion builtins to the CLC library (#124727)

2025-02-12 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-02-12T08:55:02Z New Revision: 25c055416643f3291dfaa8136cb3a17b00656779 URL: https://github.com/llvm/llvm-project/commit/25c055416643f3291dfaa8136cb3a17b00656779 DIFF: https://github.com/llvm/llvm-project/commit/25c055416643f3291dfaa8136cb3a17b00656779.diff LOG

[clang] [clang][perf-training] Support excluding LLVM build from PGO training (PR #126876)

2025-02-12 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/126876 Using LLVM build itself for PGO training is convenient and a great starting point but it also has several issues: * LLVM build implicitly depends on tools other than CMake and C/C++ compiler and if those too

[clang] [clang][bytecode] Fix operator new source expression (PR #126870)

2025-02-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/126870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 20506a0 - [clang][bytecode] Fix operator new source expression (#126870)

2025-02-12 Thread via cfe-commits
Author: Timm Baeder Date: 2025-02-12T10:05:49+01:00 New Revision: 20506a0a15f9c4a7dc1cd0b4fa2dec8449074ab8 URL: https://github.com/llvm/llvm-project/commit/20506a0a15f9c4a7dc1cd0b4fa2dec8449074ab8 DIFF: https://github.com/llvm/llvm-project/commit/20506a0a15f9c4a7dc1cd0b4fa2dec8449074ab8.diff L

[clang] [NFC] Delete useless call. (PR #126875)

2025-02-12 Thread via cfe-commits
https://github.com/schittir converted_to_draft https://github.com/llvm/llvm-project/pull/126875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][perf-training] Support excluding LLVM build from PGO training (PR #126876)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes Using LLVM build itself for PGO training is convenient and a great starting point but it also has several issues: * LLVM build implicitly depends on tools other than CMake and C/C++ compiler and if those to

[clang] [clang][perf-training] Support excluding LLVM build from PGO training (PR #126876)

2025-02-12 Thread Petr Hosek via cfe-commits
petrhosek wrote: @tstellar We're trying to build a more minimal corpus that would address the issues I listed with @ilovepi. In the meantime, it'd be helpful to have this option since the current implementation actually breaks on our builders (which don't have host toolchain and sysroot instal

[clang] [NFC] Delete useless call. (PR #126875)

2025-02-12 Thread via cfe-commits
https://github.com/schittir closed https://github.com/llvm/llvm-project/pull/126875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm:ir] Add support for constant data exceeding 4GiB (PR #126481)

2025-02-12 Thread via cfe-commits
@@ -644,7 +644,7 @@ class ConstantDataSequential : public ConstantData { Type *getElementType() const; /// Return the number of elements in the array or vector. - unsigned getNumElements() const; + uint64_t getNumElements() const; pzzp wrote: Should I a

[clang] [analyzer] Add option assume-at-least-one-iteration (PR #125494)

2025-02-12 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/125494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] edbc1fb - [analyzer] Add option assume-at-least-one-iteration (#125494)

2025-02-12 Thread via cfe-commits
Author: Donát Nagy Date: 2025-02-12T11:56:02+01:00 New Revision: edbc1fb228acd7746d91cd72d476c063704504b8 URL: https://github.com/llvm/llvm-project/commit/edbc1fb228acd7746d91cd72d476c063704504b8 DIFF: https://github.com/llvm/llvm-project/commit/edbc1fb228acd7746d91cd72d476c063704504b8.diff LO

[clang] [clang][Sema] Fix type of an statement expression ending with an atomic type (PR #119711)

2025-02-12 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/119711 From d398fa13c2fa141954c79ca68a59c6ac506b393f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Wed, 11 Dec 2024 15:43:58 +0100 Subject: [PATCH 1/5] A

[clang] [llvm] [llvm:ir] Add support for constant data exceeding 4GiB (PR #126481)

2025-02-12 Thread via cfe-commits
@@ -644,7 +644,7 @@ class ConstantDataSequential : public ConstantData { Type *getElementType() const; /// Return the number of elements in the array or vector. - unsigned getNumElements() const; + uint64_t getNumElements() const; pzzp wrote: ok, I upda

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-02-12 Thread Younan Zhang via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -786,12 +786,16 @@ NonType

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-02-12 Thread Younan Zhang via cfe-commits
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?= Message-ID:

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-02-12 Thread Younan Zhang via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: https://github.com/zyn0217 edited https://git

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-02-12 Thread via cfe-commits
https://github.com/StarOne01 updated https://github.com/llvm/llvm-project/pull/123495 >From ea6c9ca9cffbf4327fc7bab85e37e2a3c2c0f0cd Mon Sep 17 00:00:00 2001 From: Prashanth Date: Sun, 19 Jan 2025 07:28:24 +0530 Subject: [PATCH 01/12] [clang][Sema] Add diagnostic note for function-like macros

[clang] [NFC][analyzer] OOB test consolidation II: constraint checking (PR #126748)

2025-02-12 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/126748 From df63943adf054b94249b125078d4dbeafb437641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 11 Feb 2025 16:22:32 +0100 Subject: [PATCH 1/2] [NFC][analyzer] OOB test consolidation II:

[clang] [NFC][analyzer] OOB test consolidation II: constraint checking (PR #126748)

2025-02-12 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/126748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-02-12 Thread via cfe-commits
https://github.com/StarOne01 updated https://github.com/llvm/llvm-project/pull/123495 >From ea6c9ca9cffbf4327fc7bab85e37e2a3c2c0f0cd Mon Sep 17 00:00:00 2001 From: Prashanth Date: Sun, 19 Jan 2025 07:28:24 +0530 Subject: [PATCH 01/11] [clang][Sema] Add diagnostic note for function-like macros

[clang] [Driver][ROCm][ASan] Skip checking ':xnack+' feature for gfx12. (PR #126885)

2025-02-12 Thread Amit Kumar Pandey via cfe-commits
@@ -1112,6 +1112,11 @@ bool AMDGPUToolChain::shouldSkipSanitizeOption( assert(OptionalGpuArch && "Invalid Target ID"); (void)OptionalGpuArch; + + // Skip checking 'xnack+' feature availability for gfx12 family. ampandey-1995 wrote: Sorry, but I didn't u

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-02-12 Thread via cfe-commits
@@ -2347,6 +2347,27 @@ Sema::BuildDeclRefExpr(ValueDecl *D, QualType Ty, ExprValueKind VK, return E; } +// Check whether a similar function-like macro exists and suggest it +static bool isFunctionLikeMacro(const DeclarationName &Name, Sema &SemaRef, +

[clang] [Driver][ROCm][ASan] Skip checking ':xnack+' feature for gfx12. (PR #126885)

2025-02-12 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/126885 >From cfa9342304a03671ed261a4f0b0cbe0297bb050b Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Wed, 12 Feb 2025 15:47:33 +0530 Subject: [PATCH] [Driver][ROCm][ASan] Skip checking ':xnack+' feature for gf

[clang] [Driver][ROCm][ASan] Skip checking ':xnack+' feature for gfx12. (PR #126885)

2025-02-12 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 edited https://github.com/llvm/llvm-project/pull/126885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] OOB test consolidation II: constraint checking (PR #126748)

2025-02-12 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -1,6 +1,4 @@ -// RUN: %clang_analyze_cc1 -Wno-array-bounds -analyzer-checker=core,security.ArrayBound,debug.ExprInspection -verify %s - -void clang_analyzer_eval(int); +// RUN: %clang_analyze_cc1 -Wno-array-bounds -analyzer-c

[clang] [NFC][analyzer] OOB test consolidation II: constraint checking (PR #126748)

2025-02-12 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -1,112 +1,163 @@ // RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.Malloc,security.ArrayBound,debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false -verify %s -void clang_analyzer_eval(int); -void cla

[clang] [clang] handle fp options in __builtin_convertvector (PR #125522)

2025-02-12 Thread Jakub Ficek via cfe-commits
https://github.com/ficol updated https://github.com/llvm/llvm-project/pull/125522 >From cb26d6a13e196bfc08221b7f6cd43ab45019e7d6 Mon Sep 17 00:00:00 2001 From: "Ficek, Jakub" Date: Mon, 3 Feb 2025 16:45:17 +0100 Subject: [PATCH 1/3] [clang] Handle fp options in __builtin_convertvector This pat

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-02-12 Thread via cfe-commits
https://github.com/StarOne01 updated https://github.com/llvm/llvm-project/pull/123495 >From ea6c9ca9cffbf4327fc7bab85e37e2a3c2c0f0cd Mon Sep 17 00:00:00 2001 From: Prashanth Date: Sun, 19 Jan 2025 07:28:24 +0530 Subject: [PATCH 01/11] [clang][Sema] Add diagnostic note for function-like macros

[clang] [lldb] [llvm] [mlir] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-02-12 Thread via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=,Yutong Zhu <115899167+yutongz...@users.noreply.github.com>, Juan Manuel

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-02-12 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/121768 From da2bbf99b8430d8b6aa6bf7969c9825b4d94219b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Mon, 18 Nov 2024 11:36:03 +0100 Subject: [PATCH 1/8] [

[clang-tools-extra] Add AllowFalseEvaluated flag to clang-tidy noexcept-move-constructor check (PR #126897)

2025-02-12 Thread Dmitry Nechitaev via cfe-commits
Nechda wrote: Ask for review @PiotrZSL https://github.com/llvm/llvm-project/pull/126897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] OOB test consolidation II: constraint checking (PR #126748)

2025-02-12 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal requested changes to this pull request. Please avoid matching the types of the `clang_analyzer_value` dumps, but be sure to match the whole range sets there, including their curlies. It's still important to know that

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread via cfe-commits
https://github.com/flovent edited https://github.com/llvm/llvm-project/pull/126752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread via cfe-commits
https://github.com/flovent edited https://github.com/llvm/llvm-project/pull/126752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread via cfe-commits
https://github.com/flovent edited https://github.com/llvm/llvm-project/pull/126752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread via cfe-commits
@@ -339,6 +425,36 @@ void BlockInCriticalSectionChecker::reportBlockInCritSection( os.str(), ErrNode); R->addRange(Call.getSourceRange()); R->markInteresting(Call.getReturnValue()); + // for 'read' call, check whether it

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread via cfe-commits
https://github.com/flovent edited https://github.com/llvm/llvm-project/pull/126752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix type of an statement expression ending with an atomic type (PR #119711)

2025-02-12 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/119711 From d398fa13c2fa141954c79ca68a59c6ac506b393f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Wed, 11 Dec 2024 15:43:58 +0100 Subject: [PATCH 1/5] A

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread via cfe-commits
https://github.com/flovent edited https://github.com/llvm/llvm-project/pull/126752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread Gábor Horváth via cfe-commits
@@ -339,6 +425,36 @@ void BlockInCriticalSectionChecker::reportBlockInCritSection( os.str(), ErrNode); R->addRange(Call.getSourceRange()); R->markInteresting(Call.getReturnValue()); + // for 'read' call, check whether it

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2025-02-12 Thread Younan Zhang via cfe-commits
@@ -3636,18 +3644,23 @@ ExprResult Parser::ParseRequiresExpression() { // Start of requirement list llvm::SmallVector Requirements; - // C++2a [expr.prim.req]p2 - // Expressions appearing within a requirement-body are unevaluated operands. - EnterExpressionEvaluation

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-12 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/120896 >From 295df258043ef5a87ae603eedd308b863bad7b59 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 22 Dec 2024 15:14:30 +0200 Subject: [PATCH 01/10] [Clang] allow restrict qualifier for array types with po

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread via cfe-commits
@@ -339,6 +425,36 @@ void BlockInCriticalSectionChecker::reportBlockInCritSection( os.str(), ErrNode); R->addRange(Call.getSourceRange()); R->markInteresting(Call.getReturnValue()); + // for 'read' call, check whether it

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread via cfe-commits
https://github.com/flovent edited https://github.com/llvm/llvm-project/pull/126752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-02-12 Thread via cfe-commits
https://github.com/StarOne01 updated https://github.com/llvm/llvm-project/pull/123495 >From ea6c9ca9cffbf4327fc7bab85e37e2a3c2c0f0cd Mon Sep 17 00:00:00 2001 From: Prashanth Date: Sun, 19 Jan 2025 07:28:24 +0530 Subject: [PATCH 01/12] [clang][Sema] Add diagnostic note for function-like macros

[clang] [clang][Sema] Fix type of an statement expression ending with an atomic type (PR #119711)

2025-02-12 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/119711 From d398fa13c2fa141954c79ca68a59c6ac506b393f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Wed, 11 Dec 2024 15:43:58 +0100 Subject: [PATCH 1/5] A

[clang] [llvm] [llvm:ir] Add support for constant data exceeding 4GiB (PR #126481)

2025-02-12 Thread via cfe-commits
https://github.com/pzzp updated https://github.com/llvm/llvm-project/pull/126481 >From 3feb290783ff44972d5634b505ec3e051f1e2603 Mon Sep 17 00:00:00 2001 From: zhoupeng12 Date: Mon, 30 Oct 2023 18:13:07 +0800 Subject: [PATCH] [llvm:ir] Add support for constant data exceeding 4GiB --- clang/lib/

[clang] [NFC][analyzer] OOB test consolidation II: constraint checking (PR #126748)

2025-02-12 Thread Donát Nagy via cfe-commits
@@ -1,112 +1,163 @@ // RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.Malloc,security.ArrayBound,debug.ExprInspection \ // RUN: -analyzer-config eagerly-assume=false -verify %s -void clang_analyzer_eval(int); -void clang_analyzer_printState(void); - -typedef typeof(siz

[clang] [analyzer] Add option assume-at-least-one-iteration (PR #125494)

2025-02-12 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. https://github.com/llvm/llvm-project/pull/125494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Delete useless call (PR #126874)

2025-02-12 Thread via cfe-commits
@@ -440,7 +440,6 @@ static SVal castArgToParamTypeIfNeeded(const CallEvent &Call, unsigned ArgIdx, return ArgVal; const FunctionDecl *Definition = CallExprDecl; - Definition->hasBody(Definition); schittir wrote: Yes, that makes sense. This change is

[clang] [analyzer] Simplify CallEvent castArgToParamTypeIfNeeded (PR #120981)

2025-02-12 Thread via cfe-commits
https://github.com/schittir deleted https://github.com/llvm/llvm-project/pull/120981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Delete useless call (PR #126874)

2025-02-12 Thread Balazs Benics via cfe-commits
@@ -440,7 +440,6 @@ static SVal castArgToParamTypeIfNeeded(const CallEvent &Call, unsigned ArgIdx, return ArgVal; const FunctionDecl *Definition = CallExprDecl; - Definition->hasBody(Definition); steakhal wrote: The removal of this would break the `cl

[clang] [NFC] Delete useless call (PR #126874)

2025-02-12 Thread Balazs Benics via cfe-commits
@@ -440,7 +440,6 @@ static SVal castArgToParamTypeIfNeeded(const CallEvent &Call, unsigned ArgIdx, return ArgVal; const FunctionDecl *Definition = CallExprDecl; - Definition->hasBody(Definition); steakhal wrote: These tests can be run using `check-cla

[clang] [NFC] Delete useless call (PR #126874)

2025-02-12 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/126874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Simplify CallEvent castArgToParamTypeIfNeeded (PR #120981)

2025-02-12 Thread via cfe-commits
@@ -435,27 +435,27 @@ static SVal processArgument(SVal Value, const Expr *ArgumentExpr, /// runtime definition don't match in terms of argument and parameter count. static SVal castArgToParamTypeIfNeeded(const CallEvent &Call, unsigned ArgIdx,

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread Gábor Horváth via cfe-commits
@@ -339,6 +425,36 @@ void BlockInCriticalSectionChecker::reportBlockInCritSection( os.str(), ErrNode); R->addRange(Call.getSourceRange()); R->markInteresting(Call.getReturnValue()); + // for 'read' call, check whether it

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread Gábor Horváth via cfe-commits
@@ -339,6 +425,36 @@ void BlockInCriticalSectionChecker::reportBlockInCritSection( os.str(), ErrNode); R->addRange(Call.getSourceRange()); R->markInteresting(Call.getReturnValue()); + // for 'read' call, check whether it

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/126752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun commented: Is read the only operation that is non-blocking in this case? Alternatively, instead of using a BugReporterVisitor, we could maintain a set of file handles that are OK to use. https://github.com/llvm/llvm-project/pull/126752 _

[clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-02-12 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/126846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] OOB test consolidation II: constraint checking (PR #126748)

2025-02-12 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/126748 From df63943adf054b94249b125078d4dbeafb437641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 11 Feb 2025 16:22:32 +0100 Subject: [PATCH 1/4] [NFC][analyzer] OOB test consolidation II:

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread Balazs Benics via cfe-commits
steakhal wrote: I want to review this PR before anyone would approve and merge this, as I was the one who plotted a potential solution in the linked issue. I hope I can get to this on the weekend. https://github.com/llvm/llvm-project/pull/126752 ___

[clang] [NFC][analyzer] OOB test consolidation II: constraint checking (PR #126748)

2025-02-12 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > Please avoid matching the types of the `clang_analyzer_value` dumps, but be > sure to match the whole range sets there, including their curlies. It's still > important to know that it would have a single range associated. Yes, that's what I was planning. Pushed a commit that

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-02-12 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -786,12 +786,16 @@ NonTypeTemplateParmDecl *NonTypeTemplateParmDecl::Create( QualType T, bool ParameterPack, TypeSourceInfo *TInfo) { AutoType *AT = C.getLangOpts().CPlusPlus20 ? T->getContainedAutoType() : nullptr; - return new (C, DC, - additional

[clang] [llvm] [Clang] [OpenMP] Add support for '#pragma omp stripe'. (PR #119891)

2025-02-12 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > @zahiraam I've reverted your PR. I'm happy to test your revised version > though my build environment is no secret -- `-DLLVM_ENABLE_WERROR=On` along > with clang as the host compiler. Sorry about that! I will fix the error and merge it back. https://github.com/llvm/llvm-pro

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread via cfe-commits
@@ -145,6 +145,92 @@ using MutexDescriptor = std::variant; +class NonBlockOpenVisitor : public BugReporterVisitor { +private: + const VarRegion *VR; + const CallExpr *OpenCallExpr; + int O_NONBLOCKV; whisperity wrote: My suggestion is to call this `int`

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Aaron Ballman via cfe-commits
@@ -1648,8 +1648,11 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *Method = dyn_cast_if_present(getCalleeDecl()); Method && Method->isExplicitObjectMemberFunction()) { -assert(getNumArgs() > 0 && getArg(0)); -return getArg(0)->getBeg

[clang] [clang][Sema] Fix type of an statement expression ending with an atomic type (PR #119711)

2025-02-12 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/119711 From d398fa13c2fa141954c79ca68a59c6ac506b393f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Wed, 11 Dec 2024 15:43:58 +0100 Subject: [PATCH 1/5] A

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread via cfe-commits
@@ -145,6 +145,92 @@ using MutexDescriptor = std::variant; +class NonBlockOpenVisitor : public BugReporterVisitor { +private: + const VarRegion *VR; + const CallExpr *OpenCallExpr; + int O_NONBLOCKV; flovent wrote: i understand now, thank you for explai

[clang] [clang][Sema] Fix type of an statement expression ending with an atomic type (PR #119711)

2025-02-12 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -15919,10 +15919,17 @@ ExprResult Sema::ActOnStmtExprResult(ExprResult ER) { if (Cast && Cast->getCastKind() == CK_ARCConsumeObject) return Cast->getSubExpr(); + auto Ty = E->getType().getUnqualifiedType(); alejandro-alvarez-sonarsource wrote: > Bef

[clang] [openmp] [OpenMP][SIMD][FIX] Use conservative "omp simd ordered" lowering (PR #126172)

2025-02-12 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev closed https://github.com/llvm/llvm-project/pull/126172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][OpenMP] dispatch directive semantics/codegen (PR #126914)

2025-02-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/126914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread via cfe-commits
flovent wrote: i have implemented the way using set successfully in my local development environment as @Xazax-hun suggested. the implementation detail is: 1. when we encounter `open` call, if open flag contains O_NONBLOCK, store call's return Symbol to set, 2. when we encounter `read` call, ch

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-12 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/120896 >From 295df258043ef5a87ae603eedd308b863bad7b59 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 22 Dec 2024 15:14:30 +0200 Subject: [PATCH 01/10] [Clang] allow restrict qualifier for array types with po

[libclc] [libclc] Fix int<->float conversion builtins (PR #126905)

2025-02-12 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/126905 While working on moving the conversion builtins to the CLC library in 25c05541 it was discovered that many weren't passing the OpenCL-CTS tests. As it happens, the clspv-specific code for conversion impleme

[clang] [Sema] -Wformat: warn about C23 %b %B when not in C23 language mode (PR #126694)

2025-02-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > /cc @SharonXSharon > > thanks for submitting the fix! A noob question, I wonder in general why does > clang choose to warn on the invalid formatter instead of erroring out given > it'll be undefined behavior for invalid formatter? Functionally, some kinds of UB are wor

[libclc] [libclc] Fix int<->float conversion builtins (PR #126905)

2025-02-12 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: CC @rjodinchr. I remember you saying you're OOO so no pressure, but perhaps you could verify this commit with clspv? For clarity, the remaining failures I see are, e.g., ``` Error for vector size 1 found at 0x0001: *-0x0p+0 vs 0x0p+0 Input value: -0x1.02p-25 (conve

[libclc] [libclc] Stop installing CLC headers (PR #126908)

2025-02-12 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/126908 The libclc headers are an implementation detail and are not intended to be used by others as OpenCL headers. The only artifacts of libclc we want to publish are the LLVM bytecode libraries. As the headers

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > The public libclang interface needs to be stable, yes... but in this context, > that's just the interfaces declared in clang/include/clang-c/CXString.h. We > can do whatever we want with the internal interface in > clang/tools/libclang/CXString.h. Oh, good catch! Agreed.

[libclc] [libclc] Stop installing CLC headers (PR #126908)

2025-02-12 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: CC @KarolHerbst. https://github.com/llvm/llvm-project/pull/126908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a1826b4 - [OpenMP][SIMD][FIX] Use conservative "omp simd ordered" lowering (#126172)

2025-02-12 Thread via cfe-commits
Author: Matt Date: 2025-02-12T08:53:47-05:00 New Revision: a1826b4d2603a2018ca348d430159ec59e0b72bd URL: https://github.com/llvm/llvm-project/commit/a1826b4d2603a2018ca348d430159ec59e0b72bd DIFF: https://github.com/llvm/llvm-project/commit/a1826b4d2603a2018ca348d430159ec59e0b72bd.diff LOG: [Op

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-12 Thread Aaron Ballman via cfe-commits
@@ -96,6 +100,47 @@ the header file to conditionally make a function constexpr whenever the constant evaluation of the corresponding builtin (for example, ``std::fmax`` calls ``__builtin_fmax``) is supported in Clang. +``__has_target_builtin`` + +

[clang] [HLSL] Change clang Driver Options to not set CXXOperatorNames (PR #126758)

2025-02-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-out-of-tree` running on `linaro-flang-aarch64-out-of-tree` while building `clang` at step 7 "build-flang-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/53/builds/12221 H

[clang] [llvm] [OpenMP][OpenMPIRBuilder] Support SPIR-V device variant matches (PR #126801)

2025-02-12 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/126801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP][OpenMPIRBuilder] Support SPIR-V device variant matches (PR #126801)

2025-02-12 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/126801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP][OpenMPIRBuilder] Support SPIR-V device variant matches (PR #126801)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Nick Sarnie (sarnex) Changes We should be able to use `spirv64` as a device variant match and it should be considered a GPU. Also add the triple to an RTTI check. --- Full diff: https://github.com/llvm/llvm-project/pull/126801.di

[clang] [Driver][ROCm][ASan] Skip checking ':xnack+' feature for gfx12. (PR #126885)

2025-02-12 Thread Joseph Huber via cfe-commits
@@ -1112,6 +1112,11 @@ bool AMDGPUToolChain::shouldSkipSanitizeOption( assert(OptionalGpuArch && "Invalid Target ID"); (void)OptionalGpuArch; + + // Skip checking 'xnack+' feature availability for gfx12 family. jhuber6 wrote: The fact that target-id's pu

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-02-12 Thread via cfe-commits
StarOne01 wrote: Done! (Sorry for force pushes 😅, git suddenly decided to act weird). https://github.com/llvm/llvm-project/pull/123495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-12 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > * Now the ScanningProjectModules are owned by different calls to > `ModulesBuilder::buildPrerequisiteModulesFor`. So we don't need to care about > thread safety in ScanningProjectModules. And if we make it the underlying > ProjectModules, we need to care about the thead safet

[clang] [C++20] [Modules] Instantiate pending instantiations when GMF ends (PR #126842)

2025-02-12 Thread Matheus Izvekov via cfe-commits
@@ -1104,9 +1104,13 @@ void Sema::ActOnStartOfTranslationUnit() { } void Sema::ActOnEndOfTranslationUnitFragment(TUFragmentKind Kind) { - // No explicit actions are required at the end of the global module fragment. - if (Kind == TUFragmentKind::Global) + if (Kind == TUFrag

[clang] [clang] handle fp options in __builtin_convertvector (PR #125522)

2025-02-12 Thread Jakub Ficek via cfe-commits
ficol wrote: Hi @shafik, can you please review this PR after changes? https://github.com/llvm/llvm-project/pull/125522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] OOB test consolidation II: constraint checking (PR #126748)

2025-02-12 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/126748 ___ cfe-commits mailing list cf

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #117904)

2025-02-12 Thread Julian Brown via cfe-commits
jtb20 wrote: The failures with this patch and not mine are just: PASS->FAIL: tests/5.1/dispatch/test_dispatch_is_device_ptr.c run PASS->FAIL: tests/5.1/dispatch/test_dispatch_nowait.c run that's actually probably neither here nor there, the clauses in question aren't implemented in my patch ye

[clang] 767b15f - [HLSL] Change clang Driver Options to not set CXXOperatorNames (#126758)

2025-02-12 Thread via cfe-commits
Author: Farzon Lotfi Date: 2025-02-12T09:21:39-05:00 New Revision: 767b15f9d57cf31fd6ba2aed8c17a8c30d5b5e6e URL: https://github.com/llvm/llvm-project/commit/767b15f9d57cf31fd6ba2aed8c17a8c30d5b5e6e DIFF: https://github.com/llvm/llvm-project/commit/767b15f9d57cf31fd6ba2aed8c17a8c30d5b5e6e.diff

[clang] [HLSL] Change clang Driver Options to not set CXXOperatorNames (PR #126758)

2025-02-12 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/126758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DebugInfo] Update DIBuilder insertion to take InsertPosition (PR #126059)

2025-02-12 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams commented: > @OCHyams I believe you did the C API changes, are there any additional > concerns in this area? SGTM, just one inline question https://github.com/llvm/llvm-project/pull/126059 ___ cfe-commits mailing list cfe-c

[clang] [llvm] [DebugInfo] Update DIBuilder insertion to take InsertPosition (PR #126059)

2025-02-12 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams edited https://github.com/llvm/llvm-project/pull/126059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coverage][MC/DC] Show uncoverable and unreachable conditions (PR #94137)

2025-02-12 Thread via cfe-commits
https://github.com/Lambdaris updated https://github.com/llvm/llvm-project/pull/94137 >From 17075214ce351cc39db7e2da8d0bfcb196861c7b Mon Sep 17 00:00:00 2001 From: Lambdaris Date: Thu, 22 Aug 2024 21:31:03 +0800 Subject: [PATCH 1/3] [coverage] Count false counters when calculating max counter i

[clang] [llvm] [mlir] [NVPTX] Convert scalar function nvvm.annotations to attributes (PR #125908)

2025-02-12 Thread Guray Ozen via cfe-commits
@@ -227,14 +228,14 @@ class NVVMDialectLLVMIRTranslationInterface } else if (attribute.getName() == grypp wrote: Sure sounds great https://github.com/llvm/llvm-project/pull/125908 ___ cfe-commits mailing list cfe-

[clang] [llvm] [Coverage][MC/DC] Show uncoverable and unreachable conditions (PR #94137)

2025-02-12 Thread via cfe-commits
Lambdaris wrote: > What's the current status? I think it's done and ready for review. > I think marking extended semantics (to Regions) will still be the issue. > Could we enhance "Gap"? Could you clarify the issue and how we enhance "gap" a bit more? Now the major work of this patch is in

  1   2   3   4   5   6   >