[clang] [PAC][clang] Use cc1 instead of driver in init-fini codegen test (PR #109247)

2024-09-18 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/109247 None >From 26e9605ba09e0bc997a17804bae482d556501c0a Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Tue, 10 Sep 2024 10:02:07 +0300 Subject: [PATCH] [PAC][clang] Use cc1 instead of driver in init-fini code

[clang] [libclang/python] Fix evaluation of the unsigned enumeration values, #108766 (PR #108769)

2024-09-18 Thread Dmitry Fursov via cfe-commits
fursov wrote: Sorry, I'm not familiar with the process (this is my first PR on github) - how the change gets now to the repo? Someone from llvm-project should push it? https://github.com/llvm/llvm-project/pull/108769 ___ cfe-commits mailing list cfe-c

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-18 Thread Younan Zhang via cfe-commits
@@ -444,7 +444,7 @@ const RawComment *ASTContext::getRawCommentForAnyRedecl( return CommentlessRedeclChains.lookup(CanonicalD); }(); - for (const auto Redecl : D->redecls()) { + for (const auto Redecl : CanonicalD->redecls()) { zyn0217 wrote: Yup, in

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-18 Thread Younan Zhang via cfe-commits
@@ -440,14 +440,23 @@ const RawComment *ASTContext::getRawCommentForAnyRedecl( // Any redeclarations of D that we haven't checked for comments yet? // We can't use DenseMap::iterator directly since it'd get invalid. - auto LastCheckedRedecl = [this, CanonicalD]() -> const

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

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

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-18 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks for working on this! I think this probably needs a release note, otherwise it looks good on the whole. Please give other folks some time before merging it, and I invited @AaronBallman for the second pair of eyes. https://github.com

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-18 Thread Younan Zhang via cfe-commits
@@ -0,0 +1,99 @@ +//===- unittests/AST/RawCommentForDeclTestTest.cpp +//-===// +// +// 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:

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-18 Thread Younan Zhang via cfe-commits
@@ -0,0 +1,99 @@ +//===- unittests/AST/RawCommentForDeclTestTest.cpp +//-===// +// +// 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:

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

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

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-18 Thread via cfe-commits
antangelo wrote: Friendly ping https://github.com/llvm/llvm-project/pull/98788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Use field descriptor in IntPointer::atOffset (PR #109238)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We're otherwise still pointing to the old type, but with the new offset. --- Full diff: https://github.com/llvm/llvm-project/pull/109238.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Pointer.c

[clang] [clang][bytecode] Use field descriptor in IntPointer::atOffset (PR #109238)

2024-09-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/109238 We're otherwise still pointing to the old type, but with the new offset. >From aa2c3e286ec40d6897e17df6b2dd93553f93159c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 19 Sep 2024 07:47

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-18 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-18 Thread Nathan Ridge via cfe-commits
@@ -444,7 +444,7 @@ const RawComment *ASTContext::getRawCommentForAnyRedecl( return CommentlessRedeclChains.lookup(CanonicalD); }(); - for (const auto Redecl : D->redecls()) { + for (const auto Redecl : CanonicalD->redecls()) { HighCommander4 wrote: (

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-18 Thread Nathan Ridge via cfe-commits
@@ -444,7 +444,7 @@ const RawComment *ASTContext::getRawCommentForAnyRedecl( return CommentlessRedeclChains.lookup(CanonicalD); }(); - for (const auto Redecl : D->redecls()) { + for (const auto Redecl : CanonicalD->redecls()) { HighCommander4 wrote: >

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-18 Thread Younan Zhang via cfe-commits
@@ -444,7 +444,7 @@ const RawComment *ASTContext::getRawCommentForAnyRedecl( return CommentlessRedeclChains.lookup(CanonicalD); }(); - for (const auto Redecl : D->redecls()) { + for (const auto Redecl : CanonicalD->redecls()) { zyn0217 wrote: Yeah, bu

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Buildkite is green with this approach! Graduated patch from "Draft" state. https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-18 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 ready_for_review https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-18 Thread Nathan Ridge via cfe-commits
@@ -444,7 +444,7 @@ const RawComment *ASTContext::getRawCommentForAnyRedecl( return CommentlessRedeclChains.lookup(CanonicalD); }(); - for (const auto Redecl : D->redecls()) { + for (const auto Redecl : CanonicalD->redecls()) { HighCommander4 wrote: T

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-18 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/108475 >From 1df905728da591bae0acf231e2d7c1f7492d43f3 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 10 Sep 2024 22:34:55 -0400 Subject: [PATCH] [AST] Ensure getRawCommentsForAnyRedecl() does not miss an

[clang] [clang-format] Fix a bug in annotating StartOfName (PR #99791)

2024-09-18 Thread Owen Pan via cfe-commits
owenca wrote: Wouldn't you have the same problem if we were to backport the fix, say, to 18.1.9? Anyway, LLVM 19.1.0 has just been released. https://github.com/llvm/llvm-project/pull/99791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [clang-format] Annotate the l_paren of function pointer types (PR #109229)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #109146. --- Full diff: https://github.com/llvm/llvm-project/pull/109229.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+8-6) - (modified) clang/unittests/Format/TokenAnn

[clang] [clang-format] Annotate the l_paren of function pointer types (PR #109229)

2024-09-18 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/109229 Fixes #109146. >From 84c166dfabc3f314cd922baa3933b3d0ea11e08e Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 18 Sep 2024 21:03:24 -0700 Subject: [PATCH] [clang-format] Annotate the l_paren of function pointe

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

2024-09-18 Thread Timm Baeder 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-18 Thread Timm Baeder 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-18 Thread Timm Baeder 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][powerpc][wasm][systemz][x86] Replace target vector popcount intrinsics with __builtin_elementwise_popcount (PR #109160)

2024-09-18 Thread Phoebe Wang via cfe-commits
@@ -23,7 +23,7 @@ static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_popcnt_epi16(__m512i __A) { - return (__m512i) __builtin_ia32_vpopcntw_512((__v32hi) __A); + return (__m512i)__builtin_elementwise_popcount((__v32hi)__A); phoebewang wrote: hi or hu? The s

[clang] [clang] Increase VecLib bitfield size to 4 bits in CodeGenOptions.def (PR #108804)

2024-09-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang` at step 4 "cmake-configure". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/7937 Here is the relevant piece of the b

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-09-18 Thread Eli Friedman via cfe-commits
@@ -870,6 +904,15 @@ bool ConstStructBuilder::Build(const APValue &Val, const RecordDecl *RD, if (!EltInit) return false; +if (ZeroInitPadding) { + if (!DoZeroInitPadding(Layout, FieldNo, *Field, SizeSoFar, + IsFlexibleArray, All

[clang] [clang] Increase VecLib bitfield size to 4 bits in CodeGenOptions.def (PR #108804)

2024-09-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-x86_64-debian-fast` running on `gribozavr4` while building `clang` at step 4 "cmake-configure". Full details are available at: https://lab.llvm.org/buildbot/#/builders/56/builds/7718 Here is the relevant piece of the b

[clang] [C++20] [Modules] Offer -fmodules-embed-all-files option (PR #107194)

2024-09-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/107194 >From f18b50fb6ae778ac9b4ddaee4029d54f859c50f9 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 4 Sep 2024 16:02:53 +0800 Subject: [PATCH 1/4] [C++20] [Modules] Offer -fmodules-embed-all-files option See

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-09-18 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw requested changes to this pull request. Reproducer: ``` ; bin/opt -passes=inline reduced.ll -S 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" target triple = "x86_64-unknown-linux-gnu" define i64 @caller(ptr %p1,

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

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes Looks like this file is generated by the `generate_formatted_state.py` script in the same directory. So it seems this was committed to the repo inadvertently. --- Patch is 408.98 KiB, truncated to 20.00 KiB

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

2024-09-18 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/109220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Offer -fmodules-embed-all-files option (PR #107194)

2024-09-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/107194 >From f18b50fb6ae778ac9b4ddaee4029d54f859c50f9 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 4 Sep 2024 16:02:53 +0800 Subject: [PATCH 1/3] [C++20] [Modules] Offer -fmodules-embed-all-files option See

[clang] [clang-format] Fix regression in BAS_AlwaysBreak for-await (PR #108634)

2024-09-18 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/108634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c9aa9d5 - [clang-format] Fix regression in BAS_AlwaysBreak for-await (#108634)

2024-09-18 Thread via cfe-commits
Author: Gedare Bloom Date: 2024-09-18T19:44:09-07:00 New Revision: c9aa9d53b6f92d9780430ab8239ea9117574c95d URL: https://github.com/llvm/llvm-project/commit/c9aa9d53b6f92d9780430ab8239ea9117574c95d DIFF: https://github.com/llvm/llvm-project/commit/c9aa9d53b6f92d9780430ab8239ea9117574c95d.diff

[clang] [C++20] [Modules] Offer -fmodules-embed-all-files option (PR #107194)

2024-09-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/107194 >From f18b50fb6ae778ac9b4ddaee4029d54f859c50f9 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 4 Sep 2024 16:02:53 +0800 Subject: [PATCH 1/2] [C++20] [Modules] Offer -fmodules-embed-all-files option See

[clang] [C++20] [Modules] Offer -fmodules-embed-all-files option (PR #107194)

2024-09-18 Thread Chuanqi Xu via cfe-commits
@@ -462,6 +462,33 @@ Currently, Clang accepts the above example, though it may produce surprising results if the debugging code depends on consistent use of ``NDEBUG`` in other translation units. +Source Files Consistency + + +Clang may open the input

[clang] [C++20] [Modules] Offer -fmodules-embed-all-files option (PR #107194)

2024-09-18 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,2 @@ +// RUN: %clang -std=c++20 %s -fmodules-embed-all-files -### 2>&1 | FileCheck %s ChuanqiXu9 wrote: Done https://github.com/llvm/llvm-project/pull/107194 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [C++20] [Modules] Offer -fmodules-embed-all-files option (PR #107194)

2024-09-18 Thread Chuanqi Xu via cfe-commits
@@ -462,6 +462,33 @@ Currently, Clang accepts the above example, though it may produce surprising results if the debugging code depends on consistent use of ``NDEBUG`` in other translation units. +Source Files Consistency + + +Clang may open the input

[clang] [C++20] [Modules] Offer -fmodules-embed-all-files option (PR #107194)

2024-09-18 Thread Chuanqi Xu via cfe-commits
@@ -462,6 +462,33 @@ Currently, Clang accepts the above example, though it may produce surprising results if the debugging code depends on consistent use of ``NDEBUG`` in other translation units. +Source Files Consistency + + +Clang may open the input

[clang] [C++20] [Modules] Offer -fmodules-embed-all-files option (PR #107194)

2024-09-18 Thread Chuanqi Xu via cfe-commits
@@ -462,6 +462,33 @@ Currently, Clang accepts the above example, though it may produce surprising results if the debugging code depends on consistent use of ``NDEBUG`` in other translation units. +Source Files Consistency + + +Clang may open the input

[clang] [C++20] [Modules] Offer -fmodules-embed-all-files option (PR #107194)

2024-09-18 Thread Chuanqi Xu via cfe-commits
@@ -484,6 +511,13 @@ fragment is disabled by default. These checks can be enabled by specifying and you encounter incorrect or missing diagnostics, please report them via the `community issue tracker `_. +Privacy Issue +--

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

2024-09-18 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Would you like to explain more why this fail previously in more detail? Also I am thinking if we can make the process more efficiently: (1) Can we avoid the visitor in the writing process? (2) Can we delay the loading of lambdas to the load of definitions of the functions? I

[clang-tools-extra] [clang-tidy] insert ``static`` keyword in correct position for misc-use-internal-linkage (PR #108792)

2024-09-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/108792 >From 795b3ae677210ff50f7710a0cf73d435889b68ae Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 16 Sep 2024 13:47:10 +0800 Subject: [PATCH] [clang-tidy] insert ``static`` keyword in correct position f

[clang-tools-extra] [clang-tidy][NFC] add qutation mark for C++ classes in warning message (PR #109068)

2024-09-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/109068 >From 66be189c281db7a49c5238c2fe09df64842c1e25 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 17 Sep 2024 23:01:17 +0800 Subject: [PATCH 1/2] add quotation --- .../modernize/AvoidCArraysCheck.cpp

[clang] [clang][codegen] Don't mark "int" TBAA on FP libcalls with indirect args (PR #108853)

2024-09-18 Thread via cfe-commits
@@ -686,12 +686,31 @@ static Value *EmitSignBit(CodeGenFunction &CGF, Value *V) { return CGF.Builder.CreateICmpSLT(V, Zero); } +/// Checks no arguments or results are passed indirectly in the ABI (i.e. via a +/// hidden pointer). This is used to check annotating FP libcalls

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

2024-09-18 Thread Matheus Izvekov 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] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-18 Thread Keith Packard via cfe-commits
@@ -3664,12 +3680,18 @@ static void RenderSSPOptions(const Driver &D, const ToolChain &TC, << A->getOption().getName() << Value; return; } +if (EffectiveTriple.isRISCV() && (Offset <= -2048 || Offset >= 2048)) { keith-packard wrote: Ye

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-09-18 Thread via cfe-commits
goldsteinn wrote: ping5 https://github.com/llvm/llvm-project/pull/91101 ___ 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-18 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] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-09-18 Thread Jun Wang via cfe-commits
@@ -434,6 +434,15 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { indicatePessimisticFixpoint(); return; } + +for (Instruction &I : instructions(F)) { + if (isa(I) && jwanggit86 wrote: @arsenm Following constants to see if

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-09-18 Thread Jun Wang via cfe-commits
@@ -678,6 +690,37 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { return !A.checkForAllCallLikeInstructions(DoesNotRetrieve, *this, UsedAssumedInformation); } + + // Returns true if FlatScratchInit is needed, i.e

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

2024-09-18 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: In case I don't get a chance to look at this in more detail right away can you please reference specific CWG issues in the summary and in comments in the code? Thank you. https://github.com/llvm/llvm-project/pull/109208 _

[clang] -ast-dump-decl-types crashes on codes involving concepts #94928 (PR #108142)

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

[clang] 258fc7f - [Clang] Fix -ast-dump-decl-types crashes on concepts (#108142)

2024-09-18 Thread via cfe-commits
Author: ofAlpaca Date: 2024-09-19T08:33:37+08:00 New Revision: 258fc7f582877d3bc2a26e62da4f50e467d8c640 URL: https://github.com/llvm/llvm-project/commit/258fc7f582877d3bc2a26e62da4f50e467d8c640 DIFF: https://github.com/llvm/llvm-project/commit/258fc7f582877d3bc2a26e62da4f50e467d8c640.diff LOG:

[clang] [llvm] Buffer_store_lds_dword, buffer_wbinvl1, and buffer_wbinvl1_vol should not be supported in GFX940 (PR #109223)

2024-09-18 Thread Jun Wang via cfe-commits
jwanggit86 wrote: Based off wrong branch. https://github.com/llvm/llvm-project/pull/109223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Buffer_store_lds_dword, buffer_wbinvl1, and buffer_wbinvl1_vol should not be supported in GFX940 (PR #109223)

2024-09-18 Thread Jun Wang via cfe-commits
https://github.com/jwanggit86 closed https://github.com/llvm/llvm-project/pull/109223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Buffer_store_lds_dword, buffer_wbinvl1, and buffer_wbinvl1_vol should not be supported in GFX940 (PR #109223)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Jun Wang (jwanggit86) Changes Three instructions, namely, buffer_store_lds_dword, buffer_wbinvl1, and buffer_wbinvl1_vol are obsolete in GFX940 and should not be supported. --- Patch is 211.53 KiB, truncated to 20.00 KiB below, full version:

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

2024-09-18 Thread Younan Zhang via cfe-commits
zyn0217 wrote: For visibility, see the last attempt at removal: https://github.com/llvm/llvm-project/pull/80081 AFAIK, some Clangd features e.g. code folding, are still relying on it, so ditching it completely is probably not an option at the moment. https://github.com/llvm/llvm-project/pull/

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-18 Thread via cfe-commits
eddyz87 wrote: > > Also a question regarding 3 commits in one pull request. As far as I > > understand [current](https://llvm.org/docs/GitHub.html) policy, the idea is > > to have a separate pull request for each commit (and fork branches from one > > another to build a stack). Otherwise the c

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-18 Thread via cfe-commits
eddyz87 wrote: @peilin-ye , > However, I didn't want to use `lock` because I feel like it's too similar to > the x86 `LOCK` prefix (implies a full memory barrier, which could be > confusing here). WDYT? Cc: @yonghong-song @4ast Well, we already confuse people in a way, since existing `lock *

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

2024-09-18 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/109220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-18 Thread Thomas Köppe via cfe-commits
@@ -84,6 +84,14 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + T x; +}; +void test_templated() { + pear p = { NULL }; tkoeppe wrote: Done now. A key insight was that the test defines `NULL` as `0`, so in order for the new che

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

2024-09-18 Thread Thomas Köppe via cfe-commits
https://github.com/tkoeppe updated https://github.com/llvm/llvm-project/pull/109169 From d8a46761ef175194c7e7272313807d2ef25aa497 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] [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-18 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

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-09-18 Thread Michael Buch via cfe-commits
Michael137 wrote: > This change leads to a crash in `ConstStructBuilder::Build()` for the > following program: > > ``` > struct S { > }; > > union U { > struct S s; > int x; > }; > > void foo() { > union U bar = {}; > } > ``` > > `isEmptyRecordForLayout` returns false for `union

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

2024-09-18 Thread Thomas Köppe via cfe-commits
https://github.com/tkoeppe updated https://github.com/llvm/llvm-project/pull/109169 From 6e056a2aad2b9b7957c18c8dfb8f64a44c7c785f 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] [clang-scan-deps] Don't inspect Args[0] as an option (PR #109050)

2024-09-18 Thread Jan Svoboda via cfe-commits
@@ -839,9 +839,11 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) { auto R = std::make_reverse_iterator(FlagsEnd); for (auto I = R, E = Args.rend(); I != E; ++I) { StringRef Arg = *I; +if ((I + 1) == E)

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: I see. A clear diagnostic wouldn't hurt indeed. Thanks a lot for the analysis! No more concerns from our side at this point. https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

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

2024-09-18 Thread Eisuke Kawashima via cfe-commits
e-kwsm wrote: This PR is ready but I have no permission. 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] [clang] implement current CWG direction for string literal comparisons in constant evaluation (PR #109208)

2024-09-18 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/3] Implement current CWG direction for string literal compari

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Wow, I would never have thought it was a problem. Making these the same type > removes the compilation error. Can you explain why this is a problem from the > C++ standard PoV? That's https://eel.is/c++draft/temp.deduct.type#20 In deduced contexts for an NTTP, the type of th

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

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Richard Smith (zygoloid) Changes Track the identity of each string literal object produced by evaluation with a global version number. Accept comparisons between literals of the same version, and between literals of different versions that

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

2024-09-18 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] Implement current CWG direction for string literal comparisons. (PR #109208)

2024-09-18 Thread Richard Smith via cfe-commits
https://github.com/zygoloid ready_for_review 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] Implement current CWG direction for string literal comparisons. (PR #109208)

2024-09-18 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/2] Implement current CWG direction for string literal compari

[clang] Implement current CWG direction for string literal comparisons. (PR #109208)

2024-09-18 Thread Richard Smith via cfe-commits
https://github.com/zygoloid created https://github.com/llvm/llvm-project/pull/109208 Track the identity of each string literal object produced by evaluation with a global version number. Accept comparisons between literals of the same version, and between literals of different versions that cann

[clang] [flang] [flang][Driver] Support -fdiagnostics-color (PR #109210)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: Tarun Prabhu (tarunprabhu) Changes Add support for -fdiagnostics-color and -fdiagnostics-color=. Add documentation for -fdiagnostics-color= which should also be visible in clang. Partially addresses requests in #89888 --- Full dif

[clang] [flang] [flang][Driver] Support -fdiagnostics-color (PR #109210)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Tarun Prabhu (tarunprabhu) Changes Add support for -fdiagnostics-color and -fdiagnostics-color=. Add documentation for -fdiagnostics-color= which should also be visible in clang. Partially addresses requests in #89888 --- Full dif

[clang] [flang] [flang][Driver] Support -fdiagnostics-color (PR #109210)

2024-09-18 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/109210 Add support for -fdiagnostics-color and -fdiagnostics-color=. Add documentation for -fdiagnostics-color= which should also be visible in clang. Partially addresses requests in #89888 >From c5c827ab2c65da7b

[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-18 Thread John McCall 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

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Wow, I would never have thought it was a problem. Making these the same type removes the compilation error. Can you explain why this is a problem from the C++ standard PoV? https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commit

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-18 Thread Peilin Ye via cfe-commits
@@ -621,6 +642,16 @@ let Predicates = [BPFHasLdsx] in { def LDD : LOADi64; +class acquiring_load +: PatFrag<(ops node:$ptr), (base node:$ptr)> { + let IsAtomic = 1; peilin-ye wrote: Got it, I'll make it generate acquire and release for weaker types, and

[clang] [Clang][NFC] Remove incorrect SYCL tests (PR #109182)

2024-09-18 Thread via cfe-commits
elizabethandrews wrote: > > > Instead of removing the test case altogether, does it not suffice to > > > remove the SYCL reference / SYCL specific flag, which I interpret as the > > > problem being addressed? SYCL per se is not a target, but rather a > > > language? Apologies if I'm missing so

[clang] [clang] Use canonical type for substitution which might be incomplete (PR #109065)

2024-09-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/4770 Here is the relevant piec

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @alexfh Your third test case reduces to: ```C++ template struct InlinedVector {}; template void PackArgsHelper(InlinedVector, unsigned char); template void PackArgsHelper(InlinedVector packed_args, T0, TRest... args_rest) { PackArgsHelper(packed_args, a

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-18 Thread Peilin Ye via cfe-commits
peilin-ye wrote: Hi @eddyz87, thanks for the review and context! > ``` > lock *(u64 *)(r1 + 0x0) = r2 release > lock r2 = *(u64 *)(r1 + 0x0) acquire > ``` Appending `acquire` and `release` does sound nice to me since it makes the syntax more similar to LLVM IR (e.g. `store atomic i64 %v, ptr %

[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-18 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

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

2024-09-18 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/4] [UEFI] X86_64 UEFI Clang Driver Introduce changes necessary for UE

[clang] [clang] Use canonical type for substitution which might be incomplete (PR #109065)

2024-09-18 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/109065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e0ad34e - [clang] Use canonical type for substitution which might be incomplete (#109065)

2024-09-18 Thread via cfe-commits
Author: Matheus Izvekov Date: 2024-09-18T18:22:14-03:00 New Revision: e0ad34e56590fa2e6ffdf617e044de7eadee2139 URL: https://github.com/llvm/llvm-project/commit/e0ad34e56590fa2e6ffdf617e044de7eadee2139 DIFF: https://github.com/llvm/llvm-project/commit/e0ad34e56590fa2e6ffdf617e044de7eadee2139.dif

[clang] [clang][powerpc][wasm][systemz][x86] Replace target vector popcount intrinsics with __builtin_elementwise_popcount (PR #109160)

2024-09-18 Thread Thomas Lively via cfe-commits
https://github.com/tlively commented: WebAssembly changes LGTM. https://github.com/llvm/llvm-project/pull/109160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Fix performance-unnecessary-value-param (PR #109145)

2024-09-18 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/109145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] abb317f - [clang-tidy] Fix performance-unnecessary-value-param (#109145)

2024-09-18 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-18T14:18:04-07:00 New Revision: abb317ff9aba8a58449d91f6162597e54d02a57c URL: https://github.com/llvm/llvm-project/commit/abb317ff9aba8a58449d91f6162597e54d02a57c DIFF: https://github.com/llvm/llvm-project/commit/abb317ff9aba8a58449d91f6162597e54d02a57c.diff L

[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-18 Thread John McCall 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

[clang] [llvm] [clang][OpenMP] Add codegen for scope directive (PR #109197)

2024-09-18 Thread Alexey Bataev via cfe-commits
@@ -0,0 +1,2267 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filechec

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: It was faster than I thought. The original code for case 2 is indeed invalid. Having looked carefully at the two definitions of PrintTo, I clearly see they are violating ODR. And both are originating in the internal code, so nothing specific to Eigen. Thanks again for the good ex

[clang] [llvm] [clang][OpenMP] Add codegen for scope directive (PR #109197)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: David Pagan (ddpagan) Changes Added codegen for scope directive, enabled allocate and firstprivate clauses, and added scope directive LIT test. Testing - LIT tests (including new scope test). - OpenMP scope example test from 5

  1   2   3   4   5   >