[clang] 9fc152d - [TBAA] Add Clang pointer TBAA test with void *.

2025-01-08 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2025-01-08T11:54:02Z New Revision: 9fc152d25ea1610efe2824c763e96e790d520910 URL: https://github.com/llvm/llvm-project/commit/9fc152d25ea1610efe2824c763e96e790d520910 DIFF: https://github.com/llvm/llvm-project/commit/9fc152d25ea1610efe2824c763e96e790d520910.diff LOG:

[clang] [clang] [ARM] Explicitly enable NEON for Windows/Darwin targets (PR #122095)

2025-01-08 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: Admittedly, I'm not sure if this patch really is relevant for upstream or not, as it doesn't really affect observable behaviour much at all. The main observable difference on the clang driver level is that when compiling assembly, `-target-feature` arguments are now passed on t

[clang] [NFC] [analyzer] Factor out SymbolManager::get<*> (PR #121781)

2025-01-08 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/121781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Arm] Regenerate tests (NFC) (PR #121801)

2025-01-08 Thread Momchil Velikov via cfe-commits
momchil-velikov wrote: Another things that "works" is changing the codegen for `__builtin_bit_cast` (https://github.com/llvm/llvm-project/blob/32bc029be6265838833623fdd88cc665d5658dc7/clang/lib/CodeGen/CGExprScalar.cpp#L2295). It stores a value with one type and loads it back with another type w

[clang] [flang] [flang][driver] add option to make all main program variable static (PR #121968)

2025-01-08 Thread via cfe-commits
https://github.com/jeanPerier updated https://github.com/llvm/llvm-project/pull/121968 >From f8683e46b58eee5828fced9a31294d72fc247baf Mon Sep 17 00:00:00 2001 From: Jean Perier Date: Tue, 7 Jan 2025 09:30:17 -0800 Subject: [PATCH 1/2] [flang][driver] add option to make all main program variabl

[clang] [AArch64][Clang] Add support for __arm_agnostic("sme_za_state") (PR #121788)

2025-01-08 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm updated https://github.com/llvm/llvm-project/pull/121788 >From 159bc2ccdab5457d997c9fc8ed679e4607db0b79 Mon Sep 17 00:00:00 2001 From: Sander de Smalen Date: Mon, 9 Sep 2024 15:20:26 +0100 Subject: [PATCH 1/3] [AArch64][Clang] Add support for __arm_agnostic("sm

[clang] edf14ed - [Clang] Don't form a type constraint if the concept is invalid (#122065)

2025-01-08 Thread via cfe-commits
Author: Younan Zhang Date: 2025-01-08T19:40:16+08:00 New Revision: edf14ed6b182b9ae9efa0c854f3d4744bb67bf08 URL: https://github.com/llvm/llvm-project/commit/edf14ed6b182b9ae9efa0c854f3d4744bb67bf08 DIFF: https://github.com/llvm/llvm-project/commit/edf14ed6b182b9ae9efa0c854f3d4744bb67bf08.diff

[clang] [Clang] Don't form a type constraint if the concept is invalid (PR #122065)

2025-01-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/122065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [ARM] Explicitly enable NEON for Windows/Darwin targets (PR #122095)

2025-01-08 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo created https://github.com/llvm/llvm-project/pull/122095 Upstream LLVM implicitly enables NEON for any ARMv7 target. Many platform ABIs with an ARMv7 baseline also include NEON in that, this is the case on e.g. Windows and iOS. On Linux, however, things are not quit

[clang] [clang] [ARM] Explicitly enable NEON for Windows/Darwin targets (PR #122095)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Martin Storsjö (mstorsjo) Changes Upstream LLVM implicitly enables NEON for any ARMv7 target. Many platform ABIs with an ARMv7 baseline also include NEON in that, this is the case on e.g. Windows and iOS. On Linux, however, things

[clang] [clang] Emit @llvm.assume before streaming_compatible functions when the streaming mode is known (PR #121917)

2025-01-08 Thread Sander de Smalen via cfe-commits
@@ -1275,6 +1279,31 @@ bool AArch64TargetCodeGenInfo::wouldInliningViolateFunctionCallABI( GetArmSMEInlinability(Caller, Callee) != ArmSMEInlinability::Ok; } +void AArch64TargetCodeGenInfo::emitFunctionCallProlog( +CGBuilderTy &Builder, const FunctionDecl *Caller

[clang] [clang] Emit @llvm.assume before streaming_compatible functions when the streaming mode is known (PR #121917)

2025-01-08 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/121917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Emit @llvm.assume before streaming_compatible functions when the streaming mode is known (PR #121917)

2025-01-08 Thread Sander de Smalen via cfe-commits
@@ -1275,6 +1279,31 @@ bool AArch64TargetCodeGenInfo::wouldInliningViolateFunctionCallABI( GetArmSMEInlinability(Caller, Callee) != ArmSMEInlinability::Ok; } +void AArch64TargetCodeGenInfo::emitFunctionCallProlog( +CGBuilderTy &Builder, const FunctionDecl *Caller

[clang] [clang] Emit @llvm.assume before streaming_compatible functions when the streaming mode is known (PR #121917)

2025-01-08 Thread Sander de Smalen via cfe-commits
@@ -1275,6 +1279,31 @@ bool AArch64TargetCodeGenInfo::wouldInliningViolateFunctionCallABI( GetArmSMEInlinability(Caller, Callee) != ArmSMEInlinability::Ok; } +void AArch64TargetCodeGenInfo::emitFunctionCallProlog( +CGBuilderTy &Builder, const FunctionDecl *Caller

[clang] [clang] Emit @llvm.assume before streaming_compatible functions when the streaming mode is known (PR #121917)

2025-01-08 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm commented: @NickGuy-Arm this PR is missing some test-coverage. @efriedma-quic do you have any thoughts on emitting the llvm.assume as a prologue to the actual call? I guess the alternative would be to analyse the function to see if there's any calls to streamin

[clang] [SPIR-V] Add hlsl_private address space for SPIR-V (PR #122103)

2025-01-08 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts created https://github.com/llvm/llvm-project/pull/122103 In SPIR-V, private global variables have the `Private` storage class. This PR adds a new address space which allows frontend to emit variable with this storage class. Before this change, global variable were e

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2025-01-08 Thread Jan Voung via cfe-commits
https://github.com/jvoung updated https://github.com/llvm/llvm-project/pull/115051 >From 8d83ec25ccdedad5f6a48e4a23176435f71a3e72 Mon Sep 17 00:00:00 2001 From: Jan Voung Date: Tue, 5 Nov 2024 19:20:36 + Subject: [PATCH 1/5] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-opti

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-08 Thread via cfe-commits
https://github.com/GeorgeKA updated https://github.com/llvm/llvm-project/pull/120900 >From faf8597dbb58a08991e11e9c4b9a0aad2f0b4234 Mon Sep 17 00:00:00 2001 From: GeorgeKA Date: Sun, 22 Dec 2024 09:42:36 -0500 Subject: [PATCH 1/4] [Clang][Driver][Test] Created test for unsupported driver optio

[libunwind] [libunwind][cmake] Compile _Unwind* routines with -fexceptions (PR #121819)

2025-01-08 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Maybe this is a hidden bug, but I haven't investigated it too deeply, > @mstorsjo may know better. Sorry, no clue offhand here. > If you build MinGW LTO libunwind without `-fno-exceptions` or with > -`fexceptions`, libunwind references `__gcc_personality_seh0`, which results

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2025-01-08 Thread Jan Voung via cfe-commits
https://github.com/jvoung updated https://github.com/llvm/llvm-project/pull/115051 >From 8d83ec25ccdedad5f6a48e4a23176435f71a3e72 Mon Sep 17 00:00:00 2001 From: Jan Voung Date: Tue, 5 Nov 2024 19:20:36 + Subject: [PATCH 1/6] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-opti

[clang-tools-extra] [clang-tidy] fix false positives when using name-independent variables after C++26 for bugprone-unused-local-non-trivial-variable (PR #121783)

2025-01-08 Thread Congcong Cai via cfe-commits
@@ -29,6 +29,12 @@ static constexpr StringRef DefaultIncludeTypeRegex = AST_MATCHER(VarDecl, isLocalVarDecl) { return Node.isLocalVarDecl(); } AST_MATCHER(VarDecl, isReferenced) { return Node.isReferenced(); } +AST_MATCHER_P(VarDecl, explicitMarkUnused, LangOptions, LangOpts)

[clang] [clang][OpenMP] Add 'align' modifier for 'allocate' clause (PR #121814)

2025-01-08 Thread Alexey Bataev via cfe-commits
@@ -4530,32 +4530,89 @@ static bool parseStepSize(Parser &P, SemaOpenMP::OpenMPVarListDataTy &Data, } /// Parse 'allocate' clause modifiers. -/// If allocator-modifier exists, return an expression for it and set -/// Data field noting modifier was specified. -/// +/// I

[clang] [clang][OpenMP] Add 'align' modifier for 'allocate' clause (PR #121814)

2025-01-08 Thread Alexey Bataev via cfe-commits
@@ -11824,10 +11824,14 @@ void OMPClauseReader::VisitOMPMapClause(OMPMapClause *C) { } void OMPClauseReader::VisitOMPAllocateClause(OMPAllocateClause *C) { - C->setAllocatorModifier(Record.readEnum()); + C->setFirstAllocateModifier( + static_cast(Record.readInt())); +

[clang] [Clang] disallow attributes after namespace identifier (PR #121614)

2025-01-08 Thread Oleksandr T. via cfe-commits
@@ -81,7 +81,7 @@ Parser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, ParsedAttributes attrs(AttrFactory); - auto ReadAttributes = [&] { + auto ReadAttributes = [&](bool TrailingAttrs) { a-tarasyuk wrote: @erichkeane @AaronBallman c

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2025-01-08 Thread Tom Honermann via cfe-commits
@@ -15978,6 +15988,24 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, CheckCoroutineWrapper(FD); } + // Diagnose invalid SYCL kernel entry point function declarations. + if (FD && !FD->isInvalidDecl() && !FD->isTemplated() && + FD->hasAttr()) { +

[clang] [clang] Emit @llvm.assume before streaming_compatible functions when the streaming mode is known (PR #121917)

2025-01-08 Thread Amara Emerson via cfe-commits
aemerson wrote: > > However what we want to achieve with this is to make the state of the > > streaming mode known to potentially inlineable called functions, allowing > > for further inlining and identification/removal of dead code > > It seems like we're in agreement that the llvm.assume doe

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2025-01-08 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/120494 >From 13a9c0b88afae7a5f48a66e86357f7284fdace95 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 17 Dec 2024 15:25:00 -0800 Subject: [PATCH] [libclang/python] Add python bindings for PrintingPolicy T

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-08 Thread Eli Friedman via cfe-commits
@@ -137,6 +137,10 @@ llvm::AllocaInst *CodeGenFunction::CreateTempAlloca(llvm::Type *Ty, Alloca = new llvm::AllocaInst(Ty, CGM.getDataLayout().getAllocaAddrSpace(), ArraySize, Name, AllocaInsertPt->getIterator()); + if (Alloca->getName

[clang] [Clang][OpenMP][Doc] Update OpenMPSupport.rst (PR #122174)

2025-01-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/122174 >From 47908c2aefc7009ccb62d4b9111fbd8d7e5ee7ad Mon Sep 17 00:00:00 2001 From: CatherineMoore Date: Wed, 8 Jan 2025 16:33:01 -0500 Subject: [PATCH 1/3] Update OpenMPSupport.rst --- clang/docs/OpenMPSupport.rst

[clang] [Clang][OpenMP][Doc] Update OpenMPSupport.rst (PR #122174)

2025-01-08 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Seems to be failing for some unrelated OpenACC test. https://github.com/llvm/llvm-project/pull/122174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2025-01-08 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Still failing the same way. Should I go ahead and merge anyway, or is there someone who can look into this? https://github.com/llvm/llvm-project/pull/120494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] Update OpenMPSupport.rst (PR #122174)

2025-01-08 Thread Joseph Huber via cfe-commits
jhuber6 wrote: ```Warning, treated as error: /home/runner/work/llvm-project/llvm-project/clang-build/tools/clang/docs/OpenMPSupport.rst:398:Inline interpreted text or phrase reference start-string without end-string. ninja: build stopped: subcommand failed. ``` >From the CI https://github.com/l

[clang] [OpenMP] Allow GPUs to be targeted directly via `-fopenmp`. (PR #122149)

2025-01-08 Thread Shilei Tian via cfe-commits
shiltian wrote: > To me this looks like compilation for a host, except the GPU is the host. The > only functions that could be called from such a CU would be the top-level > ones, not any of the auto-generated one. > > Additionally, the host wouldn't support offload, so we'd need to do somethi

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/121619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update OpenMPSupport.rst (PR #122174)

2025-01-08 Thread via cfe-commits
https://github.com/CatherineMoore updated https://github.com/llvm/llvm-project/pull/122174 >From 47908c2aefc7009ccb62d4b9111fbd8d7e5ee7ad Mon Sep 17 00:00:00 2001 From: CatherineMoore Date: Wed, 8 Jan 2025 16:33:01 -0500 Subject: [PATCH 1/3] Update OpenMPSupport.rst --- clang/docs/OpenMPSuppo

[clang] [Clang][OpenMP][Doc] Update OpenMPSupport.rst (PR #122174)

2025-01-08 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/122174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't form a type constraint if the concept is invalid (PR #122065)

2025-01-08 Thread Shafik Yaghmour via cfe-commits
@@ -1969,7 +1970,7 @@ void ASTDeclWriter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { if (OwnsDefaultArg) Record.AddTemplateArgumentLoc(D->getDefaultArgument()); - if (!TC && !OwnsDefaultArg && + if (!D->hasTypeConstraint() && !OwnsDefaultArg && -

[clang] [Clang] Don't form a type constraint if the concept is invalid (PR #122065)

2025-01-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/122065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't form a type constraint if the concept is invalid (PR #122065)

2025-01-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: After commit review. Thank you for the fix. https://github.com/llvm/llvm-project/pull/122065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Allow GPUs to be targeted directly via `-fopenmp`. (PR #122149)

2025-01-08 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: > I get it, but that doesn't look like the case. If you look at the test case, > the `target` region in `bar` is simply ignored. To me this looks like > treating the entire TU being wrapped into a giant target region instead of > compiling for host. That is a good point. I th

[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)

2025-01-08 Thread Eli Friedman via cfe-commits
@@ -14585,11 +14585,18 @@ void Sema::CheckAddressOfPackedMember(Expr *rhs) { _2, _3, _4)); } +static ExprResult UsualUnaryConversionsNoPromoteInt(Sema &S, Expr *E) { + // Don't promote integer types + if (QualType Ty = E->getType(); S.getASTContext().is

[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)

2025-01-08 Thread Eli Friedman via cfe-commits
@@ -14604,57 +14611,63 @@ bool Sema::PrepareBuiltinElementwiseMathOneArgCall(CallExpr *TheCall) { } bool Sema::BuiltinElementwiseMath(CallExpr *TheCall, bool FPOnly) { - QualType Res; - if (BuiltinVectorMath(TheCall, Res, FPOnly)) -return true; - TheCall->setType(Res);

[clang] [clang] Infer capture_by for insert_or_assign (PR #122109)

2025-01-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang` at step 6 "test-build-unified-tree-check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/16507 Here is the r

[clang] [Headers][X86] amxintrin.h - fix attributes according to Intel SDM (PR #122204)

2025-01-08 Thread Evgenii Kudriashov via cfe-commits
e-kud wrote: I'm not sure if tests are needed. Let me know. https://github.com/llvm/llvm-project/pull/122204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [lld] [Flang] Don't use FortranDecimal for runtime (PR #121997)

2025-01-08 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/121997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6