[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-06 Thread Balazs Benics via cfe-commits
@@ -1158,6 +1173,123 @@ void StreamChecker::evalUngetc(const FnDescription *Desc, const CallEvent , C.addTransition(StateFailed); } +ProgramStateRef +StreamChecker::ensurePtrNotNull(SVal PtrVal, const Expr *PtrExpr, +CheckerContext ,

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-06 Thread Tulio Magno Quites Machado Filho via cfe-commits
tuliom wrote: @fpetrogalli I found a small issue with this PR. Could you take a look at PR #84186 and review it, please? https://github.com/llvm/llvm-project/pull/83584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Fix standalone execution in TableGen/target-builtins-prototype-parser.td (PR #84186)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tulio Magno Quites Machado Filho (tuliom) Changes Use a path that works for both standalone as well as full repository builds. Fixes: 9b672de99760 ("[clang][Builtins] Parse clang extended vectors types. (#83584)") --- Full diff:

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/84159 >From 5eacd7478d3db7472d5ab983468a441b1f61ad7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 6 Mar 2024 08:36:52 +0100 Subject:

[clang] [analyzer] Fix crash on dereference invalid return value of getAdjustedParameterIndex() (PR #83585)

2024-03-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/83585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix standalone execution in TableGen/target-builtins-prototype-parser.td (PR #84186)

2024-03-06 Thread Tulio Magno Quites Machado Filho via cfe-commits
https://github.com/tuliom created https://github.com/llvm/llvm-project/pull/84186 Use a path that works for both standalone as well as full repository builds. Fixes: 9b672de99760 ("[clang][Builtins] Parse clang extended vectors types. (#83584)") >From 46e044a7c97fe1891a9109e423c66ff75c9c4a14

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-06 Thread Erich Keane via cfe-commits
@@ -0,0 +1,68 @@ +//===- SemaOpenACC.h - Semantic Analysis for OpenACC constructs ---===// +// +// 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] [llvm] [openmp] [libomptarget] Build plugins-nextgen for SystemZ (PR #83978)

2024-03-06 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand updated https://github.com/llvm/llvm-project/pull/83978 >From e0cca3ddec75c7624c27a75ae6741dee3b0044fa Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Tue, 5 Mar 2024 10:03:55 +0100 Subject: [PATCH] [libomptarget] Build plugins-nextgen for SystemZ The plugin

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-06 Thread Erich Keane via cfe-commits
@@ -0,0 +1,68 @@ +//===- SemaOpenACC.h - Semantic Analysis for OpenACC constructs ---===// +// +// 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] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-06 Thread Erich Keane via cfe-commits
@@ -0,0 +1,68 @@ +//===- SemaOpenACC.h - Semantic Analysis for OpenACC constructs ---===// +// +// 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] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch moves OpenACC parts of `Sema` into a separate class `SemaOpenACC` that is placed in a separate header `Sema/SemaOpenACC.h`. This patch is intended to be a model of factoring things out of

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread via cfe-commits
cor3ntin wrote: Can you mark the status of the paper in cxx_status.html as partial (with a `` tag explaining what is missing)? Can you update the commit message / changelog to refer to the paper number? Thanks https://github.com/llvm/llvm-project/pull/77890

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/84184 This patch moves OpenACC parts of `Sema` into a separate class `SemaOpenACC` that is placed in a separate header `Sema/SemaOpenACC.h`. This patch is intended to be a model of factoring things out of `Sema`, so

[clang] [RISCV][Clang] Added builtin support for experimental Zimop extension (PR #79971)

2024-03-06 Thread Lyut Nersisyan via cfe-commits
@@ -89,5 +89,13 @@ TARGET_BUILTIN(__builtin_riscv_sm3p1, "UiUi", "nc", "zksh") TARGET_BUILTIN(__builtin_riscv_ntl_load, "v.", "t", "zihintntl") TARGET_BUILTIN(__builtin_riscv_ntl_store, "v.", "t", "zihintntl") +// Zimop extension ln8-8 wrote: Rebased

[clang] [RISCV][Clang] Added builtin support for experimental Zimop extension (PR #79971)

2024-03-06 Thread Lyut Nersisyan via cfe-commits
@@ -5588,6 +5588,14 @@ bool Sema::CheckRISCVBuiltinFunctionCall(const TargetInfo , // Check if rnum is in [0, 10] case RISCV::BI__builtin_riscv_aes64ks1i: return SemaBuiltinConstantArgRange(TheCall, 1, 0, 10); + // Check if n of mop.r.[n] is in [0, 31] + case

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread via cfe-commits
@@ -2612,44 +2669,312 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList

[clang] [Clang][Sema][NFC]Use isa_and_nonnull to simplify the code and avoid build warning (PR #84181)

2024-03-06 Thread via cfe-commits
ZERO-N wrote: @yronglin much thanks https://github.com/llvm/llvm-project/pull/84181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-06 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-06 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread via cfe-commits
@@ -10598,10 +10598,38 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (TemplateName.isDependent()) return SubstAutoTypeDependent(TSInfo->getType()); - // We can only perform deduction for class templates. + // We can only perform deduction for

[clang] [analyzer] Fix crash on dereference invalid return value of getAdjustedParameterIndex() (PR #83585)

2024-03-06 Thread via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core -std=c++23 -verify %s +// expected-no-diagnostics + +struct S { + bool operator==(this auto, S) { +return true; + } +}; +int use_deducing_this() { + return S{} == S{}; mzyKi wrote:

[clang-tools-extra] [clang-tidy] `isOnlyUsedAsConst`: Handle static method calls. (PR #84005)

2024-03-06 Thread Felix Berger via cfe-commits
https://github.com/fberger approved this pull request. https://github.com/llvm/llvm-project/pull/84005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema][NFC]Use isa_and_nonnull to simplify the code and avoid build warning (PR #84181)

2024-03-06 Thread via cfe-commits
https://github.com/yronglin approved this pull request. LGTM. Do you need me to merge that for you? https://github.com/llvm/llvm-project/pull/84181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Fix crash on dereference invalid return value of getAdjustedParameterIndex() (PR #83585)

2024-03-06 Thread via cfe-commits
https://github.com/mzyKi updated https://github.com/llvm/llvm-project/pull/83585 >From b925806e216dcdbb359852ba6fef59268f6d5fe5 Mon Sep 17 00:00:00 2001 From: miaozhiyuan Date: Fri, 1 Mar 2024 22:45:20 +0800 Subject: [PATCH 1/3] [clang][ExprEngineCXX] Fix crash on dereference invalid return

[clang] [Clang][Sema][NFC]Use isa_and_nonnull to simplify the code and avoid build warning (PR #84181)

2024-03-06 Thread via cfe-commits
https://github.com/ZERO-N updated https://github.com/llvm/llvm-project/pull/84181 >From 22a64059da4dfb27325cefe1d43c1c520a841b27 Mon Sep 17 00:00:00 2001 From: nwh <1416312...@qq.com> Date: Wed, 6 Mar 2024 22:45:59 +0800 Subject: [PATCH] [Clang][Sema][NFC]Use isa_and_nonnull to simplify the

[clang] [Clang][Sema][NFC]Use isa_and_nonnull to simplify the code and avoid build warning (PR #84181)

2024-03-06 Thread via cfe-commits
https://github.com/ZERO-N updated https://github.com/llvm/llvm-project/pull/84181 >From edf4b035294923b38330081d2c930172870d8886 Mon Sep 17 00:00:00 2001 From: nwh <1416312...@qq.com> Date: Wed, 6 Mar 2024 22:45:59 +0800 Subject: [PATCH] [Clang][Sema][NFC]Use isa_and_nonnull to simplify the

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-06 Thread Alejandro Álvarez Ayllón via cfe-commits
alejandro-alvarez-sonarsource wrote: Rebased on top of main and solved conflicts. https://github.com/llvm/llvm-project/pull/83027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use getDefaultArgRange instead of getDefaultArg to retrieve the (PR #79296)

2024-03-06 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/79296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fec4716 - [clang] Use getDefaultArgRange instead of getDefaultArg to retrieve the (#79296)

2024-03-06 Thread via cfe-commits
Author: Haojian Wu Date: 2024-03-06T15:55:41+01:00 New Revision: fec471649fffaa3ec44e17801e5c9605825e58bb URL: https://github.com/llvm/llvm-project/commit/fec471649fffaa3ec44e17801e5c9605825e58bb DIFF: https://github.com/llvm/llvm-project/commit/fec471649fffaa3ec44e17801e5c9605825e58bb.diff

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-06 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/83027 From 997501888aacdbae59ace767e085922c9aa96a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Wed, 21 Feb 2024 14:46:01 +0100 Subject: [PATCH]

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I'm happy when Corentin is, so he can approve when he's ready. https://github.com/llvm/llvm-project/pull/77890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Erich Keane via cfe-commits
@@ -96,6 +96,10 @@ C++20 Feature Support behavior can use the flag '-Xclang -fno-skip-odr-check-in-gmf'. (`#79240 `_). +- Initial support for class template argument deduciton (CTAD) for type alias

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2669,312 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList

[clang] [lld] [llvm] [AMDGPU] Rename COV module flag to amdhsa_code_object_version (PR #79905)

2024-03-06 Thread Emma Pilkington via cfe-commits
https://github.com/epilk closed https://github.com/llvm/llvm-project/pull/79905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema][NFC]Use isa_and_nonnull to simplify the code and avoid build warning (PR #84181)

2024-03-06 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 33e312137b065ba330b187f56ddd60df70927241 470e3fc13b66d53920f579a7fb848741418e5c0f --

[clang] [X86] Finely handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (PR #84136)

2024-03-06 Thread Phoebe Wang via cfe-commits
@@ -34,6 +34,60 @@ __m128 test_mm_andnot_ps(__m128 A, __m128 B) { return _mm_andnot_ps(A, B); } +__m128 test_mm_cmp_ps_eq_oq(__m128 a, __m128 b) { + // CHECK-LABEL: test_mm_cmp_ps_eq_oq + // CHECK: fcmp oeq <4 x float> %{{.*}}, %{{.*}} + return _mm_cmp_ps(a, b,

[clang] [Clang][Sema][NFC]Use isa_and_nonnull to simplify the code and avoid build warning (PR #84181)

2024-03-06 Thread via cfe-commits
https://github.com/ZERO-N edited https://github.com/llvm/llvm-project/pull/84181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema][NFC]Use isa_and_nonnull to simplify the code (PR #84181)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (ZERO-N) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/84181.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaExceptionSpec.cpp (+3-2) ``diff diff --git a/clang/lib/Sema/SemaExceptionSpec.cpp

[clang] [Clang][Sema][NFC]Use isa_and_nonnull to simplify the code (PR #84181)

2024-03-06 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,

[clang] [Clang][Sema][NFC]Use isa_and_nonnull to simplify the code (PR #84181)

2024-03-06 Thread via cfe-commits
https://github.com/ZERO-N created https://github.com/llvm/llvm-project/pull/84181 None >From 470e3fc13b66d53920f579a7fb848741418e5c0f Mon Sep 17 00:00:00 2001 From: nwh <1416312...@qq.com> Date: Wed, 6 Mar 2024 22:45:59 +0800 Subject: [PATCH] [Clang][Sema][NFC]Use isa_and_nonnull to simplify

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Erich Keane via cfe-commits
@@ -2612,44 +2669,312 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList

[clang] [clang][NFC] Trim license header comments to 81 characters (PR #82919)

2024-03-06 Thread Balazs Benics via cfe-commits
@@ -1,10 +1,10 @@ -//===- unittest/ASTMatchers/Dynamic/VariantValueTest.cpp - VariantValue unit tests -===// +// unittest/ASTMatchers/Dynamic/VariantValueTest.cpp - VariantValue unit tests steakhal wrote: Fixed. https://github.com/llvm/llvm-project/pull/82919

[clang] [clang-repl] Pass triple to IncrementalCompilerBuilder as explicit argument (PR #84174)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Stefan Gränitz (weliveindetail) Changes With out-of-process execution the target triple can be different from the one on the host. We need an interface to configure it. --- Full diff: https://github.com/llvm/llvm-project/pull/84174.diff

[clang] [clang-repl] Pass triple to IncrementalCompilerBuilder as explicit argument (PR #84174)

2024-03-06 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/84174 With out-of-process execution the target triple can be different from the one on the host. We need an interface to configure it. From 767fccd9b2f5badee46aaf8ab9cca5315c538720 Mon Sep 17 00:00:00 2001

[clang] [clang][NFC] Trim license header comments to 81 characters (PR #82919)

2024-03-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/82919 >From 319329630e0d2a86b22dd435985026ea236f8e56 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sun, 25 Feb 2024 12:48:06 +0100 Subject: [PATCH 1/2] [clang][NFC] Trim license header comments to 81 characters

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-06 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz edited https://github.com/llvm/llvm-project/pull/83625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-06 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz edited https://github.com/llvm/llvm-project/pull/83625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Names declared in if conditions and for-init statements are local to the inner context (C++ 3.3.2p4) (PR #84150)

2024-03-06 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= Message-ID: In-Reply-To: @@ -41,3 +40,23 @@ for (; i > 4; --i) { printf("i

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-06 Thread Krzysztof Parzyszek via cfe-commits
@@ -342,4 +359,22 @@ def TDL_DirA : Directive<"dira"> { // IMPL-NEXT:llvm_unreachable("Invalid Tdl Directive kind"); // IMPL-NEXT: } // IMPL-EMPTY: +// IMPL-NEXT: llvm::ArrayRef llvm::tdl::getLeafConstructs(llvm::tdl::Directive Dir) { +// IMPL-NEXT:static

[clang] [clang-repl] Names declared in if conditions and for-init statements are local to the inner context (C++ 3.3.2p4) (PR #84150)

2024-03-06 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: @@ -5676,24 +5676,32 @@ Parser::DeclGroupPtrTy Parser::ParseTopLevelStmtDecl() {

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-06 Thread Erich Keane via cfe-commits
erichkeane wrote: > > > Also, this probably needs a release note. > > > > > > If you want I'll add one but this bug has been on main no longer than a > > week, so I didnt think it would be necessary. > > I see. Yeah, I don’t think we really need one if the bug was introduced and > fixed in

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-06 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/83625 >From b62919c2ce24feb3c75a5bbecce3d6b6ee8e5b7e Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Tue, 16 Jan 2024 16:40:47 -0600 Subject: [PATCH 1/9] [Frontend] Add leaf constructs and association to

[clang] [OpenMP] Parse and Sema support for declare target in local scope (PR #83223)

2024-03-06 Thread Sandeep Kosuri via cfe-commits
https://github.com/sandeepkosuri closed https://github.com/llvm/llvm-project/pull/83223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6d3bb85 - [OpenMP] Parse and Sema support for declare target in local scope (#83223)

2024-03-06 Thread via cfe-commits
Author: Sandeep Kosuri Date: 2024-03-06T19:46:23+05:30 New Revision: 6d3bb854713e43daad34ffc84d0132d7fe010abf URL: https://github.com/llvm/llvm-project/commit/6d3bb854713e43daad34ffc84d0132d7fe010abf DIFF:

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-03-06 Thread via cfe-commits
https://github.com/Discookie updated https://github.com/llvm/llvm-project/pull/84166 >From 704d175fde121edaf962614d8c8d626bf8dbf156 Mon Sep 17 00:00:00 2001 From: Viktor Date: Wed, 6 Mar 2024 14:10:44 + Subject: [PATCH] [clang][dataflow] Add null-check after dereference checker ---

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-06 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/83906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1fc5e50 - [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (#83906)

2024-03-06 Thread via cfe-commits
Author: Joseph Huber Date: 2024-03-06T08:11:54-06:00 New Revision: 1fc5e50cebf1e423bce105930c3a075044998f68 URL: https://github.com/llvm/llvm-project/commit/1fc5e50cebf1e423bce105930c3a075044998f68 DIFF: https://github.com/llvm/llvm-project/commit/1fc5e50cebf1e423bce105930c3a075044998f68.diff

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-06 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz edited https://github.com/llvm/llvm-project/pull/83625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] [SVE] Created intrinsics for DUPQ instr. (PR #83260)

2024-03-06 Thread Momchil Velikov via cfe-commits
@@ -10007,6 +10007,16 @@ multiclass sve2p1_dupq { bits<1> index; let Inst{20} = index; } + + def : SVE_2_Op_Imm_Pat(NAME # _B)>; momchil-velikov wrote: Change them to `_timm`. https://github.com/llvm/llvm-project/pull/83260

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-06 Thread Krzysztof Parzyszek via cfe-commits
@@ -342,4 +359,22 @@ def TDL_DirA : Directive<"dira"> { // IMPL-NEXT:llvm_unreachable("Invalid Tdl Directive kind"); // IMPL-NEXT: } // IMPL-EMPTY: +// IMPL-NEXT: llvm::ArrayRef llvm::tdl::getLeafConstructs(llvm::tdl::Directive Dir) { +// IMPL-NEXT:static

[clang] [clang][Sema] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-06 Thread via cfe-commits
https://github.com/whisperity closed https://github.com/llvm/llvm-project/pull/83279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 63afcbb - [clang][Sema] Bugfix for choosing the more specialized overload (#83279)

2024-03-06 Thread via cfe-commits
Author: Botond István Horváth Date: 2024-03-06T15:03:21+01:00 New Revision: 63afcbbeeaf68751b57acc1f2911afee767d86bb URL: https://github.com/llvm/llvm-project/commit/63afcbbeeaf68751b57acc1f2911afee767d86bb DIFF:

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Timm Baeder via cfe-commits
tbaederr wrote: FWIW I've been tracking test failures by enabling the new interpreter by default and running `ninja check-clang-{ast,sema,semacxx,codegen}` at https://tbaederr.github.io/stats/. With this patch, we're down from 281 to 262 (with only one new failure, `Sema/callingconv-cast.c`).

[clang] [clang][Sema] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-06 Thread via cfe-commits
https://github.com/whisperity approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/83279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Remove duplicate features from mangled name. (PR #84165)

2024-03-06 Thread via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/84165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-06 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 9ec2e0184be423223f6e5b5ba58c3a7224ae1b93 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 1/2] Bugfix for choosing the more specialized overload

[clang] [analyzer] Demonstrate superfluous unsigned >= 0 assumption (PR #78442)

2024-03-06 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: NagyDonat wrote: Thanks for the approval; I forgot about this issue a few weeks ago. Now that you reminded me, I tried to research its cause and dropped a FIXME onto the statement that is not sound logically.

[clang] ae79854 - Update C status page now that Clang 18.x is released

2024-03-06 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-03-06T08:58:04-05:00 New Revision: ae79854e4dcfb923130d3cd751363dbee19cb5b5 URL: https://github.com/llvm/llvm-project/commit/ae79854e4dcfb923130d3cd751363dbee19cb5b5 DIFF: https://github.com/llvm/llvm-project/commit/ae79854e4dcfb923130d3cd751363dbee19cb5b5.diff

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-03-06 Thread Matt Arsenault via cfe-commits
@@ -137,6 +137,12 @@ Removed Compiler Flags Attribute Changes in Clang -- +- Introduced a new function attribute ``__attribute__((amdgpu_max_num_work_groups(x, y, z)))`` or arsenm wrote: s/work_groups/workgroup/

[clang] [Clang] [Sema] No longer diagnose type definitions in `offsetof` in C23 mode (PR #84169)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes This is now allowed in C23; continue to diagnose it in earlier language modes as before, but now as a C23 extension rather than a GNU extension. This fixes #83658. --- Full diff:

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-03-06 Thread Matt Arsenault via cfe-commits
@@ -1312,6 +1312,11 @@ The AMDGPU backend supports the following LLVM IR attributes. the frame. This is an internal detail of how LDS variables are lowered, language front ends should

[clang] [Clang] [Sema] No longer diagnose type definitions in `offsetof` in C23 mode (PR #84169)

2024-03-06 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/84169 This is now allowed in C23; continue to diagnose it in earlier language modes as before, but now as a C23 extension rather than a GNU extension. This fixes #83658. >From

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-03-06 Thread Matt Arsenault via cfe-commits
@@ -494,6 +494,14 @@ MetadataStreamerMsgPackV4::getHSAKernelProps(const MachineFunction , Kern[".max_flat_workgroup_size"] = Kern.getDocument()->getNode(MFI.getMaxFlatWorkGroupSize()); + unsigned NumWGX = MFI.getMaxNumWorkGroupsX(); + unsigned NumWGY =

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -26,60 +26,98 @@ Pointer::Pointer(Block *Pointee) Pointer::Pointer(Block *Pointee, unsigned BaseAndOffset) : Pointer(Pointee, BaseAndOffset, BaseAndOffset) {} -Pointer::Pointer(const Pointer ) : Pointer(P.Pointee, P.Base, P.Offset) {} +Pointer::Pointer(const Pointer )

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -28,11 +28,26 @@ class Block; class DeadBlock; class Pointer; class Context; +template class Integral; enum PrimType : unsigned; class Pointer; inline llvm::raw_ostream <<(llvm::raw_ostream , const Pointer ); +struct BlockPointer { AaronBallman

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -172,72 +217,107 @@ class Pointer { Adjust = sizeof(InitMapPtr); else Adjust = sizeof(InlineDescriptor); - return Pointer(Pointee, Base, Base + getSize() + Adjust); + return Pointer(asBlockPointer().Pointee, asBlockPointer().Base, +

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -26,60 +26,98 @@ Pointer::Pointer(Block *Pointee) Pointer::Pointer(Block *Pointee, unsigned BaseAndOffset) : Pointer(Pointee, BaseAndOffset, BaseAndOffset) {} -Pointer::Pointer(const Pointer ) : Pointer(P.Pointee, P.Base, P.Offset) {} +Pointer::Pointer(const Pointer )

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -123,8 +167,9 @@ APValue Pointer::toAPValue() const { Path.push_back(APValue::LValuePathEntry({BaseOrMember, IsVirtual})); Ptr = Ptr.getBase(); continue; + +llvm_unreachable("Invalid field type"); AaronBallman wrote: Errr...

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -88,6 +126,12 @@ APValue Pointer::toAPValue() const { if (isZero()) return APValue(static_cast(nullptr), CharUnits::Zero(), Path, /*IsOnePastEnd=*/false, /*IsNullPtr=*/true); + if (isIntegralPointer()) { +return APValue(static_cast(nullptr), +

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -809,9 +809,9 @@ inline bool CmpHelperEQ(InterpState , CodePtr OpPC, CompareFn Fn) { // element in the same array are NOT equal. They have the same Base value, // but a different Offset. This is a pretty rare case, so we fix this here // by comparing pointers

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -2180,6 +2201,14 @@ inline bool GetFnPtr(InterpState , CodePtr OpPC, const Function *Func) { return true; } +template ::T> +inline bool GetIntPtr(InterpState , CodePtr OpPC, const Descriptor *Desc) { + const T = S.Stk.pop(); + + S.Stk.push(static_cast(IntVal), Desc);

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -187,6 +195,34 @@ bool ByteCodeExprGen::VisitCastExpr(const CastExpr *CE) { return true; } + case CK_IntegralToPointer: { +QualType IntType = SubExpr->getType(); +assert(IntType->isIntegralOrEnumerationType()); +if (!this->visit(SubExpr)) + return

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -26,60 +26,98 @@ Pointer::Pointer(Block *Pointee) Pointer::Pointer(Block *Pointee, unsigned BaseAndOffset) : Pointer(Pointee, BaseAndOffset, BaseAndOffset) {} -Pointer::Pointer(const Pointer ) : Pointer(P.Pointee, P.Base, P.Offset) {} +Pointer::Pointer(const Pointer )

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -1912,6 +1929,10 @@ inline bool NoRet(InterpState , CodePtr OpPC) { inline bool NarrowPtr(InterpState , CodePtr OpPC) { const Pointer = S.Stk.pop(); + if (!S.getLangOpts().CPlusPlus) { +S.Stk.push(Ptr); AaronBallman wrote: Might be a good idea to

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -1505,12 +1509,17 @@ bool OffsetHelper(InterpState , CodePtr OpPC, const T , return true; } - if (!CheckNull(S, OpPC, Ptr, CSK_ArrayIndex)) -return false; + if (!CheckNull(S, OpPC, Ptr, CSK_ArrayIndex)) { +// The CheckNul will have emitted a note already,

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I think the general direction is pretty reasonable. https://github.com/llvm/llvm-project/pull/84159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Interp] Integral pointers (PR #84159)

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

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -53,6 +57,10 @@ class FunctionPointer final { return toAPValue().getAsString(Ctx, Func->getDecl()->getType()); } + uint32_t getIntegerRepresentation() const { +return static_cast(reinterpret_cast(Func)); + } AaronBallman wrote: This seems

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -26,60 +26,98 @@ Pointer::Pointer(Block *Pointee) Pointer::Pointer(Block *Pointee, unsigned BaseAndOffset) : Pointer(Pointee, BaseAndOffset, BaseAndOffset) {} -Pointer::Pointer(const Pointer ) : Pointer(P.Pointee, P.Base, P.Offset) {} +Pointer::Pointer(const Pointer )

[clang] [clang][Sema] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-06 Thread via cfe-commits
https://github.com/whisperity edited https://github.com/llvm/llvm-project/pull/83279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-06 Thread via cfe-commits
@@ -5548,13 +5493,76 @@ static bool isAtLeastAsSpecializedAs(Sema , FunctionTemplateDecl *Sema::getMoreSpecializedTemplate( FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, -

[clang] [clang][Sema] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-06 Thread via cfe-commits
@@ -5333,38 +5333,37 @@ bool Sema::CheckIfFunctionSpecializationIsImmediate(FunctionDecl *FD, return false; } -/// If this is a non-static member function, -static void -AddImplicitObjectParameterType(ASTContext , - CXXMethodDecl *Method, -

[clang] [clang][Sema] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-06 Thread via cfe-commits
@@ -5568,12 +5576,28 @@ FunctionTemplateDecl *Sema::getMoreSpecializedTemplate( // ... and if G has a trailing function parameter pack for which F does not // have a corresponding parameter, and if F does not have a trailing // function parameter pack, then F is

[clang] [clang][Sema] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-06 Thread via cfe-commits
https://github.com/whisperity requested changes to this pull request. (Only style nits!) https://github.com/llvm/llvm-project/pull/83279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Sema] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-06 Thread via cfe-commits
https://github.com/whisperity edited https://github.com/llvm/llvm-project/pull/83279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 33e3121 - [Clang] Mark papers & core issues implemented in clang 18 as released

2024-03-06 Thread Corentin Jabot via cfe-commits
Author: Corentin Jabot Date: 2024-03-06T14:47:53+01:00 New Revision: 33e312137b065ba330b187f56ddd60df70927241 URL: https://github.com/llvm/llvm-project/commit/33e312137b065ba330b187f56ddd60df70927241 DIFF:

[clang] [CUDA] Correctly set CUDA default architecture (PR #84017)

2024-03-06 Thread Joseph Huber via cfe-commits
@@ -2,56 +2,56 @@ // REQUIRES: nvptx-registered-target // REQUIRES: zlib -// RUN: not %clang -### --target=x86_64-linux-gnu -c %s -g -gz 2>&1 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=sm_52 -nogpulib -nogpuinc -c %s -g -gz 2>&1 \ // RUN: | FileCheck %s

[clang] [clang-repl] Names declared in if conditions and for-init statements are local to the inner context (C++ 3.3.2p4) (PR #84150)

2024-03-06 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Thanks! Added `while` with empty body as well as `switch`. Refined test output a bit, so that it now prints: ``` i = 5 (global scope) i = 1 (while condition) i = 2 (if condition) i = 3 (switch condition) i = 4 (for-init) ``` https://github.com/llvm/llvm-project/pull/84150

[clang] [CUDA] Correctly set CUDA default architecture (PR #84017)

2024-03-06 Thread Jonas Hahnfeld via cfe-commits
@@ -2,56 +2,56 @@ // REQUIRES: nvptx-registered-target // REQUIRES: zlib -// RUN: not %clang -### --target=x86_64-linux-gnu -c %s -g -gz 2>&1 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=sm_52 -nogpulib -nogpuinc -c %s -g -gz 2>&1 \ // RUN: | FileCheck %s

[clang] [clang-tools-extra] [clang][dataflow] Add null-check after dereference checker (PR #84166)

2024-03-06 Thread via cfe-commits
https://github.com/whisperity commented: (@Discookie and I had an extensive prior review at Discookie/llvm-project#1 in case someone is interested in the details.) https://github.com/llvm/llvm-project/pull/84166 ___ cfe-commits mailing list

<    1   2   3   4   5   6   >