[clang] [clang][driver] Support `-x` for all languages in CL mode (PR #89772)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (huangqinjin) Changes After https://github.com/llvm/llvm-project/pull/68921, clang-cl gained option `-x` but only for CUDA/HIP. This commit simply removes the restriction on parameters to `-x`. Especially, it is able to use `-x

[clang] [clang][driver] Support `-x` for all languages in CL mode (PR #89772)

2024-04-23 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,

[clang] Align -ffp-model=fast denormal handling with -ffast-math (PR #89477)

2024-04-23 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/89477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang][Sema] placement new initializes typedef array with correct size (#83124)" (PR #89036)

2024-04-23 Thread via cfe-commits
mahtohappy wrote: Hi @erichkeane Please merge this change. https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-23 Thread Nico Weber via cfe-commits
nico wrote: Here's a minimal repro: ``` % cat empty.c % foo/clang --driver-mode=cl empty.c --target=x86_64-pc-windows -fprofile-instr-generate -c /Fa && rg DEFAULTLIB empty.asm 23: .ascii " /DEFAULTLIB:libcmt.lib" 24: .ascii " /DEFAULTLIB:oldnames.lib" 25: .ascii "

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

2024-04-23 Thread Mircea Trofin via cfe-commits
mtrofin wrote: Does this address https://discourse.llvm.org/t/coro-pre-split-handling-of-the-suspend-edge/75043? Could you add a note there in that direction - a few folks were looking at going at the direction @jyknight was suggesting there, and it'd be good to have closure on the topic.

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-23 Thread Erich Keane via cfe-commits
erichkeane wrote: @alexey-bataev Not having this new 'base' type as a member of the `StmtNodes.td` results in one of the Clang tools failing (see the CI). AND, since it is a template, it can't do that. I can't make it a Mixin, because it needs to provide some of the Expr-type functions

[clang] [Driver] Restore arch suffix for PS and Windows (PR #89775)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Paul T Robinson (pogo59) Changes Commit b876596 corrected default compiler-rt library names for many targets, this patch restores the arch suffix for PlayStation and Windows which both distribute these libraries with the arch

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-23 Thread Tobias Hieta via cfe-commits
tru wrote: We have a custom toolchain that uses the new style on windows and if you build with runtimes on windows (which is the suggested way) it will end up with the new style without arch suffix. I don't think we can assume this is correct for windows in all setups. I am fine with this

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-23 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > @alexey-bataev Not having this new 'base' type as a member of the > `StmtNodes.td` results in one of the Clang tools failing (see the CI). AND, > since it is a template, it can't do that. > > I can't make it a Mixin, because it needs to provide some of the Expr-type >

[clang] [HLSL] Correctly set `__HLSL_ENABLE_16_BIT` (PR #89788)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes The preprocessor define `__HLSL_ENABLE_16_BIT` should be set to 1 if native 16-bit types are enabled and not set if they are not. Previously we were setting the value to match the HLSL active language

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-23 Thread Tobias Hieta via cfe-commits
tru wrote: It's been like that for maybe 2-3 years now and no one has complained about it, so I think that change is solid. I can suggest a CMake change, but last time it was discussed I think @maskray was against a new variable, but since we might need to have some different behaviour it

[clang] [libcxx] [lld] [llvm] Triple::normalize: Set OS for 3-component triple with none as middle (PR #89638)

2024-04-23 Thread YunQiang Su via cfe-commits
@@ -1149,6 +1149,13 @@ std::string Triple::normalize(StringRef Str) { } } + // For 3-component triples, the middle component is used to set Vendor; + // while if it is "none", we'd prefer to set OS. + // This is for some baremetal cases, such as "arm-none-elf". + if

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-23 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/89078 >From c611122688657287e8285edd9a2875e4975d26dd Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 17 Apr 2024 16:15:39 +0200 Subject: [PATCH 1/8] [Clang] Disallow explicit object parameters in more contexts

[clang] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-23 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/89796 >From 662f160418c704f45e57e751168903d774b74303 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 23 Apr 2024 17:41:25 +0100 Subject: [PATCH 1/2] Add initial support for AMDGCN flavoured SPIRV. ---

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-23 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/89078 >From c611122688657287e8285edd9a2875e4975d26dd Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 17 Apr 2024 16:15:39 +0200 Subject: [PATCH 1/9] [Clang] Disallow explicit object parameters in more contexts

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 Thread Derek Schuff via cfe-commits
dschuff wrote: I think "generic" is the default CPU so object files will have it enabled by default. You can still specify "mvp" as the CPU as before to avoid it. https://github.com/llvm/llvm-project/pull/80923 ___ cfe-commits mailing list

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-23 Thread Yeoul Na via cfe-commits
@@ -8547,15 +8547,25 @@ static const RecordDecl *GetEnclosingNamedOrTopAnonRecord(const FieldDecl *FD) { return RD; } -static bool -CheckCountExpr(Sema , FieldDecl *FD, Expr *E, - llvm::SmallVectorImpl ) { +static bool CheckCountedByAttrOnField( +Sema ,

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

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

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: We should probably add a release note to tell users about the new command line option, unless you think it makes more sense to do so after something uses `LateAttrParseExperimentalExt`? One concern I have is that nothing is testing the new parsing

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -592,6 +592,48 @@ class AttrSubjectMatcherAggregateRule { def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule; +// Late Attribute parsing mode enum +class LateAttrParseKind { + int Kind = val; +} + +// Never late parsed +def LateAttrParseNever :

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -592,6 +592,48 @@ class AttrSubjectMatcherAggregateRule { def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule; +// Late Attribute parsing mode enum +class LateAttrParseKind { + int Kind = val; +} AaronBallman wrote: ```suggestion //

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -1822,28 +1822,100 @@ void WriteSemanticSpellingSwitch(const std::string , OS << " }\n"; } +enum class LateAttrParseKind { Never = 0, Standard = 1, ExperimentalExt = 2 }; + +static LateAttrParseKind getLateAttrParseKind(const Record *Attr) { + // This function

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -220,8 +230,28 @@ void Parser::ParseGNUAttributes(ParsedAttributes , continue; } + bool LateParse = false; + if (!LateAttrs) +LateParse = false; + else { +if (LateAttrs->lateAttrParseExperimentalExtOnly()) { + // The

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -1822,28 +1822,100 @@ void WriteSemanticSpellingSwitch(const std::string , OS << " }\n"; } +enum class LateAttrParseKind { Never = 0, Standard = 1, ExperimentalExt = 2 }; AaronBallman wrote: ```suggestion // Note: these values need to match the values

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -1822,28 +1822,100 @@ void WriteSemanticSpellingSwitch(const std::string , OS << " }\n"; } +enum class LateAttrParseKind { Never = 0, Standard = 1, ExperimentalExt = 2 }; + +static LateAttrParseKind getLateAttrParseKind(const Record *Attr) { + // This function

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -220,8 +230,28 @@ void Parser::ParseGNUAttributes(ParsedAttributes , continue; } + bool LateParse = false; + if (!LateAttrs) +LateParse = false; + else { AaronBallman wrote: Can remove a level of indentation here by

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -592,6 +592,48 @@ class AttrSubjectMatcherAggregateRule { def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule; +// Late Attribute parsing mode enum +class LateAttrParseKind { + int Kind = val; +} + +// Never late parsed +def LateAttrParseNever :

[clang] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-23 Thread James Y Knight via cfe-commits
@@ -89,6 +89,19 @@ sections with improvements to Clang's support for those languages. C++ Language Changes +C++17 Feature Support +^ +- Clang now exposes ``__GCC_DESTRUCTIVE_SIZE`` and ``__GCC_CONSTRUCTIVE_SIZE`` + predefined macros

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-23 Thread Erich Keane via cfe-commits
erichkeane wrote: @njames93 : My test failure has to do with the "NodeIntrospection" stuff that you seemed to review ~3 years ago: https://reviews.llvm.org/D93164 At the moment, I cannot even figure out how to get it to build, but I suspect it is getting confused in some way by having a

[clang] [clang][driver] Support `-x` for all languages in CL mode (PR #89772)

2024-04-23 Thread via cfe-commits
https://github.com/huangqinjin created https://github.com/llvm/llvm-project/pull/89772 After https://github.com/llvm/llvm-project/pull/68921, clang-cl gained option `-x` but only for CUDA/HIP. This commit simply removes the restriction on parameters to `-x`. Especially, it is able to use `-x

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-23 Thread Jan Svoboda via cfe-commits
@@ -187,7 +187,8 @@ GetAffectingModuleMaps(const Preprocessor , Module *RootModule) { continue; const HeaderFileInfo *HFI = HS.getExistingLocalFileInfo(*File); -if (!HFI || (HFI->isModuleHeader && !HFI->isCompilingModuleHeader)) +if (!HFI ||

[clang] [WebAssembly] Fix uses of -DAG and -NOT in wasm-target-features.c (PR #89777)

2024-04-23 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/89777 We are currently using `PREFIX-DAG` and `PREFIX-NOT` within a single `PREFIX` test in a mixed way, but `-DAG` and `-NOT` do not work that way. For example: Result: ``` 1 2 3 ``` Test file: ```c // CHECK-DAG: 3

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-23 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/87772 >From 18912352db31406c7c5b530d6e22f77e775fbf38 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Thu, 4 Apr 2024 18:33:25 +0100 Subject: [PATCH 1/3] [clang][ExtractAPI] Fix handling of anonymous

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-23 Thread Nico Weber via cfe-commits
nico wrote: I now did build clang at ccdebbae4d77 and ccdebbae4d77^. ccdebbae4d77 has `/DEFAULTLIB:clang_rt.profile.lib` in its output, ccdebbae4d77^ has /DEFAULTLIB:clang_rt.profile-x86_64.lib`. So definitely due to this change. It sounds like you're saying that's not intentional? (It's

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -2922,7 +2922,7 @@ static bool handleFloatFloatBinOp(EvalInfo , const BinaryOperator *E, // If during the evaluation of an expression, the result is not // mathematically defined [...], the behavior is undefined. // FIXME: C++ rules require us to not conform to

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-23 Thread Paul T Robinson via cfe-commits
pogo59 wrote: > if you build with runtimes on windows (which is the suggested way) it will > end up with the new style without arch suffix Was someone from Microsoft party to that decision? If not, perhaps it needs to be revisited. We should not be making decisions about how they want to do

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

2024-04-23 Thread via cfe-commits
https://github.com/yronglin 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][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-23 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/89441 >From 9165d6086e2570198fba1c333d0c9cb9c09037c7 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 19 Apr 2024 12:13:06 -0700 Subject: [PATCH 1/3] [clang][modules] Allow module map files with textual

[clang] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-23 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. I'd rather keep the libc++ tests green while landing this PR. I tried something out, let's see if that works. Otherwise LGTM, thanks for tackling this long-standing item on our TODO list :-) https://github.com/llvm/llvm-project/pull/89446

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-04-23 Thread Benson Chu via cfe-commits
https://github.com/pestctrl updated https://github.com/llvm/llvm-project/pull/89654 >From b9efa107018daba0d45248d42043c191b28f190c Mon Sep 17 00:00:00 2001 From: Jake Vossen Date: Wed, 30 Jun 2021 15:13:13 -0500 Subject: [PATCH 1/2] [ARM] Save floating point registers with save_fp function

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-23 Thread Erich Keane via cfe-commits
erichkeane wrote: > > @alexey-bataev Not having this new 'base' type as a member of the > > `StmtNodes.td` results in one of the Clang tools failing (see the CI). AND, > > since it is a template, it can't do that. > > I can't make it a Mixin, because it needs to provide some of the Expr-type

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-23 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > I now did build clang at > [ccdebba](https://github.com/llvm/llvm-project/commit/ccdebbae4d77d3efc236af92c22941de5d437e01) > and > [ccdebba](https://github.com/llvm/llvm-project/commit/ccdebbae4d77d3efc236af92c22941de5d437e01)^. > >

[clang] [libcxx] [lld] [llvm] Triple::normalize: Set OS for 3-component triple with none as middle (PR #89638)

2024-04-23 Thread YunQiang Su via cfe-commits
wzssyqa wrote: > I've just posted an RFC to discourse about how to handle triple > normalization: > https://discourse.llvm.org/t/rfc-baremetal-target-triple-normalization/78524 We don't need to revert https://github.com/llvm/llvm-project/pull/89234 It is easy to fix `Triple::normalize` once

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-23 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Commit > [b876596](https://github.com/llvm/llvm-project/commit/b876596a76cdc183439b36455d26883b67f8ee51) > corrected default compiler-rt library names for many targets Are you sure it's this change? There are reports of similar changes showing up in

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-23 Thread via cfe-commits
@@ -2922,7 +2922,7 @@ static bool handleFloatFloatBinOp(EvalInfo , const BinaryOperator *E, // If during the evaluation of an expression, the result is not // mathematically defined [...], the behavior is undefined. // FIXME: C++ rules require us to not conform to

[clang] [Driver] Restore arch suffix for PS and Windows (PR #89775)

2024-04-23 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 created https://github.com/llvm/llvm-project/pull/89775 Commit b876596 corrected default compiler-rt library names for many targets, this patch restores the arch suffix for PlayStation and Windows which both distribute these libraries with the arch suffix. >From

[clang] [WebAssembly] Tidy up wasm-target-features.c (PR #89778)

2024-04-23 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/89778 This tidies up `wasm-target-features.c` cosmetically: - Sorts the feature tests alphabetically - Adds a space after colons >From 0d0a07ee86159ca3b706a1d17506b531e45c57d6 Mon Sep 17 00:00:00 2001 From: Heejin Ahn

[clang] [WebAssembly] Tidy up wasm-target-features.c (PR #89778)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-webassembly Author: Heejin Ahn (aheejin) Changes This tidies up `wasm-target-features.c` cosmetically: - Sorts the feature tests alphabetically - Adds a space after colons --- Full diff: https://github.com/llvm/llvm-project/pull/89778.diff 2

[clang] [llvm] [arm] Support reserving r4 and r5 alongside r9 (PR #88981)

2024-04-23 Thread via cfe-commits
https://github.com/benisxdxd updated https://github.com/llvm/llvm-project/pull/88981 >From 24453d337187e43a5901337681098d2e7520b740 Mon Sep 17 00:00:00 2001 From: benisxdxd <164242179+benisx...@users.noreply.github.com> Date: Tue, 16 Apr 2024 23:38:26 +0300 Subject: [PATCH 1/3] [arm] Support

[clang] 1d7086e - clang/win: Add a flag to disable default-linking of compiler-rt libraries (#89642)

2024-04-23 Thread via cfe-commits
Author: Nico Weber Date: 2024-04-23T11:29:59-04:00 New Revision: 1d7086e475c76046b58f4e1c5568720f1c67ad55 URL: https://github.com/llvm/llvm-project/commit/1d7086e475c76046b58f4e1c5568720f1c67ad55 DIFF: https://github.com/llvm/llvm-project/commit/1d7086e475c76046b58f4e1c5568720f1c67ad55.diff

[clang] clang/win: Add a flag to disable default-linking of compiler-rt libraries (PR #89642)

2024-04-23 Thread Nico Weber via cfe-commits
https://github.com/nico closed https://github.com/llvm/llvm-project/pull/89642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-23 Thread via cfe-commits
@@ -54,6 +54,20 @@ RecordContext *APIRecord::castToRecordContext(const APIRecord *Record) { } } +void RecordContext::stealRecordChain(RecordContext ) { + // If we don't have an empty chain append Other's chain into ours. + if (First) +Last->NextInContext =

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-23 Thread via cfe-commits
https://github.com/QuietMisdreavus edited https://github.com/llvm/llvm-project/pull/87772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-23 Thread via cfe-commits
https://github.com/QuietMisdreavus approved this pull request. Looks good! One last nitpick but you can take it or leave it. https://github.com/llvm/llvm-project/pull/87772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-23 Thread via cfe-commits
https://github.com/QuietMisdreavus edited https://github.com/llvm/llvm-project/pull/87772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-23 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > I've sent a version of this as #89729, based on your first commit here. I left a comment there. > > I think one option we have here is to consider all module maps describing a > > textual header that got included as affecting. I'm concerned that a long > > chain of

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-23 Thread Daniel Grumberg via cfe-commits
@@ -54,6 +54,20 @@ RecordContext *APIRecord::castToRecordContext(const APIRecord *Record) { } } +void RecordContext::stealRecordChain(RecordContext ) { + // If we don't have an empty chain append Other's chain into ours. + if (First) +Last->NextInContext =

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-23 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/89775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 Thread Alon Zakai via cfe-commits
https://github.com/kripken edited https://github.com/llvm/llvm-project/pull/80923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 Thread Alon Zakai via cfe-commits
@@ -668,6 +668,11 @@ AIX Support WebAssembly Support ^^^ +The -mcpu=generic configuration now enables multivalue and reference-types.These +proposals are standardized and available in all major engines. Enabling +multivalue here only enables the language

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 Thread Alon Zakai via cfe-commits
https://github.com/kripken commented: Enabling multivalue and reference-types first sgtm. https://github.com/llvm/llvm-project/pull/80923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [HLSL] Correctly set `__HLSL_ENABLE_16_BIT` (PR #89788)

2024-04-23 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/89788 The preprocessor define `__HLSL_ENABLE_16_BIT` should be set to 1 if native 16-bit types are enabled and not set if they are not. Previously we were setting the value to match the HLSL active language

[clang] [HLSL] Correctly set `__HLSL_ENABLE_16_BIT` (PR #89788)

2024-04-23 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/89788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Yeoul Na via cfe-commits
@@ -2101,9 +2173,21 @@ bool PragmaClangAttributeSupport::isAttributedSupported( return SpecifiedResult; // Opt-out rules: - // An attribute requires delayed parsing (LateParsed is on) - if (Attribute.getValueAsBit("LateParsed")) + + // An attribute requires delayed

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Correctly set `__HLSL_ENABLE_16_BIT` (PR #89788)

2024-04-23 Thread Tex Riddell via cfe-commits
https://github.com/tex3d approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/89788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Yeoul Na via cfe-commits
@@ -1371,14 +1371,23 @@ class Parser : public CodeCompletionHandler { }; // A list of late-parsed attributes. Used by ParseGNUAttributes. - class LateParsedAttrList: public SmallVector { + class LateParsedAttrList : public SmallVector { rapidsna wrote:

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-23 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/89078 >From c611122688657287e8285edd9a2875e4975d26dd Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 17 Apr 2024 16:15:39 +0200 Subject: [PATCH 1/6] [Clang] Disallow explicit object parameters in more contexts

[clang] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-23 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx created https://github.com/llvm/llvm-project/pull/89796 This change seeks to add support for vendor flavoured SPIRV - more specifically, AMDGCN flavoured SPIRV. The aim is to generate SPIRV that carries some extra bits of information that are only usable by AMDGCN

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-23 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/89078 >From c611122688657287e8285edd9a2875e4975d26dd Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 17 Apr 2024 16:15:39 +0200 Subject: [PATCH 1/7] [Clang] Disallow explicit object parameters in more contexts

[clang] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Alex Voicu (AlexVlx) Changes This change seeks to add support for vendor flavoured SPIRV - more specifically, AMDGCN flavoured SPIRV. The aim is to generate SPIRV that carries some extra bits of information that are only usable

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-23 Thread via cfe-commits
@@ -5,7 +5,7 @@ void f(this); // expected-error{{variable has incomplete type 'void'}} \ // expected-error{{invalid use of 'this' outside of a non-static member function}} -void g(this auto); // expected-error{{an explicit object parameter cannot appear in a

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-23 Thread via cfe-commits
Sirraide wrote: Alright, it took me a bit, but I’ve figured out how to continue issuing the ‘... cannot appear in a non-member function’ diagnostic where appropriate. This also handles `friend` declarations now because I had forgotten about that; I’ve also added a few more tests for

[clang] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-23 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 c793f4a4dab058cee4f283100946a1bb8e465f59 662f160418c704f45e57e751168903d774b74303 --

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-23 Thread Daniel M. Katz via cfe-commits
@@ -244,8 +244,8 @@ namespace UndefinedBehavior { constexpr int n13 = n5 + n5; // expected-error {{constant expression}} expected-note {{value -4294967296 is outside the range of }} constexpr int n14 = n3 - n5; // expected-error {{constant expression}} expected-note

[clang] [clang][modules] Only modulemaps of included textual headers are affecting (PR #89729)

2024-04-23 Thread Jan Svoboda via cfe-commits
@@ -1441,6 +1441,10 @@ void HeaderSearch::MarkFileModuleHeader(FileEntryRef FE, HFI.isCompilingModuleHeader |= isCompilingModuleHeader; } +void HeaderSearch::EnteredTextualFile(FileEntryRef File) { + getFileInfo(File).isCompilingModuleHeader = true;

[clang] Reapply "[Clang][Sema] placement new initializes typedef array with correct size (#83124)" (PR #89036)

2024-04-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 74cab54 - Reapply "[Clang][Sema] placement new initializes typedef array with correct size (#83124)" (#89036)

2024-04-23 Thread via cfe-commits
Author: mahtohappy Date: 2024-04-23T07:37:07-07:00 New Revision: 74cab546825b32f24e44d69942cdbdd129160471 URL: https://github.com/llvm/llvm-project/commit/74cab546825b32f24e44d69942cdbdd129160471 DIFF: https://github.com/llvm/llvm-project/commit/74cab546825b32f24e44d69942cdbdd129160471.diff

[clang] Reapply "[Clang][Sema] placement new initializes typedef array with correct size (#83124)" (PR #89036)

2024-04-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-04-23 Thread Benson Chu via cfe-commits
https://github.com/pestctrl updated https://github.com/llvm/llvm-project/pull/89654 >From b9efa107018daba0d45248d42043c191b28f190c Mon Sep 17 00:00:00 2001 From: Jake Vossen Date: Wed, 30 Jun 2021 15:13:13 -0500 Subject: [PATCH 1/2] [ARM] Save floating point registers with save_fp function

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-04-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/84481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Fix uses of -DAG and -NOT in wasm-target-features.c (PR #89777)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Heejin Ahn (aheejin) Changes We are currently using `PREFIX-DAG` and `PREFIX-NOT` within a single `PREFIX` test in a mixed way, but `-DAG` and `-NOT` do not work that way. For example: Result: ``` 1 2 3 ``` Test file: ```c // CHECK-DAG:

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-23 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Microsoft obviously builds and distributes with the arch suffix, supporting both 32-bit and 64-bit in the same distro. So I think they will continue to need it. (I can't actually speak for MS, but it's what I see in the Visual Studio installation.) I don't know enough about how

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-23 Thread YunQiang Su via cfe-commits
wzssyqa wrote: Will the contents of `empty.asm` correct if `lib//clang_rt.profile.lib` doesn't exist? I mean, will `empty.asm` contains `/DEFAULTLIB:clang_rt.profile-x86_64.lib` then? https://github.com/llvm/llvm-project/pull/87866 ___ cfe-commits

[clang] [libcxx] [lld] [llvm] Triple::normalize: Set OS for 3-component triple with none as middle (PR #89638)

2024-04-23 Thread Peter Waller via cfe-commits
peterwaller-arm wrote: I've just posted an RFC to discourse about how to handle triple normalization: https://discourse.llvm.org/t/rfc-baremetal-target-triple-normalization/78524 https://github.com/llvm/llvm-project/pull/89638 ___ cfe-commits mailing

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 Thread Sam Clegg via cfe-commits
sbc100 wrote: After this lands does that mean that all object files will have `multi-value` in the features section? Or only object files that actually use `mutli-value`? https://github.com/llvm/llvm-project/pull/80923 ___ cfe-commits mailing

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -2922,7 +2922,7 @@ static bool handleFloatFloatBinOp(EvalInfo , const BinaryOperator *E, // If during the evaluation of an expression, the result is not // mathematically defined [...], the behavior is undefined. // FIXME: C++ rules require us to not conform to

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

2024-04-23 Thread via cfe-commits
https://github.com/yronglin 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] [flang] [lld] [llvm] [RISCV] Split code that tablegen needs out of RISCVISAInfo. (PR #89684)

2024-04-23 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/89684 >From c28f21fb93f31661f8313259f0103dc1af44f4a7 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 22 Apr 2024 13:19:26 -0700 Subject: [PATCH 1/2] [RISCV] Split code that tablegen needs out of RISCVISAInfo.

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-23 Thread Jannik Silvanus via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, ) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName);

[clang] [HLSL] Correctly set `__HLSL_ENABLE_16_BIT` (PR #89788)

2024-04-23 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/89788 >From a44bb91986dcde7265666391c6aa46bc0876070d Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Tue, 23 Apr 2024 11:13:09 -0500 Subject: [PATCH 1/2] [HLSL] Correctly set `__HLSL_ENABLE_16_BIT` The

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-23 Thread Paul T Robinson via cfe-commits
pogo59 wrote: > what gets emitted as embedded directive, when the compiler doesn't see either > of them at compile time (with e.g. distributed build systems), while they > might be available at link time. This is exactly the scenario we had. I will double-check that it is solved by my patch,

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Yeoul Na via cfe-commits
@@ -89,13 +89,23 @@ static StringRef normalizeAttrName(StringRef Name) { return Name; } -/// isAttributeLateParsed - Return true if the attribute has arguments that -/// require late parsing. -static bool isAttributeLateParsed(const IdentifierInfo ) { +/// returns true iff

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-23 Thread Paul T Robinson via cfe-commits
pogo59 wrote: > It's been like that for maybe 2-3 years now and no one has complained about it As a downstream vendor I can tell you we work around things all the time without bothering to try to fix things upstream (I try to encourage more engagement, but I can't control what people actually

[clang] Fix objc_sel_{name,types} missing an underscore (PR #88713)

2024-04-23 Thread John McCall via cfe-commits
rjmccall wrote: Great, thanks! @Midar, if you can fix this code up so that these strings are created in one place (and test the new output, since this is not NFC), I'd be happy to sign off. https://github.com/llvm/llvm-project/pull/88713 ___

[clang] [Clang][Parser] Don't always destroy template annotations at the end of a declaration (PR #89494)

2024-04-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/89494 >From ba2e2a4bd2f7442003d6aa21f3d848cfef5061f6 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 20 Apr 2024 02:52:16 +0800 Subject: [PATCH] [Clang][Parser] Don't always destroy template annotations at the

[clang] [libcxx] [llvm] Triple::normalize: Set OS for 3-component triple with none as middle (PR #89638)

2024-04-23 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa updated https://github.com/llvm/llvm-project/pull/89638 >From a40bf92dcdaa64c2ca73d9276972c8cd47750210 Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Tue, 23 Apr 2024 01:36:17 +0800 Subject: [PATCH] Triple::normalize: Set OS for 3-component triple with none as

[clang] [libcxx] [llvm] Triple::normalize: Set OS for 3-component triple with none as middle (PR #89638)

2024-04-23 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa edited https://github.com/llvm/llvm-project/pull/89638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix objc_sel_{name,types} missing an underscore (PR #88713)

2024-04-23 Thread David Chisnall via cfe-commits
davidchisnall wrote: Yup, it’s just an optimisation. The runtime does a slightly more complex deduplication pass during loading, this just does a best effort merge so that we don’t end up with hundreds of copies of common selectors as we did with the GCC ABI. If we don’t do it, it isn’t an

  1   2   3   4   5   >