[clang] [dataflow] CXXForRangeStmt should extend flow condition (PR #80989)

2024-02-07 Thread via cfe-commits
https://github.com/martinboehme requested changes to this pull request. Can you add a test that fails without this fix? https://github.com/llvm/llvm-project/pull/80989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] d42f395 - [clang][Interp][NFC] Convert test to verify=expected,both style

2024-02-07 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-07T15:39:10+01:00 New Revision: d42f3957cea0a8f45d5f3c11db229e2ea1e6d614 URL: https://github.com/llvm/llvm-project/commit/d42f3957cea0a8f45d5f3c11db229e2ea1e6d614 DIFF: https://github.com/llvm/llvm-project/commit/d42f3957cea0a8f45d5f3c11db229e2ea1e6d614.diff LO

[clang] [clang][Sema] Subclass `-Wshorten-64-to-32` under `-Wimplicit-int-conversion` (PR #80814)

2024-02-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: LGTM aside from a minor change to the release notes, thank you for this improvement! https://github.com/llvm/llvm-project/pull/80814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [clang][Sema] Subclass `-Wshorten-64-to-32` under `-Wimplicit-int-conversion` (PR #80814)

2024-02-07 Thread Aaron Ballman via cfe-commits
@@ -149,7 +149,12 @@ Improvements to Clang's diagnostics prints. - Clang now diagnoses member template declarations with multiple declarators. -- Clang now diagnoses use of the ``template`` keyword after declarative nested name specifiers. + +- Clang now diagnoses use of th

[clang] [clang][Sema] Subclass `-Wshorten-64-to-32` under `-Wimplicit-int-conversion` (PR #80814)

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

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-07 Thread Axel Lundberg via cfe-commits
https://github.com/Zonotora edited https://github.com/llvm/llvm-project/pull/75481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Subclass `-Wshorten-64-to-32` under `-Wimplicit-int-conversion` (PR #80814)

2024-02-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: (Note, precommit CI failures are unrelated.) https://github.com/llvm/llvm-project/pull/80814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Add Features to TargetBuiltin (PR #80279)

2024-02-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/80279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Add Features to TargetBuiltin (PR #80279)

2024-02-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > The changes seem reasonable to me but I'd feel more comfortable if the > > functionality was also being used (so that we'd get test coverage verifying > > its correctness). Do you think it would be reasonable to include the RISCV > > changes as well? > > Yeah, I separa

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-07 Thread Jay Foad via cfe-commits
jayfoad wrote: > This logic would need updating again for GFX12. It seems like it's > duplicating a lot of knowledge which is already implemented in > SIInsertWaitcnts. Just to demonstrate, you could implement this feature in SIInsertWaitcnts for **all** supported architectures with something

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-07 Thread Axel Lundberg via cfe-commits
Zonotora wrote: Hi again, I have now finally gotten time and updated the patch so that the unnecessary emits I mentioned in the initial commit are avoided. The current patch introduces a number of new fsanitizer flags to separate integer conversions from bitfield conversions. E.g., - ``-fsan

[clang] [clang-tools-extra] [llvm] Accept /branch: and /cherry-pick: commands (PR #80838)

2024-02-07 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 closed https://github.com/llvm/llvm-project/pull/80838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80864 >From 570e25f19b428fb7d2936091726727f9633eec35 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 6 Feb 2024 11:08:04 -0500 Subject: [PATCH 1/2] [Clang][Sema] Abbreviated function templates do not

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80864 >From b28a6a478d021a15a6004c4f3f243ce26f6d86d8 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 6 Feb 2024 11:08:04 -0500 Subject: [PATCH 1/2] [Clang][Sema] Abbreviated function templates do not

[clang] d4a2c7f - [clang][Interp] Fix record initialization from temporary in initlist

2024-02-07 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-07T16:09:49+01:00 New Revision: d4a2c7f95297d1865a457955dcf7b679dabb5e0e URL: https://github.com/llvm/llvm-project/commit/d4a2c7f95297d1865a457955dcf7b679dabb5e0e DIFF: https://github.com/llvm/llvm-project/commit/d4a2c7f95297d1865a457955dcf7b679dabb5e0e.diff LO

[clang] [dataflow] CXXOperatorCallExpr equal operator might not be a glvalue (PR #80991)

2024-02-07 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse updated https://github.com/llvm/llvm-project/pull/80991 >From 0d03870ef82fac51387c353bbe4e095e431d7ce8 Mon Sep 17 00:00:00 2001 From: Paul Semel Date: Wed, 7 Feb 2024 13:59:40 + Subject: [PATCH] [dataflow] CXXOperatorCallExpr equal operator might not be a glvalue

[clang] [dataflow] CXXOperatorCallExpr equal operator might not be a glvalue (PR #80991)

2024-02-07 Thread Paul Semel via cfe-commits
https://github.com/paulsemel updated https://github.com/llvm/llvm-project/pull/80991 >From 0d03870ef82fac51387c353bbe4e095e431d7ce8 Mon Sep 17 00:00:00 2001 From: Paul Semel Date: Wed, 7 Feb 2024 13:59:40 + Subject: [PATCH] [dataflow] CXXOperatorCallExpr equal operator might not be a glval

[clang] [dataflow] CXXOperatorCallExpr equal operator might not be a glvalue (PR #80991)

2024-02-07 Thread Paul Semel via cfe-commits
@@ -535,7 +535,19 @@ class TransferVisitor : public ConstStmtVisitor { return; copyRecord(*LocSrc, *LocDst, Env); - Env.setStorageLocation(*S, *LocDst); + + // If the expr is a glvalue, we can reasonably assume the operator is + // returning T& an

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80864 >From e4386e21a56c0d113c8f263af79fffa072d3da86 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 6 Feb 2024 11:08:04 -0500 Subject: [PATCH] [Clang][Sema] Abbreviated function templates do not appen

[clang] [Clang][Sema] Do not attempt to instantiate a deleted move constructor (PR #80959)

2024-02-07 Thread via cfe-commits
@@ -7894,13 +7895,18 @@ bool Sema::CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD, if (ShouldDeleteForTypeMismatch || ShouldDeleteSpecialMember(MD, CSM)) { if (First) { SetDeclDeleted(MD, MD->getLocation()); - if (!inTemplateInstantiation() && !HadErr

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-07 Thread David Goldman via cfe-commits
DavidGoldman wrote: Done https://github.com/llvm/llvm-project/pull/76466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-07 Thread David Goldman via cfe-commits
@@ -538,11 +565,254 @@ std::optional checkName(const NamedDecl &RenameDecl, Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Re

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-07 Thread David Goldman via cfe-commits
@@ -538,11 +565,254 @@ std::optional checkName(const NamedDecl &RenameDecl, Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Re

[clang] [llvm] [RISCV] Add Zicfiss support to the shadow call stack implementation. (PR #68075)

2024-02-07 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM. We can resolve the question of default behavior later. https://github.com/llvm/llvm-project/pull/68075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [llvm] [RISCV] Add Zicfiss support to the shadow call stack implementation. (PR #68075)

2024-02-07 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM. Seems like all of my comments have been addressed. Thanks for the hard work! https://github.com/llvm/llvm-project/pull/68075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang] Fixup last value in DarwinPlatformKind enum (PR #81011)

2024-02-07 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/81011 None >From a9c3775ab646d3540dc776b4363d6d95b49889fd Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 7 Feb 2024 08:52:40 -0800 Subject: [PATCH] [clang] Fixup last value in DarwinPlatformKind --- clan

[clang] [clang] Fixup last value in DarwinPlatformKind enum (PR #81011)

2024-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Cyndy Ishida (cyndyishida) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/81011.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/Darwin.h (+1-1) ``diff diff --git a/clang/lib/Driver/To

[clang] [clang] Fixup last value in DarwinPlatformKind enum (PR #81011)

2024-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/81011.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/Darwin.h (+1-1) ``diff diff --git a/clang/lib/Driver/ToolChain

[clang] [Clang] C++ Templates: Refactor and fix `TransformLambdaExpr`'s mishandling of TypeLocs (PR #78801)

2024-02-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: CC @cor3ntin and @erichkeane for feedback on the approach here https://github.com/llvm/llvm-project/pull/78801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-02-07 Thread Yeoul Na via cfe-commits
rapidsna wrote: Thanks @AaronBallman! > I think AttributedType might be a reasonable way forward. That's how we model > nullability qualifiers, for example: The difference from nullability qualifiers is that they are actually encoded as `AttributeKind`, whereas `__counted_by` has to store mo

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/74056 >From 9be777d5b39852cf3c0b2538fd5f712922672caa Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 1 Dec 2023 18:00:13 +0900 Subject: [PATCH 1/2] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass""

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Matt Arsenault via cfe-commits
arsenm wrote: > @arsenm Can you rebase this patch first? It was already fresh, I just re-merged again with no conflicts https://github.com/llvm/llvm-project/pull/74056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang] Fixup last value in DarwinPlatformKind enum (PR #81011)

2024-02-07 Thread Juergen Ributzka via cfe-commits
ributzka wrote: Why didn't this trigger: https://github.com/llvm/llvm-project/blob/ab92f6274b7c3a4b4445d47017bc481aa919545f/clang/lib/Driver/ToolChains/Darwin.cpp#L1906 ? https://github.com/llvm/llvm-project/pull/81011 ___ cfe-commits mailing list cf

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-02-07 Thread Alexander Richardson via cfe-commits
@@ -285,6 +289,20 @@ void NVPTXTargetCodeGenInfo::addNVVMMetadata(llvm::GlobalValue *GV, bool NVPTXTargetCodeGenInfo::shouldEmitStaticExternCAliases() const { return false; } + +llvm::Constant * +NVPTXTargetCodeGenInfo::getNullPointer(const CodeGen::CodeGenModule &CGM, +

[clang] [compiler-rt] [llvm] [clang-repl] [ORC] Add support for out-of-process execution on ELF (PR #79936)

2024-02-07 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Thanks for sharing your patch @jameshu15869! For the moment it seems like a mix of many moving pieces. I think it would be good to review them isolation, at least ORC runtime support and ELFNix platform changes. All the RPC utilities could go into a separate cpp right? We

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-02-07 Thread Alexander Richardson via cfe-commits
@@ -0,0 +1,122 @@ +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +void bar(int &Data) {} +// CHECK-DAG: define dso_local void @[[RAW_REF:[a-zA-Z0-9_]+]](ptr noundef nonnull align 4 dereferenceable(4) % +voi

[clang] [clang] Fixup last value in DarwinPlatformKind enum (PR #81011)

2024-02-07 Thread Juergen Ributzka via cfe-commits
ributzka wrote: > Why didn't this trigger: > > https://github.com/llvm/llvm-project/blob/ab92f6274b7c3a4b4445d47017bc481aa919545f/clang/lib/Driver/ToolChains/Darwin.cpp#L1906 > > ? XROS is missing in the env vars too: https://github.com/llvm/llvm-project/blob/ab92f6274b7c3a4b4445d47017bc481aa

[clang] [Driver] Allow -fbasic-block-sections for AArch64 ELF (PR #80916)

2024-02-07 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 approved this pull request. https://github.com/llvm/llvm-project/pull/80916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fixup last value in DarwinPlatformKind enum (PR #81011)

2024-02-07 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > > Why didn't this trigger: > > https://github.com/llvm/llvm-project/blob/ab92f6274b7c3a4b4445d47017bc481aa919545f/clang/lib/Driver/ToolChains/Darwin.cpp#L1906 > > > > ? > > XROS is missing in the env vars too: > > https://github.com/llvm/llvm-project/blob/ab92f6274b7c3a4b4

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > > @arsenm Can you rebase this patch first? > > It was already fresh, I just re-merged again with no conflicts I don't know why it fails: ``` error: patch failed: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:551 error: llvm/lib/Transforms/InstCombine/InstCombineInternal

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/81014 This implements the C++23 `assume` attribute. This pr currently does not include any changes to constant evaluation. Even though the standard specifies that the behaviour is undefined should an assumption eval

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (Sirraide) Changes This implements the C++23 `assume` attribute. This pr currently does not include any changes to constant evaluation. Even though the standard specifies that the behaviour is undefined should an assumption

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes This implements the C++23 `assume` attribute. This pr currently does not include any changes to constant evaluation. Even though the standard specifies that the behaviour is undefined should an assumption evaluate

[clang] [Clang][OpenMP] Assertion `!isNull() && "Cannot retrieve a NULL type pointer"' failed. (PR #81015)

2024-02-07 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 created https://github.com/llvm/llvm-project/pull/81015 Fixes : #69085 , #69200 **PR SUMMARY**: "Added Null check for negative sized array and a test for the same" >From c8ada809964eac64f6cb0c103593748b86932163 Mon Sep 17 00:00:00 2001 From: Sh0g0-1758 Date: Wed

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
Sirraide wrote: CC @AaronBallman @cor3ntin @erichkeane https://github.com/llvm/llvm-project/pull/81014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Assertion `!isNull() && "Cannot retrieve a NULL type pointer"' failed. (PR #81015)

2024-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shourya Goel (Sh0g0-1758) Changes Fixes : #69085 , #69200 **PR SUMMARY**: "Added Null check for negative sized array and a test for the same" --- Full diff: https://github.com/llvm/llvm-project/pull/81015.diff 2 Files Affected: - (mod

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 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 af6656c375b8aa9c9156575f7c0ac678a57070d5 36fc751a4b3d55798f0e215bdb92f10e0d82afca --

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/81014 >From 5ba669011752b6ea6e6fe5f6141c4af66ca7ccbf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 7 Feb 2024 17:25:10 +0100 Subject: [PATCH 1/8] [Clang] Parsing and Sema for C++23's `assume` attribute --- clan

[clang] [Clang][OpenMP] Fix `!isNull() && "Cannot retrieve a NULL type pointer"' fail. (PR #81015)

2024-02-07 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 edited https://github.com/llvm/llvm-project/pull/81015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Fix `!isNull() && "Cannot retrieve a NULL type pointer"' fail. (PR #81015)

2024-02-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/81015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Fix `!isNull() && "Cannot retrieve a NULL type pointer"' fail. (PR #81015)

2024-02-07 Thread Joseph Huber via cfe-commits
jhuber6 wrote: I'll merge it for you once the CI builder finishes without issue, thanks. https://github.com/llvm/llvm-project/pull/81015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
@@ -783,6 +783,9 @@ def err_ms_property_expected_comma_or_rparen : Error< def err_ms_property_initializer : Error< "property declaration cannot have a default member initializer">; +def err_assume_attr_expects_cond_expr : Error< + "use of this expression in an 'assume' attr

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/81014 >From 5ba669011752b6ea6e6fe5f6141c4af66ca7ccbf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 7 Feb 2024 17:25:10 +0100 Subject: [PATCH 1/9] [Clang] Parsing and Sema for C++23's `assume` attribute --- clan

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
@@ -783,6 +783,9 @@ def err_ms_property_expected_comma_or_rparen : Error< def err_ms_property_initializer : Error< "property declaration cannot have a default member initializer">; +def err_assume_attr_expects_cond_expr : Error< + "use of this expression in an 'assume' attr

[clang] [Clang][OpenMP] Fix `!isNull() && "Cannot retrieve a NULL type pointer"' fail. (PR #81015)

2024-02-07 Thread Shilei Tian via cfe-commits
@@ -21124,6 +21124,8 @@ Sema::ActOnOpenMPDependClause(const OMPDependClause::DependDataTy &Data, ExprTy = ATy->getElementType(); else ExprTy = BaseType->getPointeeType(); +if (ExprTy.isNull()) + continue; ---

[clang] [Clang][OpenMP] Fix `!isNull() && "Cannot retrieve a NULL type pointer"' fail. (PR #81015)

2024-02-07 Thread Joseph Huber via cfe-commits
@@ -21124,6 +21124,8 @@ Sema::ActOnOpenMPDependClause(const OMPDependClause::DependDataTy &Data, ExprTy = ATy->getElementType(); else ExprTy = BaseType->getPointeeType(); +if (ExprTy.isNull()) + continue; ---

[clang] [Clang][OpenMP] Fix `!isNull() && "Cannot retrieve a NULL type pointer"' fail. (PR #81015)

2024-02-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/81015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw edited https://github.com/llvm/llvm-project/pull/74056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Yingwei Zheng via cfe-commits
@@ -1877,3 +1877,139 @@ Value *InstCombinerImpl::SimplifyDemandedVectorElts(Value *V, return MadeChange ? I : nullptr; } + +/// For floating-point classes that resolve to a single bit pattern, return that +/// value. +static Constant *getFPClassConstant(Type *Ty, FPClassTe

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw requested changes to this pull request. https://github.com/llvm/llvm-project/pull/74056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Yingwei Zheng via cfe-commits
@@ -1877,3 +1877,139 @@ Value *InstCombinerImpl::SimplifyDemandedVectorElts(Value *V, return MadeChange ? I : nullptr; } + +/// For floating-point classes that resolve to a single bit pattern, return that +/// value. +static Constant *getFPClassConstant(Type *Ty, FPClassTe

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Yingwei Zheng via cfe-commits
@@ -1877,3 +1877,139 @@ Value *InstCombinerImpl::SimplifyDemandedVectorElts(Value *V, return MadeChange ? I : nullptr; } + +/// For floating-point classes that resolve to a single bit pattern, return that +/// value. +static Constant *getFPClassConstant(Type *Ty, FPClassTe

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Yingwei Zheng via cfe-commits
@@ -1877,3 +1877,139 @@ Value *InstCombinerImpl::SimplifyDemandedVectorElts(Value *V, return MadeChange ? I : nullptr; } + +/// For floating-point classes that resolve to a single bit pattern, return that +/// value. +static Constant *getFPClassConstant(Type *Ty, FPClassTe

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Yingwei Zheng via cfe-commits
@@ -1877,3 +1877,139 @@ Value *InstCombinerImpl::SimplifyDemandedVectorElts(Value *V, return MadeChange ? I : nullptr; } + +/// For floating-point classes that resolve to a single bit pattern, return that +/// value. +static Constant *getFPClassConstant(Type *Ty, FPClassTe

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Matt Arsenault via cfe-commits
arsenm wrote: > I don't know why it fails: > > ``` > error: patch failed: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:551 > error: llvm/lib/Transforms/InstCombine/InstCombineInternal.h: patch does not > apply > error: patch failed: > llvm/lib/Transforms/InstCombine/InstCombineSimplif

[clang] [Clang][OpenMP] Fix `!isNull() && "Cannot retrieve a NULL type pointer"' fail. (PR #81015)

2024-02-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/81015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > > I don't know why it fails: > > ``` > > error: patch failed: > > llvm/lib/Transforms/InstCombine/InstCombineInternal.h:551 > > error: llvm/lib/Transforms/InstCombine/InstCombineInternal.h: patch does > > not apply > > error: patch failed: > > llvm/lib/Transforms/InstCombine/I

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
Sirraide wrote: CI on Windows seems to have had a stroke? ``` FAILED: cmTC_77a79.exe cmd.exe /C "cd . && C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_77a79.dir --rc="C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
Sirraide wrote: Actually, it would seem that there were some CMake errors earlier on too https://github.com/llvm/llvm-project/pull/81014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Fix `!isNull() && "Cannot retrieve a NULL type pointer"' fail. (PR #81015)

2024-02-07 Thread Shourya Goel via cfe-commits
@@ -21124,6 +21124,8 @@ Sema::ActOnOpenMPDependClause(const OMPDependClause::DependDataTy &Data, ExprTy = ATy->getElementType(); else ExprTy = BaseType->getPointeeType(); +if (ExprTy.isNull()) + continue; ---

[clang] [Clang][OpenMP] Fix `!isNull() && "Cannot retrieve a NULL type pointer"' fail. (PR #81015)

2024-02-07 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 updated https://github.com/llvm/llvm-project/pull/81015 >From c8ada809964eac64f6cb0c103593748b86932163 Mon Sep 17 00:00:00 2001 From: Sh0g0-1758 Date: Wed, 7 Feb 2024 21:11:58 +0530 Subject: [PATCH 1/5] Add a Null Check --- clang/lib/Sema/SemaOpenMP.cpp | 2 ++ 1

[clang] [Clang][OpenMP] Fix `!isNull() && "Cannot retrieve a NULL type pointer"' fail. (PR #81015)

2024-02-07 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 edited https://github.com/llvm/llvm-project/pull/81015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-07 Thread Krystian Stasiowski via cfe-commits
@@ -2552,10 +2552,10 @@ class Parser : public CodeCompletionHandler { /// Starting with a scope specifier, identifier, or /// template-id that refers to the current class, determine whether /// this is a constructor declarator. - bool isConstructorDeclarator( - bool

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80171 >From bcb66f80b29e6a330e28955f1e1bfc52f4c7399e Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 31 Jan 2024 11:09:11 -0500 Subject: [PATCH 1/2] [Clang][Sema] Diagnose friend declarations with enum

[clang] [Clang][OpenMP] Fix `!isNull() && "Cannot retrieve a NULL type pointer"' fail. (PR #81015)

2024-02-07 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/81015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-07 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 7718ac38a0c23597d7d02f0022eb89afe6d1b35f cb48321729a52d8883874baa85de48c40b8693cb --

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-07 Thread Louis Dionne via cfe-commits
ldionne wrote: > @ldionne if downstream is catching upstream, I would love to discuss > rationale behind ignoring command line option. I asked this question several > times and haven't got answer. Original > [diff](https://reviews.llvm.org/D89001) that introduced this behavior also > didn't e

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80171 >From bcb66f80b29e6a330e28955f1e1bfc52f4c7399e Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 31 Jan 2024 11:09:11 -0500 Subject: [PATCH 1/2] [Clang][Sema] Diagnose friend declarations with enum

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-07 Thread Krystian Stasiowski via cfe-commits
@@ -1637,10 +1637,8 @@ def err_inline_namespace_std : Error< def err_unexpected_friend : Error< "friends can only be classes or functions">; def ext_enum_friend : ExtWarn< - "befriending enumeration type %0 is a C++11 extension">, InGroup; -def warn_cxx98_compat_enum_friend

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > CI on Windows seems to have had a stroke? Yes it does have troubles ATM. We rely on Linux CI for now until Windows is fixed. Some context on the future may be found in https://discourse.llvm.org/t/rfc-future-of-windows-pre-commit-ci/76840/1 . https://github.com/llvm/llvm-pr

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread Erich Keane via cfe-commits
@@ -1996,6 +1996,30 @@ Here is an example: }]; } +def AssumeDocs : Documentation { + let Category = DocCatStmt; + let Heading = "assume"; + let Content = [{ +The ``assume`` attribute is used to indicate to the optimizer that a +certain condition can be assumed to be true

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread Erich Keane via cfe-commits
@@ -4528,6 +4528,54 @@ static bool IsBuiltInOrStandardCXX11Attribute(IdentifierInfo *AttrName, } } +/// Parse the argument to C++23's [[assume()]] attribute. +bool Parser::ParseAssumeAttributeArg(ParsedAttributes &Attrs, erichkeane wrote: Hopefully someone

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread Erich Keane via cfe-commits
@@ -783,6 +783,9 @@ def err_ms_property_expected_comma_or_rparen : Error< def err_ms_property_initializer : Error< "property declaration cannot have a default member initializer">; +def err_assume_attr_expects_cond_expr : Error< + "use of this expression in an 'assume' attr

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread Erich Keane via cfe-commits
@@ -4528,6 +4528,54 @@ static bool IsBuiltInOrStandardCXX11Attribute(IdentifierInfo *AttrName, } } +/// Parse the argument to C++23's [[assume()]] attribute. +bool Parser::ParseAssumeAttributeArg(ParsedAttributes &Attrs, + IdentifierInfo

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread Erich Keane via cfe-commits
@@ -1996,6 +1996,30 @@ Here is an example: }]; } +def AssumeDocs : Documentation { + let Category = DocCatStmt; + let Heading = "assume"; + let Content = [{ +The ``assume`` attribute is used to indicate to the optimizer that a +certain condition can be assumed to be true

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
@@ -1996,6 +1996,30 @@ Here is an example: }]; } +def AssumeDocs : Documentation { + let Category = DocCatStmt; + let Heading = "assume"; + let Content = [{ +The ``assume`` attribute is used to indicate to the optimizer that a +certain condition can be assumed to be true

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
@@ -1996,6 +1996,30 @@ Here is an example: }]; } +def AssumeDocs : Documentation { + let Category = DocCatStmt; + let Heading = "assume"; + let Content = [{ +The ``assume`` attribute is used to indicate to the optimizer that a +certain condition can be assumed to be true

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
@@ -4528,6 +4528,54 @@ static bool IsBuiltInOrStandardCXX11Attribute(IdentifierInfo *AttrName, } } +/// Parse the argument to C++23's [[assume()]] attribute. +bool Parser::ParseAssumeAttributeArg(ParsedAttributes &Attrs, + IdentifierInfo

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread Erich Keane via cfe-commits
@@ -1996,6 +1996,30 @@ Here is an example: }]; } +def AssumeDocs : Documentation { + let Category = DocCatStmt; + let Heading = "assume"; + let Content = [{ +The ``assume`` attribute is used to indicate to the optimizer that a +certain condition can be assumed to be true

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80171 >From 8e3524f7d4a88a7b868dc3d69bf63a5708db6a1f Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 31 Jan 2024 11:09:11 -0500 Subject: [PATCH 1/2] [Clang][Sema] Diagnose friend declarations with enum

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80864 >From db802e93c08ca1b490b4ad001b3d9ee4347d9eef Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 6 Feb 2024 11:08:04 -0500 Subject: [PATCH] [Clang][Sema] Abbreviated function templates do not appen

[clang] [Clang][OpenMP] Fix `!isNull() && "Cannot retrieve a NULL type pointer"' fail. (PR #81015)

2024-02-07 Thread Shourya Goel via cfe-commits
Sh0g0-1758 wrote: The build is failing because of a formatting error which I don't think is related to the changes that I made. Any thoughts as to why it is failing? https://github.com/llvm/llvm-project/pull/81015 ___ cfe-commits mailing list cfe-com

[clang] [Clang] Fixes of builtins definitions after PR #68324. (PR #81022)

2024-02-07 Thread via cfe-commits
https://github.com/michele-scandale created https://github.com/llvm/llvm-project/pull/81022 This commit addresses few differences between the `Builtins.def` file before the refactoring done in PR #68324 and the currently generated `Builtins.inc` file. >From 5122fd9939ce70c3d3f6c841c859af6c78d

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
@@ -1996,6 +1996,30 @@ Here is an example: }]; } +def AssumeDocs : Documentation { + let Category = DocCatStmt; + let Heading = "assume"; + let Content = [{ +The ``assume`` attribute is used to indicate to the optimizer that a +certain condition can be assumed to be true

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-07 Thread via cfe-commits
@@ -1637,10 +1637,8 @@ def err_inline_namespace_std : Error< def err_unexpected_friend : Error< "friends can only be classes or functions">; def ext_enum_friend : ExtWarn< - "befriending enumeration type %0 is a C++11 extension">, InGroup; -def warn_cxx98_compat_enum_friend

[clang] [Clang] Fixes of builtins definitions after PR #68324. (PR #81022)

2024-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (michele-scandale) Changes This commit addresses few differences between the `Builtins.def` file before the refactoring done in PR #68324 and the currently generated `Builtins.inc` file. --- Full diff: https://github.com/llvm/llvm-p

[clang] [clang] Fixup last value in DarwinPlatformKind enum (PR #81011)

2024-02-07 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/81011 >From 5a60725a1abf5a56c4a482c56ea91990074ee17c Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 7 Feb 2024 08:52:40 -0800 Subject: [PATCH] [clang][Driver] Add support for XROS_DEPLOYMENT_TARGET env var

[clang] [clang][Driver] Add support for XROS_DEPLOYMENT_TARGET env var (PR #81011)

2024-02-07 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/81011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Allow -fbasic-block-sections for AArch64 ELF (PR #80916)

2024-02-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/80916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Add support for XROS_DEPLOYMENT_TARGET env var (PR #81011)

2024-02-07 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 ab92f6274b7c3a4b4445d47017bc481aa919545f 5a60725a1abf5a56c4a482c56ea91990074ee17c --

<    1   2   3   4   5   >