[clang] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-24 Thread Zhengxing li via cfe-commits
@@ -90,4 +90,5 @@ def int_dx_rsqrt : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>] def int_dx_wave_is_first_lane : DefaultAttrsIntrinsic<[llvm_i1_ty], [], [IntrConvergent]>; def int_dx_sign : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i32_ty>],

[clang] [clang][bytecode] Handle vector comma op (PR #109827)

2024-09-24 Thread Timm Baeder via cfe-commits
tbaederr wrote: One of the test failures is related to this change. https://github.com/llvm/llvm-project/pull/109827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/109846 >From 68ca7ee24712a48c1b6df6aff480fb4ff3054c57 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Tue, 24 Sep 2024 20:44:23 +0200 Subject: [PATCH 1/2] [libclang/python] Improve test coverage Achieve 100%

[clang] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-24 Thread Zhengxing li via cfe-commits
@@ -4782,6 +4782,12 @@ def HLSLStep: LangBuiltin<"HLSL_LANG"> { let Prototype = "void(...)"; } +def HLSLFmod : LangBuiltin<"HLSL_LANG"> { + let Spellings = ["__builtin_hlsl_elementwise_fmod"]; lizhengxing wrote: Done. https://github.com/llvm/llvm-project/

[clang] [analyzer] use `invalidateRegions()` in `VisitGCCAsmStmt` (PR #109838)

2024-09-24 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: Looks correct to me. Btw, do you think the invalidation should cause pointer escape? I have no opinion. I rarely use this api. Wdyt? https://github.com/llvm/llvm-project/pull/109838 ___ cfe-commits mailing list c

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/109846 Achieve 100% test coverage on classes Cursor, Diagnostic, Type. >From 68ca7ee24712a48c1b6df6aff480fb4ff3054c57 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Tue, 24 Sep 2024 20:44:23 +0200 Subject: [

[clang] [analyzer] use `invalidateRegions()` in `VisitGCCAsmStmt` (PR #109838)

2024-09-24 Thread Balazs Benics via cfe-commits
@@ -40,7 +42,19 @@ void testInlineAsmMemcpyUninit(void) { int a[10], b[10] = {}, c; MyMemcpy(&a[1], &b[1], sizeof(b) - sizeof(b[1])); -c = a[0]; // expected-warning{{Assigned value is garbage or undefined}} +c = a[0]; // FIXME: should be warning about uninitiali

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-09-24 Thread via cfe-commits
@@ -88,13 +88,15 @@ void ImplicitWideningOfMultiplicationResultCheck::handleImplicitCastExpr( // Is the expression a compile-time constexpr that we know can fit in the // source type? - if (IgnoreConstantIntExpr && ETy->isIntegerType() && - !ETy->isUnsignedIntegerTy

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jannick Kremer (DeinAlptraum) Changes Achieve 100% test coverage on classes Cursor, Diagnostic, Type. --- Full diff: https://github.com/llvm/llvm-project/pull/109846.diff 3 Files Affected: - (modified) clang/bindings/python/tests/cindex

[clang] [analyzer] use `invalidateRegions()` in `VisitGCCAsmStmt` (PR #109838)

2024-09-24 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag updated https://github.com/llvm/llvm-project/pull/109838 >From dbec0e8368157684f9efc63a556037ba31d5f2ea Mon Sep 17 00:00:00 2001 From: Pavel Skripkin Date: Tue, 24 Sep 2024 20:18:30 +0300 Subject: [PATCH 1/2] clang/csa: use invalidateRegions() in VisitGCCAsmStmt ---

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: @Endilll this adds the tests in preparation as discussed for #105490. While I was at it, I also added full test coverage for all the affected classes. https://github.com/llvm/llvm-project/pull/109846 ___ cfe-

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
@@ -308,10 +310,10 @@ def test_element_type(self): def test_invalid_element_type(self): """Ensure Type.element_type raises if type doesn't have elements.""" tu = get_tu("int i;") -i = get_cursor(tu, "i") -self.assertIsNotNone(i) -with

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
@@ -357,6 +359,50 @@ def test_is_restrict_qualified(self): self.assertTrue(i.type.is_restrict_qualified()) self.assertFalse(j.type.is_restrict_qualified()) +def test_get_result(self): +tu = get_tu("void foo(); int bar(char, short);") +foo =

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
@@ -625,6 +762,25 @@ def test_result_type_objc_method_decl(self): self.assertEqual(cursor.kind, CursorKind.OBJC_INSTANCE_METHOD_DECL) self.assertEqual(result_type.kind, TypeKind.VOID) +def test_storage_class(self): +tu = get_tu( +""" +ex

[clang] [analyzer] use `invalidateRegions()` in `VisitGCCAsmStmt` (PR #109838)

2024-09-24 Thread Pavel Skripkin via cfe-commits
@@ -40,7 +42,19 @@ void testInlineAsmMemcpyUninit(void) { int a[10], b[10] = {}, c; MyMemcpy(&a[1], &b[1], sizeof(b) - sizeof(b[1])); -c = a[0]; // expected-warning{{Assigned value is garbage or undefined}} +c = a[0]; // FIXME: should be warning about uninitiali

[clang] [analyzer] use `invalidateRegions()` in `VisitGCCAsmStmt` (PR #109838)

2024-09-24 Thread Pavel Skripkin via cfe-commits
pskrgag wrote: Hm, in this particular case, I think, escaping does make sense, since we don't know what's going on inside inline assembly block. https://github.com/llvm/llvm-project/pull/109838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-24 Thread Zhengxing li via cfe-commits
https://github.com/lizhengxing updated https://github.com/llvm/llvm-project/pull/108849 >From 9942e3129cdb37969adceb40c42ea17042c61b2b Mon Sep 17 00:00:00 2001 From: Zhengxing Li Date: Fri, 13 Sep 2024 13:19:31 -0700 Subject: [PATCH] [HLSL] Implementation of the fmod intrinsic This change impl

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-24 Thread via cfe-commits
https://github.com/yonghong-song updated https://github.com/llvm/llvm-project/pull/107343 >From 844342c25c67b66c89c0a82d49035492fab24461 Mon Sep 17 00:00:00 2001 From: Yonghong Song Date: Tue, 3 Sep 2024 21:26:17 -0700 Subject: [PATCH 1/3] [BPF] Do atomic_fetch_*() pattern matching with memory

[clang] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-24 Thread Zhengxing li via cfe-commits
https://github.com/lizhengxing edited https://github.com/llvm/llvm-project/pull/108849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-24 Thread via cfe-commits
yonghong-song wrote: Uploaded new codes to address the missing case like ``` int _Atomic __attribute__((btf_type_tag("foo"))) *root; ``` https://github.com/llvm/llvm-project/pull/107343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-24 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,79 @@ +// DirectX target: +// +// -- Native Half support test --- +// +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -o - | FileC

[clang] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-24 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/108849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Use %errc to get text for system errors (PR #109852)

2024-09-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo Author: Sean Perry (perry-ca) Changes Several lit tests look for messages with text generated from strerror() such as "no such file or directory". The value can change slightly from system to system. Use the llvm-lit macro `%errc_`

[clang] [llvm] Use %errc to get text for system errors (PR #109852)

2024-09-24 Thread Sean Perry via cfe-commits
https://github.com/perry-ca created https://github.com/llvm/llvm-project/pull/109852 Several lit tests look for messages with text generated from strerror() such as "no such file or directory". The value can change slightly from system to system. Use the llvm-lit macro `%errc_` instead. Thi

[clang] [llvm] Use %errc to get text for system errors (PR #109852)

2024-09-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sean Perry (perry-ca) Changes Several lit tests look for messages with text generated from strerror() such as "no such file or directory". The value can change slightly from system to system. Use the llvm-lit macro `%errc_` ins

[clang] [llvm] Use %errc to get text for system errors (PR #109852)

2024-09-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Sean Perry (perry-ca) Changes Several lit tests look for messages with text generated from strerror() such as "no such file or directory". The value can change slightly from system to system. Use the llvm-lit macro `%errc_

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Vlad Serebrennikov via cfe-commits
@@ -357,6 +359,50 @@ def test_is_restrict_qualified(self): self.assertTrue(i.type.is_restrict_qualified()) self.assertFalse(j.type.is_restrict_qualified()) +def test_get_result(self): +tu = get_tu("void foo(); int bar(char, short);") +foo =

[clang] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-24 Thread Zhengxing li via cfe-commits
@@ -0,0 +1,79 @@ +// DirectX target: +// +// -- Native Half support test --- +// +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -o - | FileC

[clang] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-24 Thread Zhengxing li via cfe-commits
https://github.com/lizhengxing updated https://github.com/llvm/llvm-project/pull/108849 >From a12d65fabcc87a50e6c0d83e9f69862bb859b894 Mon Sep 17 00:00:00 2001 From: Zhengxing Li Date: Fri, 13 Sep 2024 13:19:31 -0700 Subject: [PATCH] [HLSL] Implementation of the fmod intrinsic This change impl

[clang] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-24 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,38 @@ + +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected + +float test_too_few_arg() { + return __builtin_elementwise_fmod(); + // expecte

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-09-24 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Donát Nagy (NagyDonat) Changes The checker alpha.security.ArrayBoundV2 produced lots of false positives in situations where loop modeling of th

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-24 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,1572 @@ +//=== SemaFunctionEffects.cpp - Sema handling of function effects -===// +// +// 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: A

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-09-24 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Gentle ping for review @MaskRay @petrhosek . Could you recommend some reviewers so I can get more comments? Thanks! https://github.com/llvm/llvm-project/pull/108570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-24 Thread Doug Wyatt via cfe-commits
@@ -1,6 +1,8 @@ // RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s // RUN: %clang_cc1 -fsyntax-only -fblocks -verify -x c -std=c23 %s +#pragma clang diagnostic warning "-Wfunction-effects" dougsonos wrote: Moved https://github.com/llvm/llv

[clang] Add missing deps edge: CodeGenAction.cpp.o -> GenVT.inc (PR #109306)

2024-09-24 Thread Jon Roelofs via cfe-commits
jroelofs wrote: @mgorny https://github.com/llvm/llvm-project/pull/109601 https://github.com/llvm/llvm-project/pull/109306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-24 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,1572 @@ +//=== SemaFunctionEffects.cpp - Sema handling of function effects -===// +// +// 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: A

[clang] [clang][CodeGen][SPIR-V] Fix incorrect SYCL usage, implement missing interface (PR #109415)

2024-09-24 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx commented: > Are there any tests available to check this behavior? The reworked tests do verify / rely on this behaviour, but I can add an individual test for both vanilla and AMDGCN flavoured SPIR-V, if that is preferred (might be better anyway). https://github.com

[clang] [clang][CodeGen][SPIR-V] Fix incorrect SYCL usage, implement missing interface (PR #109415)

2024-09-24 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/109415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-24 Thread via cfe-commits
@@ -0,0 +1,1572 @@ +//=== SemaFunctionEffects.cpp - Sema handling of function effects -===// +// +// 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: A

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-24 Thread via cfe-commits
@@ -0,0 +1,1572 @@ +//=== SemaFunctionEffects.cpp - Sema handling of function effects -===// +// +// 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: A

[clang] [clang-format] Fix a bug in annotating angles containing FatArrow (PR #108671)

2024-09-24 Thread kadir çetinkaya via cfe-commits
@@ -243,14 +244,16 @@ class AnnotatingParser { // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (InExpr && !Line.startsWith(tok::kw_template) && + if

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-24 Thread Doug Wyatt via cfe-commits
@@ -1128,12 +1128,18 @@ def ThreadSafetyBeta : DiagGroup<"thread-safety-beta">; // Uniqueness Analysis warnings def Consumed : DiagGroup<"consumed">; +// Warnings and notes related to the function effects system underlying +// the nonblocking and nonallocating attributes

[clang] [Clang][AArch64] Fix checkArmStreamingBuiltin for 'sve-b16b16' (PR #109420)

2024-09-24 Thread Paul Walker via cfe-commits
@@ -1802,9 +1854,29 @@ void SVEEmitter::createStreamingAttrs(raw_ostream &OS, ACLEKind Kind) { if (Def->isFlagSet(IsStreamingFlag)) StreamingMap["ArmStreaming"].insert(Def->getMangledName()); -else if (Def->isFlagSet(VerifyRuntimeMode)) +else if (Def->isFlag

[clang] [Clang][AArch64] Fix checkArmStreamingBuiltin for 'sve-b16b16' (PR #109420)

2024-09-24 Thread Paul Walker via cfe-commits
@@ -1802,9 +1854,29 @@ void SVEEmitter::createStreamingAttrs(raw_ostream &OS, ACLEKind Kind) { if (Def->isFlagSet(IsStreamingFlag)) StreamingMap["ArmStreaming"].insert(Def->getMangledName()); -else if (Def->isFlagSet(VerifyRuntimeMode)) +else if (Def->isFlag

[clang] [clang][CodeGen][SPIR-V] Fix incorrect SYCL usage, implement missing interface (PR #109415)

2024-09-24 Thread Arvind Sudarsanam via cfe-commits
@@ -188,6 +190,28 @@ void SPIRVTargetCodeGenInfo::setCUDAKernelCallingConvention( } } +LangAS +SPIRVTargetCodeGenInfo::getGlobalVarAddressSpace(CodeGenModule &CGM, + const VarDecl *D) const { + assert(!CGM.getLangOpts().OpenC

[clang] [Clang] Replace vt_gen with LLVMCodeGenTypes (PR #109601)

2024-09-24 Thread Tristan Ross via cfe-commits
https://github.com/RossComputerGuy updated https://github.com/llvm/llvm-project/pull/109601 >From 6902072452f92d8893b42dc7ef32fb610a579f8d Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sun, 22 Sep 2024 21:02:12 -0700 Subject: [PATCH] [Clang] Replace vt_gen with LLVMCodeGenTypes --- clang/

[clang] [NFC] [analyzer] Make `invalidateRegions` accept `Stmt` instead of `Expr` (PR #109792)

2024-09-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/6280 Here is the relevant piece of the build log for

[clang] [Clang] Replace vt_gen with LLVMCodeGenTypes (PR #109601)

2024-09-24 Thread Tristan Ross via cfe-commits
@@ -31,6 +31,7 @@ set(LLVM_LINK_COMPONENTS Target TargetParser TransformUtils + LLVMCodeGenTypes RossComputerGuy wrote: Oh, didn't realize that. https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commit

[clang] [Clang] Replace vt_gen with LLVMCodeGenTypes (PR #109601)

2024-09-24 Thread Tristan Ross via cfe-commits
@@ -31,6 +31,7 @@ set(LLVM_LINK_COMPONENTS Target TargetParser TransformUtils + CodeGenTypes RossComputerGuy wrote: Removed. https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commits mailing list cfe-c

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-09-24 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Another example using class templates: ```cpp template struct A { template struct B; }; template<> template struct A<0>::B : A<1>::B { }; template<> template struct A<1>::B { static constexpr bool x = true; }; static_assert(A<0>::B::x); // error: implicit instanti

[clang] [llvm] [RISCV] Mark Zacas as non-experimental (PR #109651)

2024-09-24 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/109651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-24 Thread J. Ryan Stinnett via cfe-commits
@@ -253,6 +253,122 @@ static bool printSymbolizedStackTrace(StringRef Argv0, void **StackTrace, return true; } +#if ENABLE_DEBUGLOC_ORIGIN_TRACKING +void sys::symbolizeAddresses(AddressSet &Addresses, + SymbolizedAddressMap &SymbolizedAddresses)

[clang] [llvm] [RISCV] Mark Zacas as non-experimental (PR #109651)

2024-09-24 Thread Philip Reames via cfe-commits
https://github.com/preames approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/109651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add cc1 --output-asm-variant= to set output syntax (PR #109360)

2024-09-24 Thread Fangrui Song via cfe-commits
@@ -7209,6 +7209,9 @@ def fuse_ctor_homing: Flag<["-"], "fuse-ctor-homing">, def as_secure_log_file : Separate<["-"], "as-secure-log-file">, HelpText<"Emit .secure_log_unique directives to this filename.">, MarshallingInfoString>; +def output_asm_variant : Joined<["--"], "o

[clang] [Clang] Add explicit visibility symbol macros (PR #108276)

2024-09-24 Thread Thomas Fransham via cfe-commits
@@ -0,0 +1,69 @@ +//===-- clang/Support/Compiler.h - Compiler abstraction support -*- 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] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-24 Thread via cfe-commits
@@ -119,6 +119,15 @@ FIELD(HasInitMethod, 1, NO_MERGE) /// within anonymous unions or structs. FIELD(HasInClassInitializer, 1, NO_MERGE) +/// Custom attribute that is True if any field is marked as requiring explicit +/// initialization with [[clang::requires_explicit_initiali

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-24 Thread Timm Baeder via cfe-commits
tbaederr wrote: For the code in question: ```c++ using FourCharsVecSize __attribute__((vector_size(4))) = char; constexpr auto s = FourCharsVecSize{6, 3, 5, 10} << 1; static_assert(s[0] == 12 && s[1] == 6 && s[2] == 10 && s[3] == 20, ""); ``` The AST is: ``` BinaryOperator 0x16251b8 'Fo

[clang] [Clang] Replace vt_gen with LLVMCodeGenTypes (PR #109601)

2024-09-24 Thread Michał Górny via cfe-commits
https://github.com/mgorny approved this pull request. Thanks! This fixes the problem with standalone builds for me. https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] b1e4656 - [NFC][analyzer] Make `invalidateRegions` accept `Stmt` instead of `Expr` (#109792)

2024-09-24 Thread via cfe-commits
Author: Pavel Skripkin Date: 2024-09-24T16:48:29+02:00 New Revision: b1e4656e8ee3289dc5f3139fc8eb33152f96bfe6 URL: https://github.com/llvm/llvm-project/commit/b1e4656e8ee3289dc5f3139fc8eb33152f96bfe6 DIFF: https://github.com/llvm/llvm-project/commit/b1e4656e8ee3289dc5f3139fc8eb33152f96bfe6.diff

[clang] [NFC] [analyzer] Make `invalidateRegions` accept `Stmt` instead of `Expr` (PR #109792)

2024-09-24 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/109792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4, PS5][Driver] Pass `-L<...>/target/lib -L.` to linker (PR #109796)

2024-09-24 Thread Edd Dawson via cfe-commits
@@ -46,3 +46,26 @@ // CHECK-SYSROOT: {{ld(\.exe)?}}" // CHECK-SYSROOT-SAME: "--sysroot=mysdk" + +// Test that "." is always added to library search paths. This is long-standing +// behavior, unique to PlayStation toolchains. + +// RUN: %clang --target=x64_64-sie-ps5 %s -### 2>

[clang] [Clang] Add explicit visibility symbol macros (PR #108276)

2024-09-24 Thread Thomas Fransham via cfe-commits
@@ -8,6 +8,7 @@ set(LLVM_LINK_COMPONENTS Support) -add_clang_tool(amdgpu-arch AMDGPUArch.cpp AMDGPUArchByHSA.cpp AMDGPUArchByHIP.cpp) +add_clang_tool(amdgpu-arch DISABLE_CLANG_LINK_DYLIB fsfod wrote: There using target_link_libraries instead of clang_target

[clang] [PS4, PS5][Driver] Pass `-L<...>/target/lib -L.` to linker (PR #109796)

2024-09-24 Thread Edd Dawson via cfe-commits
@@ -46,3 +46,26 @@ // CHECK-SYSROOT: {{ld(\.exe)?}}" // CHECK-SYSROOT-SAME: "--sysroot=mysdk" + +// Test that "." is always added to library search paths. This is long-standing +// behavior, unique to PlayStation toolchains. + +// RUN: %clang --target=x64_64-sie-ps5 %s -### 2>

[clang] [PS4, PS5][Driver] Pass `-L<...>/target/lib -L.` to linker (PR #109796)

2024-09-24 Thread Paul T Robinson via cfe-commits
@@ -46,3 +46,26 @@ // CHECK-SYSROOT: {{ld(\.exe)?}}" // CHECK-SYSROOT-SAME: "--sysroot=mysdk" + +// Test that "." is always added to library search paths. This is long-standing +// behavior, unique to PlayStation toolchains. + +// RUN: %clang --target=x64_64-sie-ps5 %s -### 2>

[clang] [PS4, PS5][Driver] Pass `-L<...>/target/lib -L.` to linker (PR #109796)

2024-09-24 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/109796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Handle vector comma op in common way (PR #109827)

2024-09-24 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/109827 None >From 4454c5c75a5b3d0930a10d59a1715dea0fb7ed5e Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 25 Sep 2024 00:35:26 +0800 Subject: [PATCH] [clang][bytecode] Handle vector comma op in common way Signed

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-09-24 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Yep, I agree that the reduction indicates the original code was IFNDR. We need a new reduction with no rename in order to locate this on QT code base and know for sure. https://github.com/llvm/llvm-project/pull/106585 ___ cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-24 Thread Doug Wyatt via cfe-commits
@@ -4940,6 +4955,78 @@ class FunctionEffectsRef { void dump(llvm::raw_ostream &OS) const; }; +/// A mutable set of FunctionEffect::Kind. +class FunctionEffectKindSet { + // For now this only needs to be a bitmap. + constexpr static size_t EndBitPos = 8; + using KindBitsT

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-09-24 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/109804 The checker alpha.security.ArrayBoundV2 produced lots of false positives in situations where loop modeling of the engine fed it with unfounded assumptions. This commit introduces a heuristic that discards Arr

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-24 Thread via cfe-commits
@@ -1128,12 +1128,18 @@ def ThreadSafetyBeta : DiagGroup<"thread-safety-beta">; // Uniqueness Analysis warnings def Consumed : DiagGroup<"consumed">; +// Warnings and notes related to the function effects system underlying +// the nonblocking and nonallocating attributes

[clang] [clang][bytecode] Fix vector shifts on big-endian systems (PR #109800)

2024-09-24 Thread via cfe-commits
https://github.com/yronglin approved this pull request. Thanks, LGTM! https://github.com/llvm/llvm-project/pull/109800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Replace vt_gen with LLVMCodeGenTypes (PR #109601)

2024-09-24 Thread Evan Wilde via cfe-commits
etcwilde wrote: Here, I'd missed adding `vt_gen` as something that one could pick up through the cmake config. Can you try a standalone build with the changes here? https://github.com/llvm/llvm-project/pull/109817 Thanks. https://github.com/llvm/llvm-project/pull/109601 ___

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-24 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/107786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-24 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s + +namespace GH49093 { + class B { + public: +static int a() { return 0; } // expected-note {{member is declared here}} +decltype(a< 0 >(0)) test;// expected-error {{member 'a' used before its

[clang-tools-extra] [clang-tidy] exclude CXXParenListInitExpr from RedundantCastingCheck (PR #109741)

2024-09-24 Thread Félix-Antoine Constantin via cfe-commits
@@ -183,6 +183,10 @@ Changes in existing checks by adding the option `UseUpperCaseLiteralSuffix` to select the case of the literal suffix in fixes. +- Improved :doc:`readability-redundant-casting + ` check to + exclude `CXXParenListInitExpr` for the source expression mat

[clang] [llvm] [clang] Add cc1 --output-asm-variant= to set output syntax (PR #109360)

2024-09-24 Thread Fangrui Song via cfe-commits
@@ -7209,6 +7209,9 @@ def fuse_ctor_homing: Flag<["-"], "fuse-ctor-homing">, def as_secure_log_file : Separate<["-"], "as-secure-log-file">, HelpText<"Emit .secure_log_unique directives to this filename.">, MarshallingInfoString>; +def output_asm_variant : Joined<["--"], "o

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-24 Thread Stephen Tozer via cfe-commits
@@ -48,22 +64,29 @@ namespace llvm { Temporary }; - // Extends TrackingMDNodeRef to also store a DebugLocKind, allowing Debugify - // to ignore intentionally-empty DebugLocs. - class DILocAndCoverageTracking : public TrackingMDNodeRef { + // Extends TrackingMDNodeRef

[clang] [llvm] [clang] Add cc1 --output-asm-variant= to set output syntax (PR #109360)

2024-09-24 Thread LIU Hao via cfe-commits
@@ -7209,6 +7209,9 @@ def fuse_ctor_homing: Flag<["-"], "fuse-ctor-homing">, def as_secure_log_file : Separate<["-"], "as-secure-log-file">, HelpText<"Emit .secure_log_unique directives to this filename.">, MarshallingInfoString>; +def output_asm_variant : Joined<["--"], "o

[clang] [llvm] [clang] Add cc1 --output-asm-variant= to set output syntax (PR #109360)

2024-09-24 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/109360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] use `invalidateRegions()` in `VisitGCCAsmStmt` (PR #109838)

2024-09-24 Thread Pavel Skripkin via cfe-commits
@@ -40,7 +42,19 @@ void testInlineAsmMemcpyUninit(void) { int a[10], b[10] = {}, c; MyMemcpy(&a[1], &b[1], sizeof(b) - sizeof(b[1])); -c = a[0]; // expected-warning{{Assigned value is garbage or undefined}} +c = a[0]; // FIXME: should be warning about uninitiali

[clang] [llvm] [RISCV] Mark Zacas as non-experimental (PR #109651)

2024-09-24 Thread Alex Bradbury via cfe-commits
https://github.com/asb updated https://github.com/llvm/llvm-project/pull/109651 >From 6e0e21779c13007ec8e102a6171636189550e770 Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Mon, 23 Sep 2024 12:28:12 +0100 Subject: [PATCH 1/5] [RISCV] Mark Zacas as non-experimental The extension has been ra

[clang] 614aeda - [RISCV] Mark Zacas as non-experimental (#109651)

2024-09-24 Thread via cfe-commits
Author: Alex Bradbury Date: 2024-09-25T06:14:43+01:00 New Revision: 614aeda93b2225c6eb42b00ba189ba7ca2585c60 URL: https://github.com/llvm/llvm-project/commit/614aeda93b2225c6eb42b00ba189ba7ca2585c60 DIFF: https://github.com/llvm/llvm-project/commit/614aeda93b2225c6eb42b00ba189ba7ca2585c60.diff

[clang] [llvm] [RISCV] Mark Zacas as non-experimental (PR #109651)

2024-09-24 Thread Alex Bradbury via cfe-commits
https://github.com/asb closed https://github.com/llvm/llvm-project/pull/109651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use std::optional::value_or (NFC) (PR #109894)

2024-09-24 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/109894 ___ 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-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. 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] d8f555d - [UBSan] Diagnose assumption violation (#104741)

2024-09-24 Thread via cfe-commits
Author: Yingwei Zheng Date: 2024-09-25T13:59:10+08:00 New Revision: d8f555d62546fc1fbee3d2a48b37779c629bf87b URL: https://github.com/llvm/llvm-project/commit/d8f555d62546fc1fbee3d2a48b37779c629bf87b DIFF: https://github.com/llvm/llvm-project/commit/d8f555d62546fc1fbee3d2a48b37779c629bf87b.diff

[clang] [compiler-rt] [UBSan] Diagnose assumption violation (PR #104741)

2024-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw closed https://github.com/llvm/llvm-project/pull/104741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4bd3a62 - [clang][bytecode] Fix diagnosing std::construct_at with wrong type (#109828)

2024-09-24 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-25T08:00:32+02:00 New Revision: 4bd3a62cd600c607e7cb3d69dd75ac4069e3eef9 URL: https://github.com/llvm/llvm-project/commit/4bd3a62cd600c607e7cb3d69dd75ac4069e3eef9 DIFF: https://github.com/llvm/llvm-project/commit/4bd3a62cd600c607e7cb3d69dd75ac4069e3eef9.diff L

[clang] [clang][bytecode] Fix diagnosing std::construct_at with wrong type (PR #109828)

2024-09-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/109828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating angles containing FatArrow (PR #108671)

2024-09-24 Thread Owen Pan via cfe-commits
@@ -243,14 +244,16 @@ class AnnotatingParser { // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (InExpr && !Line.startsWith(tok::kw_template) && + if

[clang] [clang][bytecode] Handle vector comma op (PR #109827)

2024-09-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/109827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] exclude CXXParenListInitExpr from RedundantCastingCheck (PR #109741)

2024-09-24 Thread Tommy Chen via cfe-commits
https://github.com/dl8sd11 updated https://github.com/llvm/llvm-project/pull/109741 >From 13bc00c2ffb4238903b57c0a3c77424ed35279cc Mon Sep 17 00:00:00 2001 From: dl8sd11 Date: Mon, 23 Sep 2024 17:52:25 + Subject: [PATCH 1/5] [clang-tidy] eclude CXXParenListInitExpr Exclude CXXParenListInit

[clang-tools-extra] [clang-tidy] exclude CXXParenListInitExpr from RedundantCastingCheck (PR #109741)

2024-09-24 Thread Tommy Chen via cfe-commits
@@ -183,6 +183,10 @@ Changes in existing checks by adding the option `UseUpperCaseLiteralSuffix` to select the case of the literal suffix in fixes. +- Improved :doc:`readability-redundant-casting + ` check to + exclude `CXXParenListInitExpr` for the source expression mat

[clang] [clang] Use std::optional::value_or (NFC) (PR #109894)

2024-09-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/109894 >From 7ea89a1dcdee890d3d69f59ea4e31b084d32e0d7 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 24 Sep 2024 14:34:49 -0700 Subject: [PATCH 1/2] [clang] Use std::optional::value_or (NFC) --- clang/i

[clang] [compiler-rt] [UBSan] Diagnose assumption violation (PR #104741)

2024-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/104741 >From fdadb0fdc2288b18d4dfe4f4510d057a7552ee39 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Mon, 19 Aug 2024 15:22:39 +0800 Subject: [PATCH 1/3] [UBSan] Diagnose assumption violation --- clang/lib/CodeGe

[clang-tools-extra] [clang-tidy] exclude CXXParenListInitExpr from RedundantCastingCheck (PR #109741)

2024-09-24 Thread Piotr Zegar via cfe-commits
@@ -1,8 +1,8 @@ -// RUN: %check_clang_tidy -std=c++11-or-later %s readability-redundant-casting %t -- -- -fno-delayed-template-parsing -// RUN: %check_clang_tidy -std=c++11-or-later -check-suffix=,MACROS %s readability-redundant-casting %t -- \ +// RUN: %check_clang_tidy -std=c+

[clang-tools-extra] [clang-tidy] exclude CXXParenListInitExpr from RedundantCastingCheck (PR #109741)

2024-09-24 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/109741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 416f101 - [clang] Use std::optional::value_or (NFC) (#109894)

2024-09-24 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-24T23:01:45-07:00 New Revision: 416f10e06339387ac456c288cb5e60f41bc1 URL: https://github.com/llvm/llvm-project/commit/416f10e06339387ac456c288cb5e60f41bc1 DIFF: https://github.com/llvm/llvm-project/commit/416f10e06339387ac456c288cb5e60f41bc1.diff L

[clang] [llvm] [LoongArch] [CodeGen] Add options for Clang to generate LoongArch-specific frecipe & frsqrte instructions (PR #109917)

2024-09-24 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 3da5e82e31712792411945b655929a1680fb476c eff8b3b5fb826c4f061acd27f6217434782cce59 --e

<    1   2   3   4   5   >