[flang] [clang] [flang][Driver] Support -nodefaultlibs, -nostartfiles and -nostdlib (PR #72601)

2023-11-18 Thread Brad Smith via cfe-commits
brad0 wrote: @MaskRay ? https://github.com/llvm/llvm-project/pull/72601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Enable __float128 support on X86 on FreeBSD / NetBSD (PR #72788)

2023-11-18 Thread Brad Smith via cfe-commits
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/72788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Enable __float128 support on X86 and PPC64le on FreeBSD / NetBSD (PR #72788)

2023-11-18 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/72788 >From bde98ba852c456d95be75df7e9ecfa31b7d964ff Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sat, 18 Nov 2023 22:04:19 -0500 Subject: [PATCH] [Driver] Enable __float128 support on X86 on FreeBSD / NetBSD --- cla

[clang] [Driver] Enable __float128 support on X86 and PPC64le on FreeBSD / NetBSD (PR #72788)

2023-11-18 Thread Brad Smith via cfe-commits
brad0 wrote: > Linux ppc64le does not support `__float128`. Should *BSD support it? There was another patch floating around to add support for the driver. I'll remove it for now. https://github.com/llvm/llvm-project/pull/72788 ___ cfe-commits mailing

[clang] [Driver] Enable __float128 support on X86 and PPC64le on FreeBSD / NetBSD (PR #72788)

2023-11-18 Thread Fangrui Song via cfe-commits
MaskRay wrote: Linux ppc64le does not support `__float128`. Should *BSD support it? https://github.com/llvm/llvm-project/pull/72788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Enable __float128 support on X86 and PPC64le on FreeBSD / NetBSD (PR #72788)

2023-11-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/72788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Enable __float128 support on X86 and PPC64le on FreeBSD / NetBSD (PR #72788)

2023-11-18 Thread Brad Smith via cfe-commits
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/72788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Enable __float128 support on X86 and PowerPC64le on FreeBSD … (PR #72788)

2023-11-18 Thread Brad Smith via cfe-commits
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/72788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Enable __float128 support on X86 and PowerPC64le on FreeBSD … (PR #72788)

2023-11-18 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/72788 >From 851adf14958e9dac3d9143ca2e667cd9b4de2d8b Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sat, 18 Nov 2023 22:04:19 -0500 Subject: [PATCH] [Driver] Enable __float128 support on X86 and PPC64le on FreeBSD / Net

[clang] [Driver] Enable __float128 support on X86 and PowerPC64le on FreeBSD … (PR #72788)

2023-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brad Smith (brad0) Changes …/ NetBSD --- Full diff: https://github.com/llvm/llvm-project/pull/72788.diff 2 Files Affected: - (modified) clang/lib/Basic/Targets/OSTargets.h (+18-2) - (modified) clang/test/CodeGenCXX/float128-declaration

[clang] [Driver] Enable __float128 support on X86 and PowerPC64le on FreeBSD … (PR #72788)

2023-11-18 Thread Brad Smith via cfe-commits
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/72788 …/ NetBSD >From 96f280aa636c9858887d383d4cce7ee542d0b058 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sat, 18 Nov 2023 22:04:19 -0500 Subject: [PATCH] [Driver] Enable __float128 support on X86 and PowerPC64le on

[clang] [CUDA][HIP] make trivial ctor/dtor host device (PR #72394)

2023-11-18 Thread Artem Belevich via cfe-commits
Artem-B wrote: We've found a problem with the patch. https://godbolt.org/z/jcKo34vzG ``` template class C { explicit C() {}; }; template <> C::C() {}; ``` :6:21: error: __host__ function 'C' cannot overload __host__ __device__ function 'C' 6 | template <> C::C() {}; |

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel ready_for_review https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
michael-kenzel wrote: As discussed, I've removed unnecessary includes of `` as well as a couple other unnecessary includes. I've put the include of `` in `config.h` under an `#ifdef` so it only gets included when logging is potentially active. I've also moved the include of `` from `config.h`

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel reopened https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
michael-kenzel wrote: As discussed, I've removed unnecessary includes of `` as well as a couple other unnecessary includes. I've put the include of `` in `config.h` under an `#ifdef` so it only gets included when logging is potentially active. I've also moved the include of `` from `config.h`

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel closed https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] fix stack marking for -fgpu-rdc (PR #72782)

2023-11-18 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/72782 >From b49127f7787b3f5943a879c0f30e26f0f3ac7ab6 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Fri, 17 Nov 2023 18:35:36 -0500 Subject: [PATCH] [HIP] fix stack marking for -fgpu-rdc HIP toolchain uses ll

[clang] [HIP] fix stack marking for -fgpu-rdc (PR #72782)

2023-11-18 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 5237193b87721134541f228e28edfd544a9c8ac8 adf19a8c09fc4ed82e4b42c735452e8c4ed8d84f --

[clang] [HIP] fix stack marking for -fgpu-rdc (PR #72782)

2023-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Yaxun (Sam) Liu (yxsamliu) Changes HIP toolchain uses llvm-mc to generate a host object embedding device binary for -fgpu-rdc. Due to lack of .note.GNU-stack section, the generated relocatable has executable stack marking, which di

[clang] [HIP] fix stack marking for -fgpu-rdc (PR #72782)

2023-11-18 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/72782 HIP toolchain uses llvm-mc to generate a host object embedding device binary for -fgpu-rdc. Due to lack of .note.GNU-stack section, the generated relocatable has executable stack marking, which disables protect

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel updated https://github.com/llvm/llvm-project/pull/72040 >From f8b562dbd0c5927b92c5314ea70745b9b3ec1535 Mon Sep 17 00:00:00 2001 From: Michael Kenzel Date: Sat, 11 Nov 2023 22:09:05 +0100 Subject: [PATCH] [libunwind] Remove unnecessary dependencies on stdio.h fo

[clang-tools-extra] [clang] [clang] Turn invented Exprs' source locations in __builtin_dump_struct to empty (PR #72750)

2023-11-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: It looks like the issue is, if the invented CallExpr is ill-formed and the compiler needs to issue a diagnostic about it, with the invalid SourceLocation it doesn't have a source location to attach to the diagnostic. I guess this means the approach of using an invalid Sou

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Turn invented Exprs' source locations in __builtin_dump_struct to empty (PR #72750)

2023-11-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: The CI run shows the test [Sema/builtin-dump-struct.c](https://searchfox.org/llvm/source/clang/test/Sema/builtin-dump-struct.c) is failing. https://github.com/llvm/llvm-project/pull/72750 ___ cfe-commits mailing list cfe-commits

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel updated https://github.com/llvm/llvm-project/pull/72040 >From a72cef20e847e85a5fedb56d1b9d1414dbd7e516 Mon Sep 17 00:00:00 2001 From: Michael Kenzel Date: Sat, 11 Nov 2023 22:09:05 +0100 Subject: [PATCH] [libunwind] Introduce _LIBUNWIND_TRACE_DWARF_EVAL --- l

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel updated https://github.com/llvm/llvm-project/pull/72040 >From 0bedd8b680bf8f2957a6056e92eb1cb92a8666e3 Mon Sep 17 00:00:00 2001 From: Michael Kenzel Date: Sat, 11 Nov 2023 22:09:05 +0100 Subject: [PATCH] [libunwind] Introduce _LIBUNWIND_TRACE_DWARF_EVAL --- l

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: dong jianqiang (dongjianqiang2) Changes clang splits -export-dynamic into "-e" and "xport-dynamic", and gets ld warning: cannot find entry symbol xport-dynamic; defaulting to , which is unexpected fro

[libunwind] [libunwind] Introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel updated https://github.com/llvm/llvm-project/pull/72040 >From f98bbd27427a3cc03dbb933c2fccbab73b557cec Mon Sep 17 00:00:00 2001 From: Michael Kenzel Date: Sat, 11 Nov 2023 22:09:05 +0100 Subject: [PATCH] [libunwind] Introduce _LIBUNWIND_TRACE_DWARF_EVAL --- l

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-18 Thread dong jianqiang via cfe-commits
https://github.com/dongjianqiang2 created https://github.com/llvm/llvm-project/pull/72781 clang splits -export-dynamic into "-e" and "xport-dynamic", and gets ld warning: cannot find entry symbol xport-dynamic; defaulting to , which is unexpected from user. Adjust the driver to support -e

[libunwind] [libunwind] Introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel updated https://github.com/llvm/llvm-project/pull/72040 >From c78b3f5267a5809f1d29a17dd392a8a2d0b4147c Mon Sep 17 00:00:00 2001 From: Michael Kenzel Date: Sat, 11 Nov 2023 22:09:05 +0100 Subject: [PATCH] [libunwind] Introduce _LIBUNWIND_TRACE_DWARF_EVAL --- l

[libunwind] [libunwind] Introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel updated https://github.com/llvm/llvm-project/pull/72040 >From 42bfd80e85095d8a1c94926fb907874f1c73f5c3 Mon Sep 17 00:00:00 2001 From: Michael Kenzel Date: Sat, 11 Nov 2023 22:09:05 +0100 Subject: [PATCH] [libunwind] Introduce _LIBUNWIND_TRACE_DWARF_EVAL --- l

[libunwind] [libunwind] Introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel updated https://github.com/llvm/llvm-project/pull/72040 >From ef0ec53cdcc3cd2b42bfaafe2504f4e90fbf0c2e Mon Sep 17 00:00:00 2001 From: Michael Kenzel Date: Sat, 11 Nov 2023 22:09:05 +0100 Subject: [PATCH] [libunwind] Introduce _LIBUNWIND_TRACE_DWARF_EVAL --- l

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-18 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/70338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-18 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/70338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5237193 - [NFC] Fix typos in comments

2023-11-18 Thread Phoebe Wang via cfe-commits
Author: Phoebe Wang Date: 2023-11-19T10:14:34+08:00 New Revision: 5237193b87721134541f228e28edfd544a9c8ac8 URL: https://github.com/llvm/llvm-project/commit/5237193b87721134541f228e28edfd544a9c8ac8 DIFF: https://github.com/llvm/llvm-project/commit/5237193b87721134541f228e28edfd544a9c8ac8.diff L

[llvm] [clang] [flang] [flang][OpenMP] Add semantic check for declare target (PR #72770)

2023-11-18 Thread via cfe-commits
shraiysh wrote: One thing I wanted to point out was that with this patch clang will accept `#pragma omp declare target enter(x)` when compiled with version 5.2. I don't think clang is handling it accurately yet though. Is there a way to report "unimplemented" errors in clang? Or is it okay thi

[llvm] [clang] [flang] [flang][OpenMP] Add semantic check for declare target (PR #72770)

2023-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-parser @llvm/pr-subscribers-flang-fir-hlfir Author: Shraiysh (shraiysh) Changes This patch adds the following check from OpenMP 5.2. ``` If the directive has a clause, it must contain at least one enter clause or at least one link clause. ``` Als

[llvm] [flang] [clang] [flang][OpenMP] Add semantic check for declare target (PR #72770)

2023-11-18 Thread via cfe-commits
https://github.com/shraiysh created https://github.com/llvm/llvm-project/pull/72770 This patch adds the following check from OpenMP 5.2. ``` If the directive has a clause, it must contain at least one enter clause or at least one link clause. ``` Also added a warning for the deprication of `TO

[clang] [clang-format] Fix a bug in isStartOfName() on macro definitions (PR #72768)

2023-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixed #72751. --- Full diff: https://github.com/llvm/llvm-project/pull/72768.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+4-2) - (modified) clang/unittests/Format/TokenAnnot

[clang] [clang-format] Fix a bug in isStartOfName() on macro definitions (PR #72768)

2023-11-18 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/72768 Fixed #72751. >From 188eeabc89cfc4851ad1943d5ef6bf11bc6cb629 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 18 Nov 2023 16:37:45 -0800 Subject: [PATCH] [clang-format] Fix a bug in isStartOfName() on macro de

[clang] 1c12278 - [clang] Remove unused selStructPtrTy in CGObjCGNU.cpp (NFC)

2023-11-18 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2023-11-19T08:19:47+08:00 New Revision: 1c1227846425883a3d39ff56700660236a97152c URL: https://github.com/llvm/llvm-project/commit/1c1227846425883a3d39ff56700660236a97152c DIFF: https://github.com/llvm/llvm-project/commit/1c1227846425883a3d39ff56700660236a97152c.diff LOG: [

[clang] 695662b - [clang] Remove ConstantAggregateBuilderBase::addBitCast (NFC)

2023-11-18 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2023-11-18T17:46:08-06:00 New Revision: 695662b00c993dc33f7196c6d156c967a0aad6af URL: https://github.com/llvm/llvm-project/commit/695662b00c993dc33f7196c6d156c967a0aad6af DIFF: https://github.com/llvm/llvm-project/commit/695662b00c993dc33f7196c6d156c967a0aad6af.diff

[clang] b08960f - [CGObjCMac] Replace calls to ConstantAggregateBuilderBase::addBitCast (NFC)

2023-11-18 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2023-11-18T17:03:48-06:00 New Revision: b08960f1e96d64874486354c16b4116c5f8f URL: https://github.com/llvm/llvm-project/commit/b08960f1e96d64874486354c16b4116c5f8f DIFF: https://github.com/llvm/llvm-project/commit/b08960f1e96d64874486354c16b4116c5f8f.diff

[clang] [clang] Reject incomplete type arguments for __builtin_dump_struct (PR #72749)

2023-11-18 Thread Richard Smith via cfe-commits
@@ -713,6 +713,11 @@ static ExprResult SemaBuiltinDumpStruct(Sema &S, CallExpr *TheCall) { return ExprError(); } const RecordDecl *RD = PtrArgType->getPointeeType()->getAsRecordDecl(); + if (!RD->isCompleteDefinition()) { zygoloid wrote: You need to

[compiler-rt] [flang] [clang] [clang-tools-extra] [llvm] [clang] Add `::_placement_new` expression for built-in global placement new (PR #72209)

2023-11-18 Thread via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/72209 >From 75cf305fe732d00be910a6aa0afe79953c5b7186 Mon Sep 17 00:00:00 2001 From: MaxEW707 <82551778+maxew...@users.noreply.github.com> Date: Sun, 12 Nov 2023 11:36:58 -0500 Subject: [PATCH 1/4] Implement `::_placeme

[PATCH] D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes

2023-11-18 Thread Jared Grubb via Phabricator via cfe-commits
jaredgrubb updated this revision to Diff 558132. jaredgrubb marked 3 inline comments as done. jaredgrubb added a comment. Update to address all the review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150083/new/ https://reviews.llvm.org/D150083 Files: clang/docs/ClangForma

[PATCH] D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes

2023-11-18 Thread Jared Grubb via Phabricator via cfe-commits
jaredgrubb marked 7 inline comments as done. jaredgrubb added inline comments. Comment at: clang/lib/Format/ObjCPropertyAttributeOrderFixer.cpp:113 + + // Deduplicate the attributes. + Indices.erase(std::unique(Indices.begin(), Indices.end(), owenpan wrote: > j

[clang] [clang codegen][regression] Add dso_local/hidden/etc. markings to VTT definitions and declarations (PR #72452)

2023-11-18 Thread via cfe-commits
bd1976bris wrote: > I mean, looking at the code, as far as I can tell, we always call > GetAddrOfVTT immediately before EmitVTTDefinition, so setGVProperties() has > already run, so running it again shouldn't do anything... unless somehow > EmitVTTDefinition is overwriting the visibility, or s

[clang] a540808 - [CGObjCGNU] Remove unneeded method 'CGObjCGNUstep2::EnforceType' (NFC)

2023-11-18 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2023-11-18T14:06:45-06:00 New Revision: a540808de254b18b304aa0915638a0900b36d9fa URL: https://github.com/llvm/llvm-project/commit/a540808de254b18b304aa0915638a0900b36d9fa DIFF: https://github.com/llvm/llvm-project/commit/a540808de254b18b304aa0915638a0900b36d9fa.diff

[clang] [Clang] Correct handling of negative and out-of-bounds indices (PR #71877)

2023-11-18 Thread Bill Wendling via cfe-commits
@@ -827,6 +827,165 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +llvm::Value * +CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, +

[PATCH] D70401: [RISCV] CodeGen of RVE and ilp32e/lp64e ABIs

2023-11-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70401/new/ https://reviews.llvm.org/D70401 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes

2023-11-18 Thread Jared Grubb via Phabricator via cfe-commits
jaredgrubb added a comment. In D150083#4656832 , @owenpan wrote: > Thank you for your patience! I appreciate the help :) I'm excited to get this in! > In D150083#4655528 , @owenpan wrote: > >> See also D153228 <

[libunwind] [compiler-rt] [libcxx] [mlir] [lldb] [lld] [flang] [clang-tools-extra] [libc] [libcxxabi] [llvm] [clang] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-18 Thread Todd A. Anderson via cfe-commits
@@ -17,6 +17,8 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/GraphWriter.h" +static std::vector nameObj; DrTodd13 wrote: I don't know if there is some LLVM code approach that would dictate what to do here. We can have some kind of a data st

[mlir] [lldb] [libc] [libcxxabi] [flang] [compiler-rt] [lld] [clang-tools-extra] [libcxx] [clang] [llvm] [libunwind] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-18 Thread Todd A. Anderson via cfe-commits
@@ -83,10 +85,29 @@ struct DOTGraphTraitsViewer StringRef Name; }; +static void shortenFileName(std::string &FN, unsigned char len = 250) { + + FN = FN.substr(0, len); + if (nameObj.empty()) +nameObj.push_back(FN); + + else { +for (auto it = nameObj.begin(); it !=

[llvm] [libc] [libunwind] [clang-tools-extra] [flang] [libcxxabi] [lldb] [mlir] [libcxx] [compiler-rt] [lld] [clang] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-18 Thread Todd A. Anderson via cfe-commits
https://github.com/DrTodd13 requested changes to this pull request. I like the idea of that new function but I don't think it does what you intended. https://github.com/llvm/llvm-project/pull/72654 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[lld] [llvm] [clang-tools-extra] [lldb] [compiler-rt] [libunwind] [libc] [mlir] [clang] [libcxxabi] [libcxx] [flang] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-18 Thread Todd A. Anderson via cfe-commits
https://github.com/DrTodd13 edited https://github.com/llvm/llvm-project/pull/72654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-18 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans approved this pull request. > This patch makes sure we encode the constant in a `DIExpression` on > definitions, which is tested. And we have tests for ensuring that > `DW_OP_constu` expressions get turned into `DW_AT_const_value`s (I know of at > least `llvm/test/Deb

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-18 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/72730 >From 6dcb09dcc50a9b9e92640412242927b3e226929e Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Sat, 18 Nov 2023 00:20:05 + Subject: [PATCH 1/5] [clang][DebugInfo][NFC] Create evaluateConstantInitializer

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-18 Thread Michael Buch via cfe-commits
Michael137 wrote: > Overall this looks good, thanks! > > I think we may want to add a test to check that the output DWARF has a const > value in the expected place, since consumers are relying on it. Any suggestions where to put such end-to-end test? This patch makes sure we encode the consta

[clang] [clang-tools-extra] [clang] Turn invented Exprs' source locations in __builtin_dump_struct to empty (PR #72750)

2023-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Younan Zhang (zyn0217) Changes This reflects the comment in https://github.com/llvm/llvm-project/pull/71366#issuecomment-1817271492. As that PR suggests, the invented CallExpr's source location previously pointed to the beginning of the

[clang] [clang-tools-extra] [clang] Turn invented Exprs' source locations in __builtin_dump_struct to empty (PR #72750)

2023-11-18 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/72750 This reflects the comment in https://github.com/llvm/llvm-project/pull/71366#issuecomment-1817271492. As that PR suggests, the invented CallExpr's source location previously pointed to the beginning of the `__b

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-18 Thread J. Ryan Stinnett via cfe-commits
@@ -5503,11 +5516,17 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, } AppendAddressSpaceXDeref(AddressSpace, Expr); +llvm::DIExpression *E = nullptr; +if (Expr.empty()) { + if (auto const *InitVal = evaluateConstantInitializer(D)) +

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-18 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans edited https://github.com/llvm/llvm-project/pull/72730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-18 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans commented: Overall this looks good, thanks! I think we may want to add a test to check that the output DWARF has a const value in the expected place, since consumers are relying on it. https://github.com/llvm/llvm-project/pull/72730 ___

[clang-tools-extra] f9974f7 - [clang-tidy] Improve alternate snake case warnings (#71385)

2023-11-18 Thread via cfe-commits
Author: J.C. Moyer Date: 2023-11-18T14:23:36+01:00 New Revision: f9974f7fe15a9e97ceb7514d437bef6ee46ccc38 URL: https://github.com/llvm/llvm-project/commit/f9974f7fe15a9e97ceb7514d437bef6ee46ccc38 DIFF: https://github.com/llvm/llvm-project/commit/f9974f7fe15a9e97ceb7514d437bef6ee46ccc38.diff LO

[clang-tools-extra] [clang-tidy] Improve alternate snake case warnings (PR #71385)

2023-11-18 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/71385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-18 Thread via cfe-commits
@@ -24153,6 +24153,113 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { + FormatStyle Style = getLLVMStyle(); + Style.IgnorePPDefinitions = true; + + v

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-18 Thread via cfe-commits
https://github.com/tomekpaszek commented: >Something here doesn't feel right Could you be more specific? https://github.com/llvm/llvm-project/pull/70338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-18 Thread via cfe-commits
@@ -24206,10 +24206,11 @@ TEST_F(FormatTest, IgnorePPDefinitions) { Style.IndentPPDirectives = FormatStyle::PPDIS_None; verifyNoChange("#if A\n" "#define A a\n" - "#endif", + "#endif\n", tomekpaszek wrote:

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-18 Thread via cfe-commits
@@ -1134,6 +1134,14 @@ void UnwrappedLineParser::parsePPDefine() { return; } + if (Style.IgnorePPDefinitions) { +do { + nextToken(); +} while (!eof()); tomekpaszek wrote: In this case, `eof` is a marker for the end of the unwrapped line th

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-18 Thread via cfe-commits
@@ -1355,6 +1355,8 @@ unsigned UnwrappedLineFormatter::format( bool FixIndentation = (FixBadIndentation || ContinueFormatting) && Indent != TheLine.First->OriginalColumn; bool ShouldFormat = TheLine.Affected || FixIndentation; +if (Style.Ig

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-18 Thread via cfe-commits
@@ -24153,6 +24153,113 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { + FormatStyle Style = getLLVMStyle(); + Style.IgnorePPDefinitions = true; + + v

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-18 Thread via cfe-commits
@@ -1355,8 +1355,11 @@ unsigned UnwrappedLineFormatter::format( bool FixIndentation = (FixBadIndentation || ContinueFormatting) && Indent != TheLine.First->OriginalColumn; bool ShouldFormat = TheLine.Affected || FixIndentation; -if (Style.I

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-18 Thread via cfe-commits
https://github.com/tomekpaszek edited https://github.com/llvm/llvm-project/pull/70338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-18 Thread via cfe-commits
https://github.com/tomekpaszek updated https://github.com/llvm/llvm-project/pull/70338 >From b5ba0b3fde2c6662e19dfdf96a787621ec767460 Mon Sep 17 00:00:00 2001 From: Tomek Paszek Date: Sat, 11 Nov 2023 19:38:00 +0100 Subject: [PATCH 01/10] Added an option to ignore macro definitions. --- clang

[compiler-rt] [libcxx] [flang] [clang-tools-extra] [llvm] [clang] [libc] [clang][cleanup] simplify ReachableCode scanFromBlock (PR #72257)

2023-11-18 Thread via cfe-commits
https://github.com/thyecust updated https://github.com/llvm/llvm-project/pull/72257 >From 52b0204fec8394f9c2cfaeb3cc4f28e5d4c16170 Mon Sep 17 00:00:00 2001 From: thyecust Date: Tue, 14 Nov 2023 21:51:55 +0800 Subject: [PATCH 1/3] Update ReachableCode.cpp --- clang/lib/Analysis/ReachableCode.c

[clang] [clang] Reject incomplete type arguments for __builtin_dump_struct (PR #72749)

2023-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes We used to assume that the CXXRecordDecl passed to the 1st argument always had a definition. This is not true since a pointer to an incomplete type was not excluded. --- Full diff: https://github.com/llvm/l

[clang] [clang] Reject incomplete type arguments for __builtin_dump_struct (PR #72749)

2023-11-18 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/72749 We used to assume that the CXXRecordDecl passed to the 1st argument always had a definition. This is not true since a pointer to an incomplete type was not excluded. >From d23305db7faba1ed1464aeee6d9e0f2ee19942

[clang-tools-extra] [clang-tidy] Improve alternate snake case warnings (PR #71385)

2023-11-18 Thread J.C. Moyer via cfe-commits
jcmoyer wrote: @PiotrZSL I don't mind but I changed it just in case it's an issue. https://github.com/llvm/llvm-project/pull/71385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve alternate snake case warnings (PR #71385)

2023-11-18 Thread J.C. Moyer via cfe-commits
https://github.com/jcmoyer updated https://github.com/llvm/llvm-project/pull/71385 >From 09c49dca700a5c01bee96765f1eede1808540af4 Mon Sep 17 00:00:00 2001 From: "J.C. Moyer" Date: Sat, 18 Nov 2023 07:06:07 -0500 Subject: [PATCH] [clang-tidy] Improve alternate snake case warnings Improves the a

[clang-tools-extra] [libc] [lldb] [compiler-rt] [mlir] [flang] [libunwind] [libcxxabi] [clang] [llvm] [libcxx] [lld] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-18 Thread Shahid Iqbal via cfe-commits
https://github.com/shahidiqbal13 updated https://github.com/llvm/llvm-project/pull/72654 >From b6bfb18e25c111baf6c95a0a4a1c3d667bb25b6d Mon Sep 17 00:00:00 2001 From: Shahid Iqbal Date: Thu, 16 Nov 2023 11:26:43 -0500 Subject: [PATCH 1/5] TESTING infra --- clang/NOTES.txt | 2 ++ 1 file chang

[lldb] [flang] [clang] [llvm] [compiler-rt] [clang-tools-extra] [mlir] [CodeGen][DebugInfo] Add missing debug info for jump table BB (PR #71021)

2023-11-18 Thread via cfe-commits
https://github.com/HaohaiWen closed https://github.com/llvm/llvm-project/pull/71021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D70401: [RISCV] CodeGen of RVE and ilp32e/lp64e ABIs

2023-11-18 Thread Koute via Phabricator via cfe-commits
koute added a comment. Sorry for the comment spam, but could we please get this merged in finally? (: To people who hold the decision making power as to whether this is merged: are there still any blockers left, considering the consensus was to merge it? What's the hold up? Is there anything I

[flang] [clang-tools-extra] [lldb] [clang] [llvm] [mlir] [compiler-rt] [CodeGen][DebugInfo] Add missing debug info for jump table BB (PR #71021)

2023-11-18 Thread via cfe-commits
HaohaiWen wrote: Thanks! https://github.com/llvm/llvm-project/pull/71021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b4db24e - [CGOpenMPRuntimeGPU] Replace unneeded use of CreatePointerBitCastOrAddrSpaceCast (NFC)

2023-11-18 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2023-11-18T04:17:46-06:00 New Revision: b4db24e33008660d11d703c19d8affaf5f9a843e URL: https://github.com/llvm/llvm-project/commit/b4db24e33008660d11d703c19d8affaf5f9a843e DIFF: https://github.com/llvm/llvm-project/commit/b4db24e33008660d11d703c19d8affaf5f9a843e.diff

[clang] [Clang][InstrProf] Allow mix-up of absolute path with relative path on command line when using -fprofile-list= (PR #67519)

2023-11-18 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta edited https://github.com/llvm/llvm-project/pull/67519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][InstrProf] Allow mix-up of absolute path with relative path on command line when using -fprofile-list= (PR #67519)

2023-11-18 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta edited https://github.com/llvm/llvm-project/pull/67519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][InstrProf] Allow mix-up of absolute path with relative path on command line when using -fprofile-list= (PR #67519)

2023-11-18 Thread Shivam Gupta via cfe-commits
@@ -4,7 +4,8 @@ // RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -fprofile-list=%t-func.list -emit-llvm %s -o - | FileCheck %s --check-prefix=FUNC // RUN: echo "src:%s" | sed -e 's/\\//g' > %t-file.list -// RUN: %clang_cc1 -fprofile

[clang] [Clang][InstrProf] Allow mix-up of absolute path with relative path on command line when using -fprofile-list= (PR #67519)

2023-11-18 Thread Shivam Gupta via cfe-commits
@@ -4,7 +4,8 @@ // RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -fprofile-list=%t-func.list -emit-llvm %s -o - | FileCheck %s --check-prefix=FUNC // RUN: echo "src:%s" | sed -e 's/\\//g' > %t-file.list -// RUN: %clang_cc1 -fprofile

[clang] [Clang][InstrProf] Allow mix-up of absolute path with relative path on command line when using -fprofile-list= (PR #67519)

2023-11-18 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta updated https://github.com/llvm/llvm-project/pull/67519 >From a7f4b08b54350ebbe4b115214a84669eb69aee3e Mon Sep 17 00:00:00 2001 From: Shivam Gupta Date: Thu, 19 Oct 2023 18:20:05 +0530 Subject: [PATCH] [Clang][InstrProf] Allow absolute path in fun.list of -fprofile-li

[clang] [Driver] Simply some gcc search logic (PR #72558)

2023-11-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/72558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Simply some gcc search logic (PR #72558)

2023-11-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/72558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Simply some gcc search logic (PR #72558)

2023-11-18 Thread Fangrui Song via cfe-commits
@@ -2117,14 +2117,17 @@ void Generic_GCC::GCCInstallationDetector::init( // The compatible GCC triples for this particular architecture. SmallVector CandidateTripleAliases; SmallVector CandidateBiarchTripleAliases; + // Add some triples that we want to check first. + Ca