[clang] [llvm] Assume (PR #97535)

2024-07-10 Thread Krzysztof Parzyszek via cfe-commits
@@ -760,6 +760,9 @@ void clang::getOpenMPCaptureRegions( case OMPD_parallel: CaptureRegions.push_back(OMPD_parallel); break; +case OMPD_assume: + CaptureRegions.push_back(OMPD_unknown); + break; kparzysz wrote: The final output fr

[clang] [Clang] Fix null pointer dereference in VisitUsingEnumDecl (PR #97910)

2024-07-10 Thread via cfe-commits
smanna12 wrote: Thank you for the reviews @Sirraide https://github.com/llvm/llvm-project/pull/97910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0162df0 - [Clang] Fix null pointer dereference in VisitUsingEnumDecl (#97910)

2024-07-10 Thread via cfe-commits
Author: smanna12 Date: 2024-07-10T10:06:54-05:00 New Revision: 0162df03cd51e5207310424f2a83b7670c3c2ade URL: https://github.com/llvm/llvm-project/commit/0162df03cd51e5207310424f2a83b7670c3c2ade DIFF: https://github.com/llvm/llvm-project/commit/0162df03cd51e5207310424f2a83b7670c3c2ade.diff LOG:

[clang] [Clang] Fix null pointer dereference in VisitUsingEnumDecl (PR #97910)

2024-07-10 Thread via cfe-commits
https://github.com/smanna12 closed https://github.com/llvm/llvm-project/pull/97910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread Momchil Velikov via cfe-commits
@@ -1886,6 +1896,29 @@ llvm::Constant *ConstantEmitter::emitForMemory(CodeGenModule &CGM, return Res; } + if (destType->isBitIntType()) { +if (CGM.getTypes().typeRequiresSplitIntoByteArray(destType, C->getType())) { + // Long _BitInt has array of bytes as in-

[clang] [clang] Emit bad shift warnings (PR #70307)

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

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from a few small things to correct. @tbaederr are you happy with the state of things as well? https://github.com/llvm/llvm-project/pull/70307 ___ cfe-commits mailing list cfe-commi

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-10 Thread Aaron Ballman via cfe-commits
@@ -277,7 +277,9 @@ void dr258(void) { void dr261(void) { /* This is still an integer constant expression despite the overflow. */ AaronBallman wrote: Probably good to update this comment to mention "extension". https://github.com/llvm/llvm-project/pull/7030

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-10 Thread Aaron Ballman via cfe-commits
@@ -686,6 +686,8 @@ Improvements to Clang's diagnostics - Clang no longer emits a "no previous prototype" warning for Win32 entry points under ``-Wmissing-prototypes``. Fixes #GH94366. +- Clang now diagnoses non-C++11 integer constant expressions. Fixes #GH59863 ---

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun updated https://github.com/llvm/llvm-project/pull/98325 From 06d63fe5be15afddd19e64bdf59ca560bc08b3b7 Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Mon, 8 Jul 2024 11:18:02 +0100 Subject: [PATCH] Fix --print-libgcc-file-name on Darwin platforms On Darwin, --pr

[clang] [analyzer][docs] Add clang-19 release notes for CSA (PR #97418)

2024-07-10 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/1524 Here is the relevant piece of the build log for

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Gábor Horváth via cfe-commits
@@ -223,6 +223,11 @@ class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain { // There aren't any profiling libs for embedded targets currently. } + // Return the full path of the compiler-rt library on a Darwin MachO system. + // Those are under /lib/darwin/<...>(.dyl

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Gábor Horváth via cfe-commits
@@ -2271,6 +2271,12 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { if (C.getArgs().hasArg(options::OPT_print_libgcc_file_name)) { ToolChain::RuntimeLibType RLT = TC.GetRuntimeLibType(C.getArgs()); const llvm::Triple Triple(TC.ComputeEffectiveClangTriple(C

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Gábor Horváth via cfe-commits
@@ -0,0 +1,55 @@ +// Test the output of -print-libgcc-file-name on Darwin. + +// +// All platforms +// + +// RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \ +// RUN: --target=x86_64-apple-macos \ +// RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \ +// RUN: | Fi

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Gábor Horváth via cfe-commits
@@ -0,0 +1,55 @@ +// Test the output of -print-libgcc-file-name on Darwin. + +// +// All platforms +// + +// RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \ +// RUN: --target=x86_64-apple-macos \ +// RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \ +// RUN: | Fi

[clang] [llvm] demangle function names in trace files (PR #87626)

2024-07-10 Thread Jamie Schmeiser via cfe-commits
jamieschmeiser wrote: @Trass3r, sorry, I didn't realize that you were waiting on me... I had already approved this so you can go ahead and merge it. I was just pointing you at possibly related work that might interest you. Even if you decide to expand this work, I would suggest delivering t

[clang] [llvm] demangle function names in trace files (PR #87626)

2024-07-10 Thread Jamie Schmeiser via cfe-commits
jamieschmeiser wrote: To directly answer your question: No, deliver this. If you find loop entries in the future, then consider expanding it. Also, the link to that here may help others should then decide to expand this work. https://github.com/llvm/llvm-project/pull/87626 __

[clang] [Clang][ARM] Call constructor on BranchTargetInfo. (PR #98307)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/98307 >From 4e10c95c390e519853428f424cd655379d99c61c Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 10 Jul 2024 13:58:52 +0200 Subject: [PATCH 1/3] [Clang][ARM] Call constructor on BranchTargetInfo. O

[clang] [Clang][ARM] Call constructor on BranchTargetInfo. (PR #98307)

2024-07-10 Thread Daniel Kiss via cfe-commits
@@ -1434,7 +1434,14 @@ class TargetInfo : public TransferrableTargetInfo, } public: -BranchProtectionInfo() = default; +BranchProtectionInfo() { + SignReturnAddr = LangOptions::SignReturnAddressScopeKind::None; + SignKey = LangOptions::SignReturnAddress

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-07-10 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: > It looks like there's still a failure related to this patch on current main > AFAICT (MSAN finds a use of uninitialized value): > https://lab.llvm.org/buildbot/#/builders/169/builds/852/steps/12/logs/stdio > Thanks, already noticed and addressed here: #98307 https

[clang] [llvm] demangle function names in trace files (PR #87626)

2024-07-10 Thread via cfe-commits
Trass3r wrote: Ok thanks, I don't have commit rights, could you merge it please? :) https://github.com/llvm/llvm-project/pull/87626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not emit intrinsic math functions on GPU targets (PR #98209)

2024-07-10 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/98209 >From 605e9e78c1cba3b1947a538c566ffedbb9525be0 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 10 Jul 2024 09:39:44 -0500 Subject: [PATCH 1/2] [Clang] Correctly enable the f16 type for offloading Summary:

[clang] [clang][ARM] Fix warning for using VFP from interrupts. (PR #91870)

2024-07-10 Thread Chris Copeland via cfe-commits
@@ -1329,6 +1329,11 @@ void SemaARM::handleInterruptAttr(Decl *D, const ParsedAttr &AL) { return; } + const TargetInfo &TI = getASTContext().getTargetInfo(); + if (TI.hasFeature("vfp")) { +Diag(D->getLocation(), diag::warn_arm_interrupt_vfp_clobber); + }

[clang] [Clang] Correctly enable the f16 type for offloading (PR #98331)

2024-07-10 Thread Matt Arsenault via cfe-commits
@@ -1,12 +1,605 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 arsenm wrote: I guess this doesn't apply if it was a fail test before https://github.com/llvm/llvm-project/pull/98331 __

[clang] [clang][ARM] Fix warning for using VFP from interrupts. (PR #91870)

2024-07-10 Thread Chris Copeland via cfe-commits
chrisnc wrote: Thanks! https://github.com/llvm/llvm-project/pull/91870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly enable the f16 type for offloading (PR #98331)

2024-07-10 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/98331 >From b8f50d9fb7576c0ff7b6b9202736d47913af47ee Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 10 Jul 2024 09:39:44 -0500 Subject: [PATCH] [Clang] Correctly enable the f16 type for offloading Summary: The

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

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

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Sorry for the delay in review! This seems like the right direction to go, in general. As @erichkeane, it's a bit hard to review due to the whitespace-only changes and changes to `__is_trivially_equality_comparable`, you should remove those changes or

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 %s -verify -fno-builtin -Werror=comment -Wno-error=abi -Wfatal-errors=assume -Wno-fatal-errors=assume + +#define diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__))) + +template +void diagnose_if_wcomma() diagnose_if(b, "oh no", "warnin

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 %s -verify -fno-builtin -Werror=comment -Wno-error=abi -Wfatal-errors=assume -Wno-fatal-errors=assume + +#define diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__))) + +template +void diagnose_if_wcomma() diagnose_if(b, "oh no", "warnin

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 %s -verify -fno-builtin -Werror=comment -Wno-error=abi -Wfatal-errors=assume -Wno-fatal-errors=assume + +#define diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__))) + +template +void diagnose_if_wcomma() diagnose_if(b, "oh no", "warnin

[clang] Add an option to add source file info to -ftime-trace (PR #98320)

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 1/2] Add an option to add source file info to -ftime-trace --- cla

[clang] [analyzer] Split TaintPropagation checker into reporting and modeling checkers (PR #98157)

2024-07-10 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/98157 >From 75675417c324a2d1df5e42a8549f6d4bcb779ab4 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Fri, 5 Jul 2024 14:02:00 +0200 Subject: [PATCH 1/5] [analyzer] Splitting TaintPropagation checker into reporting an

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/98320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

2024-07-10 Thread via cfe-commits
cor3ntin wrote: Is this still relevant? What about #85613 ? I think we can close both, right? https://github.com/llvm/llvm-project/pull/86960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 ready_for_review https://github.com/llvm/llvm-project/pull/98320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6002e2f - [analyzer] Split TaintPropagation checker into reporting and modeling checkers (#98157)

2024-07-10 Thread via cfe-commits
Author: Daniel Krupp Date: 2024-07-10T17:54:53+02:00 New Revision: 6002e2fd49537e942e819e5d1e6f07481fd1229e URL: https://github.com/llvm/llvm-project/commit/6002e2fd49537e942e819e5d1e6f07481fd1229e DIFF: https://github.com/llvm/llvm-project/commit/6002e2fd49537e942e819e5d1e6f07481fd1229e.diff

[clang] [analyzer] Split TaintPropagation checker into reporting and modeling checkers (PR #98157)

2024-07-10 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp closed https://github.com/llvm/llvm-project/pull/98157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Utkarsh Saxena (usx95) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/98320.diff 3 Files Affected: - (modified) clang/lib/Sema/SemaTemplateInstantiate.cpp (+1) - (modified) clang/lib/Sema/SemaTemplateInstantia

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Utkarsh Saxena (usx95) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/98320.diff 3 Files Affected: - (modified) clang/lib/Sema/SemaTemplateInstantiate.cpp (+1) - (modified) clang/lib/Sema/SemaTemplateInstantiateDecl.

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 24d5c54cf52d38e63d365275f913285908aa9c9a...ae991f8c88c21a0872a5fa63219b3cb9b2787d9a clang

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 1/3] Add an option to add source file info to -ftime-trace --- cla

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/98320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BinPackBinaryOperations configuration (PR #95013)

2024-07-10 Thread Ameer J via cfe-commits
https://github.com/ameerj updated https://github.com/llvm/llvm-project/pull/95013 >From a50f3d4395efd09eea8ba2e750bb785857f9a550 Mon Sep 17 00:00:00 2001 From: ameerj Date: Mon, 10 Jun 2024 12:09:40 -0400 Subject: [PATCH 01/11] Add BinPackBinaryOperations --- clang/include/clang/Format/Format

[clang] [clang-format] Add BinPackBinaryOperations configuration (PR #95013)

2024-07-10 Thread Ameer J via cfe-commits
@@ -146,6 +146,14 @@ static bool startsNextParameter(const FormatToken &Current, Style.BreakInheritanceList != FormatStyle::BILS_BeforeComma)); } +// Returns \c true if \c Current starts a new operand in a binary operation. ameerj wrote: The wordin

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-07-10 Thread via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang -Wno-constant-conversion -Wno-array-bounds -Wno-division-by-zero -Wno-shift-negative-value -Wno-shift-count-negative -Wno-int-to-pointer-cast -O0 -fsanitize=alignment,array-bounds,bool,float-cast-overflow,implicit-integer-sign-change,implicit-si

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-07-10 Thread via cfe-commits
https://github.com/earnol edited https://github.com/llvm/llvm-project/pull/96240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 1/4] Add an option to add source file info to -ftime-trace --- cla

[clang] [NFC][Clang] Move functions of BranchProtectionInfo out of line (PR #98329)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/98329 >From b1e113f76b289aa8a7d4459314a0dbffb313cb51 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 10 Jul 2024 16:23:11 +0200 Subject: [PATCH 1/2] [NFC][Clang] Move functions of BranchProtectionInfo o

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-07-10 Thread via cfe-commits
https://github.com/earnol edited https://github.com/llvm/llvm-project/pull/96240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0fa20c5 - demangle function names in trace files (#87626)

2024-07-10 Thread via cfe-commits
Author: Trass3r Date: 2024-07-10T12:14:28-04:00 New Revision: 0fa20c55b58deb94090985a5c5ffda4d5ceb3cd1 URL: https://github.com/llvm/llvm-project/commit/0fa20c55b58deb94090985a5c5ffda4d5ceb3cd1 DIFF: https://github.com/llvm/llvm-project/commit/0fa20c55b58deb94090985a5c5ffda4d5ceb3cd1.diff LOG:

[clang] [llvm] demangle function names in trace files (PR #87626)

2024-07-10 Thread Jamie Schmeiser via cfe-commits
https://github.com/jamieschmeiser closed https://github.com/llvm/llvm-project/pull/87626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
https://github.com/ldionne ready_for_review https://github.com/llvm/llvm-project/pull/98325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
https://github.com/ldionne requested changes to this pull request. https://github.com/llvm/llvm-project/pull/98325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,97 @@ +// Test the output of -print-libgcc-file-name on Darwin. + +// +// All platforms +// + +// RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \ +// RUN: --target=x86_64-apple-macos \ +// RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \ +// RUN: | Fi

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -2230,6 +2239,7 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { } if (C.getArgs().hasArg(options::OPT_print_runtime_dir)) { +initDarwinTarget(); ldionne wrote: We should also add tests for this behavior. We were not printing the right

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,97 @@ +// Test the output of -print-libgcc-file-name on Darwin. + +// +// All platforms +// + +// RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \ +// RUN: --target=x86_64-apple-macos \ +// RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \ +// RUN: | Fi

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,97 @@ +// Test the output of -print-libgcc-file-name on Darwin. ldionne wrote: It looks like the embedded targets are already tested to some extent inside `clang/test/Driver/darwin-embedded.c`. I would add a new test file `clang/test/Driver/darwin-em

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -1303,18 +1288,55 @@ void MachO::AddLinkRuntimeLib(const ArgList &Args, ArgStringList &CmdArgs, // rpaths. This is currently true from this place, but we need to be // careful if this function is ever called before user's rpaths are emitted. if (Opts & RLO_AddRPath) {

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -223,6 +223,13 @@ class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain { // There aren't any profiling libs for embedded targets currently. } + // Return the full path of the compiler-rt library on a non-Darwin MachO + // system. Those are under + // /lib/darwin/

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -223,6 +223,11 @@ class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain { // There aren't any profiling libs for embedded targets currently. } + // Return the full path of the compiler-rt library on a Darwin MachO system. + // Those are under /lib/darwin/<...>(.dyl

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -356,6 +363,12 @@ class LLVM_LIBRARY_VISIBILITY Darwin : public MachO { void addProfileRTLibs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override; + // Return the full path of the compiler-rt library on a Darwin MachO

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/98325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Fix -print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/98325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Fix -print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Gábor Horváth (Xazax-hun) Changes On Darwin, -print-libgcc-file-name was returning a nonsensical result. It would return the name of the library that would be used by the default toolchain implementation,

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 commented: > Sorry for the delay in review! No worries! I dropped this for a few months myself. I can't expect to get a review within days when doing that :D > This seems like the right direction to go, in general. As @erichkeane, it's a > bit hard to review due

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 %s -verify -fno-builtin -Werror=comment -Wno-error=abi -Wfatal-errors=assume -Wno-fatal-errors=assume + +#define diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__))) + +template +void diagnose_if_wcomma() diagnose_if(b, "oh no", "warnin

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/70976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 77ec20c - [clang-tidy] let UseAfterMoveFinder::find() return an optional (#98100)

2024-07-10 Thread via cfe-commits
Author: Kefu Chai Date: 2024-07-10T18:19:42+02:00 New Revision: 77ec20c2fcfe1578bd62258cc5e185236d2abf81 URL: https://github.com/llvm/llvm-project/commit/77ec20c2fcfe1578bd62258cc5e185236d2abf81 DIFF: https://github.com/llvm/llvm-project/commit/77ec20c2fcfe1578bd62258cc5e185236d2abf81.diff LOG

[clang-tools-extra] [clang-tidy] let UseAfterMoveFinder::find() return an optional (PR #98100)

2024-07-10 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/98100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add ability to list extensions enabled for a target (PR #98207)

2024-07-10 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/98207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ARM] Call constructor on BranchTargetInfo. (PR #98307)

2024-07-10 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot1` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/1294 Here is the relevant piece of the bu

[clang] [llvm] [RISCV] Add QingKe "XW" compressed opcode extension (PR #97925)

2024-07-10 Thread via cfe-commits
ArcaneNibble wrote: Pre-commit CI is now green on Windows, Linux has been waiting for a free builder for several hours now Do I need to do anything else here? I do not have commit access to merge this myself. https://github.com/llvm/llvm-project/pull/97925

[clang] [ObjC][CodeGen] Assume a for-in loop is in bounds and cannot overflow (PR #94885)

2024-07-10 Thread via cfe-commits
AtariDreams wrote: @JOE1994 Could you please merge this, as I do not have merge permissions? https://github.com/llvm/llvm-project/pull/94885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [clang] fix sema init crashing on initialization sequences (PR #98102)

2024-07-10 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/98102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix sema init crashing on initialization sequences (PR #98102)

2024-07-10 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/98102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix sema init crashing on initialization sequences (PR #98102)

2024-07-10 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/98102 >From 097881dcd14d44e97e526de86dc348e7a4e5a2e6 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Mon, 8 Jul 2024 18:16:17 -0700 Subject: [PATCH 1/2] [clang] fix sema init crash for not checking a ExprResult

[clang] [clang] fix sema init crashing on initialization sequences (PR #98102)

2024-07-10 Thread Yuxuan Chen via cfe-commits
yuxuanchen1997 wrote: > The changes LGTM, but please add a release note to > clang/docs/ReleaseNotes.rst so users know about the fix. Added. Thanks. https://github.com/llvm/llvm-project/pull/98102 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [clang] Ensure pointers passed to runtime support functions are correctly signed (PR #98276)

2024-07-10 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/98276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Ensure pointers passed to runtime support functions are correctly signed (PR #98276)

2024-07-10 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt ready_for_review https://github.com/llvm/llvm-project/pull/98276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Ensure pointers passed to runtime support functions are correctly signed (PR #98276)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes Updates codegen for global destructors and raising exceptions to ensure that the function pointers being passed are signed using the correct schema. Notably this requires that CodeGenFunction::createAtExitStub

[clang] [LoongArch][clang] Add support for option `-msimd=` and macro `__loongarch_simd_width`. (PR #97984)

2024-07-10 Thread Jake Egan via cfe-commits
jakeegan wrote: Hi, this test is failing on the AIX bot https://lab.llvm.org/buildbot/#/builders/64/builds/250/steps/6/logs/FAIL__Clang__loongarch-msimd_c The reason is that -o is not a supported option with grep on AIX. Would you be able to adapt the test to avoid piping (so that the builtin

[clang] [CodeGen] Update test intrinsic to support immediates (PR #79174)

2024-07-10 Thread via cfe-commits
https://github.com/AtariDreams closed https://github.com/llvm/llvm-project/pull/79174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-10 Thread Constantin Kronbichler via cfe-commits
https://github.com/ccrownhill updated https://github.com/llvm/llvm-project/pull/98016 >From 5dd2bb12dee26ba93d927ad1cd99fa610f9ace97 Mon Sep 17 00:00:00 2001 From: ccrownhill Date: Mon, 8 Jul 2024 11:42:37 +0100 Subject: [PATCH 1/3] fix bug that undefined internal is a warning only for -pedant

[clang] [AST] Replace localUncachedLookup with noload_lookup in ASTImporterFixtures (NFC) (PR #91955)

2024-07-10 Thread via cfe-commits
https://github.com/AtariDreams closed https://github.com/llvm/llvm-project/pull/91955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-10 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/98267 >From 2ca4c255338f1c41a2cad929604c70febf6c7eaf Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 9 Jul 2024 19:47:27 -0700 Subject: [PATCH 1/4] [llvm][AArch64] apple-m4 is armv9.2-a But since SVE and friend

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-10 Thread Jon Roelofs via cfe-commits
@@ -797,7 +797,7 @@ def HasV8_9aOps : Architecture64<8, 9, "a", "v8.9a", !listconcat(HasV8_8aOps.DefaultExts, [FeatureSPECRES2, FeatureCSSC, FeatureRASv2])>; def HasV9_0aOps : Architecture64<9, 0, "a", "v9a", - [HasV8_5aOps, FeatureMEC], jroelofs wrote:

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-10 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/98267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-10 Thread Constantin Kronbichler via cfe-commits
ccrownhill wrote: I added three more tests covering these points: — part of the operand of a sizeof operator whose result is an integer constant; — part of the controlling expression of a generic selection; — or, part of the operand of any typeof operator whose result is not a variably modified

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 created https://github.com/llvm/llvm-project/pull/98352 Add an option to the `bugprone-implicit-widening-of-multiplication-result` clang-tidy checker to suppress warnings when the expression is made up of all compile-time constants (literals, `constexpr` values

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Chris Warner (cwarner-8702) Changes Add an option to the `bugprone-implicit-widening-of-multiplication-result` clang-tidy checker to suppress warnings when the expression is made up of all compile-time constants (literals, `constexpr

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-10 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/98267 >From 2ca4c255338f1c41a2cad929604c70febf6c7eaf Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 9 Jul 2024 19:47:27 -0700 Subject: [PATCH 1/5] [llvm][AArch64] apple-m4 is armv9.2-a But since SVE and friend

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Chris Warner via cfe-commits
cwarner-8702 wrote: @AaronBallman @njames93 Could you review? https://github.com/llvm/llvm-project/pull/98352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread Mariya Podchishchaeva via cfe-commits
@@ -1,12 +1,25 @@ -// RUN: %clang_cc1 -triple x86_64-gnu-linux -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK64 -// RUN: %clang_cc1 -triple x86_64-windows-pc -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHEC

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread Mariya Podchishchaeva via cfe-commits
@@ -1886,6 +1896,29 @@ llvm::Constant *ConstantEmitter::emitForMemory(CodeGenModule &CGM, return Res; } + if (destType->isBitIntType()) { +if (CGM.getTypes().typeRequiresSplitIntoByteArray(destType, C->getType())) { + // Long _BitInt has array of bytes as in-

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread Mariya Podchishchaeva via cfe-commits
@@ -609,9 +609,25 @@ bool ConstStructBuilder::AppendBytes(CharUnits FieldOffsetInChars, return Builder.add(InitCst, StartOffset + FieldOffsetInChars, AllowOverwrite); } -bool ConstStructBuilder::AppendBitField( -const FieldDecl *Field, uint64_t FieldOffset, llvm::Const

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread Mariya Podchishchaeva via cfe-commits
@@ -118,6 +124,37 @@ llvm::Type *CodeGenTypes::ConvertTypeForMem(QualType T, bool ForBitField) { return R; } +bool CodeGenTypes::LLVMTypeLayoutMatchesAST(QualType ASTTy, +llvm::Type *LLVMTy) { + CharUnits ASTSize = Context.getTyp

[clang] Add -static-libasan alias for -static-libsan. (PR #98194)

2024-07-10 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/98194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread Mariya Podchishchaeva via cfe-commits
@@ -2093,17 +2107,10 @@ void CodeGenFunction::EmitStoreOfScalar(llvm::Value *Value, Address Addr, llvm::Type *SrcTy = Value->getType(); if (const auto *ClangVecTy = Ty->getAs()) { auto *VecTy = dyn_cast(SrcTy); -if (VecTy && ClangVecTy->isExtVectorBoolType()) { -

[clang] dcf70e1 - Add -static-libasan alias for -static-libsan. (#98194)

2024-07-10 Thread via cfe-commits
Author: Evgenii Stepanov Date: 2024-07-10T10:23:17-07:00 New Revision: dcf70e16684420ae211dad58dbfacc0430409ab4 URL: https://github.com/llvm/llvm-project/commit/dcf70e16684420ae211dad58dbfacc0430409ab4 DIFF: https://github.com/llvm/llvm-project/commit/dcf70e16684420ae211dad58dbfacc0430409ab4.di

<    1   2   3   4   5   >