[clang] [Clang] enhance error recovery with RecoveryExpr for trailing commas in call arguments (PR #114684)

2025-01-31 Thread Haojian Wu via cfe-commits
hokein wrote: I have a fix for it #125232 https://github.com/llvm/llvm-project/pull/114684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix false negative when value initializing a field annotated with [[clang::require_field_initialization]] (PR #124329)

2025-01-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman demilestoned https://github.com/llvm/llvm-project/pull/124329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix false negative when value initializing a field annotated with [[clang::require_field_initialization]] (PR #124329)

2025-01-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman milestoned https://github.com/llvm/llvm-project/pull/124329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix false negative when value initializing a field annotated with [[clang::require_field_initialization]] (PR #124329)

2025-01-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman milestoned https://github.com/llvm/llvm-project/pull/124329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix false negative when value initializing a field annotated with [[clang::require_field_initialization]] (PR #124329)

2025-01-31 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: There we go, added the right milestone this time. :-) https://github.com/llvm/llvm-project/pull/124329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Hexagon] Set the default compilation target to V68 (PR #125239)

2025-01-31 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 7ceef1b1824073fcfd4724539f5942442da1a9c2 041813a5de078adaf8d86bbeb2c92f19ce5828eb --e

[clang] 3c8dfce - [clang][bytecode][NFC] Use RetPC in InterpFrame::getExpr() as well (#125200)

2025-01-31 Thread via cfe-commits
Author: Timm Baeder Date: 2025-01-31T12:54:42+01:00 New Revision: 3c8dfce3def48982e47f2fbad5b78f409ef63467 URL: https://github.com/llvm/llvm-project/commit/3c8dfce3def48982e47f2fbad5b78f409ef63467 DIFF: https://github.com/llvm/llvm-project/commit/3c8dfce3def48982e47f2fbad5b78f409ef63467.diff L

[clang] [clang][bytecode][NFC] Use RetPC in InterpFrame::getExpr() as well (PR #125200)

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

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-31 Thread via cfe-commits
@@ -137,6 +137,10 @@ llvm::AllocaInst *CodeGenFunction::CreateTempAlloca(llvm::Type *Ty, Alloca = new llvm::AllocaInst(Ty, CGM.getDataLayout().getAllocaAddrSpace(), ArraySize, Name, AllocaInsertPt->getIterator()); + if (Alloca->getName

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

2025-01-31 Thread via cfe-commits
https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/122841 >From c26434fea8a3ebf546139805ab4f7ef5d2f4252d Mon Sep 17 00:00:00 2001 From: Vladislav Aranov Date: Mon, 13 Jan 2025 20:19:58 -0500 Subject: [PATCH 1/3] [clang-tidy] Address false positives in misc-redundant-ex

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

2025-01-31 Thread via cfe-commits
@@ -100,6 +100,9 @@ Changes in existing checks - Improved :doc:`bugprone-unsafe-functions ` check to allow specifying additional C++ member functions to match. +- Improved :doc:`misc-redundant-expression earnol wrote: And it is done. Any other suggestions?

[clang] [flang] [flang] Add support for -fimplicit-none-ext option (PR #125248)

2025-01-31 Thread Peter Klausler via cfe-commits
@@ -54,7 +54,7 @@ ENUM_CLASS(LanguageFeature, BackslashEscapes, OldDebugLines, PolymorphicActualAllocatableOrPointerToMonomorphicDummy, RelaxedPureDummy, UndefinableAsynchronousOrVolatileActual, AutomaticInMainProgram, PrintCptr, SavedLocalInSpecExpr, PrintNamelist,

[clang] [NFC][analyzer][docs] Improve Annotations.rst (PR #122749)

2025-01-31 Thread LLVM Continuous Integration via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.or

[clang] Allow 'inline' on some declarations in MS compatibility mode (PR #125250)

2025-01-31 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/125250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add clang atomic control options and attribute (PR #114841)

2025-01-31 Thread Yaxun Liu via cfe-commits
@@ -305,6 +305,13 @@ def err_drv_invalid_int_value : Error<"invalid integral value '%1' in '%0'">; def err_drv_invalid_value_with_suggestion : Error< "invalid value '%1' in '%0', expected one of: %2">; def err_drv_alignment_not_power_of_two : Error<"alignment is not a powe

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread Bill Wendling via cfe-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/125298 If the __bdos argument isn't an array (e.g. a pointer), due to '-Wno-int-conversion' or some other shenanigans, default to using the llvm.objectsize intrinsic. Fixes: cff0a460ae86 ("[Clang][counted_by] Refacto

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Bill Wendling (bwendling) Changes If the __bdos argument isn't an array (e.g. a pointer), due to '-Wno-int-conversion' or some other shenanigans, default to using the llvm.objectsize intrinsic. Fixes: cff0a460ae86 ("[Clang][counted

[clang] Add clang atomic control options and attribute (PR #114841)

2025-01-31 Thread Yaxun Liu via cfe-commits
@@ -3292,6 +3292,8 @@ def err_invalid_branch_protection_spec : Error< "invalid or misplaced branch protection specification '%0'">; def warn_unsupported_branch_protection_spec : Warning< "unsupported branch protection specification '%0'">, InGroup; +def err_attribute_inval

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread Bill Wendling via cfe-commits
bwendling wrote: Note that the early placement of this code is so that no executable code is generated if we have to bail out. https://github.com/llvm/llvm-project/pull/125298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] Reland: [clang] Track function template instantiation from definition (PR #125266)

2025-01-31 Thread via cfe-commits
@@ -5276,9 +5277,31 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, RebuildTypeSourceInfoForDefaultSpecialMembers(); SetDeclDefaulted(Function, PatternDecl->getLocation()); } else { +NamedDecl *ND = Function; +DeclContext *DC

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
@@ -31,6 +33,24 @@ namespace direct { std::unique_ptr lowerDirectlyFromCIRToLLVMIR(mlir::ModuleOp mlirModule, llvm::LLVMContext &llvmCtx); + +class CIRToLLVMGlobalOpLowering andykaylor wrote: I think that was an accident. This is a

[clang] [z/OS] Add option to target older versions of LE on z/OS (PR #123399)

2025-01-31 Thread Sean Perry via cfe-commits
https://github.com/perry-ca updated https://github.com/llvm/llvm-project/pull/123399 >From 9f5763faa81691f540af42721147daf50042e549 Mon Sep 17 00:00:00 2001 From: Sean Perry Date: Wed, 27 Nov 2024 18:33:09 -0600 Subject: [PATCH 1/3] Add -mzos-target --- .../clang/Basic/DiagnosticDriverKinds.t

[clang] [analyzer][NFC] Simplify and eliminate redundant map lookups (PR #125272)

2025-01-31 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/125272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -1,8 +1,10 @@ // Smoke test for ClangIR-to-LLVM IR code generation // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o - | FileCheck %s -// TODO: Add checks when proper lowering is implemented. -// For now, we're just creating an empty mod

[clang] [analyzer][NFC] Simplify and eliminate redundant map lookups (PR #125272)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balazs Benics (steakhal) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125272.diff 2 Files Affected: - (modified) clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h (+1-6) - (modified) cl

[clang] [analyzer][NFC] Simplify and eliminate redundant map lookups (PR #125272)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125272.diff 2 Files Affected: - (modified) clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h (+1-6

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Nathan Lanza via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2025-01-31 Thread Justin Stitt via cfe-commits
JustinStitt wrote: RFC regarding canonical wrapping/non-wrapping types in Clang: https://discourse.llvm.org/t/rfc-clang-canonical-wrapping-and-non-wrapping-types/84356 Ultimately, a type like what the RFC describes would supersede this PR in terms of feature completeness and usefulness. I'll c

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
@@ -22,16 +34,156 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread Bill Wendling via cfe-commits
bwendling wrote: I got a testcase from creduce. It's similar to your testcase. Basically, it's indexing into a pointer field, which isn't going to give the correct result either way. I expect that it's indexing into an array instead. https://github.com/llvm/llvm-project/pull/125298 ___

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/125298 >From df6b80c82f1a9ce4f1eef580f008c86fd691ba71 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 31 Jan 2025 12:48:36 -0800 Subject: [PATCH 1/2] [Clang][counted_by] Don't treat a pointer as an array If

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread Bill Wendling via cfe-commits
bwendling wrote: Oops! I forgot to push the testcases :) https://github.com/llvm/llvm-project/pull/125298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Deric Cheung (Icohedron) Changes This PR addresses #99205 - Implements the HLSL intrinsic `AddUint64` used to perform unsigned 64-bit integer addition by using pairs of unsigned 32-bit integers instead of native 64-bit types -

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-01-31 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron created https://github.com/llvm/llvm-project/pull/125319 This PR addresses #99205 - Implements the HLSL intrinsic `AddUint64` used to perform unsigned 64-bit integer addition by using pairs of unsigned 32-bit integers instead of native 64-bit types - The LLVM i

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-01-31 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 95d993a838863269dc1b90de3808c1e40ac6d5f2 2bc239b3e7fce57899c2b54089005a73e8aff1c5 --e

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-01-31 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/125319 >From 1e194fdf6dc731276cd867501708b348e3bbc97c Mon Sep 17 00:00:00 2001 From: Icohedron Date: Mon, 27 Jan 2025 11:18:09 -0800 Subject: [PATCH 1/3] Implement AddUint64 HLSL codegen and sema --- clang/include/

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/125298 >From df6b80c82f1a9ce4f1eef580f008c86fd691ba71 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 31 Jan 2025 12:48:36 -0800 Subject: [PATCH 1/3] [Clang][counted_by] Don't treat a pointer as an array If

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/122951 >From 618f4a1707c1b62693c0e878040997154e7e35d6 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 14 Jan 2025 22:05:43 +0300 Subject: [PATCH 1/9] [clang-tidy] add AllowedTypes to misc-const-correctness -

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-31 Thread Baranov Victor via cfe-commits
@@ -196,3 +199,13 @@ Options // The following pointer may not become a 'int *const'. int *changing_pointee = &value; changing_pointee = &result; + +.. option:: AllowedTypes + + A semicolon-separated list of names of types that will be excluded from + const-correct

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/122951 >From 618f4a1707c1b62693c0e878040997154e7e35d6 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 14 Jan 2025 22:05:43 +0300 Subject: [PATCH 1/8] [clang-tidy] add AllowedTypes to misc-const-correctness -

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,16 +34,156 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

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

2025-01-31 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: Ah true

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

2025-01-31 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: Feel fr

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/125260 >From 4801886dd4c45d32891a7337ad7430a6c5137929 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 28 Jan 2025 12:28:58 -0800 Subject: [PATCH 1/6] [CIR] Initial implementation of CIR-to-LLVM IR lowering pa

[clang] [flang] [flang] Add support for -fimplicit-none-ext option (PR #125248)

2025-01-31 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/125248 ___ 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-31 Thread Ilia Kuklin via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( kuilpd wrote: Alright, wi

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

2025-01-31 Thread Ilia Kuklin via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( kuilpd wrote: It's used i

[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)

2025-01-31 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/123977 >From 50f8b16bf83d70cc37f2ac7e70c9195a4c4cda02 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Thu, 16 Jan 2025 01:32:25 + Subject: [PATCH 01/10] wip --- clang/lib/CodeGen/CGExpr.cpp | 19

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/125260 >From 4801886dd4c45d32891a7337ad7430a6c5137929 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 28 Jan 2025 12:28:58 -0800 Subject: [PATCH 1/7] [CIR] Initial implementation of CIR-to-LLVM IR lowering pa

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-31 Thread Artem Belevich via cfe-commits
Artem-B wrote: Issuing the warning suppression every time a TU happens to see a perfectly valid use of the attribute in the host code (even transitively, in someone else's headers), would be counterproductive, IMO. The only response to the warning is to suppress it (i.e. there's nothing for th

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Timm Baeder via cfe-commits
tbaederr wrote: Damn, thanks for the revert. https://github.com/llvm/llvm-project/pull/125253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Hanlde qualified type name for `QualifierAlignment` (PR #125327)

2025-01-31 Thread Emilia Kond via cfe-commits
rymiel wrote: Seems to also work for top-level types (`::int_64_t constexpr x{123};` works correctly) but breaks for fully qualified types (`::std::int64_t constexpr x{123};` becomes `::constexpr std::int64_t x{123};`) https://github.com/llvm/llvm-project/pull/125327 __

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [clang][mutation analyzer][NFC] Simplify code in ExprMutationAnalyzer (PR #125283)

2025-01-31 Thread Kazu Hirata via cfe-commits
@@ -813,10 +813,7 @@ FunctionParmMutationAnalyzer::findMutation(const ParmVarDecl *Parm) { // before analyzing parameters of A. Then when analyzing the second "call A", // FunctionParmMutationAnalyzer can use this memoized value to avoid infinite // recursion. - Results

[clang] [clang][CodeGenOpenCL][NFC] Remove redundant map lookups (PR #125285)

2025-01-31 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/125285 None >From fa5566e41f8d01535ce4fb33c140fe2fb0e6ae60 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Fri, 31 Jan 2025 21:20:41 +0100 Subject: [PATCH] [clang][CodeGenOpenCL][NFC] Remove redundant map lookups

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [clang][mutation analyzer][NFC] Simplify code in ExprMutationAnalyzer (PR #125283)

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

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
@@ -31,6 +33,24 @@ namespace direct { std::unique_ptr lowerDirectlyFromCIRToLLVMIR(mlir::ModuleOp mlirModule, llvm::LLVMContext &llvmCtx); + +class CIRToLLVMGlobalOpLowering +: public mlir::OpConversionPattern { + mlir::DataLayout const &dataLa

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-31 Thread Reid Kleckner via cfe-commits
rnk wrote: I assume it is safe for all device side compilations to ignore this attribute. Presumably device code uses fully general patterns to access global data that could live in any shared object. Most device ISAs are virtual anyway, it's not like they're going to use PC relative addressin

[clang] [clang][CodeGenOpenCL][NFC] Remove redundant map lookups (PR #125285)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Balazs Benics (steakhal) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125285.diff 1 Files Affected: - (modified) clang/lib/CodeGen/CGOpenCLRuntime.cpp (+13-10) ``diff diff --git a/clang/lib/CodeGe

[clang] [clang][CodeGenOpenCL][NFC] Remove redundant map lookups (PR #125285)

2025-01-31 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/125285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Allow 'inline' on some declarations in MS compatibility mode (PR #125250)

2025-01-31 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: ef91cae https://github.com/llvm/llvm-project/actions/runs/13079539011 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-project/compare) https://github.com/l

[clang] [PAC] Do not support some values of branch-protection with ptrauth-returns (PR #125280)

2025-01-31 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 ready_for_review https://github.com/llvm/llvm-project/pull/125280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Simplify and eliminate redundant map lookups (PR #125272)

2025-01-31 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: @steakhal Thank you for doing this! https://github.com/llvm/llvm-project/pull/125272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM once the remaining comments are addressed! https://github.com/llvm/llvm-project/pull/125260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/125260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
@@ -22,16 +34,156 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-01-31 Thread Eli Friedman via cfe-commits
@@ -1596,12 +1596,14 @@ QualType Sema::BuildQualifiedType(QualType T, SourceLocation Loc, QualType ProblemTy; if (T->isAnyPointerType() || T->isReferenceType() || -T->isMemberPointerType()) { +T->isMemberPointerType() || T->isArrayType()) { Qual

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-01-31 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Adding to the current comments. https://github.com/llvm/llvm-project/pull/123495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-01-31 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/123495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-01-31 Thread Shafik Yaghmour via cfe-commits
@@ -159,12 +160,13 @@ void test() { // expected-note@-3 {{cannot use initializer list at the beginning of a macro argument}} } -// CHECK: fix-it:"{{.*}}macro_with_initializer_list.cpp":{145:11-145:11}:"(" -// CHECK: fix-it:"{{.*}}macro_with_initializer_list.cpp":{145:23-145

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-01-31 Thread Shafik Yaghmour via cfe-commits
@@ -180,3 +182,11 @@ void test2() { // expected-error@-3 {{use of undeclared identifier}} // expected-note@-4 {{cannot use initializer list at the beginning of a macro argument}} } + +#define LIM() 10 +// expected-note@-1 {{'LIM' is defined here as a function-like macro;

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Nathan Lanza via cfe-commits
@@ -31,6 +33,24 @@ namespace direct { std::unique_ptr lowerDirectlyFromCIRToLLVMIR(mlir::ModuleOp mlirModule, llvm::LLVMContext &llvmCtx); + +class CIRToLLVMGlobalOpLowering lanza wrote: This is originally in `clang/lib/CIR/Lowerin

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

2025-01-31 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 01/12] [lldb] Analyze enum promotion type during parsing --- clang/

[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)

2025-01-31 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/123977 >From 50f8b16bf83d70cc37f2ac7e70c9195a4c4cda02 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Thu, 16 Jan 2025 01:32:25 + Subject: [PATCH 1/8] wip --- clang/lib/CodeGen/CGExpr.cpp | 19 ++

[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)

2025-01-31 Thread Sarah Spall via cfe-commits
@@ -0,0 +1,52 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s + +// CHECK: %struct.S = type { <2 x i32>, float } +// CHECK: [[ConstS:@.*]] = private unnamed_addr constant %struct.S { <2

[clang] [libcxx] Reland: [clang] unified CWG2398 and P0522 changes; finishes implementation of P3310 (PR #124137)

2025-01-31 Thread via cfe-commits
higher-performance wrote: Hi, I think there might be a bug introduced here - would you mind taking a look at #125290? https://github.com/llvm/llvm-project/pull/124137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-31 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 01/15] [clang-format] Add BreakBeforeTemplateClose option --- clang/d

[clang] [clang][dataflow][NFC] Remove double lookup (PR #125282)

2025-01-31 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/125282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][mutation analyzer][NFC] Simplify code in ExprMutationAnalyzer (PR #125283)

2025-01-31 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata approved this pull request. LGTM. Thank you for the update! https://github.com/llvm/llvm-project/pull/125283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-01-31 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/120896 >From 295df258043ef5a87ae603eedd308b863bad7b59 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 22 Dec 2024 15:14:30 +0200 Subject: [PATCH 1/2] [Clang] allow restrict qualifier for array types with poin

[clang] Add clang atomic control options and attribute (PR #114841)

2025-01-31 Thread Yaxun Liu via cfe-commits
@@ -623,6 +623,10 @@ class LangOptions : public LangOptionsBase { // WebAssembly target. bool NoWasmOpt = false; + /// The default atomic codegen options specified by command line in the + /// format of key:{on|off}. + std::vector AtomicOptionsAsWritten; ---

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-31 Thread via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-31 Thread via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Clang][counted_by] Don't treat a __bdos argument as an array if it isn't (PR #125298)

2025-01-31 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: This tentatively looks good to me. Do you need a reduced test case for this? `cvise` gave me: ```c typedef struct { char __padding[0]; } spinlock_t; struct { int priv_len; spinlock_t addr_list_lock; char *dev_addr; char priv[] __attribute__((__counted_by__(priv_len

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/125260 >From 4801886dd4c45d32891a7337ad7430a6c5137929 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 28 Jan 2025 12:28:58 -0800 Subject: [PATCH 1/8] [CIR] Initial implementation of CIR-to-LLVM IR lowering pa

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-31 Thread via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] [Driver] Refactor option '-mlink-bitcode-file'. (PR #125322)

2025-01-31 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 created https://github.com/llvm/llvm-project/pull/125322 Associate '-mlink-bitcode-file' as both CC1 and FC1 option. Fixes https://gitlab.e4s.io/uo-public/llvm-openmp-offloading-v2/-/jobs/360327 >From c0eed4a42d294aac3237915ab83b4482936f206a Mon Sep 17 00:00:0

[clang] [Driver] Refactor option '-mlink-bitcode-file'. (PR #125322)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amit Kumar Pandey (ampandey-1995) Changes Associate '-mlink-bitcode-file' as both CC1 and FC1 option. Fixes https://gitlab.e4s.io/uo-public/llvm-openmp-offloading-v2/-/jobs/360327 --- Full diff: https://github.com/llvm/llvm-project/pull/

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

2025-01-31 Thread Amit Kumar Pandey via cfe-commits
ampandey-1995 wrote: PR https://github.com/llvm/llvm-project/pull/125322 is up for fixes. 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-commi

[clang] [Driver] Refactor option '-mlink-bitcode-file'. (PR #125322)

2025-01-31 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/125322 >From c1c3563865977cd4bd5878f3b81992637fbded5b Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Sat, 1 Feb 2025 07:02:52 +0530 Subject: [PATCH] [Driver] Refactor option '-mlink-bitcode-file'. Associate '-

[clang] [Driver] Refactor option '-mlink-bitcode-file'. (PR #125322)

2025-01-31 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/125322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Allow 'inline' on some declarations in MS compatibility mode (PR #125250)

2025-01-31 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: /cherry-pick ef91cae https://github.com/llvm/llvm-project/pull/125250 ___ 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-31 Thread Ilia Kuklin via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( kuilpd wrote: Well... I t

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

2025-01-31 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: > Mostl

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

2025-01-31 Thread Ilia Kuklin via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( kuilpd wrote: > > Iterati

[clang] Allow 'inline' on some declarations in MS compatibility mode (PR #125250)

2025-01-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman milestoned https://github.com/llvm/llvm-project/pull/125250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Do not support some values of branch-protection with ptrauth-returns (PR #125280)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-backend-arm Author: Daniil Kovalev (kovdan01) Changes This patch does two things. 1. Previously, when checking driver arguments, we emitted an error for unsupported values of `-mbranch-protection` when using pauthtest

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

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

2025-01-31 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: Apologi

<    1   2   3   4   5   >