[clang] Optimize -Wunsafe-buffer-usage. (PR #124554)

2025-01-27 Thread Ilya Biryukov via cfe-commits
@@ -79,21 +81,39 @@ static std::string getDREAncestorString(const DeclRefExpr *DRE, } // namespace #endif /* NDEBUG */ -namespace clang::ast_matchers { +class CustomMatcher { +public: + virtual bool matches(const DynTypedNode &DynNode, ASTContext &Ctx, +

[clang] Optimize -Wunsafe-buffer-usage. (PR #124554)

2025-01-27 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov commented: Thanks a lot for this! I have left quite a few comments, mostly NITs. A few things that really stood out and I think we should fix: - increasing the number of macros and signatures we use seems like a bad trade-off. It's much better to have more param

[clang] Optimize -Wunsafe-buffer-usage. (PR #124554)

2025-01-27 Thread Ilya Biryukov via cfe-commits
@@ -79,21 +81,39 @@ static std::string getDREAncestorString(const DeclRefExpr *DRE, } // namespace #endif /* NDEBUG */ -namespace clang::ast_matchers { +class CustomMatcher { +public: + virtual bool matches(const DynTypedNode &DynNode, ASTContext &Ctx, +

[clang] Optimize -Wunsafe-buffer-usage. (PR #124554)

2025-01-27 Thread Ilya Biryukov via cfe-commits
@@ -186,106 +205,202 @@ class MatchDescendantVisitor : public DynamicRecursiveASTVisitor { return DynamicRecursiveASTVisitor::TraverseStmt(Node); } + void set_ast_context(ASTContext &Context) { ActiveASTContext = &Context; } ilya-biryukov wrote: NIT:

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-27 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/124319 >From 581cc0eda9d42458ff71f2c913a2e03d2de0b5f2 Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Fri, 19 Jul 2024 14:26:23 -0700 Subject: [PATCH 1/9] This commit is to resolve the issue #24841 -

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-27 Thread Fangrui Song via cfe-commits
@@ -133,6 +133,16 @@ std::string getDefaultProfileGenName() { : "default_%m.profraw"; } +// Path and name of file used for profile generation +std::string getProfileGenName(const CodeGenOptions &CodeGenOpts) { MaskRay wrote: Move outside of the a

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-27 Thread Baranov Victor via cfe-commits
vbvictor wrote: > Can anyone please help me? Why is Test Documentation build is failing? I am > in no clue. Restore clang-tools-extra/clang-tidy/modernize/CMakeLists.txt and clang-tools-extra/clang-tidy/modernize/ModernizeTidyModule.cpp as they were before (with no changes to them). https:/

[clang-tools-extra] [clang-tidy] Address false positives in misc-redundant-expression checker (PR #122841)

2025-01-27 Thread via cfe-commits
@@ -290,7 +290,7 @@ Changes in existing checks - Improved :doc:`misc-redundant-expression ` check by extending the checker to detect floating point and integer literals in redundant - expressions. + expressions. Some macro related false positives had been removed. ---

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-27 Thread via cfe-commits
@@ -173,6 +173,11 @@ New checks Replace comparisons between signed and unsigned integers with their safe C++20 ``std::cmp_*`` alternative, if available. + +- New :doc:`modernize-use-cpp-style-comments EugeneZelenko wrote: Please change Release Notes and

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-27 Thread via cfe-commits
@@ -0,0 +1,40 @@ +//===--- UseCppStyleCommentsCheck.h - clang-tidy-*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-27 Thread via cfe-commits
@@ -0,0 +1,136 @@ +//===--- UseCppStyleCommentsCheck.cpp - clang-tidy-===// + EugeneZelenko wrote: Please remove empty line. https://github.com/llvm/llvm-project/pull/124319 ___ cfe-commits mai

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-27 Thread via cfe-commits
@@ -0,0 +1,136 @@ +//===--- UseCppStyleCommentsCheck.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-Identifier:

[clang] Optimize -Wunsafe-buffer-usage. (PR #124554)

2025-01-27 Thread Ilya Biryukov via cfe-commits
@@ -186,106 +205,202 @@ class MatchDescendantVisitor : public DynamicRecursiveASTVisitor { return DynamicRecursiveASTVisitor::TraverseStmt(Node); } + void set_ast_context(ASTContext &Context) { ActiveASTContext = &Context; } + + void set_handler(const UnsafeBufferUsag

[clang] Optimize -Wunsafe-buffer-usage. (PR #124554)

2025-01-27 Thread Ilya Biryukov via cfe-commits
@@ -186,106 +205,202 @@ class MatchDescendantVisitor : public DynamicRecursiveASTVisitor { return DynamicRecursiveASTVisitor::TraverseStmt(Node); } + void set_ast_context(ASTContext &Context) { ActiveASTContext = &Context; } + + void set_handler(const UnsafeBufferUsag

[clang] Add configuration option PenaltyBreakBeforeMemberAccess (PR #118409)

2025-01-27 Thread Owen Pan via cfe-commits
@@ -22365,6 +22365,19 @@ TEST_F(FormatTest, BreakPenaltyAfterForLoopLParen) { Style); } +TEST_F(FormatTest, BreakPenaltyBeforeMemberAccess) { owenca wrote: I was looking at the option names, not the test names. Please ignore this request if yo

[clang] Optimize -Wunsafe-buffer-usage. (PR #124554)

2025-01-27 Thread Ilya Biryukov via cfe-commits
@@ -79,21 +81,39 @@ static std::string getDREAncestorString(const DeclRefExpr *DRE, } // namespace #endif /* NDEBUG */ -namespace clang::ast_matchers { +class CustomMatcher { ilya-biryukov wrote: NIT: maybe rename to `FastMatcher`? We should definitely add

[clang] Add configuration option PenaltyBreakBeforeMemberAccess (PR #118409)

2025-01-27 Thread Owen Pan via cfe-commits
@@ -22365,6 +22365,29 @@ TEST_F(FormatTest, BreakPenaltyAfterForLoopLParen) { Style); } +TEST_F(FormatTest, BreakPenaltyBeforeMemberAccess) { + auto Style = getLLVMStyle(); + EXPECT_EQ(Style.PenaltyBreakBeforeMemberAccess, 150u); + + Style.ColumnLimit = 60; +

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-27 Thread Fangrui Song via cfe-commits
@@ -785,6 +786,34 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val; } + if (const auto *A = Args.getLastArg(options::OPT_fprofile_continuous)) { +if (!

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-27 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/124353 >From abef90fe8f46431a5fb8b7fe717c9fb65eb30266 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Thu, 23 Jan 2025 00:03:15 + Subject: [PATCH 1/2] [PGO] Add a clang option -fprofile-continuous that enables PGO

[clang] Add configuration option PenaltyBreakBeforeMemberAccess (PR #118409)

2025-01-27 Thread Owen Pan via cfe-commits
https://github.com/owenca deleted https://github.com/llvm/llvm-project/pull/118409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Ilia Kuklin via cfe-commits
@@ -2367,11 +2369,38 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[clang] [clang] Add __nullptr as a keyword to C (PR #123119)

2025-01-27 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/123119 >From bc5d1419d94ac492c0fcf62a74844eb43ce17f1a Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 15 Jan 2025 15:24:12 -0500 Subject: [PATCH 01/11] __nullptr -> KEYALL, added relevant test --- clang/include

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Ilia Kuklin via cfe-commits
https://github.com/kuilpd edited https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-27 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/124319 >From 581cc0eda9d42458ff71f2c913a2e03d2de0b5f2 Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Fri, 19 Jul 2024 14:26:23 -0700 Subject: [PATCH 01/10] This commit is to resolve the issue #24841

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Ilia Kuklin via cfe-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/115005 >From 4d797371598960baf7729d05590aa1a8c7077694 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Mon, 4 Nov 2024 14:33:45 +0500 Subject: [PATCH 1/7] [lldb] Analyze enum promotion type during parsing --- clang/in

[clang] [clang] improve print / dump of anonymous declarations (PR #124605)

2025-01-27 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/124605 ast-print: A DeclRef to an anonymous NTTP will print 'value-parameter--', similar to how type parameters are printed. ast-dump: A bareDeclRef to an anonymous entity will print some extra identifying informati

[clang] [clang] improve print / dump of anonymous declarations (PR #124605)

2025-01-27 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/124605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] improve print / dump of anonymous declarations (PR #124605)

2025-01-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-hlsl Author: Matheus Izvekov (mizvekov) Changes ast-print: A DeclRef to an anonymous NTTP will print 'value-parameter--', similar to how type parameters are printed. ast-dump: A bareDeclRef to an anonymo

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Ilia Kuklin via cfe-commits
@@ -2367,11 +2369,38 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[clang] [clang] Add __nullptr as a keyword to C (PR #123119)

2025-01-27 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/123119 >From bc5d1419d94ac492c0fcf62a74844eb43ce17f1a Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 15 Jan 2025 15:24:12 -0500 Subject: [PATCH 01/12] __nullptr -> KEYALL, added relevant test --- clang/include

[clang] dc6411d - [AST] Migrate away from PointerUnion::dyn_cast (NFC) (#124502)

2025-01-27 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-27T10:34:16-08:00 New Revision: dc6411d3e1ab903750a4c80571ee0ebd7e26a62c URL: https://github.com/llvm/llvm-project/commit/dc6411d3e1ab903750a4c80571ee0ebd7e26a62c DIFF: https://github.com/llvm/llvm-project/commit/dc6411d3e1ab903750a4c80571ee0ebd7e26a62c.diff L

[clang] 4075915 - [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (#124503)

2025-01-27 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-27T10:34:41-08:00 New Revision: 4075915ebdfc7b69381388c96781e6abfa5f4407 URL: https://github.com/llvm/llvm-project/commit/4075915ebdfc7b69381388c96781e6abfa5f4407 DIFF: https://github.com/llvm/llvm-project/commit/4075915ebdfc7b69381388c96781e6abfa5f4407.diff L

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124503)

2025-01-27 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/124503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124502)

2025-01-27 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/124502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-27 Thread Craig Topper via cfe-commits
@@ -1228,6 +1228,21 @@ def HasVendorXCVbi : Predicate<"Subtarget->hasVendorXCVbi()">, AssemblerPredicate<(all_of FeatureVendorXCVbi), "'XCVbi' (CORE-V Immediate Branching)">; +// MIPS Extensions + +def FeatureVendorXMIPSCMove +: RISCVExten

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveMax` intrinsic (PR #123428)

2025-01-27 Thread Adam Yang via cfe-commits
@@ -19203,6 +19203,25 @@ static Intrinsic::ID getWaveActiveSumIntrinsic(llvm::Triple::ArchType Arch, } } +// Return wave active sum that corresponds to the QT scalar type +static Intrinsic::ID getWaveActiveMaxIntrinsic(llvm::Triple::ArchType Arch, adam-yang

[clang] [clang] improve print / dump of anonymous declarations (PR #124605)

2025-01-27 Thread Erich Keane via cfe-commits
@@ -875,7 +875,41 @@ void TextNodeDumper::dumpBareDeclRef(const Decl *D) { if (const NamedDecl *ND = dyn_cast(D)) { ColorScope Color(OS, ShowColors, DeclNameColor); -OS << " '" << ND->getDeclName() << '\''; +if (DeclarationName Name = ND->getDeclName()) + OS

[clang] [clang] improve print / dump of anonymous declarations (PR #124605)

2025-01-27 Thread Erich Keane via cfe-commits
@@ -875,7 +875,41 @@ void TextNodeDumper::dumpBareDeclRef(const Decl *D) { if (const NamedDecl *ND = dyn_cast(D)) { ColorScope Color(OS, ShowColors, DeclNameColor); -OS << " '" << ND->getDeclName() << '\''; +if (DeclarationName Name = ND->getDeclName()) + OS

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-27 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/124319 >From 581cc0eda9d42458ff71f2c913a2e03d2de0b5f2 Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Fri, 19 Jul 2024 14:26:23 -0700 Subject: [PATCH 01/11] This commit is to resolve the issue #24841

[clang] [Clang] Remove unnecessary Decl transform & profiles for SizeOfPackExpr (PR #124533)

2025-01-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/124533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [Clang] [NFC] Rename `isAnyPointerType()` and `getPointeeOrArrayElementType()`. (PR #122938)

2025-01-27 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Thank you for working on cleaning up these APIs! They are definitely a source of confusion in practice, so paying down this tech debt is great! > The names for the first two are rather verbose; I’m open to suggestions as to > better names for these functions since that was

[clang] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" linking. (PR #123922)

2025-01-27 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/123922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [StaticAnalyzer] Fix state update in VisitObjCForCollectionStmt (PR #124477)

2025-01-27 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: CC: @dtarditi https://github.com/llvm/llvm-project/pull/124477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-01-27 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/123470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-01-27 Thread Vitaly Buka via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_hwasan %s -o %t && %env_hwasan_opts=random_tags=1 %run %t +// RUN: %clang_hwasan -Wno-error=return-type %s -o %t && %env_hwasan_opts=random_tags=1 %run %t vitalybuka wrote: why not just to return nullptr? https://github.com/llvm/

[libclc] libclc: clspv: add missing clc_isnan.cl dependency (PR #124614)

2025-01-27 Thread David Neto via cfe-commits
https://github.com/dneto0 approved this pull request. https://github.com/llvm/llvm-project/pull/124614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Allow FP8 Neon vector types to be used by __builtin_shufflevector (PR #119031)

2025-01-27 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov closed https://github.com/llvm/llvm-project/pull/119031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Refactor implementation of FP8 types (NFC) (PR #118969)

2025-01-27 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov closed https://github.com/llvm/llvm-project/pull/118969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add FP8 Neon intrinsics for dot-product (PR #119911)

2025-01-27 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov closed https://github.com/llvm/llvm-project/pull/119911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] only inherit the parent eval context inside of lambdas (PR #124426)

2025-01-27 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/124426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement NEON FP8 intrinsics for fused multiply-add (indexed) (PR #120403)

2025-01-27 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov closed https://github.com/llvm/llvm-project/pull/120403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement FP8 Neon reinterpret intrinsics (PR #121804)

2025-01-27 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov closed https://github.com/llvm/llvm-project/pull/121804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement NEON FP8 fused multiply-add intrinsics (non-indexed) (PR #120273)

2025-01-27 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov closed https://github.com/llvm/llvm-project/pull/120273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add Neon FP8 conversion intrinsics (PR #119033)

2025-01-27 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov closed https://github.com/llvm/llvm-project/pull/119033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement FP8 Neon reinterpret intrinsics (PR #120476)

2025-01-27 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov edited https://github.com/llvm/llvm-project/pull/120476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement FP8 Neon reinterpret intrinsics (PR #120476)

2025-01-27 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov edited https://github.com/llvm/llvm-project/pull/120476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] FP8 implicit bitcast (PR #122893)

2025-01-27 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov closed https://github.com/llvm/llvm-project/pull/122893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Introduce `ConstDynamicRecursiveASTVisitor` (PR #122991)

2025-01-27 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. I wonder if we want to apply the MaybeConst traitment to RAV in the future. For now, this looks good https://github.com/llvm/llvm-project/pull/122991 ___ cfe-commits mailing list cfe-commits@list

[clang] [clang] Implement -fstrict-bool (PR #116732)

2025-01-27 Thread via cfe-commits
https://github.com/apple-fcloutier closed https://github.com/llvm/llvm-project/pull/116732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement NEON FP8 fused multiply-add intrinsics (non-indexed) (PR #123614)

2025-01-27 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/123614 >From ae09723ecc1cc9bc2cbcef300b05aa2ce5ced448 Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Tue, 17 Dec 2024 11:42:42 + Subject: [PATCH 1/2] [AArch64] Add FP8 Neon intrinsics for dot-product

[clang] 285009f - [NFC][DebugInfo] Rewrite more call-sites to insert with iterators (#124288)

2025-01-27 Thread Jeremy Morse via cfe-commits
Author: Jeremy Morse Date: 2025-01-27T20:30:45Z New Revision: 285009f202ca8bfcc6b607eba0e919867559e725 URL: https://github.com/llvm/llvm-project/commit/285009f202ca8bfcc6b607eba0e919867559e725 DIFF: https://github.com/llvm/llvm-project/commit/285009f202ca8bfcc6b607eba0e919867559e725.diff LOG:

[clang] [clang][SME] Emit error for OpenMP captured regions in SME functions (PR #124590)

2025-01-27 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/124590 >From f3083be395aa9cfb1e6d44f00a32faaee347468a Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Mon, 27 Jan 2025 16:43:58 + Subject: [PATCH 1/2] [clang][SME] Emit error for OpemMP captured regions in SM

[clang] [llvm] [NFC][DebugInfo] Rewrite more call-sites to insert with iterators (PR #124288)

2025-01-27 Thread Jeremy Morse via cfe-commits
jmorse wrote: Merged in 285009f202ca as it was composing with a workaround in an earlier commit. https://github.com/llvm/llvm-project/pull/124288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [clang] improve print / dump of anonymous declarations (PR #124605)

2025-01-27 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/124605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SME] Emit error for OpenMP captured regions in SME functions (PR #124590)

2025-01-27 Thread Benjamin Maxwell via cfe-commits
@@ -4568,9 +4568,28 @@ buildCapturedStmtCaptureList(Sema &S, CapturedRegionScopeInfo *RSI, return false; } +static std::optional +isOpenMPCapturedRegionInArmSMEFunction(Sema const &S, CapturedRegionKind Kind) { + if (!S.getLangOpts().OpenMP || Kind != CR_OpenMP) +retu

[clang] a85b2dc - [Clang] only inherit the parent eval context inside of lambdas (#124426)

2025-01-27 Thread via cfe-commits
Author: cor3ntin Date: 2025-01-27T21:30:29+01:00 New Revision: a85b2dc45a5f1312d6ee5e2522c24e81a086bf60 URL: https://github.com/llvm/llvm-project/commit/a85b2dc45a5f1312d6ee5e2522c24e81a086bf60 DIFF: https://github.com/llvm/llvm-project/commit/a85b2dc45a5f1312d6ee5e2522c24e81a086bf60.diff LOG:

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-27 Thread via cfe-commits
=?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand Message-ID: In-Reply-To: https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/124407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] e734f01 - [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (#124407)

2025-01-27 Thread via cfe-commits
Author: André Brand Date: 2025-01-27T21:42:33+01:00 New Revision: e734f01bffb87d035d9037ade8d8ba1e96639c2b URL: https://github.com/llvm/llvm-project/commit/e734f01bffb87d035d9037ade8d8ba1e96639c2b DIFF: https://github.com/llvm/llvm-project/commit/e734f01bffb87d035d9037ade8d8ba1e96639c2b.diff L

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-27 Thread via cfe-commits
=?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand Message-ID: In-Reply-To: https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/124407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [llvm] [LLVM][AMDGPU] Add Intrinsic and Builtin for ds_bpermute_fi_b32 (PR #124616)

2025-01-27 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: negative tests https://github.com/llvm/llvm-project/pull/124616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] __has_builtin should return false for aux triple builtins (PR #121839)

2025-01-27 Thread Artem Belevich via cfe-commits
Artem-B wrote: This breaks CUDA compilation on ARM, because `__has_builtin()` now returns false for the host-side builtins and that causes some clang headers on ARM to try defining their own replacement for the builtin they consider to be missing, but which is actually still there: https://god

[clang] [llvm] [NFC][DebugInfo] Rewrite more call-sites to insert with iterators (PR #124288)

2025-01-27 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse closed https://github.com/llvm/llvm-project/pull/124288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Track source deduction guide for alias template deduction guides (PR #123875)

2025-01-27 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/123875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] __has_builtin should return false for aux triple builtins (PR #121839)

2025-01-27 Thread Artem Belevich via cfe-commits
Artem-B wrote: I think the conceptual problem here is that `__has_builtin()` conflates "builtin exists" with "builtin is usable on the target". For C++ they are the same. For CUDA they are not. Builting in aux-triple do exist (as in compiler does see them when it constructs AST), but we can't

[clang] [clang][docs] Fix typos concerning wasm __funcref (PR #124365)

2025-01-27 Thread Derek Schuff via cfe-commits
https://github.com/dschuff approved this pull request. Do you need me to commit? https://github.com/llvm/llvm-project/pull/124365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] __has_builtin should return false for aux triple builtins (PR #121839)

2025-01-27 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > This breaks CUDA compilation on ARM, because `__has_builtin()` now returns > false for the host-side builtins and that causes some clang headers on ARM to > try defining their own replacement for the builtin they consider to be > missing, but which is actually still there: htt

[clang] [Clang] Skip past code generation for unevaluated lambdas (PR #124572)

2025-01-27 Thread via cfe-commits
cor3ntin wrote: @efriedma-quic So we would track that a function that was declared in an unevaluated context has "unevaluated linkage" (or really, a bit that said it was declared in unevaluated context), and skip them in `EmitTopLevelDecl` like we do for immediate functions? Seems reasonable

[clang] [Clang] Fixed UnresolvedLookupExpr propagating into the codegen phase (PR #124609)

2025-01-27 Thread Erich Keane via cfe-commits
erichkeane wrote: This doesn't quite seem right to me... First, I would expect us to check the declaration context here rather than whether it is in a function template. Second, I find myself thinking the `UnresolvedLookupExpr` in a non-dependent context is the actual problem, and we need to

[clang] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)

2025-01-27 Thread Michael Flanders via cfe-commits
@@ -119,7 +120,26 @@ class MemRegion : public llvm::FoldingSetNode { virtual MemRegionManager &getMemRegionManager() const = 0; - LLVM_ATTRIBUTE_RETURNS_NONNULL const MemSpaceRegion *getMemorySpace() const; + /// Deprecated. Gets the 'raw' memory space of a memory region'

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-27 Thread Reid Kleckner via cfe-commits
@@ -51,28 +57,71 @@ class StringToOffsetTable { return II->second; } - // Emit the string using string literal concatenation, for better readability - // and searchability. - void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl, -co

[clang] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)

2025-01-27 Thread Michael Flanders via cfe-commits
Flandini wrote: Made the above changes. I moved it all into `MemRegion` and changed the names of and added deprecation comments to the old `MemRegion` instance methods that queried mem space info. https://github.com/llvm/llvm-project/pull/123003 __

[clang] [SveEmitter] Explicitly merge with `poison` instead of `undef` (PR #124596)

2025-01-27 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Does the Arm spec actually allow us to do this? It says "the inactive elements of the result have arbitrary, undefined values." That seems very different from "your program has undefined behavior if you use the inactive elements of the result". For comparison, the x86 `

[clang] Revert "[Clang] __has_builtin should return false for aux triple builtins (#121839) (PR #124626)

2025-01-27 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/124626 This reverts commit 1c28b9237382b093f477479c993c80181922ca6a. Breaks CUDA on ARM. >From 287dcf646d4c7520c8637a798d677168e100b515 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Mon, 27 Jan 2025 13:00:28 -08

[clang] [Clang] __has_builtin should return false for aux triple builtins (PR #121839)

2025-01-27 Thread Nick Sarnie via cfe-commits
sarnex wrote: Yeah seems there's no easy fix here. Revert PR here https://github.com/llvm/llvm-project/pull/124626 https://github.com/llvm/llvm-project/pull/121839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-27 Thread Chandler Carruth via cfe-commits
@@ -51,28 +57,71 @@ class StringToOffsetTable { return II->second; } - // Emit the string using string literal concatenation, for better readability - // and searchability. - void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl, -co

[clang] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)

2025-01-27 Thread Balazs Benics via cfe-commits
@@ -119,7 +120,26 @@ class MemRegion : public llvm::FoldingSetNode { virtual MemRegionManager &getMemRegionManager() const = 0; - LLVM_ATTRIBUTE_RETURNS_NONNULL const MemSpaceRegion *getMemorySpace() const; + /// Deprecated. Gets the 'raw' memory space of a memory region'

[clang] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)

2025-01-27 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/123003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] __has_builtin should return false for aux triple builtins (#121839) (PR #124626)

2025-01-27 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/124626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] __has_builtin should return false for aux triple builtins (#121839) (PR #124626)

2025-01-27 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/124626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] __has_builtin should return false for aux triple builtins (#121839) (PR #124626)

2025-01-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Sad I saw the other thing, I'm not sure how we can manage that without a new builtin just so CUDA can do what they need here. https://github.com/llvm/llvm-project/pull/124626 ___ cfe-commits mailing list cf

[clang] Revert "[Clang] __has_builtin should return false for aux triple builtins (#121839) (PR #124626)

2025-01-27 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Honestly I'm wondering if this can only be solved with another preprocessor macro that's like "Can this be used, no I mean it." just for these weird offloading language cases. https://github.com/llvm/llvm-project/pull/124626 __

[clang] Revert "[Clang] __has_builtin should return false for aux triple builtins (#121839) (PR #124626)

2025-01-27 Thread Nick Sarnie via cfe-commits
sarnex wrote: Yeah I was thinking maybe we could add a new macro or a new argument or something to control the behavior https://github.com/llvm/llvm-project/pull/124626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang][Sema] Null-check type in resolveMemberExpr() before checking for auto type (PR #124628)

2025-01-27 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: No test case because there wasn't one in the bug report; I diagnosed the issue based on the stack trace only. https://github.com/llvm/llvm-project/pull/124628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] Revert "[Clang] __has_builtin should return false for aux triple builtins (#121839) (PR #124626)

2025-01-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nick Sarnie (sarnex) Changes This reverts commit 1c28b9237382b093f477479c993c80181922ca6a. Breaks CUDA on ARM. --- Full diff: https://github.com/llvm/llvm-project/pull/124626.diff 3 Files Affected: - (modified) clang/lib/Lex/PPMacroExp

[clang] [clang][Sema] Null-check type in resolveMemberExpr() before checking for auto type (PR #124628)

2025-01-27 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/124628 Fixes https://github.com/clangd/clangd/issues/2301 >From 5ecde7be72659f66c45b4cfdc9e398bdb850e862 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 27 Jan 2025 16:07:34 -0500 Subject: [PATCH] [clang

[clang] [clang][Sema] Null-check type in resolveMemberExpr() before checking for auto type (PR #124628)

2025-01-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nathan Ridge (HighCommander4) Changes Fixes https://github.com/clangd/clangd/issues/2301 --- Full diff: https://github.com/llvm/llvm-project/pull/124628.diff 1 Files Affected: - (modified) clang/lib/Sema/HeuristicResolver.cpp (+2) ``

[clang] [llvm] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2025-01-27 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/84420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add FP8 Neon intrinsics for dot-product (PR #123613)

2025-01-27 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov closed https://github.com/llvm/llvm-project/pull/123613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 804b81d - [AArch64] Add FP8 Neon intrinsics for dot-product (#123613)

2025-01-27 Thread via cfe-commits
Author: Momchil Velikov Date: 2025-01-27T21:14:16Z New Revision: 804b81d39f2d50743fd2090aed72dad29f5fb388 URL: https://github.com/llvm/llvm-project/commit/804b81d39f2d50743fd2090aed72dad29f5fb388 DIFF: https://github.com/llvm/llvm-project/commit/804b81d39f2d50743fd2090aed72dad29f5fb388.diff LO

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-27 Thread Sergei Barannikov via cfe-commits
@@ -51,28 +57,71 @@ class StringToOffsetTable { return II->second; } - // Emit the string using string literal concatenation, for better readability - // and searchability. - void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl, -co

<    1   2   3   4   5   6   >