[clang] [clang][dataflow] Add matchers for smart pointer accessors to be cached (PR #120102)

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

[clang] [clang][dataflow] Fix a missing break from a switch case -Wimplicit-fallthrough (PR #120739)

2024-12-20 Thread Jan Voung via cfe-commits
jvoung wrote: > Thanks for the fix! Thanks for helping merge! And sorry again about the breakage! https://github.com/llvm/llvm-project/pull/120739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [libcxx] [clang][driver] Cleanup UEFI toolchain driver (PR #111473)

2024-12-20 Thread via cfe-commits
Prabhuk wrote: @RossComputerGuy FYI https://github.com/llvm/llvm-project/pull/111473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang][driver] Cleanup UEFI toolchain driver (PR #111473)

2024-12-20 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/111473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] UEFI backend for x86_64 (PR #109320)

2024-12-20 Thread via cfe-commits
Prabhuk wrote: @RossComputerGuy FYI https://github.com/llvm/llvm-project/pull/109320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-20 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi updated https://github.com/llvm/llvm-project/pull/120484 >From b76111ab93253a772156992e70acb5c78511a6bf Mon Sep 17 00:00:00 2001 From: David Olsen Date: Wed, 18 Dec 2024 13:52:58 -0800 Subject: [PATCH 1/4] [CIR] floating-point, pointer, and function types Upstrea

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Jon Roelofs via cfe-commits
@@ -1018,13 +1018,19 @@ bool Darwin::hasBlocksRuntime() const { } } -void Darwin::AddCudaIncludeArgs(const ArgList &DriverArgs, -ArgStringList &CC1Args) const { +void MachO::AddCudaIncludeArgs(const ArgList &DriverArgs, +

[clang] [llvm] UEFI backend for x86_64 (PR #109320)

2024-12-20 Thread via cfe-commits
Prabhuk wrote: > Some of the clang changes seem kinda _odd_, maybe some of this work and > #120632 could be conjoined? The LLVM stuff itself looks great, it's mainly > the target stuff in clang seems odd to me. I can drop the Clang changes in this PR once #120632 lands. This is a draft PR. ht

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-20 Thread Ian Anderson via cfe-commits
@@ -8265,6 +8265,11 @@ def internal_externc_isystem : Separate<["-"], "internal-externc-isystem">, "implicit extern \"C\" semantics; these are assumed to not be " "user-provided and are used to model system and standard headers' " "paths.">; +d

[clang] 399c3a7 - [clang][NFC] Fix the static assertion in 4797437 (#120643)

2024-12-20 Thread via cfe-commits
Author: Ziqing Luo Date: 2024-12-20T11:12:16-08:00 New Revision: 399c3a78a2577c6fc68bba7f301901a0e66e87ed URL: https://github.com/llvm/llvm-project/commit/399c3a78a2577c6fc68bba7f301901a0e66e87ed DIFF: https://github.com/llvm/llvm-project/commit/399c3a78a2577c6fc68bba7f301901a0e66e87ed.diff LO

[clang] [clang][NFC] Fix the static assertion in 4797437 (PR #120643)

2024-12-20 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 closed https://github.com/llvm/llvm-project/pull/120643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/120507 >From 0370e1ed0a58e6ee171bd2ea020092098aec5c82 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Wed, 18 Dec 2024 16:31:19 -0800 Subject: [PATCH] [Darwin][Driver][clang] apple-none-macho orders the res

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 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 21a6dbd400ffd68abe36161576d81d0646f1122d 06e5fd1dcf4409b8da12ecf28a2a6899b5ba783e --e

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Carlo Cabrera via cfe-commits
@@ -312,7 +312,8 @@ bool InitHeaderSearch::ShouldAddDefaultIncludePaths( break; case llvm::Triple::UnknownOS: -if (triple.isWasm()) +if (triple.isWasm() || ((triple.getVendor() == llvm::Triple::Apple) && +triple.isOSBinFormatMachO()))

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab approved this pull request. LGTM once @jroelofs is happy with the test. https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang-CL][DXC] Expose -fdiagnostic-color= to clang-cl and clang-dxc (PR #120644)

2024-12-20 Thread Chris White via cfe-commits
https://github.com/whiteio updated https://github.com/llvm/llvm-project/pull/120644 >From 2d6d43abf0dfaa64a5cdd7bff3a3ecbef01635c2 Mon Sep 17 00:00:00 2001 From: Chris White Date: Thu, 19 Dec 2024 22:02:47 + Subject: [PATCH 1/2] [Clang-CL][DXC] Expose -fdiagnostic-color= to clang-cl and cl

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
@@ -312,7 +312,8 @@ bool InitHeaderSearch::ShouldAddDefaultIncludePaths( break; case llvm::Triple::UnknownOS: -if (triple.isWasm()) +if (triple.isWasm() || ((triple.getVendor() == llvm::Triple::Apple) && +triple.isOSBinFormatMachO()))

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2024-12-20 Thread Ilia Kuklin via cfe-commits
@@ -8544,7 +8524,8 @@ clang::EnumConstantDecl *TypeSystemClang::AddEnumerationValueToEnumerationType( bool is_signed = false; underlying_type.IsIntegerType(is_signed); - llvm::APSInt value(enum_value_bit_size, is_signed); + // APSInt constructor's sign argument is isUns

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/10] Update SemaL

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/13] Update SemaL

[clang] 994457f - [Clang-CL][DXC] Expose -fdiagnostic-color= to clang-cl and clang-dxc (#120644)

2024-12-20 Thread via cfe-commits
Author: Chris White Date: 2024-12-20T23:12:25+01:00 New Revision: 994457f81ffd95531eff07e08a0fea42397b80d2 URL: https://github.com/llvm/llvm-project/commit/994457f81ffd95531eff07e08a0fea42397b80d2 DIFF: https://github.com/llvm/llvm-project/commit/994457f81ffd95531eff07e08a0fea42397b80d2.diff L

[clang] [Clang-CL][DXC] Expose -fdiagnostic-color= to clang-cl and clang-dxc (PR #120644)

2024-12-20 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis closed https://github.com/llvm/llvm-project/pull/120644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/11] Update SemaL

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/12] Update SemaL

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-12-20 Thread via cfe-commits
https://github.com/charan-003 commented: added few test cases https://github.com/llvm/llvm-project/pull/117953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang-CL][DXC] Expose -fdiagnostic-color= to clang-cl and clang-dxc (PR #120644)

2024-12-20 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis approved this pull request. Great work, Thank you very much! https://github.com/llvm/llvm-project/pull/120644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/120507 >From 7aecf682c1d620d1b4f9480315f614df7473f40f Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Wed, 18 Dec 2024 16:31:19 -0800 Subject: [PATCH] [Darwin][Driver][clang] apple-none-macho orders the res

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Oleksandr T. via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { a-tarasyuk wrote: @erichkeane Thanks for the detailed feedback. I just extracted this helper https

[clang] [webkit.UncountedLambdaCapturesChecker] Fix a nullptr deference. (PR #120702)

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

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
@@ -1018,13 +1018,19 @@ bool Darwin::hasBlocksRuntime() const { } } -void Darwin::AddCudaIncludeArgs(const ArgList &DriverArgs, -ArgStringList &CC1Args) const { +void MachO::AddCudaIncludeArgs(const ArgList &DriverArgs, +

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-20 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/120087 >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:43:42 +0530 Subject: [PATCH 01/29] Up

[clang] [clang][NFC] Increase NumStmtBits by 2 as we are approaching the limit (PR #120341)

2024-12-20 Thread John McCall via cfe-commits
rjmccall wrote: > FYI it looks like this has a fairly large impact on compile-time, esp at `O0` > with a clang host compiler > (https://llvm-compile-time-tracker.com/compare.php?from=1fcb6a9754a8db057e18f629cb90011b638901e7&to=4797437463e63ee289a1ff1904cfb7b2fe6cb4c2&stat=instructions%3Au). >

[clang] [clang] Expose -f(no-)wrapv as clang-cl option (PR #120787)

2024-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Nico Weber (nico) Changes Also move the -fno-wrapv option definition next to the -fwrapv one while here. --- Full diff: https://github.com/llvm/llvm-project/pull/120787.diff 2 Files Affected: - (modified) clang/include/clang/Driv

[clang] [clang] Expose -f(no-)wrapv as clang-cl option (PR #120787)

2024-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nico Weber (nico) Changes Also move the -fno-wrapv option definition next to the -fwrapv one while here. --- Full diff: https://github.com/llvm/llvm-project/pull/120787.diff 2 Files Affected: - (modified) clang/include/clang/Driver/Opti

[clang] [clang] Expose -f(no-)wrapv as clang-cl option (PR #120787)

2024-12-20 Thread Nico Weber via cfe-commits
https://github.com/nico created https://github.com/llvm/llvm-project/pull/120787 Also move the -fno-wrapv option definition next to the -fwrapv one while here. >From 48b974d50a6b5d91f094663e446b94910a22f097 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 20 Dec 2024 14:25:20 -0500 Subject:

[clang] [clang][NFC] Fix the static assertion in 4797437 (PR #120643)

2024-12-20 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: > [#120341 > (comment)](https://github.com/llvm/llvm-project/pull/120341#discussion_r1893822845) oops, I saw this after I hit the merge button. I will do it in a follow-up commit. https://github.com/llvm/llvm-project/pull/120643 ___

[clang] [clang][dataflow] Use smart pointer caching in unchecked optional accessor (PR #120249)

2024-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Jan Voung (jvoung) Changes Part 2 (and final part) following https://github.com/llvm/llvm-project/pull/120102 Allows users to do things like: ``` if (o->x.has_value()) { ((*o).x).value(); } ``` where the `->` and `*` are operat

[clang] [clang][dataflow] Use smart pointer caching in unchecked optional accessor (PR #120249)

2024-12-20 Thread Jan Voung via cfe-commits
https://github.com/jvoung ready_for_review https://github.com/llvm/llvm-project/pull/120249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang][driver] Cleanup UEFI toolchain driver (PR #111473)

2024-12-20 Thread via cfe-commits
Prabhuk wrote: @RossComputerGuy -- I am planning to land this today. Would you like to take a look and let me know if you are ok with these clean ups? I am still not able to add you as a reviewer. Maybe something to do with getting an approval? I'll check the process docs. https://github.com/

[clang] [clang][dataflow] Use smart pointer caching in unchecked optional accessor (PR #120249)

2024-12-20 Thread Jan Voung via cfe-commits
https://github.com/jvoung updated https://github.com/llvm/llvm-project/pull/120249 >From c526263a7accc434dbf6e93c2995ceb2f95873b8 Mon Sep 17 00:00:00 2001 From: Jan Voung Date: Tue, 17 Dec 2024 15:38:19 + Subject: [PATCH 1/4] [clang][dataflow] Use smart pointer caching in unchecked optiona

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-20 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/120087 >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:43:42 +0530 Subject: [PATCH 01/30] Up

[clang] [clang] Introduce a new UEFI target predefine. (PR #111719)

2024-12-20 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Didn't know this existed, but we have https://github.com/llvm/llvm-project/pull/120632 tracking it now. https://github.com/llvm/llvm-project/pull/111719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/120507 >From 3a651d6ff0b2435ee058b06a1da235b8b3bfdaed Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Wed, 18 Dec 2024 16:31:19 -0800 Subject: [PATCH] [Darwin][Driver][clang] apple-none-macho orders the res

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang][driver] Cleanup UEFI toolchain driver (PR #111473)

2024-12-20 Thread Joseph Huber via cfe-commits
@@ -35,6 +35,24 @@ UEFI::UEFI(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) Tool *UEFI::buildLinker() const { return new tools::uefi::Linker(*this); } +void UEFI::AddClangSystemIncludeArgs(const ArgList &DriverArgs, + A

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/120507 >From 06e5fd1dcf4409b8da12ecf28a2a6899b5ba783e Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Wed, 18 Dec 2024 16:31:19 -0800 Subject: [PATCH] [Darwin][Driver][clang] apple-none-macho orders the res

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-20 Thread via cfe-commits
@@ -1944,6 +1956,16 @@ APValue &CallStackFrame::createTemporary(const KeyT *Key, QualType T, return createLocal(Base, Key, T, Scope); } +APValue & +CallStackFrame::createConstexprUnknownAPValues(const VarDecl *Key, + APValue::LV

[clang] [clang] fix uefi target for aarch64 & x86_64 (PR #120632)

2024-12-20 Thread Joseph Huber via cfe-commits
@@ -788,16 +789,28 @@ class LLVM_LIBRARY_VISIBILITY ZOSTargetInfo : public OSTargetInfo { // UEFI target template class LLVM_LIBRARY_VISIBILITY UEFITargetInfo : public OSTargetInfo { + llvm::Triple Triple; + protected: void getOSDefines(const LangOptions &Opts, const llv

[clang] [clang] fix uefi target for aarch64 & x86_64 (PR #120632)

2024-12-20 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/120632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Jon Roelofs via cfe-commits
@@ -290,8 +290,50 @@ class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain { /// } }; +/// Apple specific MachO extensions +class LLVM_LIBRARY_VISIBILITY AppleMachO : public MachO { +public: + AppleMachO(const Driver &D, const llvm::Triple &Triple, + const llvm

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

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

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-20 Thread via cfe-commits
https://github.com/cor3ntin commented: Just a few nits + missing cxx_status/release notes changes https://github.com/llvm/llvm-project/pull/95474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-20 Thread via cfe-commits
@@ -3566,6 +3613,21 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, } Result = VD->getEvaluatedValue(); + + // C++23 [expr.const]p8 + // ... For such an object that is not usable in constant expressions, the + // dynamic type of the object is constexp

[clang] [clang] fix uefi target for aarch64 & x86_64 (PR #120632)

2024-12-20 Thread via cfe-commits
@@ -788,16 +789,28 @@ class LLVM_LIBRARY_VISIBILITY ZOSTargetInfo : public OSTargetInfo { // UEFI target template class LLVM_LIBRARY_VISIBILITY UEFITargetInfo : public OSTargetInfo { + llvm::Triple Triple; + protected: void getOSDefines(const LangOptions &Opts, const llv

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
@@ -290,8 +290,50 @@ class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain { /// } }; +/// Apple specific MachO extensions +class LLVM_LIBRARY_VISIBILITY AppleMachO : public MachO { +public: + AppleMachO(const Driver &D, const llvm::Triple &Triple, + const llvm

[clang] 8ae8a90 - [CIR] floating-point, pointer, and function types (#120484)

2024-12-20 Thread via cfe-commits
Author: David Olsen Date: 2024-12-20T12:22:25-08:00 New Revision: 8ae8a905855ca1b07a72059d8225ab1f9cae65dc URL: https://github.com/llvm/llvm-project/commit/8ae8a905855ca1b07a72059d8225ab1f9cae65dc DIFF: https://github.com/llvm/llvm-project/commit/8ae8a905855ca1b07a72059d8225ab1f9cae65dc.diff L

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-20 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi closed https://github.com/llvm/llvm-project/pull/120484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang][driver] Cleanup UEFI toolchain driver (PR #111473)

2024-12-20 Thread Tristan Ross via cfe-commits
https://github.com/RossComputerGuy approved this pull request. Looks good to me. https://github.com/llvm/llvm-project/pull/111473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix uefi target for aarch64 & x86_64 (PR #120632)

2024-12-20 Thread Tristan Ross via cfe-commits
@@ -788,16 +789,28 @@ class LLVM_LIBRARY_VISIBILITY ZOSTargetInfo : public OSTargetInfo { // UEFI target template class LLVM_LIBRARY_VISIBILITY UEFITargetInfo : public OSTargetInfo { + llvm::Triple Triple; + protected: void getOSDefines(const LangOptions &Opts, const llv

[clang] [clang-format] Fix crashes when the macro expansion is empty (PR #119428)

2024-12-20 Thread Björn Schäpers via cfe-commits
@@ -233,6 +233,10 @@ MacroExpander::expand(FormatToken *ID, if (Result.size() > 1) { ++Result[0]->MacroCtx->StartOfExpansion; ++Result[Result.size() - 2]->MacroCtx->EndOfExpansion; + } else { +// If the macro expansion is empty, mark the start and end ---

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/120734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Oleksandr T. via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { a-tarasyuk wrote: @erichkeane Thanks for the detailed feedback. I just extracted this helper https

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/120734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
@@ -0,0 +1,43 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Unlike the Darwin driver, the MachO driver doesn't add any framework search paths, +// only the normal header ones. +// RUN: %clang -x c -t

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c1e7e45 - Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (#110523)

2024-12-20 Thread Aaron Puchert via cfe-commits
Author: Malek Ben Slimane Date: 2024-12-20T23:49:03+01:00 New Revision: c1e7e4500c6e3b921f5e0cda8ba8d8d66e086db6 URL: https://github.com/llvm/llvm-project/commit/c1e7e4500c6e3b921f5e0cda8ba8d8d66e086db6 DIFF: https://github.com/llvm/llvm-project/commit/c1e7e4500c6e3b921f5e0cda8ba8d8d66e086db6.d

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-12-20 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: Submitted as c1e7e4500c6e3b921f5e0cda8ba8d8d66e086db6. https://github.com/llvm/llvm-project/pull/110523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-12-20 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert closed https://github.com/llvm/llvm-project/pull/110523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-20 Thread via cfe-commits
4m4n-x-B4w4ne wrote: Thanks ,I am working on it and also on clean PR build. https://github.com/llvm/llvm-project/pull/120087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-12-20 Thread Scott Constable via cfe-commits
https://github.com/scottconstable updated https://github.com/llvm/llvm-project/pull/117121 >From b787d6d7a9c0904c5e47e32556103b8a5220a7d1 Mon Sep 17 00:00:00 2001 From: Scott D Constable Date: Tue, 19 Nov 2024 15:51:05 -0800 Subject: [PATCH] Enhance KCFI type IDs with a 3-bit arity indicator.

[clang-tools-extra] e5de2a2 - [clang-tidy][NFC] extract options verify to separately function (#120768)

2024-12-20 Thread via cfe-commits
Author: Congcong Cai Date: 2024-12-21T07:07:19+08:00 New Revision: e5de2a2df4f983e1db83deaaa1d21457c922404f URL: https://github.com/llvm/llvm-project/commit/e5de2a2df4f983e1db83deaaa1d21457c922404f DIFF: https://github.com/llvm/llvm-project/commit/e5de2a2df4f983e1db83deaaa1d21457c922404f.diff

[clang] [clang-format] Fix a crash in `QualifierAlignment: Right` (PR #120821)

2024-12-20 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/120821 Fixes #120793. >From 9a2a33fe4568f0b344e9093b99c87ad1a0f7e8a4 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 20 Dec 2024 20:02:26 -0800 Subject: [PATCH] [clang-format] Fix a crash in `QualifierAlignment: Rig

[clang] [clang-format] Fix a crash in `QualifierAlignment: Right` (PR #120821)

2024-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #120793. --- Full diff: https://github.com/llvm/llvm-project/pull/120821.diff 2 Files Affected: - (modified) clang/lib/Format/QualifierAlignmentFixer.cpp (+1-1) - (modified) clang/unittests/Format

[clang] [clang-format] Fix crashes when the macro expansion is empty (PR #119428)

2024-12-20 Thread Owen Pan via cfe-commits
https://github.com/owenca commented: Please add a test case for https://github.com/llvm/llvm-project/issues/119258#issue-2728126922. https://github.com/llvm/llvm-project/pull/119428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Erich Keane via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { + if (const TagDecl *TD = T->getAsTagDecl()) +return TD->hasAttr(); + if (const TypedefType *TDT = T->getAs())

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Erich Keane via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { + if (const TagDecl *TD = T->getAsTagDecl()) +return TD->hasAttr(); + if (const TypedefType *TDT = T->getAs())

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Erich Keane via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { erichkeane wrote: Huh, that commit seems to be intentionally NO warning on unused private fields.

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-12-20 Thread via cfe-commits
https://github.com/mxms0 updated https://github.com/llvm/llvm-project/pull/117370 >From 8fed333cf4221dbf1826351da80164db5d209c21 Mon Sep 17 00:00:00 2001 From: mxms Date: Fri, 22 Nov 2024 15:09:07 -0500 Subject: [PATCH 1/6] [Wunsafe-buffer-usage] Fix false positives in handling enums Do not w

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2024-12-20 Thread Erich Keane via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { + if (const TagDecl *TD = T->getAsTagDecl()) +return TD->hasAttr(); + if (const TypedefType *TDT = T->getAs())

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-12-20 Thread via cfe-commits
mxms0 wrote: > I think there's a policy question here of how much trust we want to put into > the type system. Clearly, we've already put some trust into it to reduce > false positives, but we could decide to trust any old constant array type > bounds, and that would be a good code simplificat

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-12-20 Thread via cfe-commits
@@ -439,8 +439,16 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { dyn_cast(Node.getBase()->IgnoreParenImpCasts()); mxms0 wrote: I think ultimately going to the Sema code is probably the better place to be, but I'm not sure who's working on that

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-12-20 Thread via cfe-commits
@@ -463,6 +471,13 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { return true; mxms0 wrote: I changed the code and tests still pass, it looks like you're correct. :) https://github.com/llvm/llvm-project/pull/117370 _

[clang] [clang-format] Fix crashes when the macro expansion is empty (PR #119428)

2024-12-20 Thread Owen Pan via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: grep -Ev "// *[A-Z-]+:" %s | clang-format -style="{Macros: [A(x)=x]}" \ +// RUN: | FileCheck -strict-whitespace %s + +// CHECK: A() +A() owenca wrote: Don't add a lit test. Instead, add a unittest similar to the one you already added

[clang] [clang-format] Fix crashes when the macro expansion is empty (PR #119428)

2024-12-20 Thread via cfe-commits
https://github.com/amane-ame updated https://github.com/llvm/llvm-project/pull/119428 From 3a4c1a924faef3a7a09126694fcb943bd7083451 Mon Sep 17 00:00:00 2001 From: amane-ame Date: Wed, 11 Dec 2024 02:13:43 +0800 Subject: [PATCH 1/6] Fix crashes when the macro expansion is empty --- clang/lib/F

[clang] [clang] Fix crashes when passing VLA to va_arg (PR #119563)

2024-12-20 Thread via cfe-commits
https://github.com/amane-ame updated https://github.com/llvm/llvm-project/pull/119563 From 659eda3ec76b63418f8b621b004728d9d7bf26ad Mon Sep 17 00:00:00 2001 From: amane-ame Date: Wed, 11 Dec 2024 22:17:51 +0800 Subject: [PATCH 01/10] [clang] Fix crashes when passing VLA to va_arg --- clang/li

<    1   2   3