[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
@@ -1402,6 +1402,29 @@ def CXX11NoReturn : InheritableAttr { let Documentation = [CXX11NoReturnDocs]; } +def NoLock : DeclOrTypeAttr { + let Spellings = [CXX11<"clang", "nolock">, + C23<"clang", "nolock">, + GNU<"clang_nolock">]; + + //

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-12 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Do you mean the SPIR-V target (backend)? I have not followed this area of > work closely. What is missing or what exactly needs to be supported by the > SPIR-V target? Any help or pointers would be greatly appreciated! I believe there was some work to port SYCL to work with

[clang] [llvm] [Clang][BPF] Allow sign/zero extension for call parameters with int/uint types (PR #84874)

2024-03-12 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: Oh, this is making a bit more sense now... I didn't realize this was overriding method that handles char/short already. And I guess for BPF targets, you can assume "long" is 64 bits. That said, this isn't handling "unsigned int" correctly.

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
@@ -18321,6 +18321,28 @@ bool Sema::CheckOverridingFunctionAttributes(const CXXMethodDecl *New, return true; } + // Virtual overrides: check for matching effects. Sirraide wrote: Just a remark: Despite what I said wrt function declaration merging, I

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
@@ -1402,6 +1402,29 @@ def CXX11NoReturn : InheritableAttr { let Documentation = [CXX11NoReturnDocs]; } +def NoLock : DeclOrTypeAttr { + let Spellings = [CXX11<"clang", "nolock">, + C23<"clang", "nolock">, + GNU<"clang_nolock">]; + + //

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
@@ -11100,6 +11136,48 @@ Attr *Sema::getImplicitCodeSegOrSectionAttrForFunction(const FunctionDecl *FD, return nullptr; } +// Should only be called when getFunctionEffects() returns a non-empty set. +// Decl should be a FunctionDecl or BlockDecl. +void

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
@@ -7754,6 +7906,145 @@ QualType DecayedType::getPointeeType() const { void FixedPointValueToString(SmallVectorImpl , llvm::APSInt Val, unsigned Scale); +// -- + +//

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
@@ -7754,6 +7905,145 @@ QualType DecayedType::getPointeeType() const { void FixedPointValueToString(SmallVectorImpl , llvm::APSInt Val, unsigned Scale); +// -- + +//

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
@@ -2380,6 +2382,1239 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +// Temporary debugging option +#define FX_ANALYZER_VERIFY_DECL_LIST 1 +

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
@@ -10778,6 +10778,101 @@ def warn_imp_cast_drops_unaligned : Warning< "implicit cast from type %0 to type %1 drops __unaligned qualifier">, InGroup>; +def warn_func_effect_allocates : Warning< + "'%0' function '%1' must not allocate or deallocate memory">, + InGroup; +

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
@@ -3922,6 +3922,42 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *, Scope *S, return true; } + const auto OldFX = Old->getFunctionEffects(); + const auto NewFX = New->getFunctionEffects(); + if (OldFX != NewFX) { +const auto Diffs =

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
@@ -4912,3 +4922,279 @@ void AutoType::Profile(llvm::FoldingSetNodeID , const ASTContext ) { Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(), getTypeConstraintConcept(), getTypeConstraintArguments()); } + +FunctionEffect::~FunctionEffect() =

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
@@ -2380,6 +2382,1239 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +// Temporary debugging option +#define FX_ANALYZER_VERIFY_DECL_LIST 1 +

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
@@ -10778,6 +10778,101 @@ def warn_imp_cast_drops_unaligned : Warning< "implicit cast from type %0 to type %1 drops __unaligned qualifier">, InGroup>; +def warn_func_effect_allocates : Warning< + "'%0' function '%1' must not allocate or deallocate memory">, + InGroup; +

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
@@ -7973,3 +7973,20 @@ requirement: } }]; } + +def NoLockNoAllocDocs : Documentation { + let Category = DocCatType; + let Content = [{ +The ``nolock`` and ``noalloc`` attributes can be attached to functions, blocks, +function pointers, lambdas, and member functions.

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
@@ -1402,6 +1402,29 @@ def CXX11NoReturn : InheritableAttr { let Documentation = [CXX11NoReturnDocs]; } +def NoLock : DeclOrTypeAttr { + let Spellings = [CXX11<"clang", "nolock">, + C23<"clang", "nolock">, + GNU<"clang_nolock">]; + + //

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
https://github.com/Sirraide requested changes to this pull request. I was following this on Discourse, so I thought I’d take a look; overall, this seems like a very interesting addition to Clang to me. This is by no means a complete review; this pr is pretty big, so looking at everything in

[clang] [llvm] [CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers (PR #67454)

2024-03-12 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: Maybe `emitRawPointerFromAddress` is better. I see a lot of functions starting with `emit` in CodeGen. https://github.com/llvm/llvm-project/pull/67454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-03-12 Thread Eli Friedman via cfe-commits
@@ -3173,41 +3174,46 @@ class ArrayType : public Type, public llvm::FoldingSetNode { return T->getTypeClass() == ConstantArray || T->getTypeClass() == VariableArray || T->getTypeClass() == IncompleteArray || - T->getTypeClass() ==

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-12 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-format Author: Ameer J (ameerj) Changes This adds an option to break function definition parameters, putting them on the next line after the function's opening paren. This was a missing step towards allowing styles

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-12 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] Revert "[X86][clang] Lift _BitInt() supported max width." (PR #81175)

2024-03-12 Thread Harald van Dijk via cfe-commits
https://github.com/hvdijk closed https://github.com/llvm/llvm-project/pull/81175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[X86][clang] Lift _BitInt() supported max width." (PR #81175)

2024-03-12 Thread Harald van Dijk via cfe-commits
hvdijk wrote: > I would really like to avoid Clang 18 being released in this broken state, if > possible, and I see no way short of a revert to realistically achieve that. It's too late for that now, it's out there, and it's now everybody else's problem regardless of what Clang does in the

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-12 Thread Ameer J via cfe-commits
https://github.com/ameerj created https://github.com/llvm/llvm-project/pull/84988 This adds an option to break function definition parameters, putting them on the next line after the function's opening paren. This was a missing step towards allowing styles which require all function

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-03-12 Thread Eli Friedman via cfe-commits
@@ -2231,7 +2231,8 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { case CK_UserDefinedConversion: return Visit(const_cast(E)); - case CK_NoOp: { + case CK_NoOp: + case CK_HLSLArrayRValue: { efriedma-quic wrote: It shouldn't be possible to

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-03-12 Thread Eli Friedman via cfe-commits
@@ -500,6 +500,7 @@ ComplexPairTy ComplexExprEmitter::EmitCast(CastKind CK, Expr *Op, case CK_NoOp: case CK_LValueToRValue: case CK_UserDefinedConversion: + case CK_HLSLArrayRValue: efriedma-quic wrote: The result of an CK_HLSLArrayRValue can't be a

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-03-12 Thread Eli Friedman via cfe-commits
@@ -1442,6 +1445,7 @@ static bool castPreservesZero(const CastExpr *CE) { case CK_BitCast: case CK_ToUnion: case CK_ToVoid: + case CK_HLSLArrayRValue: efriedma-quic wrote: Probably should be false, like other lvalue-to-rvalue casts?

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-03-12 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: This seems like the right direction. https://github.com/llvm/llvm-project/pull/79382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-03-12 Thread Eli Friedman via cfe-commits
@@ -10900,6 +10936,10 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS, bool OfBlockPointer, assert(LHS != RHS && "Equivalent pipe types should have already been handled!"); return {}; + case Type::ArrayParameter: +if (RHS != LHS)

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-03-12 Thread Eli Friedman via cfe-commits
@@ -1126,6 +1126,7 @@ class ConstExprEmitter : case CK_NonAtomicToAtomic: case CK_NoOp: case CK_ConstructorConversion: +case CK_HLSLArrayRValue: efriedma-quic wrote: We shouldn't accept CK_HLSLArrayRValue casts here (or if we do, we need to do

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-03-12 Thread Eli Friedman via cfe-commits
@@ -4655,6 +4655,13 @@ void CodeGenFunction::EmitCallArg(CallArgList , const Expr *E, return emitWritebackArg(*this, args, CRE); } + // If an argument is an array paramter expression being passed through. Emit + // the argument to a temporary and pass the temporary

[clang] [HLSL] Implement array temporary support (PR #79382)

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

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #83204)

2024-03-12 Thread Richard Smith via cfe-commits
@@ -26996,18 +26996,38 @@ class, structure, array, or other object. Arguments: "" -The ``llvm.objectsize`` intrinsic takes four arguments. The first argument is a -pointer to or into the ``object``. The second argument determines whether -``llvm.objectsize`` returns 0

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-12 Thread Michal Paszkowski via cfe-commits
michalpaszkowski wrote: Hi @jhuber6! Thank you for the pull request! > This is not intended to be landed immediately, but to allow for greater > testing. One potential issue I've discovered is the lack of SPIR-V > support or handling for `--offload`. Do you mean the SPIR-V target (backend)? I

[clang] [llvm] [RISCV] Add generic CPUs for profiles (PR #84877)

2024-03-12 Thread Craig Topper via cfe-commits
topperc wrote: > I don't know if we need S-mode profile CPUs. I lean towards not supporting them since the S extensions don't do anything in the compiler except preprocessor defines and ELF attributes, but maybe we should put it on the agenda for the sync meeting this week.

[clang] [clang-repl] Expose CreateExecutor() and ResetExecutor() in extended Interpreter interface (PR #84460)

2024-03-12 Thread Vladimir Vereschaka via cfe-commits
vvereschaka wrote: Thank you @weliveindetail https://github.com/llvm/llvm-project/pull/84460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Expose CreateExecutor() and ResetExecutor() in extended Interpreter interface (PR #84460)

2024-03-12 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: This should fix both: initializing the native target (your reported case) AND skipping the test on platforms that don't support JIT (other build bots complained). https://github.com/llvm/llvm-project/pull/84460 ___ cfe-commits

[clang] [clang][CodeCompletion] Allow debuggers to code-complete reserved identifiers (PR #84891)

2024-03-12 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/84891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] beb47e7 - [clang][CodeCompletion] Allow debuggers to code-complete reserved identifiers (#84891)

2024-03-12 Thread via cfe-commits
Author: Michael Buch Date: 2024-03-12T22:19:09Z New Revision: beb47e78be6a819b6501f99302c1c4c1ae84b90e URL: https://github.com/llvm/llvm-project/commit/beb47e78be6a819b6501f99302c1c4c1ae84b90e DIFF: https://github.com/llvm/llvm-project/commit/beb47e78be6a819b6501f99302c1c4c1ae84b90e.diff LOG:

[clang] d73c2d5 - Fix unittest after #84460: only applicable if the platform supports JIT

2024-03-12 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2024-03-12T23:14:23+01:00 New Revision: d73c2d5df21735805a1f46a85790db64c0615e1c URL: https://github.com/llvm/llvm-project/commit/d73c2d5df21735805a1f46a85790db64c0615e1c DIFF:

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #83204)

2024-03-12 Thread Bill Wendling via cfe-commits
@@ -26996,18 +26996,38 @@ class, structure, array, or other object. Arguments: "" -The ``llvm.objectsize`` intrinsic takes four arguments. The first argument is a -pointer to or into the ``object``. The second argument determines whether -``llvm.objectsize`` returns 0

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-12 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 f1ca2a09671e4d4acc2bea362b39268ed7883b6d c31b2fd3cb923bc306cf9d086bb7723e4c7004cd --

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-12 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/83896 >From f22a5cd30f77b2043f9c1f7f4482fad87fb79250 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 4 Mar 2024 11:24:34 -0800 Subject: [PATCH 1/6] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-03-12 Thread via cfe-commits
weiguozhi wrote: > We have another use case for this calling convention - micropatching. See my > coworker's blog post on how this would work: > https://www.philipzucker.com/permutation_compile/ > I'm happy to see it's useful to you. > Is there a reason why r10 isn't included in the list of

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-12 Thread Thiago Macieira via cfe-commits
@@ -857,8 +881,13 @@ void CXXRecordDecl::addedMember(Decl *D) { data().HasDeclaredCopyAssignmentWithConstParam = true; } -if (Method->isMoveAssignmentOperator()) +if (Method->isMoveAssignmentOperator()) { SMKind |= SMF_MoveAssignment; +} + +

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-03-12 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/79382 >From 762646ef1d95efa968199156b52a60c3472a7611 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Thu, 29 Feb 2024 15:37:50 -0600 Subject: [PATCH 1/3] [HLSL] Pass arrays by value HLSL constant sized array

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-03-12 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/79382 >From 762646ef1d95efa968199156b52a60c3472a7611 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Thu, 29 Feb 2024 15:37:50 -0600 Subject: [PATCH 1/2] [HLSL] Pass arrays by value HLSL constant sized array

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-03-12 Thread Chris B via cfe-commits
llvm-beanz wrote: I force pushed an update here because the new implementation is basically a complete rewrite based on @efriedma-quic's suggestion. I think this is a significantly cleaner approach that more accurately models the behavior of HLSL.

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #83204)

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

[clang] [clang-repl] Expose CreateExecutor() and ResetExecutor() in extended Interpreter interface (PR #84460)

2024-03-12 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Yes, I think I can fix it quickly https://github.com/llvm/llvm-project/pull/84460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement array temporary support (PR #79382)

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

[clang] [HLSL] Implement array temporary support (PR #79382)

2024-03-12 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/79382 >From 762646ef1d95efa968199156b52a60c3472a7611 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Thu, 29 Feb 2024 15:37:50 -0600 Subject: [PATCH] [HLSL] Pass arrays by value HLSL constant sized array

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #83204)

2024-03-12 Thread Richard Smith via cfe-commits
@@ -26996,18 +26996,38 @@ class, structure, array, or other object. Arguments: "" -The ``llvm.objectsize`` intrinsic takes four arguments. The first argument is a -pointer to or into the ``object``. The second argument determines whether -``llvm.objectsize`` returns 0

[clang] [clang-repl] Expose CreateExecutor() and ResetExecutor() in extended Interpreter interface (PR #84460)

2024-03-12 Thread Vladimir Vereschaka via cfe-commits
vvereschaka wrote: @weliveindetail , the `Clang-Unit::ClangReplInterpreterTests.exe/InterpreterExtensionsTest/ExecutorCreateReset` gets failed on the Clang Windows buidler *

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #83204)

2024-03-12 Thread Bill Wendling via cfe-commits
@@ -26996,18 +26996,38 @@ class, structure, array, or other object. Arguments: "" -The ``llvm.objectsize`` intrinsic takes four arguments. The first argument is a -pointer to or into the ``object``. The second argument determines whether -``llvm.objectsize`` returns 0

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

2024-03-12 Thread Axel Lundberg via cfe-commits
https://github.com/Zonotora updated https://github.com/llvm/llvm-project/pull/75481 >From f0f02479736548a72c8a35ca3fea067b02e66bfd Mon Sep 17 00:00:00 2001 From: Zonotora Date: Sat, 16 Dec 2023 19:33:21 +0100 Subject: [PATCH 1/3] [clang] Extract negativity check lambda to function ---

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

2024-03-12 Thread Axel Lundberg via cfe-commits
https://github.com/Zonotora updated https://github.com/llvm/llvm-project/pull/75481 >From cd64144a4cf18adba1494871bfd9da1b0bf0a489 Mon Sep 17 00:00:00 2001 From: Zonotora Date: Sat, 16 Dec 2023 19:33:21 +0100 Subject: [PATCH 1/3] [clang] Extract negativity check lambda to function ---

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-03-12 Thread via cfe-commits
Sirraide wrote: Just requested more reviews real quick because this has been open for a month now, and Corentin apparently won’t be able to review prs until April, and I’d also feel a bit bad if I kept pinging just him about this over and over again...

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > This is an early PR to solicit comments on the overall approach and a number > of outstanding questions. You should advertise this elsewhere (e.g. in RFC thread), or remove the draft status so that reviewers can see this as something they should provide feedback on.

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good to me. Thank you for putting new functions in all the right places! https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos converted_to_draft https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-03-12 Thread via cfe-commits
Sirraide wrote: Alright, just checking that the AST dump doesn’t contain `FloatingRealToComplex` seems to work pretty well. https://github.com/llvm/llvm-project/pull/83063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-03-12 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/83063 >From 5418bec794ad1df54f49a1c8d317a75d56290239 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Mon, 26 Feb 2024 19:53:42 +0100 Subject: [PATCH 1/4] [Clang] [Sema] Remove incorrect int-to-complex-float conversion

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Valentin Clement バレンタイン クレメン via cfe-commits
@@ -6488,6 +6488,9 @@ defm stack_arrays : BoolOptionWithoutMarshalling<"f", "stack-arrays", defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stride", PosFlag, NegFlag>; + +def fcuda : Flag<["-"], "fcuda">, Group, clementval

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval deleted https://github.com/llvm/llvm-project/pull/84944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/84944 >From e42e8fe7f1dfe503a6735ef76e9d6483f5c9b5ec Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Tue, 12 Mar 2024 09:33:17 -0700 Subject: [PATCH 1/2] [flang][cuda] Add -fcuda option ---

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 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 ad23127222fe23e28ac3deaa16f3ae64d13b7b6f 2a1b0d2d99c9bc4595dfc98f250bf43d23a28093 --

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Doug Wyatt (dougsonos) Changes Rough first draft. This is an early PR to solicit comments on the overall approach and a number of outstanding questions. Some of the larger ones, "earlier" in the flow (from parse - Sema): - Does

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Doug Wyatt (dougsonos) Changes Rough first draft. This is an early PR to solicit comments on the overall approach and a number of outstanding questions. Some of the larger ones, "earlier" in the flow (from parse - Sema): - Does the

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 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] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-12 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > Sometimes it does confuse clang, at least I saw problems with a `typedef > enum` when I made an include-once header `textual`. Ok, I see. I would just consider it a bug, not a design decision. > That's correct. `#import` is an external source - often it comes from the >

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-12 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/84981 >From b60ff0c29f367306beb5ea0965dfaf5b7f361654 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Tue, 12 Mar 2024 13:53:34 +0100 Subject: [PATCH 1/3] [Clang] [CodeGen] Fix codegen bug in constant initialisation in

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-12 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/84981 >From b60ff0c29f367306beb5ea0965dfaf5b7f361654 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Tue, 12 Mar 2024 13:53:34 +0100 Subject: [PATCH 1/2] [Clang] [CodeGen] Fix codegen bug in constant initialisation in

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (Sirraide) Changes Consider the following code: ```c bool const inf = (1.0/0.0); ``` When trying to emit the initialiser of this variable in C23, we end up hitting a code path in codegen in `VarDecl::evaluateValueImpl()`

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-12 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/84981 Consider the following code: ```c bool const inf = (1.0/0.0); ``` When trying to emit the initialiser of this variable in C23, we end up hitting a code path in codegen in `VarDecl::evaluateValueImpl()` where

[clang] 2377beb - [Fuchsia] Add LLDB_TEST_USE_VENDOR_PACKAGES to boostrap passthrough

2024-03-12 Thread Daniel Thornburgh via cfe-commits
Author: Daniel Thornburgh Date: 2024-03-12T13:33:12-07:00 New Revision: 2377beba8d10ce1092db7f8ddd5b10a2c0d3bfd1 URL: https://github.com/llvm/llvm-project/commit/2377beba8d10ce1092db7f8ddd5b10a2c0d3bfd1 DIFF:

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-12 Thread Kees Cook via cfe-commits
kees wrote: > That one ends up not being a problem, but presumably you are wanting to > change that top-level 'struct' to be a 'union'? No, I want to collapse the entire macro into just `TYPE NAME[]`. Right now the Linux kernel uses the `DECLARE_FLEX_ARRAY` macro _in_ over 200 unions and

[clang] [llvm] [Clang][BPF] Allow sign/zero extension for call parameters with int/uint types (PR #84874)

2024-03-12 Thread via cfe-commits
yonghong-song wrote: @efriedma-quic Thanks for your comments. BPF llvm backend and kernel BPF jit try to make BPF<->other_architecture compatible. riscv started to support BPF starting in 2020 and probably BPF has limited usage so the bug is exposed until now. Yes,

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-12 Thread via cfe-commits
https://github.com/eddyz87 updated https://github.com/llvm/llvm-project/pull/84410 >From 1cb6905e726b1f6c6cb71ea1e4d9ab4405aedeaf Mon Sep 17 00:00:00 2001 From: Eduard Zingerman Date: Fri, 26 Jan 2024 04:18:32 +0200 Subject: [PATCH] [BPF] Add addr_space_cast BPF instruction addr_space_cast

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Valentin Clement バレンタイン クレメン via cfe-commits
@@ -6488,6 +6488,9 @@ defm stack_arrays : BoolOptionWithoutMarshalling<"f", "stack-arrays", defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stride", PosFlag, NegFlag>; + +def fcuda : Flag<["-"], "fcuda">, Group, clementval

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval edited https://github.com/llvm/llvm-project/pull/84944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Valentin Clement バレンタイン クレメン via cfe-commits
@@ -0,0 +1,13 @@ +! Test -fcuda option +! RUN: %flang -fc1 -cpp -fcuda -fdebug-unparse %s -o - | FileCheck %s clementval wrote: Without it, it would just fail during parsing. Do you want a test that check the failure?

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-12 Thread Nathan Sidwell via cfe-commits
urnathan wrote: @rjmccall here's a refactoring along the lines you suggested. Once one stops worrying about rescanning when the next access unit fails to accumulate into the current one, things get simpler. The compiler should be able to turn the boolean conditional flow within the loop body

[clang] [InstallAPI] Break up headers and add common header for TextAPI types (PR #84960)

2024-03-12 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/84960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a38b7a4 - [InstallAPI] Break up headers and add common header for TextAPI types (#84960)

2024-03-12 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-03-12T12:37:17-07:00 New Revision: a38b7a432d3cbb093af9310eba5b4982dc0a0243 URL: https://github.com/llvm/llvm-project/commit/a38b7a432d3cbb093af9310eba5b4982dc0a0243 DIFF: https://github.com/llvm/llvm-project/commit/a38b7a432d3cbb093af9310eba5b4982dc0a0243.diff

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-03-12 Thread via cfe-commits
@@ -0,0 +1,143 @@ +// RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown -o - | FileCheck %s --check-prefix=X86 + +// Check that for 'F _Complex + int' (F = real floating-point type), we emit an +// implicit cast from 'int' to 'F', but NOT to 'F _Complex' (i.e.

[clang] [InstallAPI] Break up headers and add common header for TextAPI types (PR #84960)

2024-03-12 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/84960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-03-12 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,143 @@ +// RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown -o - | FileCheck %s --check-prefix=X86 + +// Check that for 'F _Complex + int' (F = real floating-point type), we emit an +// implicit cast from 'int' to 'F', but NOT to 'F _Complex' (i.e.

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-12 Thread via cfe-commits
@@ -0,0 +1,52 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4 +; RUN: opt --bpf-check-and-opt-ir -S -mtriple=bpf-pc-linux < %s | FileCheck %s + +; Generated from the following C code: +; +; extern int __uptr *magic1(); +;

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-12 Thread via cfe-commits
https://github.com/eddyz87 updated https://github.com/llvm/llvm-project/pull/84410 >From 503c1abc8dd63ec1500d1ed867a4bfefc1aed062 Mon Sep 17 00:00:00 2001 From: Eduard Zingerman Date: Fri, 26 Jan 2024 04:18:32 +0200 Subject: [PATCH 1/4] [BPF] Add addr_space_cast BPF instruction This commit

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,13 @@ +! Test -fcuda option +! RUN: %flang -fc1 -cpp -fcuda -fdebug-unparse %s -o - | FileCheck %s banach-space wrote: Could you add a RUN line without enabling CUDA? Otherwise it's hard to see what's being tested and what the impact of enabling CUDA

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Andrzej Warzyński via cfe-commits
@@ -6488,6 +6488,9 @@ defm stack_arrays : BoolOptionWithoutMarshalling<"f", "stack-arrays", defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stride", PosFlag, NegFlag>; + +def fcuda : Flag<["-"], "fcuda">, Group, banach-space

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes Made by following: https://github.com/llvm/llvm-project/pull/83585#issuecomment-1980340866 Thanks for the details Tomek! --- Full diff:

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-12 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/84972 Made by following: https://github.com/llvm/llvm-project/pull/83585#issuecomment-1980340866 Thanks for the details Tomek! >From 9860dad609c8a27dfaa178af5b72285e3ad050fd Mon Sep 17 00:00:00 2001 From: Balazs

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-12 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/83896 >From f22a5cd30f77b2043f9c1f7f4482fad87fb79250 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 4 Mar 2024 11:24:34 -0800 Subject: [PATCH 1/5] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-12 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/83896 >From 9434f834c4d48559aeec94403c927f48b15763e3 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 4 Mar 2024 11:24:34 -0800 Subject: [PATCH 1/5] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1

[clang-tools-extra] [clang-tidy]bugprone-unused-return-value ignore `++` and `--` operator overloading (PR #84922)

2024-03-12 Thread Piotr Zegar via cfe-commits
@@ -165,20 +165,20 @@ void UnusedReturnValueCheck::storeOptions(ClangTidyOptions::OptionMap ) { void UnusedReturnValueCheck::registerMatchers(MatchFinder *Finder) { auto MatchedDirectCallExpr = expr( - callExpr( - callee(functionDecl( - // Don't

<    1   2   3   4   5   >