[clang] Extend life of variables in `DiagComparison` in `ExprConstant` (PR #79522)

2024-05-03 Thread via cfe-commits
AdvenamTacet wrote: It's not needed. https://github.com/llvm/llvm-project/pull/79522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Extend life of variables in `DiagComparison` in `ExprConstant` (PR #79522)

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

[clang] [Clang] Allow raw string literals in C as an extension (PR #88265)

2024-05-03 Thread Owen Pan via cfe-commits
@@ -3850,6 +3850,7 @@ LangOptions getFormattingLangOpts(const FormatStyle ) { // the sequence "<::" will be unconditionally treated as "[:". // Cf. Lexer::LexTokenInternal. LangOpts.Digraphs = LexingStd >= FormatStyle::LS_Cpp11; + LangOpts.RawStringLiterals = LexingStd

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-03 Thread via cfe-commits
https://github.com/antangelo created https://github.com/llvm/llvm-project/pull/91046 Adds AArch64 support for the `preserve_none` calling convention. Registers X0-X17 and X19-X28 are caller save, and can be used to pass arguments. Delegates to AAPCS for all other registers. Closes #87423

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-05-03 Thread Eli Friedman via cfe-commits
@@ -908,6 +908,69 @@ void CodeGenFunction::EmitIfStmt(const IfStmt ) { incrementProfileCounter(); } +bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression, + bool HasEmptyBody) { + if

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-05-03 Thread Eli Friedman via cfe-commits
@@ -908,6 +908,69 @@ void CodeGenFunction::EmitIfStmt(const IfStmt ) { incrementProfileCounter(); } +bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression, + bool HasEmptyBody) { + if

[clang] [clang-format] Don't remove parentheses of fold expressions (PR #91045)

2024-05-03 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/91045 Fixes #90966. >From 2cc5ef7cca02578262795a7f7ea840d0a1496f74 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 3 May 2024 22:15:33 -0700 Subject: [PATCH] [clang-format] Don't remove parentheses of fold

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-05-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/90066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-05-03 Thread Eli Friedman via cfe-commits
@@ -908,6 +908,69 @@ void CodeGenFunction::EmitIfStmt(const IfStmt ) { incrementProfileCounter(); } +bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression, + bool HasEmptyBody) { + if

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-05-03 Thread Eli Friedman via cfe-commits
@@ -908,6 +908,69 @@ void CodeGenFunction::EmitIfStmt(const IfStmt ) { incrementProfileCounter(); } +bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression, + bool HasEmptyBody) { + if

[clang] [clang][docs] fix rendering issue in UsersManual.rst (PR #90308)

2024-05-03 Thread Nikita Kniazev via cfe-commits
Kojoley wrote: Could you please merge/commit for me? https://github.com/llvm/llvm-project/pull/90308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Fix MSVC ABI for classes with a deleted copy assignment operator (PR #90547)

2024-05-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/90547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Fix MSVC ABI for classes with a deleted copy assignment operator (PR #90547)

2024-05-03 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/90547 >From f404db44d3770cdb8ac5123c16c0b04314eda698 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Mon, 29 Apr 2024 22:09:52 -0400 Subject: [PATCH 1/5] [clang][CodeGen] Fix MS ABI for classes with non static data

[clang] Reland "[OpenMP][TR12] change property of map-type modifier." (PR #90935)

2024-05-03 Thread via cfe-commits
https://github.com/jyu2-git updated https://github.com/llvm/llvm-project/pull/90935 >From 8468a10bf34e4c432b181d40c370043ad21b5801 Mon Sep 17 00:00:00 2001 From: jyu2-git Date: Thu, 2 May 2024 20:55:18 -0700 Subject: [PATCH 1/4] Revert "Revert "[OpenMP][TR12] change property of map-type

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-05-03 Thread Mircea Trofin via cfe-commits
@@ -1056,6 +1083,25 @@ void CoroCloner::create() { // Set up the new entry block. replaceEntryBlock(); + // Turn symmetric transfers into musttail calls. + for (CallInst *ResumeCall : Shape.SymmetricTransfers) { +ResumeCall = cast(VMap[ResumeCall]); +

[clang] [clang][CodeGen] Fix MSVC ABI for classes with a deleted copy assignment operator (PR #90547)

2024-05-03 Thread Max Winkler via cfe-commits
@@ -1131,13 +1132,18 @@ static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, return false; if (RD->hasNonTrivialCopyAssignment()) return false; + if (RD->needsImplicitCopyAssignment() && !RD->hasSimpleCopyAssignment()) MaxEW707 wrote:

[clang] Reland "[OpenMP][TR12] change property of map-type modifier." (PR #90935)

2024-05-03 Thread via cfe-commits
https://github.com/jyu2-git updated https://github.com/llvm/llvm-project/pull/90935 >From 8468a10bf34e4c432b181d40c370043ad21b5801 Mon Sep 17 00:00:00 2001 From: jyu2-git Date: Thu, 2 May 2024 20:55:18 -0700 Subject: [PATCH 1/3] Revert "Revert "[OpenMP][TR12] change property of map-type

[clang] Reland "[OpenMP][TR12] change property of map-type modifier." (PR #90935)

2024-05-03 Thread via cfe-commits
https://github.com/jyu2-git updated https://github.com/llvm/llvm-project/pull/90935 >From 8468a10bf34e4c432b181d40c370043ad21b5801 Mon Sep 17 00:00:00 2001 From: jyu2-git Date: Thu, 2 May 2024 20:55:18 -0700 Subject: [PATCH 1/2] Revert "Revert "[OpenMP][TR12] change property of map-type

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-05-03 Thread Hubert Tong via cfe-commits
@@ -908,6 +908,69 @@ void CodeGenFunction::EmitIfStmt(const IfStmt ) { incrementProfileCounter(); } +bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression, + bool HasEmptyBody) { + if

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-05-03 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast commented: @cor3ntin, can you take a look at the case I added? Thanks. https://github.com/llvm/llvm-project/pull/90066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-05-03 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast edited https://github.com/llvm/llvm-project/pull/90066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[OpenMP][TR12] change property of map-type modifier." (PR #90935)

2024-05-03 Thread via cfe-commits
jyu2-git wrote: I don't really understand the problem. So you mean static_cast having problem? We have two function like this the other one is isMapModifier. I just wonder why we don't have problem before. https://github.com/llvm/llvm-project/pull/90935

[clang] [FMV][AArch64] Don't optimize backward compatible features in resolver. (PR #90928)

2024-05-03 Thread Tomas Matheson via cfe-commits
tmatheson-arm wrote: I agree with the other comments, and also I think changes like this should not go in this fast and with so few eyes on them. https://github.com/llvm/llvm-project/pull/90928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Bounds-Safety] Reserve slot in SanitizerHandler enum for Bounds-Safety (PR #91032)

2024-05-03 Thread Dan Liew via cfe-commits
https://github.com/delcypher created https://github.com/llvm/llvm-project/pull/91032 Due to how `CodeGenFunction::EmitTrapCheck` is implemented `SanitizerHandler` with numeric value 0x19 needs to be reserved because `-fbounds-safety` generates trap instructions with that value embedded in the

[clang] Reland "[OpenMP][TR12] change property of map-type modifier." (PR #90935)

2024-05-03 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Yes, its there but it's too late we can't cast to enum invalid values it should be like: ``` unsigned MapType = getOpenMPSimpleClauseType( OMPC_map, PP.getSpelling(Tok), P.getLangOpts()); if (MapType == OMPC_MAP_to || MapType == OMPC_MAP_from || MapType ==

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

2024-05-03 Thread Richard Smith via cfe-commits
@@ -711,6 +711,26 @@ void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, if (VerifyOnly) return; + // Enter a lifetime extension context, then we can support lifetime + // extension of temporary created by aggregate

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

2024-05-03 Thread Richard Smith via cfe-commits
@@ -206,13 +206,10 @@ namespace cwg1814 { // cwg1814: yes #endif } -namespace cwg1815 { // cwg1815: no +namespace cwg1815 { // cwg1815: yes zygoloid wrote: A test for constant evaluation would be nice here too. Maybe: ```c++ struct C { const int = 0; };

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

2024-05-03 Thread Richard Smith via cfe-commits
@@ -10698,7 +10698,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/1815.html;>1815 CD4 Lifetime extension in aggregate initialization -No +Clang 19 zygoloid wrote: ```suggestion Clang 19 ``` We use

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

2024-05-03 Thread Richard Smith via cfe-commits
@@ -122,7 +122,7 @@ void aggregateWithReferences() { clang_analyzer_dump(viaReference.ry); // expected-warning-re {{_extended_object{Composite, viaReference, S{{[0-9]+}}} }} // clang does not currently implement extending lifetime of object bound to reference members of

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

2024-05-03 Thread Richard Smith via cfe-commits
@@ -269,6 +269,26 @@ void init_capture_init_list() { // CHECK: } } +void check_dr1815() { // dr1815: yes +#if __cplusplus >= 201402L + + struct A { +int & = 0; +~A() {} + }; + + struct B { +A & = A{}; +~B() {} + }; + + // CHECK: void

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

2024-05-03 Thread Richard Smith via cfe-commits
@@ -8194,25 +8216,18 @@ void Sema::checkInitializerLifetime(const InitializedEntity , } switch (shouldLifetimeExtendThroughPath(Path)) { + case PathLifetimeKind::ShouldExtend: zygoloid wrote: Do we need separate `ShouldExtend` and `Extend`

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

2024-05-03 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/87933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-03 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Thanks for working on this. https://github.com/llvm/llvm-project/pull/87933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,61 @@ +//=== CIRGenAction.h - CIR Code Generation Frontend Action -*- 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:

[clang] [llvm] [Clang] -fseparate-named-sections option (PR #91028)

2024-05-03 Thread Petr Hosek via cfe-commits
petrhosek wrote: This is an alternative approach to address the issue described in https://discourse.llvm.org/t/rfc-support-for-memory-regions-in-elf/78570 which doesn't require a custom section type. https://github.com/llvm/llvm-project/pull/91028

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/91007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,61 @@ +//===--- CIRGenModule.h - Per-Module state for CIR gen --*- 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:

[clang] [llvm] [Clang] -fseparate-named-sections option (PR #91028)

2024-05-03 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/91028 When set, the compiler will use separate unique sections for global symbols in named special sections (e.g. symbols that are annotated with __attribute__((section(.... Doing so enables linker GC to

[clang] [FMV][AArch64] Don't optimize backward compatible features in resolver. (PR #90928)

2024-05-03 Thread Sam Elliott via cfe-commits
lenary wrote: Is this check even right for MTE? FEAT_MTE uses encodings that are undefined (rather than nop-compatible) in the base architecture, even though those encodings are not doing tag checking until you enable at least FEAT_MTE2 - so I cannot execute e.g. `IRG` on a base armv8.0a

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -42,6 +47,14 @@ CreateFrontendBaseAction(CompilerInstance ) { StringRef Action("unknown"); (void)Action; + auto UseCIR = CI.getFrontendOpts().UseClangIRPipeline; bcardosolopes wrote: Should this be the case for actual lib/CIR/CodeGen too? MLIR uses

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s bcardosolopes wrote: We don't have any IR to test just yet. @lanza you could use `FileCheck` with `--allow-empty` here for now. You could also rename this test

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-03 Thread Justin Bogner via cfe-commits
@@ -115,6 +115,30 @@ StringRef Triple::getArchName(ArchType Kind, SubArchType SubArch) { if (SubArch == AArch64SubArch_arm64e) return "arm64e"; break; + case Triple::dxil: +switch (SubArch) { +case Triple::NoSubArch: +case Triple::DXILSubArch_v1_0:

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-03 Thread Justin Bogner via cfe-commits
@@ -744,7 +744,7 @@ void codegen::setFunctionAttributes(StringRef CPU, StringRef Features, Expected> codegen::createTargetMachineForTriple(StringRef TargetTriple, CodeGenOptLevel OptLevel) { - Triple TheTriple(TargetTriple); + Triple

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-03 Thread Justin Bogner via cfe-commits
@@ -1200,6 +1224,27 @@ std::string Triple::normalize(StringRef Str) { } } + // Normalize DXIL triple if it does not include DXIL version number. + // Determine DXIL version number using the minor version number of Shader + // Model version specified in target triple,

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-03 Thread Justin Bogner via cfe-commits
@@ -630,7 +630,7 @@ extern "C" int optMain( } } - Triple ModuleTriple(M->getTargetTriple()); + Triple ModuleTriple(Triple::normalize(M->getTargetTriple())); bogner wrote: Similarly to my concern about updating `createTargetMachineForTriple`, I don't

[clang] [llvm] [AArch64] Add support for Qualcomm Oryon processor (PR #91022)

2024-05-03 Thread Wei Zhao via cfe-commits
https://github.com/wxz2020 created https://github.com/llvm/llvm-project/pull/91022 Oryon is an ARM V8 AArch64 CPU from Qualcomm. >From 8aebe46d7fdd15f02a9716718f53b03056ef0d19 Mon Sep 17 00:00:00 2001 From: Wei Zhao Date: Fri, 3 May 2024 22:01:58 + Subject: [PATCH] [AArch64] Add support

[clang] Propeller config for clang (PR #91002)

2024-05-03 Thread Sriraman Tallam via cfe-commits
@@ -928,6 +928,186 @@ if (CLANG_BOLT AND NOT LLVM_BUILD_INSTRUMENTED) ) endif() +if (CLANG_PROPELLER_INSTRUMENT AND NOT LLVM_BUILD_INSTRUMENTED) + set(CLANG_PATH ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang) + set(CLANGXX_PATH ${CLANG_PATH}++) + set(PROPELLER_ARTIFACTS_DIR

[clang] Propeller config for clang (PR #91002)

2024-05-03 Thread Sriraman Tallam via cfe-commits
https://github.com/tmsri updated https://github.com/llvm/llvm-project/pull/91002 >From a9daae4fafb096253a985054bbfa8482669796e0 Mon Sep 17 00:00:00 2001 From: Sriraman Tallam Date: Fri, 3 May 2024 12:43:29 -0700 Subject: [PATCH 1/2] Propeller config for clang This patch adds a Propeller config

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-03 Thread Justin Bogner via cfe-commits
@@ -4675,7 +4676,7 @@ bool CompilerInvocation::CreateFromArgsImpl( // FIXME: We shouldn't have to pass the DashX option around here InputKind DashX = Res.getFrontendOpts().DashX; ParseTargetArgs(Res.getTargetOpts(), Args, Diags); - llvm::Triple

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-03 Thread Bill Wendling via cfe-commits
@@ -335,6 +336,22 @@ Attribute Changes in Clang - Clang now warns that the ``exclude_from_explicit_instantiation`` attribute is ignored when applied to a local class or a member thereof. +- The ``counted_by`` attribute can now be late parsed in C when

[clang] [clang][test] Fix instantiation-depth-default.cpp under ubsan config on Windows (PR #91021)

2024-05-03 Thread Duo Wang via cfe-commits
https://github.com/wdunicornpro created https://github.com/llvm/llvm-project/pull/91021 Clang test `instantiation-depth-default.cpp` fails on Windows when built with `ubsan` due to extra warnings printed by the compiler: ```console File instantiation-depth-default.cpp Line 11: stack nearly

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-03 Thread Andy Kaylor via cfe-commits
@@ -3225,11 +3204,10 @@ static void RenderFloatingPointOptions(const ToolChain , const Driver , if (!FPContract.empty()) CmdArgs.push_back(Args.MakeArgString("-ffp-contract=" + FPContract)); - if (!RoundingFPMath) -

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-03 Thread Andy Kaylor via cfe-commits
@@ -3010,13 +2995,8 @@ static void RenderFloatingPointOptions(const ToolChain , const Driver , // Validate and pass through -ffp-contract option. case options::OPT_ffp_contract: { StringRef Val = A->getValue(); - if (PreciseFPModel) {

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-03 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/91017 This change refactors RenderFloatingPointOptions() to eliminate some excessively complicated logic and a redundant switch statement. The logic being simplified is an artifact of the original -ffp-model

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-03 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @dyung Yup, that is expected https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-03 Thread via cfe-commits
dyung wrote: > @zmodem Fixed in > [3191e0b](https://github.com/llvm/llvm-project/commit/3191e0b52725aa17651e38d26284386f3ea64eb6) This change also seems to fix the small example I posted, I'll double check it against our original source code. https://github.com/llvm/llvm-project/pull/90152

[clang] [HLSL] Implement 202x conforming literals (PR #91015)

2024-05-03 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/91015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement 202x conforming literals (PR #91015)

2024-05-03 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/91015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement 202x conforming literals (PR #91015)

2024-05-03 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/91015 This implements the HLSL 202x conforming literals feature. The feature proposal is available here: https://github.com/microsoft/hlsl-specs/blob/main/proposals/0017-conform ing-literals.md The language

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-03 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: Given that @bogner had concerns about the other approach I think we should get him to review this before moving forward. That said, other than some missing unit test coverage I think this approach looks fine.

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-03 Thread Chris B via cfe-commits
@@ -1200,6 +1224,27 @@ std::string Triple::normalize(StringRef Str) { } } + // Normalize DXIL triple if it does not include DXIL version number. + // Determine DXIL version number using the minor version number of Shader + // Model version specified in target triple,

[clang] [NFC] Use `const&` avoiding copies (PR #90334)

2024-05-03 Thread Danny Mösch via cfe-commits
SimplyDanny wrote: The failing Windows tests seem to be related to my change, yet I can't see what actually failed. Can you help me figure out what's wrong, @lipracer? https://github.com/llvm/llvm-project/pull/90334 ___ cfe-commits mailing list

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-03 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @zmodem Fixed in 3191e0b52725aa17651e38d26284386f3ea64eb6 https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Add all remaining features to bleeding-edge (PR #90875)

2024-05-03 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin closed https://github.com/llvm/llvm-project/pull/90875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5d81b1c - [WebAssembly] Add all remaining features to bleeding-edge (#90875)

2024-05-03 Thread via cfe-commits
Author: Heejin Ahn Date: 2024-05-03T14:08:22-07:00 New Revision: 5d81b1c50a6eadc5d2ebe8c524dd2daa665402d7 URL: https://github.com/llvm/llvm-project/commit/5d81b1c50a6eadc5d2ebe8c524dd2daa665402d7 DIFF: https://github.com/llvm/llvm-project/commit/5d81b1c50a6eadc5d2ebe8c524dd2daa665402d7.diff

[clang] [Clang][Sema] Fix template name lookup for operator= (PR #90999)

2024-05-03 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/90999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3191e0b - [Clang][Sema] Fix template name lookup for operator= (#90999)

2024-05-03 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-05-03T17:07:52-04:00 New Revision: 3191e0b52725aa17651e38d26284386f3ea64eb6 URL: https://github.com/llvm/llvm-project/commit/3191e0b52725aa17651e38d26284386f3ea64eb6 DIFF:

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-03 Thread Chris Apple via cfe-commits
cjappl wrote: Ah! Nice, that is a totally valid solution as well. The only argument for the parameter that I can think of is symmetry. I just noticed it _could_ accept a parameter, so I expected the behavior above. Absolutely good by me to strike it from being possible.

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-03 Thread Dan Liew via cfe-commits
@@ -335,6 +336,22 @@ Attribute Changes in Clang - Clang now warns that the ``exclude_from_explicit_instantiation`` attribute is ignored when applied to a local class or a member thereof. +- The ``counted_by`` attribute can now be late parsed in C when

[clang] [webkit.RefCntblBaseVirtualDtor] Ignore WTF::RefCounted and its variants missing virtual destructor (PR #91009)

2024-05-03 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91009 >From 2b5782f9a7f6473174ccefa005268debb79aa744 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 3 May 2024 13:35:29 -0700 Subject: [PATCH 1/3] [webkit.RefCntblBaseVirtualDtor] Ignore WTF::RefCounted and its

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-03 Thread Bill Wendling via cfe-commits
@@ -6534,6 +6536,15 @@ def err_counted_by_attr_refer_to_union : Error< "'counted_by' argument cannot refer to a union member">; def note_flexible_array_counted_by_attr_field : Note< "field %0 declared here">; +def err_counted_by_attr_pointee_unknown_size : Error< +

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-05-03 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/90397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[OpenMP][TR12] change property of map-type modifier." (PR #90935)

2024-05-03 Thread via cfe-commits
jyu2-git wrote: Hi @vitalybuka, could you please check what in isMapType clang/lib/Parse/ParseOpenMP.cpp : Should look like following: static OpenMPMapClauseKind isMapType(Parser ) { Token Tok = P.getCurToken(); // The map-type token can be either an identifier or the C++ delete keyword.

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-03 Thread Bill Wendling via cfe-commits
@@ -631,6 +631,18 @@ bool Type::isStructureType() const { return false; } +bool Type::isStructureTypeWithFlexibleArrayMember() const { + const auto *RT = getAs(); + if (!RT) +return false; + const auto *Decl = RT->getDecl(); + if (!Decl->isStruct()) +return

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-05-03 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. Just nits, otherwise LGTM! https://github.com/llvm/llvm-project/pull/90397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-05-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,107 @@ +//===--- UseStdFormatCheck.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-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-05-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,84 @@ +.. title:: clang-tidy - modernize-use-std-format + +modernize-use-std-format + + +Converts calls to ``absl::StrFormat``, or other functions via +configuration options, to C++20's ``std::format``, or another function +via a configuration

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-05-03 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Should the check options use the simpler format? E.g. ``` CheckOptions: modernize-use-std-format.StrFormatLikeFunctions: 'unqualified_strprintf;::strprintf; mynamespace::strprintf2' ``` https://github.com/llvm/llvm-project/pull/90397

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-05-03 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/90397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-05-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,107 @@ +//===--- UseStdFormatCheck.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] [llvm] [WebAssembly] Implement prototype f32.load_f16 instruction. (PR #90906)

2024-05-03 Thread Heejin Ahn via cfe-commits
@@ -321,6 +321,18 @@ def int_wasm_relaxed_dot_bf16x8_add_f32: [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v4f32_ty], [IntrNoMem, IntrSpeculatable]>; +//===--===// +//

[clang] [clang] Note that optnone and target attributes do not apply to nested functions (PR #82815)

2024-05-03 Thread Reid Kleckner via cfe-commits
rnk wrote: Thanks for the reminder, I missed the update. https://github.com/llvm/llvm-project/pull/82815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-03 Thread Dan Liew via cfe-commits
@@ -6534,6 +6536,15 @@ def err_counted_by_attr_refer_to_union : Error< "'counted_by' argument cannot refer to a union member">; def note_flexible_array_counted_by_attr_field : Note< "field %0 declared here">; +def err_counted_by_attr_pointee_unknown_size : Error< +

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-03 Thread Bill Wendling via cfe-commits
@@ -6534,6 +6536,15 @@ def err_counted_by_attr_refer_to_union : Error< "'counted_by' argument cannot refer to a union member">; def note_flexible_array_counted_by_attr_field : Note< "field %0 declared here">; +def err_counted_by_attr_pointee_unknown_size : Error< +

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-03 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/90809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Note that optnone and target attributes do not apply to nested functions (PR #82815)

2024-05-03 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/82815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4e6d30e - [clang] Note that optnone and target attributes do not apply to nested functions (#82815)

2024-05-03 Thread via cfe-commits
Author: Reid Kleckner Date: 2024-05-03T13:50:27-07:00 New Revision: 4e6d30e2c17fa2be3bc5106c2541fddb62b2d4ee URL: https://github.com/llvm/llvm-project/commit/4e6d30e2c17fa2be3bc5106c2541fddb62b2d4ee DIFF: https://github.com/llvm/llvm-project/commit/4e6d30e2c17fa2be3bc5106c2541fddb62b2d4ee.diff

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-03 Thread Bill Wendling via cfe-commits
@@ -335,6 +336,22 @@ Attribute Changes in Clang - Clang now warns that the ``exclude_from_explicit_instantiation`` attribute is ignored when applied to a local class or a member thereof. +- The ``counted_by`` attribute can now be late parsed in C when

[clang] [webkit.RefCntblBaseVirtualDtor] Ignore WTF::RefCounted and its variants missing virtual destructor (PR #91009)

2024-05-03 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91009 >From 2b5782f9a7f6473174ccefa005268debb79aa744 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 3 May 2024 13:35:29 -0700 Subject: [PATCH 1/2] [webkit.RefCntblBaseVirtualDtor] Ignore WTF::RefCounted and its

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Erich Keane via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s erichkeane wrote: Would still like this to 'pipe' to filecheck. In addition to 'not crash', it would be worthwhile to ensure we emit sensible IR.

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Erich Keane via cfe-commits
@@ -42,6 +47,14 @@ CreateFrontendBaseAction(CompilerInstance ) { StringRef Action("unknown"); (void)Action; + auto UseCIR = CI.getFrontendOpts().UseClangIRPipeline; erichkeane wrote: Coding standard doesn't allow use of 'auto' here, only when the actual

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Erich Keane via cfe-commits
@@ -0,0 +1,61 @@ +//===--- CIRGenModule.h - Per-Module state for CIR gen --*- 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:

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Erich Keane via cfe-commits
@@ -0,0 +1,59 @@ +//===- CIRGenerator.h - CIR Generation from Clang AST -===// +// +// 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] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Erich Keane via cfe-commits
@@ -53,8 +66,13 @@ CreateFrontendBaseAction(CompilerInstance ) { case DumpTokens: return std::make_unique(); case EmitAssembly: return std::make_unique(); case EmitBC: return std::make_unique(); +#if CLANG_ENABLE_CIR + case EmitCIR:

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Erich Keane via cfe-commits
@@ -0,0 +1,61 @@ +//===--- CIRGenModule.h - Per-Module state for CIR gen --*- 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:

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Erich Keane via cfe-commits
@@ -0,0 +1,61 @@ +//=== CIRGenAction.h - CIR Code Generation Frontend Action -*- 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:

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-03 Thread Doug Wyatt via cfe-commits
@@ -8057,3 +8057,70 @@ requirement: } }]; } + +def DocCatNonBlockingNonAllocating : DocumentationCategory<"Performance Constraint Attributes"> { + let Content = [{ dougsonos wrote: Done in the next commit(s) I push

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-03 Thread Doug Wyatt via cfe-commits
dougsonos wrote: Hi Chris, Currently I had only envisioned that `nonblocking` would have the optional conditional expression parameter, so `blocking(false)` should generate an error. I had mistakenly thought that the parser would take care of this via the ways that the attributes are

[clang] [llvm] [WebAssembly] Implement prototype f32.load_f16 instruction. (PR #90906)

2024-05-03 Thread Brendan Dahl via cfe-commits
brendandahl wrote: > Overall this looks good, and I think it makes sense to model this as short* > for now. I think it will be interesting to see if that ends up causing > issues. Out of curiosity does this work if you try `_fp16`? I was trying _Float16 and that wasn't working since it

[clang] [webkit.RefCntblBaseVirtualDtor] Ignore WTF::RefCounted and its variants missing virtual destructor (PR #91009)

2024-05-03 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/91009 None >From 2b5782f9a7f6473174ccefa005268debb79aa744 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 3 May 2024 13:35:29 -0700 Subject: [PATCH] [webkit.RefCntblBaseVirtualDtor] Ignore WTF::RefCounted and

  1   2   3   4   >