[clang] [compiler-rt] [llvm] [AArch64] Split FeatureMTE to FEAT_MTE and FEAT_MTE2. (PR #109299)

2024-09-19 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Adding the GCC folks @andrewcarlotti and @Wilco1 for visibility. https://github.com/llvm/llvm-project/pull/109299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-19 Thread Zibi Sarbinowski via cfe-commits
https://github.com/zibi2 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/107906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-09-19 Thread Nikita Popov via cfe-commits
nikic wrote: @cor3ntin See the discussion on https://github.com/llvm/llvm-project/pull/95917. This is very likely effectively dead code, but nobody is certain enough of that to delete it outright... https://github.com/llvm/llvm-project/pull/109298 _

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-09-19 Thread via cfe-commits
c8ef wrote: Based on the comment from the original PR, I am unsure how to reproduce this bug. However, it aligns with the original intention of this code. https://github.com/llvm/llvm-project/pull/109298 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [compiler-rt] [llvm] [AArch64] Split FeatureMTE to FEAT_MTE and FEAT_MTE2. (PR #109299)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Alexandros Lamprineas (labrinea) Changes These extensions depend on each other as follows: mte -> mte2 Currently in LLVM FeatureMTE models both FEAT_MTE and FEAT_MTE2 lumped together. However the architecture does not mandate that

[clang] fix(clang/**.py): fix comparison to None (PR #94014)

2024-09-19 Thread via cfe-commits
github-actions[bot] wrote: @e-kwsm 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] e818202 - [clang] Fix python comparison to None (#94014)

2024-09-19 Thread via cfe-commits
Author: Eisuke Kawashima Date: 2024-09-19T16:33:12+02:00 New Revision: e8182029516dae445f21db304953aa5f10880d2d URL: https://github.com/llvm/llvm-project/commit/e8182029516dae445f21db304953aa5f10880d2d DIFF: https://github.com/llvm/llvm-project/commit/e8182029516dae445f21db304953aa5f10880d2d.di

[clang] fix(clang/**.py): fix comparison to None (PR #94014)

2024-09-19 Thread Christian Ulmann via cfe-commits
https://github.com/Dinistro closed https://github.com/llvm/llvm-project/pull/94014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-19 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: @MaskRay, If everything looks good to you now, could you approve this? I apologize for being pushy, but this will help us get moving on some other things in `flang`. Thanks. https://github.com/llvm/llvm-project/pull/102975 ___ cfe

[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)

2024-09-19 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: @uweigand SystemZ parts ok? https://github.com/llvm/llvm-project/pull/100757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIR-V] Add SPIR-V structurizer (PR #107408)

2024-09-19 Thread Nathan Gauër via cfe-commits
@@ -0,0 +1,1242 @@ +//===-- SPIRVStructurizer.cpp --*- 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: Apache-2.0 WITH

[clang] [clang] fix the unexpected controlflow in `ParseTentative.cpp` (PR #95917)

2024-09-19 Thread Kamil Dudka via cfe-commits
kdudka wrote: @c8ef Cannot we simply replace `continue` with `break` to make it obvious what the code does? It would silence the static analysis warning without changing the behavior... https://github.com/llvm/llvm-project/pull/95917 ___ cfe-commits

[clang] [llvm] [SPIR-V] Add SPIR-V structurizer (PR #107408)

2024-09-19 Thread Nathan Gauër via cfe-commits
Keenuts wrote: Thanks! No worries! Applied the few changes. And yes, there will be iterations on this. For example, merge-exit pass is not completely finished, and other specific scenarios. But this will be done through smaller PRs. I also need to look into how to test this since people want me

[clang] [llvm] [SPIR-V] Add SPIR-V structurizer (PR #107408)

2024-09-19 Thread Michal Paszkowski via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Na

[clang] [clang] Code owners -> Maintainers transition (PR #108997)

2024-09-19 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: FWIW, I plan to land these changes tomorrow morning. https://github.com/llvm/llvm-project/pull/108997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIR-V] Add SPIR-V structurizer (PR #107408)

2024-09-19 Thread Michal Paszkowski via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Na

[clang] 9ca62c5 - [analyzer] Indicate UnarySymExpr is not supported by Z3 (#108900)

2024-09-19 Thread via cfe-commits
Author: vabridgers Date: 2024-09-19T09:57:25-05:00 New Revision: 9ca62c5302633d0220de30f2b2a21d87dee64ac0 URL: https://github.com/llvm/llvm-project/commit/9ca62c5302633d0220de30f2b2a21d87dee64ac0 DIFF: https://github.com/llvm/llvm-project/commit/9ca62c5302633d0220de30f2b2a21d87dee64ac0.diff LO

[clang] [analyzer] Indicate UnarySymExpr is not supported by Z3 (PR #108900)

2024-09-19 Thread via cfe-commits
https://github.com/vabridgers closed https://github.com/llvm/llvm-project/pull/108900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-19 Thread Shilei Tian via cfe-commits
shiltian wrote: It's a good idea to make it more generic. Potentially we can add an API like `isAddressSpaceOptimizable(unsigned AS)`. If we want to do that, the question would be, where to put this API? Like I mentioned in the description, I tried some similar approach but they didn't pan out

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Thomas Köppe via cfe-commits
https://github.com/tkoeppe updated https://github.com/llvm/llvm-project/pull/109169 From 2b86607a6b3d2909c2e3757b3f9e4d5f3bf5997f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 18 Sep 2024 17:04:44 + Subject: [PATCH] [clang-tidy] Make modernize-use-nullptr matcher

[clang] [llvm] [Loads] Check context instruction for context-sensitive derefability (PR #109277)

2024-09-19 Thread Thorsten Schütt via cfe-commits
@@ -104,6 +104,17 @@ static bool isDereferenceableAndAlignedPointer( if (CheckForNonNull && !isKnownNonZero(V, SimplifyQuery(DL, DT, AC, CtxI))) return false; +// When using something like !dereferenceable on a load, the +// dereferenceability may only

[clang-tools-extra] [clang-tidy][readability-container-contains] Use hasOperands when possible (PR #109178)

2024-09-19 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/109178 >From 3f5df5d8299a48fe0bf919cd2d52eaa195b1e8ce Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Thu, 19 Sep 2024 12:35:47 -0400 Subject: [PATCH] [clang-tidy][readability-container-contains] Use hasOperan

[clang] [clang] Lifetime of locals must end before musttail call (PR #109255)

2024-09-19 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard created https://github.com/llvm/llvm-project/pull/109255 The lifetimes of local variables and function parameters must end before the call to a [[clang::musttail]] function, instead of before the return, because we will not have a stack frame to hold them when doin

[clang] [clang][bytecode] Diagnose loads from weak variables (PR #109256)

2024-09-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/109256 None >From dd54314e7fca35feb4ae8d00687544990284d18c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 19 Sep 2024 10:08:10 +0200 Subject: [PATCH] [clang][bytecode] Diagnose loads from wea

[clang] [clang][bytecode] Diagnose loads from weak variables (PR #109256)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/109256.diff 3 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.cpp (+15-1) - (modified) clang/test/AST/ByteCode/weak.cpp (+8) - (modifi

[clang] [clang] Lifetime of locals must end before musttail call (PR #109255)

2024-09-19 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 30cdf1e959d2e4dee1c871ff37470dcdb7e8d099 85ac319257785f88fd27a533fffde7aab20c8d8d --e

[clang] [clang] Lifetime of locals must end before musttail call (PR #109255)

2024-09-19 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard updated https://github.com/llvm/llvm-project/pull/109255 >From 85ac319257785f88fd27a533fffde7aab20c8d8d Mon Sep 17 00:00:00 2001 From: Oliver Stannard Date: Wed, 18 Sep 2024 16:22:41 +0100 Subject: [PATCH 1/2] [clang] Lifetime of locals must end before musttail call

[clang-tools-extra] bb5e66e - [include-cleaner] Suppress all clang warnings (#109099)

2024-09-19 Thread via cfe-commits
Author: kadir çetinkaya Date: 2024-09-19T11:16:49+02:00 New Revision: bb5e66e31b2a5dbb2930728ff94281fd805f2d14 URL: https://github.com/llvm/llvm-project/commit/bb5e66e31b2a5dbb2930728ff94281fd805f2d14 DIFF: https://github.com/llvm/llvm-project/commit/bb5e66e31b2a5dbb2930728ff94281fd805f2d14.dif

[clang] [clang-tools-extra] Remove clang-pseudo (PR #109154)

2024-09-19 Thread kadir çetinkaya via cfe-commits
kadircet wrote: thanks a lot for taking care of this @AaronBallman, I think the only concern here is not regressing clangd functionality. We can figure out how we should trim down the bits that're moving into clangd later if need be. I think this LG, but cc @hokein as well. https://github.co

[clang] [clang][wasm] Replace the target iminmax intrinsics with the equivalent generic `__builtin_elementwise_min/max` intrinsics (PR #109259)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-webassembly Author: Simon Pilgrim (RKSimon) Changes Noticed while working on #109160 --- Full diff: https://github.com/llvm/llvm-project/pull/109259.diff 4 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsWebAssembly.def (-13)

[clang] [analyzer] Indicate UnarySymExpr is not supported by Z3 (PR #108900)

2024-09-19 Thread via cfe-commits
vabridgers wrote: Hi @NagyDonat , I think all comments have been addressed. Please review at your convenience. Thank you! https://github.com/llvm/llvm-project/pull/108900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang][wasm] Replace the target integer add saturate intrinsics with the equivalent generic `__builtin_elementwise_add_sat` intrinsics (PR #109269)

2024-09-19 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/109269 Noticed while working on #109160 I've left out the sub_sat intrinsics for now - not sure about the history behind them using Intrinsic::wasm_sub_sat_* instead of Intrinsic::*sub_sat >From 59827162bac77248118ec

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on this! Be sure to update the release notes so users know about the fix. https://github.com/llvm/llvm-project/pull/109208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

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

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Aaron Ballman via cfe-commits
@@ -1306,3 +1306,18 @@ constexpr int field(int a) { static_assert(field(3), ""); // expected-error {{constant expression}} \ // expected-note {{in call to 'field(3)'}} } + +namespace literal_comparison { + +constexpr bool different_in_loop(bool b =

[clang] [NFC] Delete unused clang-formatted-files.txt file (PR #109220)

2024-09-19 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I don't think this file is actually unused; it was committed with the original PR adding the script: 5aca8bb963a43b62f37305f7eb07476631ea9f2a (https://reviews.llvm.org/D111000 was the review) I've added @mydeveloperday as a reviewer for confirmation though https://github.c

[clang] [lldb] [ASTImporter][lldb] Avoid implicit imports in VisitFieldDecl (PR #107828)

2024-09-19 Thread Michael Buch via cfe-commits
Michael137 wrote: > > Our idea is summarized in > > https://discourse.llvm.org/t/rfc-lldb-more-reliable-completion-of-record-types/77442. > > Basically the goal is to guarantee that a call to `getDefinition`, _will_ > > fetch the definition. This is something that Clang already does, but we >

[clang] [Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (PR #109278)

2024-09-19 Thread Rainer Orth via cfe-commits
https://github.com/rorth created https://github.com/llvm/llvm-project/pull/109278 While working on supporting PR #109101 on Linux/sparc64, I was reminded that `clang -m32` still defaults to generating V8 code, although the 64-bit kernel requires a V9 CPU. This patch corrects that on V9-only d

[clang] [Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (PR #109278)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Rainer Orth (rorth) Changes While working on supporting PR #109101 on Linux/sparc64, I was reminded that `clang -m32` still defaults to generating V8 code, although the 64-bit kernel requires a V9 CPU. This patch corrects that on

[clang] [Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (PR #109278)

2024-09-19 Thread Rainer Orth via cfe-commits
rorth wrote: @glaubitz https://github.com/llvm/llvm-project/pull/109278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-09-19 Thread via cfe-commits
davide-q wrote: Is there a way to revert and rework this PR to avoid issue #101368 which this PR introduced? https://github.com/llvm/llvm-project/pull/92865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)

2024-09-19 Thread Jonas Paulsson via cfe-commits
https://github.com/JonPsson1 updated https://github.com/llvm/llvm-project/pull/100757 >From 1e7544f684579ed2016f4037a611a5939adabee9 Mon Sep 17 00:00:00 2001 From: Jonas Paulsson Date: Mon, 11 Oct 2021 19:08:42 +0200 Subject: [PATCH 1/3] VerifyIntegerArgs() i8 test. LangRef text. tests IP Tests

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Aaron Ballman via cfe-commits
@@ -96,6 +96,8 @@ def note_constexpr_pointer_constant_comparison : Note< "at runtime">; def note_constexpr_literal_comparison : Note< "comparison of addresses of literals has unspecified value">; +def note_constexpr_opaque_call_comparison : Note< + "comparison against opaq

[clang] [clang][wasm] Replace the target iminmax intrinsics with the equivalent generic `__builtin_elementwise_min/max` intrinsics (PR #109259)

2024-09-19 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/109259 Noticed while working on #109160 >From 8b909be1991bcace334149ace393cf3e679f856b Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 18 Sep 2024 22:19:19 +0100 Subject: [PATCH] [clang][wasm] Replace the targ

[clang] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (PR #108606)

2024-09-19 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM, don't think exactly how the builder call looks like here is important... https://github.com/llvm/llvm-project/pull/108606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)

2024-09-19 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: @nikic thanks for review - patch updated. https://github.com/llvm/llvm-project/pull/100757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Remove clang-pseudo (PR #109154)

2024-09-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-linux-multistage` running on `ppc64le-clang-multistage-test` while building `clang-tools-extra,clang` at step 4 "build stage 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/builds/

[clang] [Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (PR #109278)

2024-09-19 Thread via cfe-commits
@@ -125,7 +126,9 @@ std::string sparc::getSparcTargetCPU(const Driver &D, const ArgList &Args, return std::string(CPUName); } - if (Triple.getArch() == llvm::Triple::sparc && Triple.isOSSolaris()) + Distro Dist(D.getVFS(), Triple); + if (Triple.getArch() == llvm::Tri

[clang] [NFC] Delete unused clang-formatted-files.txt file (PR #109220)

2024-09-19 Thread Rahul Joshi via cfe-commits
jurahul wrote: May be. Even in that PR, the only reference to this file is: ``` CLEAN_FILE = os.path.join(CLANG_DIR, 'docs/tools/clang-formatted-files.txt') cleanfiles = open(CLEAN_FILE, "wb") ``` So its overwritten. But yeah, let @mydeveloperday confirm. https://github.com/llvm/llvm-project/

[clang] [Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (PR #109278)

2024-09-19 Thread Rainer Orth via cfe-commits
@@ -125,7 +126,9 @@ std::string sparc::getSparcTargetCPU(const Driver &D, const ArgList &Args, return std::string(CPUName); } - if (Triple.getArch() == llvm::Triple::sparc && Triple.isOSSolaris()) + Distro Dist(D.getVFS(), Triple); + if (Triple.getArch() == llvm::Tri

[clang] [clang] Lifetime of locals must end before musttail call (PR #109255)

2024-09-19 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: I think it warrants a mention in the release notes. https://github.com/llvm/llvm-project/pull/109255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [llvm] [Loads] Check context instruction for context-sensitive derefability (PR #109277)

2024-09-19 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/109277 >From edbdc039ee955cc9d5f0f7d4cb4be287c55e25bb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 17 Sep 2024 15:48:42 +0200 Subject: [PATCH] [Loads] Check context instruction for context-sensitive derefabili

[clang] [C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #109167)

2024-09-19 Thread Dmitry Polukhin via cfe-commits
dmpolukhin wrote: > Would you like to explain more why this fail previously in more detail? Original code in `ASTReader::finishPendingActions` looked like this: ``` for (auto ID : PendingLambdas) GetDecl(ID); PendingLambdas.clear(); ``` The issue here is that the code uses implicit

[clang] [analyzer] Indicate UnarySymExpr is not supported by Z3 (PR #108900)

2024-09-19 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/108900 >From 1790ebab722f53b5dba3ef7cd2afb7cf2549f245 Mon Sep 17 00:00:00 2001 From: einvbri Date: Tue, 17 Sep 2024 01:25:20 +0200 Subject: [PATCH 1/2] [analyzer] Indicate UnarySymExpr is not supported by Z3 Random

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Needs a release note https://github.com/llvm/llvm-project/pull/109208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Erich Keane via cfe-commits
@@ -324,6 +324,13 @@ class ASTContext : public RefCountedBase { /// This is lazily created. This is intentionally not serialized. mutable llvm::StringMap StringLiteralCache; + /// The next string literal "version" to allocate during constant evaluation. + /// This is us

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Erich Keane via cfe-commits
@@ -2142,11 +2150,81 @@ static const ValueDecl *GetLValueBaseDecl(const LValue &LVal) { return LVal.Base.dyn_cast(); } -static bool IsLiteralLValue(const LValue &Value) { - if (Value.getLValueCallIndex()) +// Information about an LValueBase that is some kind of string. +st

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/109208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Erich Keane via cfe-commits
@@ -2142,11 +2150,81 @@ static const ValueDecl *GetLValueBaseDecl(const LValue &LVal) { return LVal.Base.dyn_cast(); } -static bool IsLiteralLValue(const LValue &Value) { - if (Value.getLValueCallIndex()) +// Information about an LValueBase that is some kind of string. +st

[clang] [analyzer] Indicate UnarySymExpr is not supported by Z3 (PR #108900)

2024-09-19 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/108900 >From d48964b43ddc1bdc8a3c51198cbf08677287bd74 Mon Sep 17 00:00:00 2001 From: einvbri Date: Tue, 17 Sep 2024 01:25:20 +0200 Subject: [PATCH] [analyzer] Indicate UnarySymExpr is not supported by Z3 Random tes

[clang] [analyzer] Indicate UnarySymExpr is not supported by Z3 (PR #108900)

2024-09-19 Thread via cfe-commits
@@ -278,6 +278,13 @@ class SMTConstraintManager : public clang::ento::SimpleConstraintManager { if (const SymbolCast *SC = dyn_cast(Sym)) return canReasonAbout(SVB.makeSymbolVal(SC->getOperand())); +// If a UnarySymExpr is encountered, the Z3 +// wrapper doe

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Thomas Köppe via cfe-commits
@@ -84,6 +84,28 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + // If you say __null (or NULL), we assume that T will always be a pointer + // type, so we suggest replacing it with nullptr. + void f() { x = __null; } + // CHECK-MESSAGES: :[[@L

[clang-tools-extra] 14c7632 - [clang-tidy][readability-container-contains] Use hasOperands when possible (#109178)

2024-09-19 Thread via cfe-commits
Author: Nicolas van Kempen Date: 2024-09-19T14:04:51-04:00 New Revision: 14c76321a27943455dfa041e5e84121c61c8162d URL: https://github.com/llvm/llvm-project/commit/14c76321a27943455dfa041e5e84121c61c8162d DIFF: https://github.com/llvm/llvm-project/commit/14c76321a27943455dfa041e5e84121c61c8162d.

[clang-tools-extra] [clang-tidy][readability-container-contains] Use hasOperands when possible (PR #109178)

2024-09-19 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank closed https://github.com/llvm/llvm-project/pull/109178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
https://github.com/zygoloid updated https://github.com/llvm/llvm-project/pull/109208 >From 81193568c17a89f6cf42f43a82fb1fbf0f90184d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 18 Sep 2024 21:59:56 + Subject: [PATCH 1/7] Implement current CWG direction for string literal compari

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Thomas Köppe via cfe-commits
https://github.com/tkoeppe updated https://github.com/llvm/llvm-project/pull/109169 From d4e208f89ff04cfab366cdc6849bea25613090e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 18 Sep 2024 17:04:44 + Subject: [PATCH] [clang-tidy] Make modernize-use-nullptr matcher

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,28 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + // If you say __null (or NULL), we assume that T will always be a pointer + // type, so we suggest replacing it with nullptr. + void f() { x = __null; } + // CHECK-MESSAGES: :[[@L

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-19 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/102975 >From 4a37cec543f30bb122bf14573fdec8302a0afa3e Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Mon, 12 Aug 2024 14:32:08 -0600 Subject: [PATCH 1/6] [clang][flang][mlir] Support -frecord-command-line option

[clang] [Driver] Add toolchain for X86_64 UEFI target (PR #76838)

2024-09-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/76838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] edf3b27 - [SystemZ][z/OS] Propagate IsText parameter to open text files as text (#107906)

2024-09-19 Thread via cfe-commits
Author: Abhina Sree Date: 2024-09-19T14:30:10-04:00 New Revision: edf3b277a5f2ebe144827ed47463c22743cac5f9 URL: https://github.com/llvm/llvm-project/commit/edf3b277a5f2ebe144827ed47463c22743cac5f9 DIFF: https://github.com/llvm/llvm-project/commit/edf3b277a5f2ebe144827ed47463c22743cac5f9.diff L

[clang] [Driver] Add toolchain for X86_64 UEFI target (PR #76838)

2024-09-19 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/76838 >From 5a05572d9daf9ce640b54975b4b4e874bd9fcba3 Mon Sep 17 00:00:00 2001 From: prabhukr Date: Mon, 4 Dec 2023 08:54:14 -0800 Subject: [PATCH 1/5] [UEFI] X86_64 UEFI Clang Driver Introduce changes necessary for UE

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
https://github.com/zygoloid updated https://github.com/llvm/llvm-project/pull/109208 >From 81193568c17a89f6cf42f43a82fb1fbf0f90184d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 18 Sep 2024 21:59:56 + Subject: [PATCH 1/8] Implement current CWG direction for string literal compari

[clang] [Driver] Add toolchain for X86_64 UEFI target (PR #76838)

2024-09-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: %clang_cl -### %s --target=x86_64-unknown-uefi \ +// RUN: --sysroot=%S/platform -fuse-ld=lld -g 2>&1 \ +// RUN: | FileCheck -check-prefixes=CHECK %s +// CHECK: "-cc1" +// CHECK-SAME: "-triple" "x86_64-unknown-uefi" +// CHECK-SAME: "-mrelocation-mo

[clang] [Driver] Add toolchain for X86_64 UEFI target (PR #76838)

2024-09-19 Thread Fangrui Song via cfe-commits
@@ -22,6 +22,10 @@ // RUN: FileCheck --check-prefix=X86_64 %s // X86_64: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" +// RUN: %clang_cc1 -triple x86_64-unknown-uefi -emit-llvm -o - %s | \ MaskRay w

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
https://github.com/zygoloid updated https://github.com/llvm/llvm-project/pull/109208 >From 81193568c17a89f6cf42f43a82fb1fbf0f90184d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 18 Sep 2024 21:59:56 + Subject: [PATCH 1/9] Implement current CWG direction for string literal compari

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
https://github.com/zygoloid updated https://github.com/llvm/llvm-project/pull/109208 >From 81193568c17a89f6cf42f43a82fb1fbf0f90184d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 18 Sep 2024 21:59:56 + Subject: [PATCH 01/10] Implement current CWG direction for string literal compa

[clang] [Clang] Change Attribute plugin to link clang-cpp like other examples (PR #109319)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Thomas Fransham (fsfod) Changes Change the Attribute example plugin to use clang_target_link_libraries instead of target_link_libraries so libclang-cpp is linked when the CLANG_LINK_CLANG_DYLIB CMake option is used. This change will allo

[clang] d1335fb - [Driver] Add toolchain for X86_64 UEFI target (#76838)

2024-09-19 Thread via cfe-commits
Author: Prabhuk Date: 2024-09-19T11:46:55-07:00 New Revision: d1335fb86466221b0499db5fc8f158f1f64d9542 URL: https://github.com/llvm/llvm-project/commit/d1335fb86466221b0499db5fc8f158f1f64d9542 DIFF: https://github.com/llvm/llvm-project/commit/d1335fb86466221b0499db5fc8f158f1f64d9542.diff LOG:

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-19 Thread Abhina Sree via cfe-commits
https://github.com/abhina-sree closed https://github.com/llvm/llvm-project/pull/107906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add toolchain for X86_64 UEFI target (PR #76838)

2024-09-19 Thread via cfe-commits
https://github.com/Prabhuk closed https://github.com/llvm/llvm-project/pull/76838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
@@ -2142,11 +2150,81 @@ static const ValueDecl *GetLValueBaseDecl(const LValue &LVal) { return LVal.Base.dyn_cast(); } -static bool IsLiteralLValue(const LValue &Value) { - if (Value.getLValueCallIndex()) +// Information about an LValueBase that is some kind of string. +st

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
@@ -2142,11 +2150,81 @@ static const ValueDecl *GetLValueBaseDecl(const LValue &LVal) { return LVal.Base.dyn_cast(); } -static bool IsLiteralLValue(const LValue &Value) { - if (Value.getLValueCallIndex()) +// Information about an LValueBase that is some kind of string. +st

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: We need to figure out what we want to do about modules, but I think I've addressed the rest of the comments. https://github.com/llvm/llvm-project/pull/109208 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
@@ -96,6 +96,8 @@ def note_constexpr_pointer_constant_comparison : Note< "at runtime">; def note_constexpr_literal_comparison : Note< "comparison of addresses of literals has unspecified value">; +def note_constexpr_opaque_call_comparison : Note< + "comparison against opaq

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/109208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
@@ -324,6 +324,13 @@ class ASTContext : public RefCountedBase { /// This is lazily created. This is intentionally not serialized. mutable llvm::StringMap StringLiteralCache; + /// The next string literal "version" to allocate during constant evaluation. + /// This is us

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
@@ -2061,15 +2063,21 @@ static bool EvaluateIgnoredValue(EvalInfo &Info, const Expr *E) { return true; } -/// Should this call expression be treated as a no-op? -static bool IsNoOpCall(const CallExpr *E) { +/// Should this call expression be treated as forming an opaque con

[clang] [Clang] Change Attribute plugin to link clang-cpp like other examples (PR #109319)

2024-09-19 Thread Thomas Fransham via cfe-commits
https://github.com/fsfod created https://github.com/llvm/llvm-project/pull/109319 Change the Attribute example plugin to use clang_target_link_libraries instead of target_link_libraries so libclang-cpp is linked when the CLANG_LINK_CLANG_DYLIB CMake option is used. This change will allow buil

[clang] [PAC] Re-sign a pointer to a noexcept member function when it is converted to a pointer to a member function without noexcept (PR #109056)

2024-09-19 Thread Akira Hatanaka via cfe-commits
@@ -2419,8 +2419,13 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { return Visit(const_cast(E)); case CK_NoOp: { -return CE->changesVolatileQualification() ? EmitLoadOfLValue(CE) - : Visit(const_cast(E)); +i

<    1   2   3   4   5