[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes Currently, clang postpones all semantic analysis of unary operators with operands of pointer/pointer to member/array/function type until instantiation whenever that type is dependent (e.g. `T*`

[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-04-29 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/90500 Currently, clang postpones all semantic analysis of unary operators with operands of pointer/pointer to member/array/function type until instantiation whenever that type is dependent (e.g. `T*` where `T` is

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

2024-04-29 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/90499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][TR12] change proerty of map-type modifer. (PR #90499)

2024-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (jyu2-git) Changes map-type change to "default" instead "ultimate" from [OpenMP5.2] The change is allowed map-type to be placed any locations within map modifiers, besides the last location in the modifiers-list, also map-type can

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-29 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > C doesn't have an odr, does it? For non-C++ "ODR" has a meaning more like "ODR-inspired checks". But there is no language rule that would require enforcement and there is no impact on linkage (at least during deserialization). https://github.com/llvm/llvm-project/pull/90298

[clang] [OpenMP][TR12] change proerty of map-type modifer. (PR #90499)

2024-04-29 Thread via cfe-commits
https://github.com/jyu2-git created https://github.com/llvm/llvm-project/pull/90499 map-type change to "default" instead "ultimate" from [OpenMP5.2] The change is allowed map-type to be placed any locations within map modifiers, besides the last location in the modifiers-list, also map-type

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

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

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

2024-04-29 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,57 @@ +// RUN: %clang_cc1 -DWIN -verify -std=c++23 -fsyntax-only %s +// RUN: %clang_cc1 -verify -std=c++23 -fsyntax-only %s + +// expected-no-diagnostics + + +#ifdef WIN +#define INFINITY ((float)(1e+300 * 1e+300)) +#define NAN (-(float)(INFINITY * 0.0F)) +#else

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

2024-04-29 Thread via cfe-commits
@@ -908,6 +908,73 @@ void CodeGenFunction::EmitIfStmt(const IfStmt ) { incrementProfileCounter(); } +bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression, + bool IsTrivialCXXLoop) { + if

[clang] cd68d7b - [Pipelines] Do not run CoroSplit and CoroCleanup in LTO pre-link pipeline (#90310)

2024-04-29 Thread via cfe-commits
Author: Wei Wang Date: 2024-04-29T10:24:53-07:00 New Revision: cd68d7b3c0ebf6da5e235cfabd5e6381737eb7fe URL: https://github.com/llvm/llvm-project/commit/cd68d7b3c0ebf6da5e235cfabd5e6381737eb7fe DIFF: https://github.com/llvm/llvm-project/commit/cd68d7b3c0ebf6da5e235cfabd5e6381737eb7fe.diff

[clang] [llvm] [Pipelines] Do not run CoroSplit and CoroCleanup in LTO pre-link pipeline (PR #90310)

2024-04-29 Thread Wei Wang via cfe-commits
https://github.com/apolloww closed https://github.com/llvm/llvm-project/pull/90310 ___ 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-04-29 Thread Eli Friedman via cfe-commits
@@ -908,6 +908,73 @@ void CodeGenFunction::EmitIfStmt(const IfStmt ) { incrementProfileCounter(); } +bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression, + bool IsTrivialCXXLoop) { + if

[clang] [Clang] Propagate 'SystemDrive' environment variable for unit tests (PR #90478)

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

[clang] fe3f6c6 - [Clang] Propagate 'SystemDrive' environment variable for unit tests (#90478)

2024-04-29 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-04-29T13:21:27-04:00 New Revision: fe3f6c63cd6b75433a72b980a23d9848d19abdc2 URL: https://github.com/llvm/llvm-project/commit/fe3f6c63cd6b75433a72b980a23d9848d19abdc2 DIFF:

[clang] [clang][CodeGen] Propagate pragma set fast-math flags to floating point builtins (PR #90377)

2024-04-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks right to me, but @zahiraam is more familiar with this code than I am. Zahira, do you have any comments? https://github.com/llvm/llvm-project/pull/90377 ___ cfe-commits mailing list

[clang] [llvm] Try to use non-volatile registers for `preserve_none` parameters (PR #88333)

2024-04-29 Thread via cfe-commits
https://github.com/weiguozhi approved this pull request. Looks good to me! Thanks for the improvement. https://github.com/llvm/llvm-project/pull/88333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [AArch64] Add intrinsics for non-widening FMOPA/FMOPS (PR #88105)

2024-04-29 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/88105 >From 3ea7ee0aaf7f8be8c2ee42af92ba3b13b8212645 Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Tue, 9 Apr 2024 10:52:41 +0100 Subject: [PATCH 1/3] [AArch64] Add intrinsics for non-widening

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-29 Thread Reid Kleckner via cfe-commits
rnk wrote: Sorry for the delay, work life does its best to intervene. https://github.com/llvm/llvm-project/pull/88857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-29 Thread Reid Kleckner via cfe-commits
@@ -1105,6 +1105,11 @@ bool MicrosoftCXXABI::hasMostDerivedReturn(GlobalDecl GD) const { static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, CodeGenModule ) { + // If the record is marked with the trivial_abi attribute, we don't +

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

2024-04-29 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] Address post commit feedbacks in #89906 (PR #90495)

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

[clang] 99df06a - [AST] Dump explicit template arguments for UnreslovedLookupExpr. (#90466)

2024-04-29 Thread via cfe-commits
Author: Haojian Wu Date: 2024-04-29T18:59:03+02:00 New Revision: 99df06ac71b12bc5a38240e71cfc37383687b48e URL: https://github.com/llvm/llvm-project/commit/99df06ac71b12bc5a38240e71cfc37383687b48e DIFF: https://github.com/llvm/llvm-project/commit/99df06ac71b12bc5a38240e71cfc37383687b48e.diff

[clang] [AST] Dump explicit template arguments for UnreslovedLookupExpr. (PR #90466)

2024-04-29 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/90466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Try to use non-volatile registers for `preserve_none` parameters (PR #88333)

2024-04-29 Thread David Li via cfe-commits
david-xl wrote: > The Windows x64 Buildkite CI job is failing, but I can't find any failed > tests in the downloaded logs. Any advice? You can download the raw log file from the details view. From the log, it looks like not related to this change -- the flang build run out of heap space:

[clang] [clang codegen] Fix MS ABI detection of user-provided constructors. (PR #90151)

2024-04-29 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/90151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Propagate 'SystemDrive' environment variable for unit tests (PR #90478)

2024-04-29 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/90478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-29 Thread via cfe-commits
cor3ntin wrote: https://github.com/llvm/llvm-project/pull/90495 https://github.com/llvm/llvm-project/pull/89906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Address post commit feedbacks in #89906 (PR #90495)

2024-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes * Fix a leak * Fix a maybe unused warning * Fix incorrect cxx_status entry --- Full diff: https://github.com/llvm/llvm-project/pull/90495.diff 3 Files Affected: - (modified)

[clang] [Clang] Address post commit feedbacks in #89906 (PR #90495)

2024-04-29 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/90495 * Fix a leak * Fix a maybe unused warning * Fix incorrect cxx_status entry >From 9d29106b06e8e2b0b388c755b81d4e1d9b217976 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 29 Apr 2024 18:34:49 +0200

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-04-29 Thread via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: sethp wrote: Well, good news and bad news: I succeeded in trying to save one more cycle by asking you to fix the conflict in ReleaseNotes.rst,

[clang] [llvm] [Libomptarget] Statically link all plugin runtimes (PR #87009)

2024-04-29 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/87009 >From 4fd1510c2013fd975ac2ad94b3d201bcd5a9d029 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 28 Mar 2024 16:18:19 -0500 Subject: [PATCH] [Libomptarget] Statically link all plugin runtimes Summary: This

[clang] [Clang] Fix Null Pointer Dereference in Sema::BuildClassMessageImplicit() (PR #90482)

2024-04-29 Thread via cfe-commits
@@ -2440,10 +2440,13 @@ ExprResult Sema::BuildClassMessageImplicit(QualType ReceiverType, assert(((isSuperReceiver && Loc.isValid()) || receiverTypeInfo) && "Either the super receiver location needs to be valid or the receiver " "needs valid type source

[clang] Fix a crash introduced by 3d5e9ab by adding a nullptr check. (PR #90301)

2024-04-29 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/90301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e441363 - Fix a crash introduced by 3d5e9ab by adding a nullptr check. (#90301)

2024-04-29 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-04-29T09:27:01-07:00 New Revision: e441363f7da2da50449917f17ab4ed412f9e7cb3 URL: https://github.com/llvm/llvm-project/commit/e441363f7da2da50449917f17ab4ed412f9e7cb3 DIFF: https://github.com/llvm/llvm-project/commit/e441363f7da2da50449917f17ab4ed412f9e7cb3.diff

[clang] Fix a crash introduced by 3d5e9ab by adding a nullptr check. (PR #90301)

2024-04-29 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/90301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-29 Thread via cfe-commits
@@ -187,7 +187,7 @@ C++2c implementation status Trivial infinite loops are not Undefined Behavior https://wg21.link/P2809R3;>P2809R3 (DR) - No + Clang 19 cor3ntin wrote: I'll fix that shortly https://github.com/llvm/llvm-project/pull/89906

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-29 Thread via cfe-commits
@@ -1115,7 +1115,9 @@ int64_t Decl::getID() const { const FunctionType *Decl::getFunctionType(bool BlocksToo) const { QualType Ty; - if (const auto *D = dyn_cast(this)) + if (const auto *D = dyn_cast(this)) cor3ntin wrote: I'll fix that shortly

[clang] [Clang] Propagate 'SystemDrive' environment variable for unit tests (PR #90478)

2024-04-29 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @cor3ntin Updated https://github.com/llvm/llvm-project/pull/90478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Propagate 'SystemDrive' environment variable for unit tests (PR #90478)

2024-04-29 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/90478 >From b52984893c1f83963f90c4784e17f4cf2243e046 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 29 Apr 2024 10:01:14 -0400 Subject: [PATCH 1/2] [Clang] Propagate 'SystemDrive' environment

[clang] 3590ede - [clang][Interp] Support vec_step

2024-04-29 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-29T18:21:24+02:00 New Revision: 3590ede848d67cf7d49d43e1830f90b053e3e76f URL: https://github.com/llvm/llvm-project/commit/3590ede848d67cf7d49d43e1830f90b053e3e76f DIFF: https://github.com/llvm/llvm-project/commit/3590ede848d67cf7d49d43e1830f90b053e3e76f.diff

[clang] [Clang] Add diagnostic about "%P" specifier with Objective-C pointers (PR #89977)

2024-04-29 Thread via cfe-commits
github-actions[bot] wrote: @jaredgrubb Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[clang] [Clang] Add diagnostic about "%P" specifier with Objective-C pointers (PR #89977)

2024-04-29 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan closed https://github.com/llvm/llvm-project/pull/89977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e3750fb - [Clang] Add diagnostic about "%P" specifier with Objective-C pointers (#89977)

2024-04-29 Thread via cfe-commits
Author: Jared Grubb Date: 2024-04-29T17:16:00+01:00 New Revision: e3750fb65acf0f7447f6a49a0ba5d3197f4d9766 URL: https://github.com/llvm/llvm-project/commit/e3750fb65acf0f7447f6a49a0ba5d3197f4d9766 DIFF: https://github.com/llvm/llvm-project/commit/e3750fb65acf0f7447f6a49a0ba5d3197f4d9766.diff

[clang] [Clang] Add diagnostic about "%P" specifier with Objective-C pointers (PR #89977)

2024-04-29 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan edited https://github.com/llvm/llvm-project/pull/89977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add diagnostic about "%P" specifier with Objective-C pointers (#89968) (PR #89977)

2024-04-29 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan edited https://github.com/llvm/llvm-project/pull/89977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2903df0 - Squashed commit of the following:

2024-04-29 Thread Seth Pellegrino via cfe-commits
Author: Pol Marcet Sardà Date: 2024-04-29T09:09:59-07:00 New Revision: 2903df02fb3c057849aaa796a91289b01950a5f0 URL: https://github.com/llvm/llvm-project/commit/2903df02fb3c057849aaa796a91289b01950a5f0 DIFF:

[clang] [Clang] Prevent null pointer dereference in Sema::​CodeCompleteQualifiedId() (PR #90490)

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

[clang] [Clang] Prevent null pointer dereference in Sema::​CodeCompleteQualifiedId() (PR #90490)

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

[clang] [Clang] Prevent null pointer dereference in Sema::CodeCompleteQualifi… (PR #90490)

2024-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes …edId() The null pointer dereference issue seems happening with in the expression NNS-getAsType(). Although dyn_cast_or_nullTemplateTypeParmType() correctly handles null pointers, it doesn’t prevent the

[clang] [Clang] Prevent null pointer dereference in Sema::CodeCompleteQualifi… (PR #90490)

2024-04-29 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/90490 …edId() The null pointer dereference issue seems happening with in the expression NNS->getAsType(). Although dyn_cast_or_null() correctly handles null pointers, it doesn’t prevent the subsequent

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-29 Thread via cfe-commits
cor3ntin wrote: @kstoimenov Looking now https://github.com/llvm/llvm-project/pull/89906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

2024-04-29 Thread via cfe-commits
@@ -16548,11 +16548,10 @@ static void CheckImplicitConversion(Sema , Expr *E, QualType T, std::string PrettySourceValue = toString(Value, 10); std::string PrettyTargetValue = PrettyPrintInRange(Value, TargetRange); -S.DiagRuntimeBehavior( -

[clang] [llvm] [llvm][RISCV] Improve error message for invalid extension letters (PR #90468)

2024-04-29 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett closed https://github.com/llvm/llvm-project/pull/90468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6f02120 - [llvm][RISCV] Improve error message for invalid extension letters (#90468)

2024-04-29 Thread via cfe-commits
Author: David Spickett Date: 2024-04-29T16:51:09+01:00 New Revision: 6f02120ac4463e5e0cda25e2aafc485a4fe634ea URL: https://github.com/llvm/llvm-project/commit/6f02120ac4463e5e0cda25e2aafc485a4fe634ea DIFF:

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

2024-04-29 Thread Daniel M. Katz via cfe-commits
@@ -16548,11 +16548,10 @@ static void CheckImplicitConversion(Sema , Expr *E, QualType T, std::string PrettySourceValue = toString(Value, 10); std::string PrettyTargetValue = PrettyPrintInRange(Value, TargetRange); -S.DiagRuntimeBehavior( -

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-29 Thread Kirill Stoimenov via cfe-commits
kstoimenov wrote: This is breaking a sanitizer build bot because it is causing a memory leak: https://lab.llvm.org/buildbot/#/builders/168/builds/20146. @cor3ntin could you please take a look? Thanks! https://github.com/llvm/llvm-project/pull/89906

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-29 Thread Kees Cook via cfe-commits
kees wrote: My thinking about this attribute tends to follow from my desire not to change the C type system, but rather to adjust the behavior of the sanitizers. This means that it is possible to still build the Linux kernel without the sanitizers (the build just ignores the attribute), or

[clang] [llvm] Try to use non-volatile registers for `preserve_none` parameters (PR #88333)

2024-04-29 Thread Brandt Bucher via cfe-commits
brandtbucher wrote: The Windows x64 Buildkite CI job is failing, but I can't find any failed tests in the downloaded logs. Any advice? https://github.com/llvm/llvm-project/pull/88333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][dataflow] Don't propagate result objects inside `decltype`. (PR #90438)

2024-04-29 Thread Gábor Horváth via cfe-commits
@@ -350,6 +350,13 @@ class ResultObjectVisitor : public RecursiveASTVisitor { return RecursiveASTVisitor::TraverseDecl(D); } + bool TraverseDecltypeTypeLoc(DecltypeTypeLoc Node) { Xazax-hun wrote: There are other instances in the language that are

[clang] [NFC] Fix hasQualifier comment (PR #90485)

2024-04-29 Thread Jorge Pinto Sousa via cfe-commits
sousajo-cc wrote: fixes https://github.com/llvm/llvm-project/issues/90472 https://github.com/llvm/llvm-project/pull/90485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Fix hasQualifier comment (PR #90485)

2024-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jorge Pinto Sousa (sousajo-cc) Changes operator bool from NestedNameSpecifierLoc and member function hasQualifier both do the same thing, returning true iff the private data member Qualifier is not nullptr, so clearly one of the comments

[clang] [NFC] Fix hasQualifier comment (PR #90485)

2024-04-29 Thread Jorge Pinto Sousa via cfe-commits
https://github.com/sousajo-cc created https://github.com/llvm/llvm-project/pull/90485 operator bool from NestedNameSpecifierLoc and member function hasQualifier both do the same thing, returning true iff the private data member Qualifier is not nullptr, so clearly one of the comments is

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

2024-04-29 Thread Hubert Tong via cfe-commits
@@ -14638,6 +14649,8 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { return true; } + case Builtin::BIfmin: + case Builtin::BIfminf: hubert-reinterpretcast wrote: I think we'll be missing at least "pedantic" diagnostics if we don't

[clang] [flang] [Flang] RFC: Add support for -w option (PR #90420)

2024-04-29 Thread Peter Klausler via cfe-commits
klausler wrote: I am finishing up a patch that ensures that all warning messages are conditional in Semantics. https://github.com/llvm/llvm-project/pull/90420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-29 Thread Chris B via cfe-commits
@@ -7314,6 +7314,41 @@ static void handleHLSLSV_DispatchThreadIDAttr(Sema , Decl *D, D->addAttr(::new (S.Context) HLSLSV_DispatchThreadIDAttr(S.Context, AL)); } +static void handleHLSLPackOffsetAttr(Sema , Decl *D, const ParsedAttr ) { + if (!isa(D) ||

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-29 Thread Chris B via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple dxil-unknown-shadermodel6.3-library -S -finclude-default-header -ast-dump -x hlsl %s | FileCheck %s + + +// CHECK: HLSLBufferDecl {{.*}} cbuffer A +cbuffer A +{ +// CHECK-NEXT: VarDecl {{.*}} C1 'float4'

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-29 Thread Chris B via cfe-commits
@@ -183,6 +183,86 @@ void Parser::ParseHLSLAnnotations(ParsedAttributes , return; } } break; + case ParsedAttr::AT_HLSLPackOffset: { +// Parse 'packoffset( c[Subcomponent][.component] )'. +// Check '('. +if (ExpectAndConsume(tok::l_paren,

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-29 Thread Chris B via cfe-commits
@@ -0,0 +1,55 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library -verify %s + +// expected-error@+1{{cannot mix packoffset elements with nonpackoffset elements in a cbuffer}} +cbuffer Mix +{ +float4 M1 : packoffset(c0); +float M2; +

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-29 Thread Chris B via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple dxil-unknown-shadermodel6.3-library -S -finclude-default-header -ast-dump -x hlsl %s | FileCheck %s + + +// CHECK: HLSLBufferDecl {{.*}} cbuffer A +cbuffer A +{ +// CHECK-NEXT: VarDecl {{.*}} C1 'float4' +// CHECK-NEXT:

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-29 Thread Chris B via cfe-commits
@@ -7398,6 +7398,26 @@ The full documentation is available here: https://docs.microsoft.com/en-us/windo }]; } +def HLSLPackOffsetDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The packoffset attribute is used to change the layout of a

[clang] [Clang] Fix Null Pointer Dereference in Sema::BuildClassMessageImplicit() (PR #90482)

2024-04-29 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/90482 >From 1a46c4d8bd22f8802058a1865a3b18d5aa4f2cd4 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Mon, 29 Apr 2024 07:58:44 -0700 Subject: [PATCH 1/2] [Clang] Fix Null Pointer Dereference in

[clang] [Clang] Fix Null Pointer Dereference in Sema::BuildClassMessageImplicit() (PR #90482)

2024-04-29 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 d486a4c29a331d3bfb3649a8a0aa2ba4970a6455 1a46c4d8bd22f8802058a1865a3b18d5aa4f2cd4 --

[clang] [Clang] Fix Null Pointer Dereference in Sema::BuildClassMessageImplicit() (PR #90482)

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

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

2024-04-29 Thread via cfe-commits
zmodem wrote: I've cleaned up the patch a bit and added some comments. Please take a look. https://github.com/llvm/llvm-project/pull/89751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Fix Null Pointer Dereference in Sema::BuildClassMessageImplic… (PR #90482)

2024-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes The issue arises in the assert statement. The code asserts that either isSuperReceiver Loc.isValid() is true or receiverTypeInfo is not null. However, the subsequent line (return BuildClassMessage(...))

[clang] [Clang] Fix Null Pointer Dereference in Sema::BuildClassMessageImplic… (PR #90482)

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

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

2024-04-29 Thread Hubert Tong via cfe-commits
@@ -14638,6 +14649,8 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { return true; } + case Builtin::BIfmin: + case Builtin::BIfminf: hubert-reinterpretcast wrote: > How would that help? I guess it doesn't... The functions would be

[clang] [Clang] Fix Null Pointer Dereference in Sema::BuildClassMessageImplic… (PR #90482)

2024-04-29 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/90482 …it() The issue arises in the assert statement. The code asserts that either isSuperReceiver && Loc.isValid() is true or receiverTypeInfo is not null. However, the subsequent line (return

[clang] [CUDA] make kernel stub ICF-proof (PR #90155)

2024-04-29 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/90155 >From 112e5eb538d4167a1d7be6c7171df1ca51cb374e Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Thu, 25 Apr 2024 22:23:26 -0400 Subject: [PATCH] [CUDA] make kernel stub ICF-proof MSVC linker merges

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

2024-04-29 Thread via cfe-commits
@@ -40,10 +38,8 @@ exit: ; Verify that in the resume part resume call is marked with musttail. ; CHECK-LABEL: @f.resume( -; CHECK: %[[addr2:.+]] = call ptr @llvm.coro.subfn.addr(ptr null, i8 0) -; NOPGO-NEXT: musttail call fastcc void %[[addr2]](ptr null) -; PGO: call void

[clang] [Clang] Propagate 'SystemDrive' environment variable for unit tests (PR #90478)

2024-04-29 Thread Krystian Stasiowski via cfe-commits
@@ -32,6 +32,8 @@ if "HOME" in os.environ: config.environment["HOME"] = os.environ["HOME"] +if "SystemDrive" in os.environ: +config.environment["SystemDrive"] = os.environ["SystemDrive"] sdkrystian wrote: Sure

[clang] [Clang] Propagate 'SystemDrive' environment variable for unit tests (PR #90478)

2024-04-29 Thread via cfe-commits
@@ -32,6 +32,8 @@ if "HOME" in os.environ: config.environment["HOME"] = os.environ["HOME"] +if "SystemDrive" in os.environ: +config.environment["SystemDrive"] = os.environ["SystemDrive"] cor3ntin wrote: can we do something like ```py # Propagate

[clang] [clang] Fix `remove{CVR|Fast}Qualifiers` with 64-bit `Qualifiers::Mask` (PR #90329)

2024-04-29 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 closed https://github.com/llvm/llvm-project/pull/90329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 91f251c - [clang] Fix `remove{CVR|Fast}Qualifiers` with 64-bit `Qualifiers::Mask` (#90329)

2024-04-29 Thread via cfe-commits
Author: Daniil Kovalev Date: 2024-04-29T17:56:54+03:00 New Revision: 91f251c31fbbc9b9d8ce69fce4fb50faa0179ef4 URL: https://github.com/llvm/llvm-project/commit/91f251c31fbbc9b9d8ce69fce4fb50faa0179ef4 DIFF:

[clang] [clang] Fix `remove{CVR|Fast}Qualifiers` with 64-bit `Qualifiers::Mask` (PR #90329)

2024-04-29 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @cor3ntin Thanks for feedback! I'll merge it myself https://github.com/llvm/llvm-project/pull/90329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix `remove{CVR|Fast}Qualifiers` with 64-bit `Qualifiers::Mask` (PR #90329)

2024-04-29 Thread via cfe-commits
cor3ntin wrote: @kovdan01 Aaron is not available this week. This looks sensible. Do you need me to merge it for you? https://github.com/llvm/llvm-project/pull/90329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-29 Thread 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] Fix `remove{CVR|Fast}Qualifiers` with 64-bit `Qualifiers::Mask` (PR #90329)

2024-04-29 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @AaronBallman Please let me know if you have some comments on this or if can be merged https://github.com/llvm/llvm-project/pull/90329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Add support for scalable vectors in __builtin_reduce_* functions (PR #87750)

2024-04-29 Thread Lawrence Benson via cfe-commits
https://github.com/lawben closed https://github.com/llvm/llvm-project/pull/87750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bd07c22 - [Clang] Add support for scalable vectors in __builtin_reduce_* functions (#87750)

2024-04-29 Thread via cfe-commits
Author: Lawrence Benson Date: 2024-04-29T16:45:33+02:00 New Revision: bd07c22e5372789c3eb47b9009029d5e99e0ef9f URL: https://github.com/llvm/llvm-project/commit/bd07c22e5372789c3eb47b9009029d5e99e0ef9f DIFF:

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

2024-04-29 Thread via cfe-commits
zmodem wrote: With my patch, some of these tests become less interesting. The class of problems arising from instructions between the resume and suspend doesn't exist with the new lowering. We could probably drop coro-split-musttail{5,6,7}.ll?

[clang] 45bd85e - [clang][Interp] Fix casting function pointers to integers

2024-04-29 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-29T16:33:21+02:00 New Revision: 45bd85e4815254a4528cc337447fd6a8eb6fd583 URL: https://github.com/llvm/llvm-project/commit/45bd85e4815254a4528cc337447fd6a8eb6fd583 DIFF: https://github.com/llvm/llvm-project/commit/45bd85e4815254a4528cc337447fd6a8eb6fd583.diff

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

2024-04-29 Thread via cfe-commits
zmodem wrote: I wasn't able to figure out what this test does. There is a Clang level test which was added at the same time: llvm/test/Transforms/Coroutines/coro-preserve-final.ll presumable that's enough. https://github.com/llvm/llvm-project/pull/89751

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

2024-04-29 Thread via cfe-commits
@@ -16548,11 +16548,10 @@ static void CheckImplicitConversion(Sema , Expr *E, QualType T, std::string PrettySourceValue = toString(Value, 10); std::string PrettyTargetValue = PrettyPrintInRange(Value, TargetRange); -S.DiagRuntimeBehavior( -

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-29 Thread Chris B via cfe-commits
llvm-beanz wrote: > While I like the approach of aligning availability parameters closer to > `llvm::Triple`, I am concerned about how this will interact with existing > precedent. There is a lot of code that passes in _platform_ values that > aren't actually `OSType`. For example >

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

2024-04-29 Thread via cfe-commits
zmodem wrote: This was testing that "the lifetime of the coroutine handle used to obtain the address is contained within single basic block, and hence does not live across suspension points" Since we no longer separately obtain the handle and pass it to

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

2024-04-29 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/88978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add processor definition and scheduling model for XiangShan-KunMingHu (PR #90392)

2024-04-29 Thread Camel Coder via cfe-commits
=?utf-8?b?6YOd5bq36L6+?= Message-ID: In-Reply-To: https://github.com/camel-cdr edited https://github.com/llvm/llvm-project/pull/90392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e34b41c - [clang][Interp] Support CXXParenListInitExprs for non-record types

2024-04-29 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-29T16:30:13+02:00 New Revision: e34b41c707a8cc589725d5f996e1a40e9631a495 URL: https://github.com/llvm/llvm-project/commit/e34b41c707a8cc589725d5f996e1a40e9631a495 DIFF: https://github.com/llvm/llvm-project/commit/e34b41c707a8cc589725d5f996e1a40e9631a495.diff

<    1   2   3   4   5   >