[clang] [Clang] Fix Handling of Init Capture with Parameter Packs in LambdaScopeForCallOperatorInstantiationRAII (PR #100766)

2024-08-08 Thread Yupei Liu via cfe-commits
LYP951018 wrote: ping~ https://github.com/llvm/llvm-project/pull/100766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Trivial refactoring of region invalidation (PR #102456)

2024-08-08 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/102456 This commit removes `invalidateRegionsImpl()`, moving its body to `invalidateRegions(ValueList Values, ...)`, because it was a completely useless layer of indirection. Moreover I'm fixing some strange indent

[clang] [analyzer][NFC] Trivial refactoring of region invalidation (PR #102456)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Donát Nagy (NagyDonat) Changes This commit removes `invalidateRegionsImpl()`, moving its body to `invalidateRegions(ValueList Values, ...)`, because it was a completely useless layer of indirection. Moreover I'm fixing some strange inden

[clang] [analyzer][NFC] Trivial refactoring of region invalidation (PR #102456)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Donát Nagy (NagyDonat) Changes This commit removes `invalidateRegionsImpl()`, moving its body to `invalidateRegions(ValueList Values, ...)`, because it was a completely useless layer of indirection. Moreover I'm fixing

[clang] [llvm] [SystemZ][z/OS] __ptr32 support for z/OS (PR #101696)

2024-08-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang,llvm` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/3370 Here is the relevant p

[clang] b8c560f - [CMake] Remove EXPORT_SYMBOLS_FOR_PLUGINS from #102138 (#102396)

2024-08-08 Thread via cfe-commits
Author: Steven Wu Date: 2024-08-08T06:00:11-07:00 New Revision: b8c560f1592648197d01f402dec5592a72d46c96 URL: https://github.com/llvm/llvm-project/commit/b8c560f1592648197d01f402dec5592a72d46c96 DIFF: https://github.com/llvm/llvm-project/commit/b8c560f1592648197d01f402dec5592a72d46c96.diff LOG

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [CMake] Remove EXPORT_SYMBOLS_FOR_PLUGINS from #102138 (PR #102396)

2024-08-08 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan closed https://github.com/llvm/llvm-project/pull/102396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] b8c560f - [CMake] Remove EXPORT_SYMBOLS_FOR_PLUGINS from #102138 (#102396)

2024-08-08 Thread via cfe-commits
Author: Steven Wu Date: 2024-08-08T06:00:11-07:00 New Revision: b8c560f1592648197d01f402dec5592a72d46c96 URL: https://github.com/llvm/llvm-project/commit/b8c560f1592648197d01f402dec5592a72d46c96 DIFF: https://github.com/llvm/llvm-project/commit/b8c560f1592648197d01f402dec5592a72d46c96.diff LOG

[clang] Add flag to suppress overflow errors in C++ constant expressions. (PR #102390)

2024-08-08 Thread via cfe-commits
cor3ntin wrote: I agree with @AaronBallman that, given there hasn't been a lot of outstanding complaints following https://github.com/llvm/llvm-project/pull/70307, we don't want to allow that sort of relaxation of constexpr evaluation as it's both non conforming (and potentially problematic fo

[clang] ea1dee7 - [clang][Interp] Don't diagnose indexing arrays with index 0 (#102454)

2024-08-08 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-08T15:03:03+02:00 New Revision: ea1dee76c7bc88ada21686fb2579a3ed7f284028 URL: https://github.com/llvm/llvm-project/commit/ea1dee76c7bc88ada21686fb2579a3ed7f284028 DIFF: https://github.com/llvm/llvm-project/commit/ea1dee76c7bc88ada21686fb2579a3ed7f284028.diff L

[clang] [clang][Interp] Don't diagnose indexing arrays with index 0 (PR #102454)

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

[clang] [HLSL] Add __is_scalarized_layout_compatible (PR #102227)

2024-08-08 Thread Mital Ashok via cfe-commits
MitalAshok wrote: Is this the expected behaviour: ```c++ struct EmptyPadding : Empty { Empty e; int X; }; struct Repeated : Empty, DerivedEmpty { int X; }; // expected-warning {{inaccessible due to ambiguity}} _Static_assert(sizeof(EmptyPadding) == 8, ""); _Static_assert(sizeof(Repeated) == 8,

[clang] [libcxx] [Clang] Implement CWG2137 (list-initialization from objects of the same type) (PR #94355)

2024-08-08 Thread via cfe-commits
cor3ntin wrote: @MitalAshok Feel free to merge :) https://github.com/llvm/llvm-project/pull/94355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix smart pointers handling in bugprone-use-after-move (PR #94869)

2024-08-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/94869 >From 51e3a4bb1601157416f543ba2a8ba193876ce595 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Tue, 16 Jul 2024 18:34:25 + Subject: [PATCH 1/2] [clang-tidy] Fix smart pointers handling in bugprone-use-afte

[clang-tools-extra] [clang-tidy] Fix smart pointers handling in bugprone-use-after-move (PR #94869)

2024-08-08 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: @martinboehme _"I suggested that if we wanted to change the default behavior, we should survey users to see what their opinions / preferences are. Have you done this? If not, I think the default behavior (when the option is not set) should remain unchanged."_ Nope, there is n

[clang] [llvm] [RISCV] Add Hazard3 CPU (PR #102452)

2024-08-08 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: It looks like a toy project :( The RTL design is not frozen. https://github.com/llvm/llvm-project/pull/102452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Fall back to dummy pointers if createGlobal() fails (PR #102464)

2024-08-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/102464 createGlobal fails e.g. if the type isn't complete. >From b945bf23c12fc54c6a256507c815fee19fbac655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 8 Aug 2024 15:08:46 +0200 Subject: [PA

[clang] [clang][Interp] Fall back to dummy pointers if createGlobal() fails (PR #102464)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes createGlobal fails e.g. if the type isn't complete. --- Full diff: https://github.com/llvm/llvm-project/pull/102464.diff 3 Files Affected: - (modified) clang/lib/AST/Interp/Compiler.cpp (+11-7) - (modifie

[clang] [clang][Interp] Fall back to dummy pointers if createGlobal() fails (PR #102464)

2024-08-08 Thread Mital Ashok via cfe-commits
MitalAshok wrote: ```c++ struct Foo; struct Bar { static const Foo x; static const Foo y; }; static_assert(&Bar::x != nullptr, ""); // both-warning {{always true}} static_assert(&Bar::x != &Bar::y, ""); constexpr const Foo* xp = &Bar::x; struct Foo {}; static_assert(xp == &Bar::x); // This f

[clang] [llvm] [SystemZ][z/OS] __ptr32 support for z/OS (PR #101696)

2024-08-08 Thread Nikita Popov via cfe-commits
@@ -2727,6 +2727,8 @@ void CXXNameMangler::mangleQualifiers(Qualifiers Quals, const DependentAddressSp //::= U //::= U +llvm::Triple Triple = getASTContext().getTargetInfo().getTriple(); nikic wrote: const reference both here and below?

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-08-08 Thread via cfe-commits
yronglin wrote: friendly ping~ https://github.com/llvm/llvm-project/pull/97308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Remove unnecessary copy of Triple in ItaniumMangle.cpp (PR #102469)

2024-08-08 Thread Abhina Sree via cfe-commits
https://github.com/abhina-sree created https://github.com/llvm/llvm-project/pull/102469 Remove unnecessary copy of Triple in ItaniumMangle.cpp >From e5139d8079471ac6e6f0d76f36ed7ef593fff1b7 Mon Sep 17 00:00:00 2001 From: Abhina Sreeskantharajan Date: Thu, 8 Aug 2024 09:57:03 -0400 Subject: [PA

[clang] [NFC] Remove unnecessary copy of Triple in ItaniumMangle.cpp (PR #102469)

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

[clang-tools-extra] create new clang-tidy check to add namespaces to symbol references (PR #70621)

2024-08-08 Thread via cfe-commits
@@ -0,0 +1,220 @@ +// RUN: %check_clang_tidy %s readability-use-explicit-namespaces %t + +namespace foo { +void doSomething() {} + +template void doTemplateThing(T &value) { value = value * 2; } + +struct StructTest { + int StructIntMember; +}; + +class ClassTest { +public: + i

[clang] [llvm] [SystemZ][z/OS] __ptr32 support for z/OS (PR #101696)

2024-08-08 Thread Abhina Sree via cfe-commits
@@ -2727,6 +2727,8 @@ void CXXNameMangler::mangleQualifiers(Qualifiers Quals, const DependentAddressSp //::= U //::= U +llvm::Triple Triple = getASTContext().getTargetInfo().getTriple(); abhina-sree wrote: Thanks for catching, I fixed t

[clang] [NFC] Remove unnecessary copy of Triple in ItaniumMangle.cpp (PR #102469)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Abhina Sree (abhina-sree) Changes Remove unnecessary copy of Triple --- Full diff: https://github.com/llvm/llvm-project/pull/102469.diff 1 Files Affected: - (modified) clang/lib/AST/ItaniumMangle.cpp (+1-3) ``diff diff --git

[clang] #101784 part 2: fix error handling of TranslationUnit.reparse (PR #102410)

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

[clang] #101784 part 2: fix error handling of TranslationUnit.reparse (PR #102410)

2024-08-08 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: Thanks for this change! Looks good to me, aside from a few minor comments, most importantly a release note. Generally: for PR titles, a prefix ala "[libclang/python]" woud be good to denote the component or area of the code base, and empty description

[clang] #101784 part 2: fix error handling of TranslationUnit.reparse (PR #102410)

2024-08-08 Thread Jannick Kremer via cfe-commits
@@ -152,6 +152,41 @@ def b(x: str | bytes) -> bytes: ### Exception Classes ### +class CXError(Exception): +'''Represents C error of type enum CXErrorCode.''' + +# A generic error code, no further details are available. +# +# Errors of this kind can get their o

[clang] #101784 part 2: fix error handling of TranslationUnit.reparse (PR #102410)

2024-08-08 Thread Jannick Kremer via cfe-commits
@@ -3263,9 +3298,11 @@ def reparse(self, unsaved_files=None, options=0): unsaved_files = [] unsaved_files_array = self.process_unsaved_files(unsaved_files) -ptr = conf.lib.clang_reparseTranslationUnit( +result = conf.lib.clang_reparseTransla

[clang] #101784 part 2: fix error handling of TranslationUnit.reparse (PR #102410)

2024-08-08 Thread Jannick Kremer via cfe-commits
@@ -152,6 +152,41 @@ def b(x: str | bytes) -> bytes: ### Exception Classes ### +class CXError(Exception): DeinAlptraum wrote: We already have a similar case with the bindings' `CXSaveError` for `clang_saveTranslationUnit` on the C side, for which we've impl

[clang] #101784 part 2: fix error handling of TranslationUnit.reparse (PR #102410)

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

[clang] [NFC] Remove unnecessary copy of Triple in ItaniumMangle.cpp (PR #102469)

2024-08-08 Thread Nikita Popov via cfe-commits
nikic wrote: Could you please also adjust the other use in https://github.com/llvm/llvm-project/pull/101696/files#diff-e0ad0cd86168ae6b1bdbc14d96dce7bd4de45ec1da69b9ac18dacb7adf1e453cR7060? https://github.com/llvm/llvm-project/pull/102469 ___ cfe-comm

[clang] [Clang][Interp] Fix display of syntactically-invalid note for member function calls (PR #102170)

2024-08-08 Thread via cfe-commits
@@ -198,11 +198,11 @@ def NoRet : Opcode {} def Call : Opcode { - let Args = [ArgFunction, ArgUint32]; + let Args = [ArgFunction, ArgUint32, ArgExpr]; yronglin wrote: Yeah, it's might be a `CXXConstructExpr` or `CXXInheritedCtorInitExpr`, for this reason,

[clang] [Clang][Interp] Fix display of syntactically-invalid note for member function calls (PR #102170)

2024-08-08 Thread via cfe-commits
@@ -67,15 +68,19 @@ struct Bar { template constexpr int fail2() const { return 1 / 0; } // expected-warning {{division by zero}} \ // expected-note {{division by zero}} +#ifndef NEW_CONST_INTERP template constexpr in

[clang] [Clang][Interp] Fix display of syntactically-invalid note for member function calls (PR #102170)

2024-08-08 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/102170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] #101784 part 2: fix error handling of TranslationUnit.reparse (PR #102410)

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

[clang] [Clang][Interp] Fix display of syntactically-invalid note for member function calls (PR #102170)

2024-08-08 Thread via cfe-commits
@@ -67,15 +68,19 @@ struct Bar { template constexpr int fail2() const { return 1 / 0; } // expected-warning {{division by zero}} \ // expected-note {{division by zero}} +#ifndef NEW_CONST_INTERP template constexpr in

[clang] #101784 part 2: fix error handling of TranslationUnit.reparse (PR #102410)

2024-08-08 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 98e4413a38f286147b863a6ead9625228ab0ec7d...c11dcf93d924eb9347d4cc9833c8b684920dfba0 clang

[clang] [NFC] Remove unnecessary copy of Triple in ItaniumMangle.cpp (PR #102469)

2024-08-08 Thread Abhina Sree via cfe-commits
https://github.com/abhina-sree updated https://github.com/llvm/llvm-project/pull/102469 >From e5139d8079471ac6e6f0d76f36ed7ef593fff1b7 Mon Sep 17 00:00:00 2001 From: Abhina Sreeskantharajan Date: Thu, 8 Aug 2024 09:57:03 -0400 Subject: [PATCH 1/2] [NFC] Remove unnecessary copy of Triple in Ita

[clang] [NFC] Remove unnecessary copy of Triples (PR #102469)

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

[clang] [NFC] Remove unnecessary copy of Triples (PR #102469)

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

[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-08 Thread via cfe-commits
@@ -0,0 +1,34 @@ +.. title:: clang-tidy - bugprone-incorrect-enable-shared-from-this + +bugprone-incorrect-enable-shared-from-this +=== + +Check if class/struct publicly derives from ``std::enable_shared_from_this``, +because otherwise when ``sh

[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-08 Thread via cfe-commits
@@ -0,0 +1,96 @@ +//===--- IncorrectEnableSharedFromThisCheck.cpp - clang-tidy +//-===// EugeneZelenko wrote: Please merge to previous line. See other checks as example. https://github.com/llvm/llvm-project/pull/102299 ___

[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-08 Thread via cfe-commits
@@ -0,0 +1,96 @@ +//===--- IncorrectEnableSharedFromThisCheck.cpp - clang-tidy +//-===// +// +// 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-Id

[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-08 Thread via cfe-commits
@@ -0,0 +1,57 @@ +// RUN: %check_clang_tidy %s bugprone-incorrect-enable-shared-from-this %t -- -- + +namespace std { +template class enable_shared_from_this {}; +} //namespace std + +class BadClassExample : std::enable_shared_from_this {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7

[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-08 Thread via cfe-commits
@@ -0,0 +1,96 @@ +//===--- IncorrectEnableSharedFromThisCheck.cpp - clang-tidy +//-===// +// +// 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-Id

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-08-08 Thread via cfe-commits
@@ -38,3 +38,14 @@ Example: This check implements `F.19 `_ from the C++ Core Guidelines. + + +Options +--- + +.. option:: IgnoreStaticCasts + + Boolean flag to allow users who want to use the forwardi

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-08-08 Thread via cfe-commits
https://github.com/EugeneZelenko edited https://github.com/llvm/llvm-project/pull/99477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Remove unnecessary copy of Triples (PR #102469)

2024-08-08 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/102469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add `__builtin_experimental_vectorcompress` (PR #102476)

2024-08-08 Thread Lawrence Benson via cfe-commits
https://github.com/lawben created https://github.com/llvm/llvm-project/pull/102476 This PR exposes the new `@llvm.experimental.vector.compress` intrinsic to Clang, so it can be called from C/C++. TODO: Add Docs and Release note if people are fine with this addition. >From 40e7eca608e7f8cfe87

[clang] [Clang] Add `__builtin_experimental_vectorcompress` (PR #102476)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Lawrence Benson (lawben) Changes This PR exposes the new `@llvm.experimental.vector.compress` intrinsic to Clang, so it can be called from C/C++. TODO: Add Docs and Release note if people are fine with this addition. --- Full diff: http

[clang] fdf8e3e - [Modules][Diagnostic] Mention which AST file's options differ from the current TU options. (#101413)

2024-08-08 Thread via cfe-commits
Author: Volodymyr Sapsai Date: 2024-08-08T11:23:47-03:00 New Revision: fdf8e3e31103bc81917cdb27150877f524bb2669 URL: https://github.com/llvm/llvm-project/commit/fdf8e3e31103bc81917cdb27150877f524bb2669 DIFF: https://github.com/llvm/llvm-project/commit/fdf8e3e31103bc81917cdb27150877f524bb2669.di

[clang] [Modules][Diagnostic] Mention which AST file's options differ from the current TU options. (PR #101413)

2024-08-08 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/101413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Hazard3 CPU (PR #102452)

2024-08-08 Thread Michael Maitland via cfe-commits
michaelmaitland wrote: There was a prior discussion about what designs should go in. The initial quote from @asb was: > it's obvious that commercial designs with active support should go in, and > that some core design I hacked up over a weekend shouldn't but we haven't had > the need to disc

[clang] [analyzer][NFC] Improve documentation of `invalidateRegion` methods (PR #102477)

2024-08-08 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/102477 ... within the classes `StoreManager` and `ProgramState` and describe the connection between the two methods. From 4faf523b8f7dc6e343082649867664b1439789de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=

[clang] [analyzer][NFC] Improve documentation of `invalidateRegion` methods (PR #102477)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Donát Nagy (NagyDonat) Changes ... within the classes `StoreManager` and `ProgramState` and describe the connection between the two methods. --- Full diff: https://github.com/llvm/llvm-project/pull/102477.diff 2 Files

[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)

2024-08-08 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Sorry about the delay! I was on break. Thanks for the comments @AaronBallman and @cor3ntin ! > I think it would make sense to revert this and the original patch (so there's > no #pragma mc_func support in Clang 19.x or main at all) so we can take a > fresh run at a new PR to

[clang] [Clang][Interp] Fix display of syntactically-invalid note for member function calls (PR #102170)

2024-08-08 Thread Timm Baeder via cfe-commits
@@ -198,11 +198,11 @@ def NoRet : Opcode {} def Call : Opcode { - let Args = [ArgFunction, ArgUint32]; + let Args = [ArgFunction, ArgUint32, ArgExpr]; tbaederr wrote: As you can see in the snippet I posted, you get an `Expr*` anyway, so you can check for

[clang] [Clang][Interp] Fix display of syntactically-invalid note for member function calls (PR #102170)

2024-08-08 Thread Timm Baeder via cfe-commits
@@ -67,15 +68,19 @@ struct Bar { template constexpr int fail2() const { return 1 / 0; } // expected-warning {{division by zero}} \ // expected-note {{division by zero}} +#ifndef NEW_CONST_INTERP template constexpr in

[clang] #101784 part 1: introduce ctyped in an independent manner (PR #101941)

2024-08-08 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll thanks a lot for the summary! Turning this into documentation also sounds like a good idea. 15\. & 16. fully agree it would be nicer to go without using this `errcheck` functionality, and just call the conversion functions directly. Even if the documentation appro

[clang] [Clang][Interp] Fix display of syntactically-invalid note for member function calls (PR #102170)

2024-08-08 Thread Timm Baeder via cfe-commits
@@ -67,15 +68,19 @@ struct Bar { template constexpr int fail2() const { return 1 / 0; } // expected-warning {{division by zero}} \ // expected-note {{division by zero}} +#ifndef NEW_CONST_INTERP template constexpr in

[clang] [Clang][Interp] Fix display of syntactically-invalid note for member function calls (PR #102170)

2024-08-08 Thread Timm Baeder via cfe-commits
@@ -67,15 +68,19 @@ struct Bar { template constexpr int fail2() const { return 1 / 0; } // expected-warning {{division by zero}} \ // expected-note {{division by zero}} +#ifndef NEW_CONST_INTERP template constexpr in

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [CMake] Remove EXPORT_SYMBOLS_FOR_PLUGINS from #102138 (PR #102396)

2024-08-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot1` while building `clang-tools-extra,clang,flang,lld,llvm,mlir` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/263

[clang] [Clang][AST][NFC] Store template parameter position for TemplateTypeParmType in TypeBit (PR #102481)

2024-08-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/102481 `TemplateTypeParmType` currently stores the depth, index, and whether a template type parameter is a pack in a union of `CanonicalTTPTInfo` and `TemplateTypeParmDecl*`, and only the canonical type stores the

[clang] [Clang][AST][NFC] Store template parameter position for TemplateTypeParmType in TypeBit (PR #102481)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes `TemplateTypeParmType` currently stores the depth, index, and whether a template type parameter is a pack in a union of `CanonicalTTPTInfo` and `TemplateTypeParmDecl*`, and only the canonical type

[clang] [Clang] Simplify specifying passes via -Xoffload-linker (PR #102483)

2024-08-08 Thread Joel E. Denny via cfe-commits
https://github.com/jdenny-ornl created https://github.com/llvm/llvm-project/pull/102483 Make it possible to do things like the following, regardless of whether `$GPU_ARCH` is for nvptx or amdgpu: ``` $ clang -O1 -g -fopenmp -fopenmp-targets=$GPU_ARCH test.c \ -Xoffload-lin

[clang] [Clang] Simplify specifying passes via -Xoffload-linker (PR #102483)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Joel E. Denny (jdenny-ornl) Changes Make it possible to do things like the following, regardless of whether `$GPU_ARCH` is for nvptx or amdgpu: ``` $ clang -O1 -g -fopenmp -fopenmp-targets=$GPU_ARCH test.

[clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-08 Thread Dmitri Gribenko via cfe-commits
gribozavr wrote: @mizvekov I will provide a more detailed response to the points you made in your last message separately, but for now I would like to ask you to revert the commit to unbreak us. We looked into the problem internally and it does not look we have a simple hack we can apply to r

[clang] [re-format][Modules] Follow-up formatting to "Mention which AST file's options differ from the current TU options." (PR #102484)

2024-08-08 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/102484 Fix formatting for fdf8e3e31103bc81917cdb27150877f524bb2669. >From 4083dcf794e2a3d27966090e955433361b733ff8 Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Thu, 8 Aug 2024 11:51:53 -0300 Subject: [PATCH]

[clang] [Clang] Simplify specifying passes via -Xoffload-linker (PR #102483)

2024-08-08 Thread Joseph Huber via cfe-commits
@@ -527,9 +527,11 @@ Expected clang(ArrayRef InputFiles, const ArgList &Args) { // Forward all of the `--offload-opt` and similar options to the device. if (linkerSupportsLTO(Args)) { -for (auto &Arg : Args.filtered(OPT_offload_opt_eq_minus, OPT_mllvm)) +for (auto

[clang] [Clang] Simplify specifying passes via -Xoffload-linker (PR #102483)

2024-08-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Thanks! One nit. https://github.com/llvm/llvm-project/pull/102483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Simplify specifying passes via -Xoffload-linker (PR #102483)

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

[clang] [re-format][Modules] Follow-up formatting to "Mention which AST file's options differ from the current TU options." (PR #102484)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Volodymyr Sapsai (vsapsai) Changes Fix formatting for fdf8e3e31103bc81917cdb27150877f524bb2669. --- Patch is 43.45 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/102484.diff 4 Files A

[clang] [libcxx] [Clang] Implement CWG2137 (list-initialization from objects of the same type) (PR #94355)

2024-08-08 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @cor3ntin Could you merge this for me please? Thanks https://github.com/llvm/llvm-project/pull/94355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [re-format][Modules] Follow-up formatting to "Mention which AST file's options differ from the current TU options." (PR #102484)

2024-08-08 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/102484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4357175 - [re-format][Modules] Follow-up formatting to "Mention which AST file's options differ from the current TU options." (#102484)

2024-08-08 Thread via cfe-commits
Author: Volodymyr Sapsai Date: 2024-08-08T11:59:47-03:00 New Revision: 435717556908a79748de22c21e3a0ee06a933036 URL: https://github.com/llvm/llvm-project/commit/435717556908a79748de22c21e3a0ee06a933036 DIFF: https://github.com/llvm/llvm-project/commit/435717556908a79748de22c21e3a0ee06a933036.di

[clang] [Modules][Diagnostic] Mention which AST file's options differ from the current TU options. (PR #101413)

2024-08-08 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: Formatting change was #102484. https://github.com/llvm/llvm-project/pull/101413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Simplify specifying passes via -Xoffload-linker (PR #102483)

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

[clang] a760df3 - [Clang] Implement CWG2137 (list-initialization from objects of the same type) (#94355)

2024-08-08 Thread via cfe-commits
Author: Mital Ashok Date: 2024-08-08T11:11:21-04:00 New Revision: a760df316510fc56576d0934f33577a4ce64b146 URL: https://github.com/llvm/llvm-project/commit/a760df316510fc56576d0934f33577a4ce64b146 DIFF: https://github.com/llvm/llvm-project/commit/a760df316510fc56576d0934f33577a4ce64b146.diff L

[clang] [libcxx] [Clang] Implement CWG2137 (list-initialization from objects of the same type) (PR #94355)

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

[clang] [Clang] Simplify specifying passes via -Xoffload-linker (PR #102483)

2024-08-08 Thread Joel E. Denny via cfe-commits
https://github.com/jdenny-ornl updated https://github.com/llvm/llvm-project/pull/102483 >From 9e8a8e78f3014324d8aa35dd1615b3f5720a5cb4 Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Wed, 7 Aug 2024 19:10:33 -0400 Subject: [PATCH 1/2] [Clang] Simplify specifying passes via -Xoffload-linker

[clang] [Clang][Interp] Fix display of syntactically-invalid note for member function calls (PR #102170)

2024-08-08 Thread via cfe-commits
@@ -198,11 +198,11 @@ def NoRet : Opcode {} def Call : Opcode { - let Args = [ArgFunction, ArgUint32]; + let Args = [ArgFunction, ArgUint32, ArgExpr]; yronglin wrote: Thanks for your guidance! I've try in my local, it' caused 6 test failures. ```diff diff

[clang] [Clang] Simplify specifying passes via -Xoffload-linker (PR #102483)

2024-08-08 Thread Joel E. Denny via cfe-commits
@@ -527,9 +527,11 @@ Expected clang(ArrayRef InputFiles, const ArgList &Args) { // Forward all of the `--offload-opt` and similar options to the device. if (linkerSupportsLTO(Args)) { -for (auto &Arg : Args.filtered(OPT_offload_opt_eq_minus, OPT_mllvm)) +for (auto

[clang] [clang][ASTMatcher] Add `matchesString` for `StringLiteral` which matches literals on given `RegExp` (PR #102152)

2024-08-08 Thread Aaron Ballman via cfe-commits
@@ -2503,6 +2503,25 @@ TEST_P(ASTMatchersTest, IsDelegatingConstructor) { cxxConstructorDecl(isDelegatingConstructor(), parameterCountIs(1; } +TEST_P(ASTMatchersTest, MatchesString) { + StatementMatcher Literal = stringLiteral(matchesString("foo.*")); + EXPECT_TRUE

[clang] [Clang][Interp] Fix display of syntactically-invalid note for member function calls (PR #102170)

2024-08-08 Thread via cfe-commits
@@ -67,15 +68,19 @@ struct Bar { template constexpr int fail2() const { return 1 / 0; } // expected-warning {{division by zero}} \ // expected-note {{division by zero}} +#ifndef NEW_CONST_INTERP template constexpr in

[clang] [clang] Turn -Wenum-constexpr-conversion into a hard error (PR #102364)

2024-08-08 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: CC @thesamesam @mgorny (and anyone else who wants to chime in) for opinions on whether this change will cause significant issues for distro maintainers https://github.com/llvm/llvm-project/pull/102364 ___ cfe-commits mailing list c

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2024-08-08 Thread Manuel Pietsch via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang] [clang][HLSL] Add sign intrinsic part 3 (PR #101989)

2024-08-08 Thread Tim Gymnich via cfe-commits
https://github.com/tgymnich updated https://github.com/llvm/llvm-project/pull/101989 >From c7f7a3683805c6a9a1d696905321a1e161ec8beb Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Fri, 2 Aug 2024 21:40:24 +0200 Subject: [PATCH 1/2] [clang][HLSL] Add sign intrinsic part 3 --- clang/include/cl

[clang] [clang][HLSL] Add sign intrinsic part 3 (PR #101989)

2024-08-08 Thread Tim Gymnich via cfe-commits
@@ -916,7 +916,7 @@ float4 lerp(float4, float4, float4); /// \brief Returns the length of the specified floating-point vector. /// \param x [in] The vector of floats, or a scalar float. /// -/// Length is based on the following formula: sqrt(x[0]^2 + x[1]^2 + �). +/// Length is

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [CMake] Remove EXPORT_SYMBOLS_FOR_PLUGINS from #102138 (PR #102396)

2024-08-08 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: That looks an unstable test the has been failed before. https://github.com/llvm/llvm-project/pull/102396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3e71357 - [PPC] Disable vsx and altivec when -msoft-float is used (#100450)

2024-08-08 Thread via cfe-commits
Author: Zaara Syeda Date: 2024-08-08T12:27:26-04:00 New Revision: 3e7135750cfe41e8b093e19ce5b85ad937e064fd URL: https://github.com/llvm/llvm-project/commit/3e7135750cfe41e8b093e19ce5b85ad937e064fd DIFF: https://github.com/llvm/llvm-project/commit/3e7135750cfe41e8b093e19ce5b85ad937e064fd.diff L

[clang] [PPC] Disable vsx and altivec when -msoft-float is used (PR #100450)

2024-08-08 Thread Zaara Syeda via cfe-commits
https://github.com/syzaara closed https://github.com/llvm/llvm-project/pull/100450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-08 Thread Nathan James via cfe-commits
njames93 wrote: > > How are classes that derive other classes that implement > > `enable_shared_from_this` > > > > ```c++ > > class A : public std::enable_shared_from_this {}; > > class B : private A{}; > > ``` > > Looking at the AST dump that clang-check gives, it seems that B doesn't have >

[clang] [llvm] [RISCV] Add Hazard3 CPU (PR #102452)

2024-08-08 Thread Sam Elliott via cfe-commits
lenary wrote: I am happy to be point person on maintaining this core definition in LLVM, I communicate regularly with Luke, the core designer. As for the core itself, it's obviously maintained by Luke, and as Alex points out, it's just been announced to be in commercial products released by R

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-08-08 Thread via cfe-commits
skc7 wrote: > @vitalybuka @nikic Let me know if anything needs to be changed in this PR? > Else, will merge the PR after approval. Please review. https://github.com/llvm/llvm-project/pull/99439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [DebugInfo][RemoveDIs] Use iterator-inserters in clang (PR #102006)

2024-08-08 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse updated https://github.com/llvm/llvm-project/pull/102006 >From cf967317327aa3971da62a15f357ee5b29268f14 Mon Sep 17 00:00:00 2001 From: Jeremy Morse Date: Mon, 5 Aug 2024 16:21:53 +0100 Subject: [PATCH 1/2] [DebugInfo][RemoveDIs] Use iterator-inserters in clang As part

[clang] [llvm] [AArch64] Add FEAT_SME_B16B16 and remove FEAT_B16B16 (PR #102501)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: None (SpencerAbson) Changes Implement FEAT_SME_B16B16 to enable ZA-targeting non-widening SME BFloat16 instructions. Remove the now redundant FEAT_B16B16 which has been replaced by FEAT_SVE_B16B16 and FEAT_SME_B16B16 (this commit), see http

[clang] [llvm] [RISCV] Add Hazard3 CPU (PR #102452)

2024-08-08 Thread Sam Elliott via cfe-commits
lenary wrote: I do have some worries about the definition as-is, as the core in the repo has optional features (configurable at tape-out time). Reading the RP2350 datasheet, not all of the optional features for Hazard3 are enabled (and I'm of the opinion that the lack of arm-like `-mcpu=++no`

[clang] [llvm] [AArch64] Add FEAT_SME_B16B16 and remove FEAT_B16B16 (PR #102501)

2024-08-08 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 a0ed7d6c5fa1438983ee2c1ad25fbb53644d5eba 25e0bec990d0fc1b4c7faab4152adc2e18034661 --e

<    1   2   3   4   5   >