[clang] 737c414 - Revert "[clang][flang][mlir] Support -frecord-command-line option (#102975)"

2024-09-20 Thread David Spickett via cfe-commits
Author: David Spickett Date: 2024-09-20T11:30:50Z New Revision: 737c414e1d9578e5037e68e3b3f6ddea507f8243 URL: https://github.com/llvm/llvm-project/commit/737c414e1d9578e5037e68e3b3f6ddea507f8243 DIFF: https://github.com/llvm/llvm-project/commit/737c414e1d9578e5037e68e3b3f6ddea507f8243.diff LOG

[clang] [clang-tools-extra] [clang][NFC] Fix example code for memberPointerType() AST matcher (PR #109403)

2024-09-20 Thread via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Carlos Galvez (carlosgalvezp) Changes The example code doesn't compile otherwise. --- Full diff: https://github.com/llvm/llvm-project/pull/109403.diff 9 Files Affected:

[clang] [clang-tools-extra] [clang][NFC] Fix example code for memberPointerType() AST matcher (PR #109403)

2024-09-20 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/109403 The example code doesn't compile otherwise. >From 6916d5ecdc327b2771fbbca226095bd99d394dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lv

[clang] [clang][NFC] Fix example code for memberPointerType() AST matcher (PR #109404)

2024-09-20 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/109404 The example code doesn't compile otherwise. >From f598e98d4deb66a313b7f944cb96df04bc4b91a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Fri, 20 Sep 2024 11:32:07 + Subject: [P

[clang] [clang-tools-extra] [clang][NFC] Fix example code for memberPointerType() AST matcher (PR #109403)

2024-09-20 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/109403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang][NFC] Fix example code for memberPointerType() AST matcher (PR #109404)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Carlos Galvez (carlosgalvezp) Changes The example code doesn't compile otherwise. --- Full diff: https://github.com/llvm/llvm-project/pull/109404.diff 2 Files Affected: - (modified) clang/docs/LibASTMatchersReference.html (+2-4) - (mod

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

2024-09-20 Thread David Spickett via cfe-commits
DavidSpickett wrote: I've had to revert this due to the failures listed above. To reproduce, configure with `-DBUILD_SHARED_LIBS=ON`. (the other 2 bots are not called shared libs but they do enable this setting too) ``` $ ./bin/bbc : CommandLine Error: Option 'fdynamic-heap-array' registered

[clang] [clang-format] Correctly annotate pointer/reference in range-for loop (PR #109361)

2024-09-20 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/109361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][NFC] Fix example code for memberPointerType() AST matcher (PR #109403)

2024-09-20 Thread Julian Schmidt via cfe-commits
Carlos =?utf-8?q?G=C3=A1lvez?= Message-ID: In-Reply-To: 5chmidti wrote: FYI this should be fixed by #94248 https://github.com/llvm/llvm-project/pull/109403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [llvm] [clang][wasm] Replace the target integer sub saturate intrinsics with the equivalent generic `__builtin_elementwise_sub_sat` intrinsics (PR #109405)

2024-09-20 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/109405 Remove the Intrinsic::wasm_sub_sat_signed/wasm_sub_sat_unsigned entries and just use sub_sat_s/sub_sat_u directly >From a2d179a10a5a0c9eb1baa7fba82ec0944622619e Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Dat

[clang] [clang][NFC] Fix example code for memberPointerType() AST matcher (PR #109404)

2024-09-20 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 b8b8fbe19dea2825b801c4738ff78dbf26aae430 66c089307601a52f5247a43f18ed4b29ea1a7599 --e

[clang] [llvm] [clang][wasm] Replace the target integer sub saturate intrinsics with the equivalent generic `__builtin_elementwise_sub_sat` intrinsics (PR #109405)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Simon Pilgrim (RKSimon) Changes Remove the Intrinsic::wasm_sub_sat_signed/wasm_sub_sat_unsigned entries and just use sub_sat_s/sub_sat_u directly --- Full diff: https://github.com/llvm/llvm-project/pull/109405.diff 8 Files Affected:

[clang] [llvm] [clang][wasm] Replace the target integer sub saturate intrinsics with the equivalent generic `__builtin_elementwise_sub_sat` intrinsics (PR #109405)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Simon Pilgrim (RKSimon) Changes Remove the Intrinsic::wasm_sub_sat_signed/wasm_sub_sat_unsigned entries and just use sub_sat_s/sub_sat_u directly --- Full diff: https://github.com/llvm/llvm-project/pull/

[clang] [llvm] [clang][wasm] Replace the target integer sub saturate intrinsics with the equivalent generic `__builtin_elementwise_sub_sat` intrinsics (PR #109405)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Simon Pilgrim (RKSimon) Changes Remove the Intrinsic::wasm_sub_sat_signed/wasm_sub_sat_unsigned entries and just use sub_sat_s/sub_sat_u directly --- Full diff: https://github.com/llvm/llvm-project/pull/109405.diff 8 Files Affecte

[clang] Reapply "[Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (#104458)" (PR #109422)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes Reapplies #104458, fixing a bug that occurs when a templated class declares `operator->` to return a non-dependent class type. --- Full diff: https://github.com/llvm/llvm-project/pull/109422.diff

[clang] [clang-repl] Simplify the value printing logic to enable out-of-process. (PR #107737)

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

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

2024-09-20 Thread Rainer Orth via cfe-commits
https://github.com/rorth updated https://github.com/llvm/llvm-project/pull/109278 >From 9123b7eae524418d0a671ac2114ddea2b2cf9695 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 19 Sep 2024 14:46:54 +0200 Subject: [PATCH 1/2] [Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 W

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

2024-09-20 Thread Rainer Orth via cfe-commits
https://github.com/rorth updated https://github.com/llvm/llvm-project/pull/109278 >From 9123b7eae524418d0a671ac2114ddea2b2cf9695 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 19 Sep 2024 14:46:54 +0200 Subject: [PATCH 1/2] [Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 W

[clang] Reapply "[Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (#104458)" (PR #109422)

2024-09-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/109422 Reapplies #104458, fixing a bug that occurs when a templated class declares `operator->` to return a non-dependent class type. >From d1b0cad696cca10c28ba32c290bc220ee917b48d Mon Sep 17 00:00:00 2001 From: Kr

[clang-tools-extra] [clangd] Improve robustness when clang-tidy check names contain leading spaces. (PR #109421)

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

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

2024-09-20 Thread Congcong Cai via cfe-commits
@@ -38,7 +38,9 @@ AST_MATCHER(Type, sugaredNullptrType) { StatementMatcher makeCastSequenceMatcher(llvm::ArrayRef NameList) { auto ImplicitCastToNull = implicitCastExpr( anyOf(hasCastKind(CK_NullToPointer), hasCastKind(CK_NullToMemberPointer)), - unless(hasImplic

[clang] [clang][ExprConst] Explicitly reject dependent types without diagnostic (PR #108598)

2024-09-20 Thread via cfe-commits
cor3ntin wrote: I don't think there is much value in changing the status quo here. There is evidently a bug somewhere before that code that we should find instead (and then we can replace the existing code by an assert) https://github.com/llvm/llvm-project/pull/108598

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

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

[clang] [Clang][SME2] Use tuple result of SME builtins directly. (PR #109423)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Paul Walker (paulwalker-arm) Changes I missed a codepath during PR108008 so SME2/SVE2p1 builtins are converting their struct return type into a large vector, which is causing unnecessary casting via memory. --- Patch is 2.20 MiB

[clang] [Clang][SME2] Use tuple result of SME builtins directly. (PR #109423)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Paul Walker (paulwalker-arm) Changes I missed a codepath during PR108008 so SME2/SVE2p1 builtins are converting their struct return type into a large vector, which is causing unnecessary casting via memory. --- Patch is 2.20 MiB, trunca

[clang] [llvm] [ADT] Simplify SmallSet (PR #109412)

2024-09-20 Thread Victor Campos via cfe-commits
https://github.com/vhscampos updated https://github.com/llvm/llvm-project/pull/109412 >From 58c88d6fee0f1aa486201189bbe67cea7da2d25e Mon Sep 17 00:00:00 2001 From: Victor Campos Date: Fri, 9 Aug 2024 13:51:52 +0100 Subject: [PATCH 1/2] [ADT] Style and nit fixes in SmallSet --- llvm/include/ll

[clang-tools-extra] 57b12e8 - [clangd] Improve robustness when clang-tidy check names contain leading spaces. (#109421)

2024-09-20 Thread via cfe-commits
Author: Haojian Wu Date: 2024-09-20T15:54:39+02:00 New Revision: 57b12e8fbc9bb29ebe8f9d2a0f2c5085b38c2454 URL: https://github.com/llvm/llvm-project/commit/57b12e8fbc9bb29ebe8f9d2a0f2c5085b38c2454 DIFF: https://github.com/llvm/llvm-project/commit/57b12e8fbc9bb29ebe8f9d2a0f2c5085b38c2454.diff LO

[clang] Reapply "[Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (#104458)" (PR #109422)

2024-09-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/109422 >From d1b0cad696cca10c28ba32c290bc220ee917b48d Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 15 Aug 2024 11:27:34 -0400 Subject: [PATCH 1/8] Reapply "[Clang][Sema] Use the correct lookup conte

[clang-tools-extra] [clang-tidy][bugprone-posix-return] support integer literals as LHS (PR #109302)

2024-09-20 Thread via cfe-commits
@@ -61,23 +67,26 @@ void PosixReturnCheck::check(const MatchFinder::MatchResult &Result) { if (const auto *LessThanZeroOp = Result.Nodes.getNodeAs("ltzop")) { SourceLocation OperatorLoc = LessThanZeroOp->getOperatorLoc(); +char NewBinOp = LessThanZeroOp->ge

[clang-tools-extra] [clang-tidy][bugprone-posix-return] support integer literals as LHS (PR #109302)

2024-09-20 Thread via cfe-commits
@@ -126,6 +126,10 @@ Changes in existing checks usages of ``sizeof()``, ``alignof()``, and ``offsetof()`` when adding or subtracting from a pointer. +- Improved :doc:`bugprone-posix-return EugeneZelenko wrote: Should be before `bugprone-sizeof-expression`

[clang] [Sema] Declare GlobalMethodPool with using (NFC) (PR #109437)

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

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

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

[clang] [OpenACC] Add 'collapse' clause AST/basic Sema implementation (PR #109461)

2024-09-20 Thread via cfe-commits
@@ -1583,6 +1618,33 @@ ExprResult SemaOpenACC::ActOnArraySectionExpr(Expr *Base, SourceLocation LBLoc, OK_Ordinary, ColonLoc, RBLoc); } +ExprResult SemaOpenACC::CheckCollapseLoopCount(Expr *LoopCount) { + if (!LoopCount) +return ExprError(); + + a

[clang] [OpenACC] Add 'collapse' clause AST/basic Sema implementation (PR #109461)

2024-09-20 Thread Erich Keane via cfe-commits
@@ -1583,6 +1618,33 @@ ExprResult SemaOpenACC::ActOnArraySectionExpr(Expr *Base, SourceLocation LBLoc, OK_Ordinary, ColonLoc, RBLoc); } +ExprResult SemaOpenACC::CheckCollapseLoopCount(Expr *LoopCount) { + if (!LoopCount) +return ExprError(); + + a

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-20 Thread Farzon Lotfi via cfe-commits
@@ -1704,6 +1704,20 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; break; } + case Builtin::BI__builtin_hlsl_cross: { +if (SemaRef.checkArgCount(TheCall, 2)) + return true; +if (CheckVectorElementCallA

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

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

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

2024-09-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Hm https://github.com/llvm/llvm-project/pull/108769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/108769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-20 Thread Vlad Serebrennikov via cfe-commits
@@ -1952,6 +1952,8 @@ def enum_value(self): underlying_type = self.type if underlying_type.kind == TypeKind.ENUM: underlying_type = underlying_type.get_declaration().enum_type +if underlying_type.kind == TypeKind.ELABORATED: -

[clang-tools-extra] [clang-move] Use a range-based for loop (NFC) (PR #109438)

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

[clang] [TableGen] Use StringSet instead of StringMap (NFC) (PR #109441)

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

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-20 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: getAddrOfCurrentPosition() is one way to do it... but it's not the only way to do it. It was specifically designed to handle cases in CGExprConstant that would have been difficult to refactor otherwise. Here, it's simple to compute the correct address beforehand, so you c

[clang] [C++20][Modules] Restore inliness of constexpr/consteval functions defined in-class (PR #109464)

2024-09-20 Thread via cfe-commits
https://github.com/tomasz-kaminski-sonarsource created https://github.com/llvm/llvm-project/pull/109464 This correct issue, when the functions declared as `constexpr` are `consteval`, are not considered to be inline (`isInlined()` is false) when defined inside class attached to named module: `

[clang] [C++20][Modules] Restore inliness of constexpr/consteval functions defined in-class (PR #109464)

2024-09-20 Thread via cfe-commits
https://github.com/tomasz-kaminski-sonarsource closed https://github.com/llvm/llvm-project/pull/109464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Restore inliness of constexpr/consteval functions defined in-class (PR #109464)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (tomasz-kaminski-sonarsource) Changes This correct issue, when the functions declared as `constexpr` are `consteval`, are not considered to be inline (`isInlined()` is false) when defined inside class attached to named module: ```c++

[clang] 69dbf46 - [Sema] Avoid repeated hash lookups (NFC) (#109375)

2024-09-20 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-20T07:55:02-07:00 New Revision: 69dbf468bf0beb87e2a8d9f9f597296d642028d6 URL: https://github.com/llvm/llvm-project/commit/69dbf468bf0beb87e2a8d9f9f597296d642028d6 DIFF: https://github.com/llvm/llvm-project/commit/69dbf468bf0beb87e2a8d9f9f597296d642028d6.diff L

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #109375)

2024-09-20 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: > Hm, why does this wrapper exist at all? It looks like a trivial wrapper that > doesn't add or change any DenseMap functionality. I was wondering about the same thing. Let me get rid of the wrapper in a subsequent patch. https://github.com/llvm/llvm-project/pull/109375

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

2024-09-20 Thread Thomas Köppe via cfe-commits
@@ -38,7 +38,9 @@ AST_MATCHER(Type, sugaredNullptrType) { StatementMatcher makeCastSequenceMatcher(llvm::ArrayRef NameList) { auto ImplicitCastToNull = implicitCastExpr( anyOf(hasCastKind(CK_NullToPointer), hasCastKind(CK_NullToMemberPointer)), - unless(hasImplic

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify ls64, ls64_v and ls64_accdata. (PR #108024)

2024-09-20 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/108024 >From b6abb4f0fcf50d7498a6f0d0ef8b75808c8b1eb1 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 10 Sep 2024 14:02:17 +0100 Subject: [PATCH 1/2] [FMV][AArch64] Unify ls64, ls64_v and ls64_accdata.

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

2024-09-20 Thread Thomas Köppe via cfe-commits
@@ -38,7 +38,9 @@ AST_MATCHER(Type, sugaredNullptrType) { StatementMatcher makeCastSequenceMatcher(llvm::ArrayRef NameList) { auto ImplicitCastToNull = implicitCastExpr( anyOf(hasCastKind(CK_NullToPointer), hasCastKind(CK_NullToMemberPointer)), - unless(hasImplic

[clang] [clang][NFC] add static for internal linkage function and extract common function to header file (PR #109436)

2024-09-20 Thread Chris B via cfe-commits
llvm-beanz wrote: I think we should separate adding the internal linkage (missing `static` keywords) from the other refactoring since they're unrelated. Adding the missing `static` keywords is all good. I'm not sure I agree with the other refactoring. https://github.com/llvm/llvm-project/pull

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

2024-09-20 Thread Erich Keane 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] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-09-20 Thread Kerry McLaughlin via cfe-commits
kmclaughlin-arm wrote: > For the lambda example, there are only three relevant calls to > GetOrCreateLLVMFunction; one for each function with IsInDefinition false, but > then only one with IsInDefinition true. > > It's not clear to me why the two cases are different, and I don't really want >

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-20 Thread Aaron Ballman via cfe-commits
@@ -1105,16 +1120,16 @@ enum AttributeDeclKind { inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, const ParsedAttr &At) { - DB.AddTaggedVal(reinterpret_cast(At.getAttrName()), + const IdentifierInfo *Att

[clang] [flang] [llvm] [mlir] Make MMIWP not have ownership over MMI + Make MMI Only Use an External MCContext (PR #105541)

2024-09-20 Thread Matin Raayai via cfe-commits
matinraayai wrote: In that case, I will modify this PR so that: 1. MMI does not take a reference to the MCContext. 2. MMIWP takes a reference for its initialize/finalize methods. I'll report back in case I run into unexpected issues. https://github.com/llvm/llvm-project/pull/105541 ___

[clang] [llvm] Update llvm::Registry to work for LLVM shared library builds on windows (PR #109024)

2024-09-20 Thread Thomas Fransham via cfe-commits
@@ -189,19 +190,23 @@ #define LLVM_TEMPLATE_ABI __declspec(dllimport) #define LLVM_EXPORT_TEMPLATE #endif +#define LLVM_ABI_EXPORT __declspec(dllexport) fsfod wrote: I added a comment to try and explains its use and behaviour. https://github.com/llvm/llvm-pro

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-20 Thread Farzon Lotfi via cfe-commits
@@ -73,6 +74,42 @@ static Value *expandAbs(CallInst *Orig) { "dx.max"); } +static Value *expandCrossIntrinsic(CallInst *Orig) { + + VectorType *VT = cast(Orig->getType()); + if (cast(VT)->getNumElements() != 3) +report_fatal_error(Twine("

[clang] [clang-format] Correctly annotate pointer/reference in range-for loop (PR #109361)

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

[clang] c28e268 - [clang-format] Correctly annotate pointer/reference in `if` statement (#109370)

2024-09-20 Thread via cfe-commits
Author: Owen Pan Date: 2024-09-20T18:13:21-07:00 New Revision: c28e268c32a6840d08e3a4dbc9eeb8a0f564d6c0 URL: https://github.com/llvm/llvm-project/commit/c28e268c32a6840d08e3a4dbc9eeb8a0f564d6c0 DIFF: https://github.com/llvm/llvm-project/commit/c28e268c32a6840d08e3a4dbc9eeb8a0f564d6c0.diff LOG:

[clang] [clang-format] Correctly annotate pointer/reference in `if` statement (PR #109370)

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

[clang] [codegen][NFC] add static mark for internal usage variable and function (PR #109431)

2024-09-20 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/109431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [codegen][NFC] add static mark for internal usage variable and function (PR #109431)

2024-09-20 Thread Paul Kirth via cfe-commits
@@ -753,13 +753,7 @@ CodeGenTypes::arrangeCall(const CGFunctionInfo &signature, signature.getRequiredArgs()); } -namespace clang { -namespace CodeGen { -void computeSPIRKernelABIInfo(CodeGenModule &CGM, CGFunctionInfo &FI); -} -} - -/// Arrange

[clang] [codegen][NFC] add static mark for internal usage variable and function (PR #109431)

2024-09-20 Thread Paul Kirth via cfe-commits
@@ -753,13 +753,7 @@ CodeGenTypes::arrangeCall(const CGFunctionInfo &signature, signature.getRequiredArgs()); } -namespace clang { -namespace CodeGen { -void computeSPIRKernelABIInfo(CodeGenModule &CGM, CGFunctionInfo &FI); -} -} --

[clang] [codegen][NFC] add static mark for internal usage variable and function (PR #109431)

2024-09-20 Thread Paul Kirth via cfe-commits
@@ -22,6 +22,9 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/raw_ostream.h" +namespace llvm { +extern cl::opt EnableSingleByteCoverage; +} // namespace llvm ilovepi wrote: This seems like an unrelated change. https://github.com/llvm/llvm-pr

[clang] [codegen][NFC] add static mark for internal usage variable and function (PR #109431)

2024-09-20 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM, modulo the unrelated bits. Those should be handled separately. https://github.com/llvm/llvm-project/pull/109431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/109496 >From e7f7f82b25eaae86623ac8f47731892b3b629d7d Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Fri, 20 Sep 2024 16:27:09 -0700 Subject: [PATCH 1/2] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warni

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

2024-09-20 Thread Shafik Yaghmour via cfe-commits
shafik wrote: CC @tbaederr this does not look like equivalent code to me based on your original isue but maybe I am confused. https://github.com/llvm/llvm-project/pull/109298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread via cfe-commits
https://github.com/jkorous-apple edited https://github.com/llvm/llvm-project/pull/109496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread via cfe-commits
@@ -250,7 +250,9 @@ AST_MATCHER_P(Stmt, ignoreUnsafeBufferInContainer, AST_MATCHER_P(Stmt, ignoreUnsafeLibcCall, const UnsafeBufferUsageHandler *, Handler) { - return Handler->ignoreUnsafeBufferInLibcCall(Node.getBeginLoc()); + if (Finder->getASTContext().getLa

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread via cfe-commits
@@ -2549,6 +2549,7 @@ void clang::sema::AnalysisBasedWarnings::IssueWarnings( DiagnosticOptions &DiagOpts = Diags.getDiagnosticOptions(); // UnsafeBufferUsage analysis settings. + bool IsCXXLang = S.getLangOpts().CPlusPlus; jkorous-apple wrote: Nit: it d

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -Wunsafe-buffer-usage %s -verify %s jkorous-apple wrote: FWIW the language mode is set via `-x` command line option. It is only inferred from the file extension if it's missing. https://github.com/llvm/llvm-project/pull/10949

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread via cfe-commits
https://github.com/jkorous-apple approved this pull request. Left some comments but LGTM. https://github.com/llvm/llvm-project/pull/109496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] 4fd14b9 - [clang-format] Correctly annotate pointer/reference in range-for loop (#109361)

2024-09-20 Thread via cfe-commits
Author: Owen Pan Date: 2024-09-20T18:12:09-07:00 New Revision: 4fd14b9a3afb2ab34dfaa3bc4ed86e82122507be URL: https://github.com/llvm/llvm-project/commit/4fd14b9a3afb2ab34dfaa3bc4ed86e82122507be DIFF: https://github.com/llvm/llvm-project/commit/4fd14b9a3afb2ab34dfaa3bc4ed86e82122507be.diff LOG:

<    1   2   3   4   5