[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-18 Thread Gábor Horváth via cfe-commits
@@ -0,0 +1,64 @@ +//== APSIntPtr.h - Wrapper for APSInt objects owned separately -*- C++ -*--==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apach

[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-18 Thread Gábor Horváth via cfe-commits
@@ -0,0 +1,64 @@ +//== APSIntPtr.h - Wrapper for APSInt objects owned separately -*- C++ -*--==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apach

[clang] [llvm] [LLVM][PhaseOrdering] Run CSE after InstCombine has cleaned the result of vectorisation. (PR #120443)

2024-12-18 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm created https://github.com/llvm/llvm-project/pull/120443 I revisited 58690 and was puzzled why the obvious combines do not fire. I believe the reason is combines that end with replaceOperand, because they can introduce duplicate expression trees (albeit tiny o

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-18 Thread Balázs Kéri via cfe-commits
@@ -10181,6 +10184,151 @@ TEST_P(ImportTemplateParmDeclDefaultValue, FromD, FromDInherited); } +TEST_P(ASTImporterOptionSpecificTestBase, ImportIntoReopenedNamespaceNoMatch1) { + const char *ToCode = + R"( + namespace a { + } + namespace a { +

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-18 Thread Balázs Kéri via cfe-commits
@@ -6082,6 +6084,7 @@ TEST_P(ASTImporterLookupTableTest, LookupSearchesInTheWholeRedeclChain) { auto Res = LT.lookup(N1, Name); ASSERT_EQ(Res.size(), 1u); EXPECT_EQ(*Res.begin(), A); + EXPECT_TRUE(LT.lookup(N2, Name).empty()); balazske wrote: Yes, prev

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-12-18 Thread Alex Voicu via cfe-commits
@@ -337,9 +337,12 @@ void AMDGPUTargetInfo::getTargetDefines(const LangOptions &Opts, if (hasFastFMA()) Builder.defineMacro("FP_FAST_FMA"); - Builder.defineMacro("__AMDGCN_WAVEFRONT_SIZE__", Twine(WavefrontSize)); - // ToDo: deprecate this macro for naming consistency

[clang] [llvm] [LLVM][PhaseOrdering] Run CSE after InstCombine has cleaned the result of vectorisation. (PR #120443)

2024-12-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-transforms Author: Paul Walker (paulwalker-arm) Changes I revisited 58690 and was puzzled why the obvious combines do not fire. I believe the reason is combines that end with replaceOperand, because they can introduce du

[clang] [clang] Change placeholder from `undef` to `poison` (PR #120446)

2024-12-18 Thread Pedro Lobo via cfe-commits
https://github.com/pedroclobo created https://github.com/llvm/llvm-project/pull/120446 Call `insertvalue` with a `poison` operand instead of `undef`. >From eac0aa0d6a60a61a4312b248229aa94559ca5add Mon Sep 17 00:00:00 2001 From: Pedro Lobo Date: Wed, 18 Dec 2024 15:58:46 + Subject: [PATCH]

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-18 Thread Balázs Kéri via cfe-commits
@@ -10181,6 +10184,151 @@ TEST_P(ImportTemplateParmDeclDefaultValue, FromD, FromDInherited); } +TEST_P(ASTImporterOptionSpecificTestBase, ImportIntoReopenedNamespaceNoMatch1) { + const char *ToCode = + R"( + namespace a { + } + namespace a { +

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

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

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-12-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: > As far as I know, to eliminate the warning emitted corresponding to the FIXME > comment, we need to implement a new Checker for attributes; we can do this in > a second PR to avoid scope creep for this issue/PR. Agreed. I had a look at the exploded grap

[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-18 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: I see that `unsafeConstructor` is used in the follow-up PRs. I'd move the addition of that function to the first PR that is using it. https://github.com/llvm/llvm-project/pull/120435 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [clang] Change placeholder from `undef` to `poison` (PR #120446)

2024-12-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Pedro Lobo (pedroclobo) Changes Call `insertvalue` with a `poison` operand instead of `undef`. --- Full diff: https://github.com/llvm/llvm-project/pull/120446.diff 2 Files Affected: - (modified) clang/lib/CodeGen/MicrosoftCXXABI

[clang] [llvm] [clang][llvm][aarch64] Add aarch64_sme_in_streaming_mode intrinsic (PR #120265)

2024-12-18 Thread Nicholas Guy via cfe-commits
https://github.com/NickGuy-Arm edited https://github.com/llvm/llvm-project/pull/120265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-18 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. I would remove the `unsafeConstructor` unless we absolutely need it. Otherwise LGTM! https://github.com/llvm/llvm-project/pull/120435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-12-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_analyze_cc1 -std=c++11 -Wno-array-bounds -verify %s \ +// RUN: -analyzer-checker=unix,core,alpha.security.ArrayBoundV2,debug.ExprInspection + +// TODO: fix the checker arguments steakhal wrote: ```suggestion // RUN: %clang_anal

[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-18 Thread Balazs Benics via cfe-commits
steakhal wrote: > I see that `unsafeConstructor` is used in the follow-up PRs. I'd move the > addition of that function to the first PR that is using it. I think I'd prefer keeping it here because this API would be here all at once. Think of dependencies: All the rest of the commits use these A

[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-18 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: OK, the dependency argument is fair. I am with this as is. https://github.com/llvm/llvm-project/pull/120435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-12-18 Thread Joseph Huber via cfe-commits
@@ -337,9 +337,12 @@ void AMDGPUTargetInfo::getTargetDefines(const LangOptions &Opts, if (hasFastFMA()) Builder.defineMacro("FP_FAST_FMA"); - Builder.defineMacro("__AMDGCN_WAVEFRONT_SIZE__", Twine(WavefrontSize)); - // ToDo: deprecate this macro for naming consistency

[clang] [clang][NFC] Increase NumStmtBits by 2 as we are approaching the limit (PR #120341)

2024-12-18 Thread Erich Keane via cfe-commits
erichkeane wrote: > Let's just increase to 9 bits. > > Have you checked whether the size of `Stmt` or `Expr` changes when you do > this? I have these concerns as well, this ends up affecting the size of a lot of things That said, StmtNodes.td already has 267 items in it (as far as I can

[clang] [llvm] [AMDGPU][True16][MC] true16 for v_alignbyte_b32 (PR #119750)

2024-12-18 Thread Brox Chen via cfe-commits
https://github.com/broxigarchen updated https://github.com/llvm/llvm-project/pull/119750 >From dc1cc19d8d3cb2c41ca05a131f67bb576effb614 Mon Sep 17 00:00:00 2001 From: guochen2 Date: Thu, 12 Dec 2024 13:33:14 -0500 Subject: [PATCH 1/2] True16 for v_alignbyte_b32 in MC --- clang/lib/CodeGen/CGB

[clang] [Clang] Re-write codegen for atomic_test_and_set and atomic_clear (PR #120449)

2024-12-18 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard created https://github.com/llvm/llvm-project/pull/120449 Re-write the sema and codegen for the atomic_test_and_set and atomic_clear builtin functions to go via AtomicExpr, like the other atomic builtins do. This simplifies the code, because AtomicExpr already handl

[clang] [Clang] Re-write codegen for atomic_test_and_set and atomic_clear (PR #120449)

2024-12-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Oliver Stannard (ostannard) Changes Re-write the sema and codegen for the atomic_test_and_set and atomic_clear builtin functions to go via AtomicExpr, like the other atomic builtins do. This simplifies the code, because AtomicExpr

[clang] [clang][NFC] Increase NumStmtBits by 2 as we are approaching the limit (PR #120341)

2024-12-18 Thread Jon Roelofs via cfe-commits
@@ -109,16 +109,27 @@ class alignas(void *) Stmt { //===--- Statement bitfields classes ---===// + enum { NumStmtBits = 10 }; + +#define STMT(CLASS, PARENT) +#define STMT_RANGE(BASE, FIRST, LAST) +#define LAST_STMT_RANGE(BASE, FIRST, LAST)

[clang] [Clang] Re-write codegen for atomic_test_and_set and atomic_clear (PR #120449)

2024-12-18 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 f8d270474c14c6705c77971494505dbe4b6d55ae 061b665db29b12f15cf3fee76c8e124d07ff050d --e

[clang] [Clang] Fix crash with implicit int-to-pointer conversion (PR #114218)

2024-12-18 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard closed https://github.com/llvm/llvm-project/pull/114218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash with implicit int-to-pointer conversion (PR #114218)

2024-12-18 Thread Oliver Stannard via cfe-commits
ostannard wrote: > If __atomic_test_and_set is overloaded to have both a volatile and > non-volatile variant, it should be using custom type-checking in Sema. Looking at the code again, there's a separate system used to codegen most of the atomic builtins, so I've switched to using that. That

[clang] [clang] Change placeholder from `undef` to `poison` (PR #120446)

2024-12-18 Thread Pedro Lobo via cfe-commits
pedroclobo wrote: cc @nunoplopes https://github.com/llvm/llvm-project/pull/120446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Increase NumStmtBits by 2 as we are approaching the limit (PR #120341)

2024-12-18 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Let's just increase to 9 bits. > > Have you checked whether the size of `Stmt` or `Expr` changes when you do > > this? > > I have these concerns as well, this ends up affecting the size of a lot of > things > > That said, StmtNodes.td already has 267 items in it (as

[clang] [clang][NFC] Increase NumStmtBits by 2 as we are approaching the limit (PR #120341)

2024-12-18 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > > > Let's just increase to 9 bits. > > > Have you checked whether the size of `Stmt` or `Expr` changes when you do > > > this? > > > > > > I have these concerns as well, this ends up affecting the size of a lot of > > things > > That said, StmtNodes.td already has 267 it

[clang] 72e58e0 - [Clang] Set `__cpp_explicit_this_parameter` (#107451)

2024-12-18 Thread via cfe-commits
Author: cor3ntin Date: 2024-12-18T17:36:47+01:00 New Revision: 72e58e00c27c7f4dd9502c719ddd13dcfef33e85 URL: https://github.com/llvm/llvm-project/commit/72e58e00c27c7f4dd9502c719ddd13dcfef33e85 DIFF: https://github.com/llvm/llvm-project/commit/72e58e00c27c7f4dd9502c719ddd13dcfef33e85.diff LOG:

[clang] [HLSL] Make fast math the default for HLSL (PR #119820)

2024-12-18 Thread Justin Bogner via cfe-commits
https://github.com/bogner commented: This looks correct, but how much work is it to update all of these tests to have fast math enabled rather than explicitly disabling it? I worry that (1) folks looking at these tests in the future will think that disabling fast math is a meaningful part of t

[clang] [flang] [Flang][OpenMP] Add -fopenmp-default-none command line flag (PR #120287)

2024-12-18 Thread Michael Klemm via cfe-commits
@@ -2276,7 +2281,8 @@ void OmpAttributeVisitor::Post(const parser::Name &name) { if (Symbol * found{currScope().FindSymbol(name.source)}) { if (symbol != found) { name.symbol = found; // adjust the symbol within region -} else if (GetContext().de

[clang] [Clang] Set `__cpp_explicit_this_parameter` (PR #107451)

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

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-18 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/118466 From e97972c18fd88129bb868b1bfc880f7fdb8e8c73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Fri, 29 Nov 2024 18:00:04 +0100 Subject: [PATCH 1/2] [clang][ASTImporter] Not using primary

[clang-tools-extra] 2b932bc - [clang-doc] Use LangOpts when printing types (#120308)

2024-12-18 Thread via cfe-commits
Author: Paul Kirth Date: 2024-12-18T08:39:19-08:00 New Revision: 2b932bc111c0d96db7044b0a854d7ad763710df2 URL: https://github.com/llvm/llvm-project/commit/2b932bc111c0d96db7044b0a854d7ad763710df2 DIFF: https://github.com/llvm/llvm-project/commit/2b932bc111c0d96db7044b0a854d7ad763710df2.diff LO

[clang-tools-extra] [clang-doc] Use LangOpts when printing types (PR #120308)

2024-12-18 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/120308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-18 Thread via cfe-commits
pidgeon777 wrote: While I don't have direct experience with LLVM releases, I suppose the Outgoing Calls feature will be part of version 20? https://github.com/llvm/llvm-project/pull/117673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [Clang] Don't assume unexpanded PackExpansions' size when expanding packs (PR #120380)

2024-12-18 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/120380 Fixes #61415 Fixes #32252 Fixes #17042 >From 3dd62b0dc3d913b76072c4dc0a7c0d172fe9d529 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 18 Dec 2024 16:22:15 +0800 Subject: [PATCH] [Clang] Don't assume unex

[clang] [llvm] [NFC][AMDGPU] Pre-commit clang and llvm tests for dynamic allocas (PR #120063)

2024-12-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/17908 Here is

[clang] 5a5838f - Introduce CounterMappingRegion::isBranch(). NFC.

2024-12-18 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-12-18T20:00:02+09:00 New Revision: 5a5838fba37153adb7885c897131dda09227eb2d URL: https://github.com/llvm/llvm-project/commit/5a5838fba37153adb7885c897131dda09227eb2d DIFF: https://github.com/llvm/llvm-project/commit/5a5838fba37153adb7885c897131dda09227eb2d.dif

[clang] [llvm] [AArch64] Implement NEON FP8 intrinsics for fused multiply-add (indexed) (PR #120403)

2024-12-18 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 229d78de31467f623e33716a30cb0c6d285d7683 159b7a74d751197fc986bbeaf1522f01f1ab2c11 --e

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

2024-12-18 Thread via cfe-commits
https://github.com/SunilKuravinakop updated https://github.com/llvm/llvm-project/pull/117904 >From 1703aa62cfe35538aedbacb28e907535e838248c Mon Sep 17 00:00:00 2001 From: Sunil Kuravinakop Date: Fri, 20 Sep 2024 01:41:29 -0500 Subject: [PATCH 01/10] Support for dispatch construct (Sema & Codege

[clang] [Clang] Don't assume unexpanded PackExpansions' size when expanding packs (PR #120380)

2024-12-18 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/120380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't assume unexpanded PackExpansions' size when expanding packs (PR #120380)

2024-12-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes CheckParameterPacksForExpansion() previously assumed that template arguments don't include PackExpansion types when attempting another pack expansion (i.e. when NumExpansions is present). However, this assum

[clang] [Clang] Don't assume unexpanded PackExpansions' size when expanding packs (PR #120380)

2024-12-18 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/120380 >From 3dd62b0dc3d913b76072c4dc0a7c0d172fe9d529 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 18 Dec 2024 16:22:15 +0800 Subject: [PATCH 1/2] [Clang] Don't assume unexpanded PackExpansions' size when ex

[clang] [Clang] Don't assume unexpanded PackExpansions' size when expanding packs (PR #120380)

2024-12-18 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/120380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash in __builtin_assume_aligned (PR #114217)

2024-12-18 Thread Oliver Stannard via cfe-commits
@@ -5272,8 +5272,11 @@ bool Sema::BuiltinAssumeAligned(CallExpr *TheCall) { { ExprResult FirstArgResult = DefaultFunctionArrayLvalueConversion(FirstArg); -if (checkBuiltinArgument(*this, TheCall, 0)) ostannard wrote: Done https://github.com/

[clang] [Clang] Fix crash in __builtin_assume_aligned (PR #114217)

2024-12-18 Thread Oliver Stannard via cfe-commits
@@ -74,7 +74,7 @@ int test13(int *a) { } int test14(int *a, int b) { - a = (int *)__builtin_assume_aligned(b, 32); // expected-error {{incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *}} + a = (int *)__builtin_assume_aligned(b, 32);

[clang] [Clang] Fix crash in __builtin_assume_aligned (PR #114217)

2024-12-18 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard updated https://github.com/llvm/llvm-project/pull/114217 >From a657d11051c95473727ca5e9f6a8e8ab195fe590 Mon Sep 17 00:00:00 2001 From: Oliver Stannard Date: Wed, 30 Oct 2024 12:01:56 + Subject: [PATCH 1/3] [Clang] Fix crash in __builtin_assume_aligned The CodeG

[clang] [llvm] [AArch64] Add soft-float ABI (PR #84146)

2024-12-18 Thread Oliver Stannard via cfe-commits
@@ -180,7 +180,7 @@ namespace { bool HandleTopLevelDecl(DeclGroupRef DG) override { // FIXME: Why not return false and abort parsing? - if (Diags.hasErrorOccurred()) + if (Diags.hasUnrecoverableErrorOccurred()) ostannard wrote: I think thi

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2024-12-18 Thread via cfe-commits
https://github.com/gbMattN updated https://github.com/llvm/llvm-project/pull/119387 >From 8781ff2355750ae61d140620b1f6862537de07e3 Mon Sep 17 00:00:00 2001 From: gbMattN Date: Tue, 10 Dec 2024 15:01:37 + Subject: [PATCH 1/4] [ASan] Add metadata to renamed instructions so ASan doesn't use t

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

2024-12-18 Thread via cfe-commits
@@ -5965,6 +5967,269 @@ static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema &SemaRef) { return Checker.teamsLoopCanBeParallelFor(); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dy

[clang] [Coverage] Resurrect Branch:FalseCnt in SwitchStmt that was pruned in #112694 (PR #120418)

2024-12-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/120418 I missed that FalseCnt for each Case was used to calculate percentage in the SwitchStmt. At the moment I resurrect them. In `!HasDefaultCase`, the pair of Counters shall be `[CaseCountSum, FalseCnt]`. (Revers

[clang] [Coverage] Resurrect Branch:FalseCnt in SwitchStmt that was pruned in #112694 (PR #120418)

2024-12-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: NAKAMURA Takumi (chapuni) Changes I missed that FalseCnt for each Case was used to calculate percentage in the SwitchStmt. At the moment I resurrect them. In `!HasDefaultCase`, the pair of Counters shal

[clang] [flang] [Flang][OpenMP] Add -fopenmp-default-none command line flag (PR #120287)

2024-12-18 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm updated https://github.com/llvm/llvm-project/pull/120287 >From ef9b76ad1dfb4b6c99bbdf6391fe57b944ffbfa2 Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Tue, 17 Dec 2024 18:34:06 +0100 Subject: [PATCH 1/4] Implement -fopenmp-default-none compiler flag --- clang/in

[clang] [FMV][AArch64] Emit mangled default version if explicitly specified. (PR #120022)

2024-12-18 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/120022 >From f3997c43e57265444bade9372833a9235e3426cb Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Fri, 13 Dec 2024 12:42:31 + Subject: [PATCH 1/2] [FMV][AArch64] Emit mangled default version if expl

[clang-tools-extra] [clang-tidy][NFC] swap cppcoreguidelines-narrowing-conversions and bugprone-narrowing-conversions (PR #120245)

2024-12-18 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > most of them probably disable aliases can clangtidy disable aliases? https://github.com/llvm/llvm-project/pull/120245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [FMV][AArch64] Emit mangled default version if explicitly specified. (PR #120022)

2024-12-18 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. just left a NIT. https://github.com/llvm/llvm-project/pull/120022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][AArch64] Emit mangled default version if explicitly specified. (PR #120022)

2024-12-18 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss edited https://github.com/llvm/llvm-project/pull/120022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][AArch64] Emit mangled default version if explicitly specified. (PR #120022)

2024-12-18 Thread Daniel Kiss via cfe-commits
@@ -11799,6 +11792,12 @@ static bool CheckMultiVersionAdditionalDecl( static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, bool &Redeclaration, NamedDecl *&OldDecl, LookupResult &Previous

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-18 Thread Balázs Kéri via cfe-commits
@@ -3165,6 +3165,7 @@ ExpectedDecl ASTNodeImporter::VisitRecordDecl(RecordDecl *D) { if (Error Err = ImportImplicitMethods(DCXX, FoundCXX)) return std::move(Err); } +return FoundDef; balazske wrote: Th

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/120087 >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:43:42 +0530 Subject: [PATCH 1/7] Upda

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -15978,6 +15988,24 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, CheckCoroutineWrapper(FD); } + // Diagnose invalid SYCL kernel entry point function declarations. + if (FD && !FD->isInvalidDecl() && !FD->isTemplated() && + FD->hasAttr()) { +

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -12408,6 +12408,29 @@ def err_sycl_special_type_num_init_method : Error< "types with 'sycl_special_class' attribute must have one and only one '__init' " "method defined">; +// SYCL kernel entry point diagnostics +def err_sycl_entry_point_invalid : Error< + "'sycl_ker

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(::new (SemaRef.Context) SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI)); } + +static SourceLocation SourceLocationForType(QualType QT) { + Source

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -15978,6 +15988,24 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, CheckCoroutineWrapper(FD); } + // Diagnose invalid SYCL kernel entry point function declarations. + if (FD && !FD->isInvalidDecl() && !FD->isTemplated() && erichkean

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -12408,6 +12408,29 @@ def err_sycl_special_type_num_init_method : Error< "types with 'sycl_special_class' attribute must have one and only one '__init' " "method defined">; +// SYCL kernel entry point diagnostics +def err_sycl_entry_point_invalid : Error< + "'sycl_ker

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -1134,8 +1134,18 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) { // the presence of a sycl_kernel_entry_point attribute, register it so that // associated metadata is recreated. if (FD->hasAttr()) { +const auto *SKEPAttr = FD->getAttr(); ASTContex

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(::new (SemaRef.Context) SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI)); } + +static SourceLocation SourceLocationForType(QualType QT) { + Source

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -319,10 +319,10 @@ Changes in existing checks diagnostic. - Improved :doc:`readability-implicit-bool-conversion - ` check - by adding the option `UseUpperCaseLiteralSuffix` to select the - case of the literal suffix in fixes and fixing false positive for implicit - co

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -332,6 +332,11 @@ Changes in existing checks ` check to validate ``namespace`` aliases. +-Improved :doc: `readability-implicit-bool-conversion + ` + - `CheckConversionsToBool`: Allows enabling or disabling warnings for implicit conversions to `bool` (default) : true .

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(::new (SemaRef.Context) SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI)); } + +static SourceLocation SourceLocationForType(QualType QT) { + Source

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(::new (SemaRef.Context) SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI)); } + +static SourceLocation SourceLocationForType(QualType QT) { + Source

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(::new (SemaRef.Context) SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI)); } + +static SourceLocation SourceLocationForType(QualType QT) { + Source

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(::new (SemaRef.Context) SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI)); } + +static SourceLocation SourceLocationForType(QualType QT) { + Source

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -1550,6 +1550,8 @@ NamedDecl *Sema::ActOnNonTypeTemplateParameter(Scope *S, Declarator &D, IdResolver.AddDecl(Param); } + ProcessDeclAttributes(S, Param, D); erichkeane wrote: Hmm... this seems like a concerning addition. I think I want @AaronBall

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(::new (SemaRef.Context) SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI)); } + +static SourceLocation SourceLocationForType(QualType QT) { + Source

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -332,6 +332,11 @@ Changes in existing checks ` check to validate ``namespace`` aliases. +-Improved :doc: `readability-implicit-bool-conversion 4m4n-x-B4w4ne wrote: Done Thanks. https://github.com/llvm/llvm-project/pull/120087 _

[clang] [llvm] [OpenMP][Clang] Migrate OpenMP UserDefinedMapper from Clang to OMPIRBuilder (PR #110001)

2024-12-18 Thread Akash Banerjee via cfe-commits
https://github.com/TIFitis closed https://github.com/llvm/llvm-project/pull/110001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6f0e9c4 - [OpenMP][Clang] Migrate OpenMP UserDefinedMapper from Clang to OMPIRBuilder (#110001)

2024-12-18 Thread via cfe-commits
Author: Akash Banerjee Date: 2024-12-18T15:02:14Z New Revision: 6f0e9c4a5611d21cbcac4bb4f16dc90674838e1e URL: https://github.com/llvm/llvm-project/commit/6f0e9c4a5611d21cbcac4bb4f16dc90674838e1e DIFF: https://github.com/llvm/llvm-project/commit/6f0e9c4a5611d21cbcac4bb4f16dc90674838e1e.diff LOG

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
EugeneZelenko wrote: New options are still not described in check documentation. https://github.com/llvm/llvm-project/pull/120087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/120087 >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:43:42 +0530 Subject: [PATCH 1/8] Upda

[clang] [flang] [flang] Add UNSIGNED (PR #113504)

2024-12-18 Thread Peter Klausler via cfe-commits
https://github.com/klausler closed https://github.com/llvm/llvm-project/pull/113504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add matchers for smart pointer accessors to be cached (PR #120102)

2024-12-18 Thread Yitzhak Mandelbaum via cfe-commits
@@ -0,0 +1,134 @@ +#include "clang/Analysis/FlowSensitive/SmartPointerAccessorCaching.h" + +#include "clang/AST/CanonicalType.h" +#include "clang/AST/DeclCXX.h" +#include "clang/ASTMatchers/ASTMatchers.h" +#include "clang/Basic/OperatorKinds.h" + +namespace clang::dataflow { + +na

[clang] [clang][dataflow] Add matchers for smart pointer accessors to be cached (PR #120102)

2024-12-18 Thread Yitzhak Mandelbaum via cfe-commits
@@ -0,0 +1,63 @@ +//===-- SmartPointerAccessorCaching.h ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [compiler-rt] Move interceptors for libresolv functions to MSan (PR #119071)

2024-12-18 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Managed to reproduce it. This seems to break if the sysroot is set to the one Chrome uses. Our sysroot can be downloaded at https://commondatastorage.googleapis.com/chrome-linux-sysroot/dec7a3a0fc5b83b909cba1b6d119077e0429a138eadef6bf5a0f2e03b1904631 Command I used: ``` $ cma

[clang] [clang][dataflow] Add matchers for smart pointer accessors to be cached (PR #120102)

2024-12-18 Thread Yitzhak Mandelbaum via cfe-commits
@@ -0,0 +1,133 @@ +#include "clang/Analysis/FlowSensitive/SmartPointerAccessorCaching.h" + +#include "clang/AST/CanonicalType.h" +#include "clang/AST/DeclCXX.h" +#include "clang/ASTMatchers/ASTMatchers.h" +#include "clang/Basic/OperatorKinds.h" + +namespace clang::dataflow { + +na

[clang] [clang][dataflow] Add matchers for smart pointer accessors to be cached (PR #120102)

2024-12-18 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/120102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -319,10 +319,10 @@ Changes in existing checks diagnostic. - Improved :doc:`readability-implicit-bool-conversion - ` check - by adding the option `UseUpperCaseLiteralSuffix` to select the - case of the literal suffix in fixes and fixing false positive for implicit - co

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -319,10 +319,10 @@ Changes in existing checks diagnostic. - Improved :doc:`readability-implicit-bool-conversion - ` check - by adding the option `UseUpperCaseLiteralSuffix` to select the - case of the literal suffix in fixes and fixing false positive for implicit - co

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -319,10 +319,10 @@ Changes in existing checks diagnostic. - Improved :doc:`readability-implicit-bool-conversion - ` check - by adding the option `UseUpperCaseLiteralSuffix` to select the - case of the literal suffix in fixes and fixing false positive for implicit - co

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -319,10 +319,10 @@ Changes in existing checks diagnostic. - Improved :doc:`readability-implicit-bool-conversion - ` check - by adding the option `UseUpperCaseLiteralSuffix` to select the - case of the literal suffix in fixes and fixing false positive for implicit - co

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/120087 >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:43:42 +0530 Subject: [PATCH 1/9] Upda

[clang-tools-extra] [clang-tidy][NFC] swap cppcoreguidelines-narrowing-conversions and bugprone-narrowing-conversions (PR #120245)

2024-12-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/120245 >From 9e47698969dc59df1abaa8abd243b97e8fa038c3 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 17 Dec 2024 23:31:52 +0800 Subject: [PATCH 1/2] [clang-tidy][NFC] swap cppcoreguidelines-narrowing-conve

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne edited https://github.com/llvm/llvm-project/pull/120087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -320,9 +320,10 @@ Changes in existing checks - Improved :doc:`readability-implicit-bool-conversion ` - - `UseUpperCaseLiteralSuffix` : check by adding the option to select the case of the literal suffix in fixes and fixing false positive for implicit conversion of co

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -320,9 +320,10 @@ Changes in existing checks - Improved :doc:`readability-implicit-bool-conversion ` - - `UseUpperCaseLiteralSuffix` : check by adding the option to select the case of the literal suffix in fixes and fixing false positive for implicit conversion of co

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-12-18 Thread Joseph Huber via cfe-commits
@@ -337,9 +337,12 @@ void AMDGPUTargetInfo::getTargetDefines(const LangOptions &Opts, if (hasFastFMA()) Builder.defineMacro("FP_FAST_FMA"); - Builder.defineMacro("__AMDGCN_WAVEFRONT_SIZE__", Twine(WavefrontSize)); - // ToDo: deprecate this macro for naming consistency

[clang] [flang] [Flang][OpenMP] Add -fopenmp-default-none command line flag (PR #120287)

2024-12-18 Thread Krzysztof Parzyszek via cfe-commits
kparzysz wrote: Is NONE special enough to have a dedicated option, or could we have `-fopenmp-default=` for any dsa? https://github.com/llvm/llvm-project/pull/120287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

<    1   2   3   4   5   6   >