[clang] [Clang][Driver] Skip empty strings in getAArch64MultilibFlags (PR #97827)

2024-07-17 Thread via cfe-commits
asmok-g wrote: @statham-arm you're right. I need to verify this is the real culprit as I didn't fully build the toolchain at the previous revision. I used a fast build instead, so I need to verify.. @smithp35 it is actually `-Wc++20-compat-aggregate-init`.. with an internal prefix IIUC. Not s

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-17 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair updated https://github.com/llvm/llvm-project/pull/97597 >From c11624370bf5615c7902993052435b92ae50b41b Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Wed, 3 Jul 2024 17:00:51 +0100 Subject: [PATCH 1/8] [Parser][ObjC] Add -Wobjc-prefix-length warning option.

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-17 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 48f55ba9d8e51cf976a8789521dd0763dea1e2d1 4980fcd7f274bba007c48aedb3b85c15c5796e3d --e

[clang-tools-extra] 666d224 - [clang-tidy] Fix modernize-use-std-print/format for fmt (#99021)

2024-07-17 Thread via cfe-commits
Author: Mike Crowe Date: 2024-07-17T17:45:47+02:00 New Revision: 666d224248707f373577b5b049b5b022916c URL: https://github.com/llvm/llvm-project/commit/666d224248707f373577b5b049b5b022916c DIFF: https://github.com/llvm/llvm-project/commit/666d224248707f373577b5b049b5b022916c.diff LO

[clang-tools-extra] [clang-tidy] Fix modernize-use-std-print/format for fmt (PR #99021)

2024-07-17 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/99021 ___ 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-17 Thread Owen Pan via cfe-commits
owenca wrote: It seems [AlignOperands](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#alignoperands) is supposed to do what this new option would, so maybe we should fix/extend `AlignOperands` instead? https://github.com/llvm/llvm-project/pull/95013 _

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

2024-07-17 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/15] Add BinPackBinaryOperations --- clang/include/clang/Format/Format

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

2024-07-17 Thread Ameer J via cfe-commits
ameerj wrote: > The logical && and bitwise | operations are not broken up into one per line, > and the column limit is exceeded. @owenca this should be fixed in the latest commit https://github.com/llvm/llvm-project/pull/95013 ___ cfe-commits mailing

[clang-tools-extra] Ensure functions are anchored in the global namespace (PR #99084)

2024-07-17 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/99084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (PR #89713)

2024-07-17 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: @cor3ntin @AaronBallman, the new diagnostic triggers for valid code (https://gcc.godbolt.org/z/fMvEaGabG): ```cpp #include struct S { int x; static_assert(std::is_same::value, ""); static_assert(std::is_same::value, ""); }; ``` Either the first `stat

[clang] [clang] Fix static analyzer concerns in #embed code (PR #99331)

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

[clang] [clang] Fix static analyzer concerns in #embed code (PR #99331)

2024-07-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM but a question about whether a test should be split off or not. https://github.com/llvm/llvm-project/pull/99331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [clang] Fix static analyzer concerns in #embed code (PR #99331)

2024-07-17 Thread Aaron Ballman via cfe-commits
@@ -1,4 +1,5 @@ -// RUN: %clang_cc1 -std=c23 %s -E -verify +// RUN: %clang_cc1 -std=c23 %s -E -verify --embed-dir=%S --embed-dir=%S/Inputs +#embed AaronBallman wrote: It feels like this test is unrelated to the test name now; should we move this into its own

[libclc] [llvm] [libclc] Revise IDE folder structure (PR #89746)

2024-07-17 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. LGTM, thanks for the screenshot. https://github.com/llvm/llvm-project/pull/89746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [OpenMP] Fix calculation of dependencies for multi-dimensional iteration space (PR #99347)

2024-07-17 Thread via cfe-commits
https://github.com/jprotze created https://github.com/llvm/llvm-project/pull/99347 The expectation for multiple iterators used in a single depend clause (`depend(iterator(i=0:5,j=0:5), in:x[i][j])`) is that the iterator space is the product of the iteration vectors (25 in that case). The curre

[clang] [OpenMP] Fix calculation of dependencies for multi-dimensional iteration space (PR #99347)

2024-07-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Joachim (jprotze) Changes The expectation for multiple iterators used in a single depend clause (`depend(iterator(i=0:5,j=0:5), in:x[i][j])`) is that the iterator space is the product of the iteration vectors (25 in that case). Th

[clang] [OpenMP] Fix calculation of dependencies for multi-dimensional iteration space (PR #99347)

2024-07-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joachim (jprotze) Changes The expectation for multiple iterators used in a single depend clause (`depend(iterator(i=0:5,j=0:5), in:x[i][j])`) is that the iterator space is the product of the iteration vectors (25 in that case). The curren

[clang] [OpenMP] Fix calculation of dependencies for multi-dimensional iteration space (PR #99347)

2024-07-17 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 77b2c681677db02552475426f0f7cf2c009ff98d 655acc619286dba497aab3b59a3b189f47f83237 --e

[clang] Handle constant "pointers" for `__atomic_always_lock_free`/`__atomic_is_lock_free`. (PR #99340)

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

[clang] Handle constant "pointers" for `__atomic_always_lock_free`/`__atomic_is_lock_free`. (PR #99340)

2024-07-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thanks for this! It should probably have a release note + documentation so users know this is a supported behavior? https://github.com/llvm/llvm-project/pull/99340 ___ cfe-commits mailing list cfe-commits@lis

[clang] Handle constant "pointers" for `__atomic_always_lock_free`/`__atomic_is_lock_free`. (PR #99340)

2024-07-17 Thread Aaron Ballman via cfe-commits
@@ -124,6 +124,24 @@ _Static_assert(__atomic_always_lock_free(4, &i64), ""); _Static_assert(!__atomic_always_lock_free(8, &i32), ""); _Static_assert(__atomic_always_lock_free(8, &i64), ""); +// Validate use with fake pointers constants. This mechanism is used to allow +// vali

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-17 Thread via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +dotprod -target-feature +fullfp16 -target-feature +fp16fml -target-feature +i8mm -target-feature +bf16 -verify -emit-llvm -o - %s + +// This test is testing the diagnostics that Clang emits whe

[clang] [clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (PR #89713)

2024-07-17 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: Indeed, the new diagnostic is never valid because the permission to name non-static data members in unevaluated operands is not restricted by scope: https://eel.is/c++draft/expr.prim.id.general#4.3 https://gcc.godbolt.org/z/h4eTT984M: ```cpp namespace std { temp

[clang] [OpenMP] Fix calculation of dependencies for multi-dimensional iteration space (PR #99347)

2024-07-17 Thread via cfe-commits
https://github.com/jprotze updated https://github.com/llvm/llvm-project/pull/99347 >From b45379e5317a00b91e514d89424da69c631ca514 Mon Sep 17 00:00:00 2001 From: Joachim Jenke Date: Wed, 17 Jul 2024 17:08:59 +0200 Subject: [PATCH] Fix calculation of dependencies for multi-dimensional iteration

[clang] [libc] [llvm] [OpenMP][libc] Remove special handling for OpenMP printf (PR #98940)

2024-07-17 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Do we have tests that cover these cases? There's already `printf` related tests AFAIK, this just changes the implementation. I could add more if needed. https://github.com/llvm/llvm-project/pull/98940 ___ cfe-commits mailing list cfe

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-17 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/98624 >From bbb844893d973f67ecc130595bfe4fe36b2cb707 Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Fri, 12 Jul 2024 12:17:29 + Subject: [PATCH 1/2] [Clang][NEON] Add neon target guard to intrinsics --- clang/

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

2024-07-17 Thread Ameer J via cfe-commits
ameerj wrote: > It seems > [AlignOperands](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#alignoperands) > is supposed to do what this new option would, so maybe we should fix/extend > `AlignOperands` instead? This new setting is only responsible for breaking long expressions, not

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-17 Thread via cfe-commits
@@ -289,7 +289,7 @@ def SPLATQ : WInst<"splat_laneq", ".(!Q)I", "UcUsUicsilPcPsfQUcQUsQUiQcQsQiQPcQPsQflUlQlQUlhdQhQdPlQPl"> { let isLaneQ = 1; } -let TargetGuard = "bf16" in { +let TargetGuard = "bf16,neon" in { Lukacma wrote: Yes that's

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-17 Thread via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +dotprod -target-feature +fullfp16 -target-feature +fp16fml -target-feature +i8mm -target-feature +bf16 -verify -emit-llvm -o - %s + +// This test is testing the diagnostics that Clang emits whe

[clang] [llvm] Remove 3dnow from X86TargetParser. (PR #99352)

2024-07-17 Thread James Y Knight via cfe-commits
https://github.com/jyknight created https://github.com/llvm/llvm-project/pull/99352 This addresses the spurious inclusion of (now unsupported) target features '-3dnow' and '-3dnowa', when disabling mmx. It should've been part of PR #96246, but was missed. >From 70160e033ac94de92fc2cd628954809

[clang] [llvm] Remove 3dnow from X86TargetParser. (PR #99352)

2024-07-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: James Y Knight (jyknight) Changes This addresses the spurious inclusion of (now unsupported) target features '-3dnow' and '-3dnowa', when disabling mmx. It should've been part of PR #96246, but was missed. --- Full diff: https://gi

[clang] [clang] Extend lifetime analysis to support assignments for pointer-like objects. (PR #99032)

2024-07-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/99032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (PR #89713)

2024-07-17 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: If I'm following along correctly, both of those `static_assert`s should be accepted from your first example because `decltype` is an unevaluated context and the fix would be to change: ``` if (isa(OrigOp.get())) { ``` to instead be: ``` if (isa(OrigOp.get()) && !SemaRef.isUn

[clang] [llvm] Remove 3dnow from X86TargetParser. (PR #99352)

2024-07-17 Thread Simon Pilgrim via cfe-commits
@@ -171,14 +171,14 @@ constexpr FeatureBitset FeaturesClearwaterforest = // Geode Processor. constexpr FeatureBitset FeaturesGeode = -FeatureX87 | FeatureCMPXCHG8B | FeatureMMX | Feature3DNOW | Feature3DNOWA; RKSimon wrote: Do we need to add a FeaturePREF

[clang] [clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (PR #89713)

2024-07-17 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > Or is there a deeper issue here and I'm not seeing it? The previous Clang behaviour produced the wrong type as the result. So the choices are to: 1. Do the old wrong thing: silent incorrect behaviour 2. Do the new wrong thing: produce diagnostic that may confuse

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-17 Thread Julian Schmidt via cfe-commits
@@ -230,6 +241,50 @@ FormatStringConverter::FormatStringConverter(ASTContext *ContextIn, finalizeFormatText(); } +std::optional +FormatStringConverter::formatStringContainsUnreplaceableMacro( 5chmidti wrote: > getting the macro name for the function call a

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-17 Thread Julian Schmidt via cfe-commits
@@ -34,13 +41,10 @@ The check doesn't do a bad job, but it's not perfect. In particular: possible. - At the point that the check runs, the AST contains a single - ``StringLiteral`` for the format string and any macro expansion, token - pasting, adjacent string literal con

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-17 Thread Julian Schmidt via cfe-commits
@@ -24,8 +24,15 @@ into: std::println(stderr, "The {} is {:3}", description, value); If the `ReplacementPrintFunction` or `ReplacementPrintlnFunction` options -are left, or assigned to their default values then this check is only -enabled with `-std=c++23` or later. +are lef

[clang] [clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (PR #89713)

2024-07-17 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: The optics of having something in the release notes about this (if the bug is not fixed properly) is not good. Meaning that I am leaning towards options (1) or (3). https://github.com/llvm/llvm-project/pull/89713 ___ cfe-

[clang] [OpenMP] Fix calculation of dependencies for multi-dimensional iteration space (PR #99347)

2024-07-17 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/99347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

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

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-17 Thread Aaron Ballman via cfe-commits
@@ -9015,11 +9015,20 @@ bool Sema::RequireCompleteTypeImpl(SourceLocation Loc, QualType T, if (const MemberPointerType *MPTy = T->getAs()) { if (!MPTy->getClass()->isDependentType()) { - if (getLangOpts().CompleteMemberPointers && - !MPTy->getClass()->getA

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: This generally LGTM but I'd love to hear from @rnk or @zmodem as they are quite knowledgeable about the MS ABI in general. https://github.com/llvm/llvm-project/pull/91990 ___ cfe-commits mailing list cfe-comm

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

2024-07-17 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov 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] [llvm] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-17 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov commented: Thanks for adding an optional flag for this. Given that the profiles are 2-3x larger now, this seems very much warranted. Mostly LG, but I did have some questions and suggestions. PTAL. https://github.com/llvm/llvm-project/pull/98320 _

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

2024-07-17 Thread Ilya Biryukov via cfe-commits
@@ -307,14 +331,25 @@ struct llvm::TimeTraceProfiler { // Minimum time granularity (in microseconds) const unsigned TimeTraceGranularity; + + // Make time trace capture verbose event details (eg. source filenames). This ilya-biryukov wrote: NIT: `e.g. `

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

2024-07-17 Thread Ilya Biryukov via cfe-commits
@@ -83,16 +83,27 @@ namespace llvm { class raw_pwrite_stream; +struct TimeTraceMetadata { ilya-biryukov wrote: Could we also include the line numbers? I suspect it would be trivial to add that, but we will have an option of pointing at an exact line in the

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

2024-07-17 Thread Ilya Biryukov via cfe-commits
@@ -60,39 +74,65 @@ bool compileFromString(StringRef Code, StringRef Standard, StringRef FileName) { return Compiler.ExecuteAction(Action); } +std::string GetMetadata(json::Object *Event) { + std::string Metadata = ""; + if (json::Object *Args = Event->getObject("args"))

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

2024-07-17 Thread Ilya Biryukov via cfe-commits
@@ -83,16 +83,27 @@ namespace llvm { class raw_pwrite_stream; +struct TimeTraceMetadata { + std::string Detail; + // Source file information for the event. + std::string Filename; ilya-biryukov wrote: NIT: Maybe use `File` here and `file` in JSON for brev

[clang-tools-extra] c736ca8 - [clang-tidy] Ensure functions are anchored in the global namespace (#99084)

2024-07-17 Thread via cfe-commits
Author: matthew-f Date: 2024-07-17T19:05:30+02:00 New Revision: c736ca85c38ce9c30a2286382d8023604f34f9e8 URL: https://github.com/llvm/llvm-project/commit/c736ca85c38ce9c30a2286382d8023604f34f9e8 DIFF: https://github.com/llvm/llvm-project/commit/c736ca85c38ce9c30a2286382d8023604f34f9e8.diff LOG

[clang-tools-extra] Ensure functions are anchored in the global namespace (PR #99084)

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

[clang-tools-extra] Ensure functions are anchored in the global namespace (PR #99084)

2024-07-17 Thread via cfe-commits
github-actions[bot] wrote: @matthew-f Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a buil

[clang] The pragma STDC CX_LIMITED_RANGE ON should have precedence. (PR #98520)

2024-07-17 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: Thanks @AaronBallman. I got thumbs up from @andykaylor offline. Merging this PR. https://github.com/llvm/llvm-project/pull/98520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (PR #89713)

2024-07-17 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Thank you for spotting this, btw! Given the proximity to the branch date, I lean towards (1) to give us time to figure out how to properly do (3) unless someone is starting on (3) Real Soon Now™. Any disagreement @cor3ntin ? https://github.com/llvm/llvm-project/pull/89713

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Pavel Skripkin via cfe-commits
@@ -14,6 +14,13 @@ void free(void *); void __attribute((ownership_takes(malloc, 1))) my_free(void *); +void __attribute((ownership_returns(malloc1))) *my_malloc1(size_t); +void __attribute((ownership_takes(malloc1, 1))) my_free1(void *); + +void __attribute((ownership_returns(

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Pavel Skripkin via cfe-commits
@@ -60,6 +67,41 @@ void testMalloc8() { operator delete[](p); // expected-warning{{Memory allocated by malloc() should be deallocated by free(), not operator delete[]}} } +void testMalloc9() { + int *p = (int *)my_malloc(sizeof(int)); + my_free(p); // no warning +} + +voi

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Pavel Skripkin via cfe-commits
@@ -14,6 +14,13 @@ void free(void *); void __attribute((ownership_takes(malloc, 1))) my_free(void *); +void __attribute((ownership_returns(malloc1))) *my_malloc1(size_t); pskrgag wrote: Seems like it works fine. At least, new test case passes. I guess, clang

[clang] [APINotes] Reduce memory footprint for Obj-C/C++ contexts (PR #99358)

2024-07-17 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan created https://github.com/llvm/llvm-project/pull/99358 We were storing extraneous data for certain Objective-C/C++ entities. Specifically, for declarations that can be nested in another context (such as functions) we were storing the kind of the parent context in

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag updated https://github.com/llvm/llvm-project/pull/98941 >From 3d362cfb1e197713a51ce798996ff4308e7ab5aa Mon Sep 17 00:00:00 2001 From: Pavel Skripkin Date: Wed, 17 Jul 2024 16:41:20 +0300 Subject: [PATCH 1/6] clang/sema: disallow more than one 'onweship_takes' with di

[clang] [APINotes] Reduce memory footprint for Obj-C/C++ contexts (PR #99358)

2024-07-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Egor Zhdan (egorzhdan) Changes We were storing extraneous data for certain Objective-C/C++ entities. Specifically, for declarations that can be nested in another context (such as functions) we were storing the kind of the parent context i

[clang] [APINotes] Reduce memory footprint for Obj-C/C++ contexts (PR #99358)

2024-07-17 Thread Egor Zhdan via cfe-commits
@@ -269,12 +269,6 @@ struct ContextTableKey { : parentContextID(parentContextID), contextKind(contextKind), contextID(contextID) {} - ContextTableKey(std::optional context, IdentifierID nameID) - : parentContextID(context ? context->id.Value : (uint32_t)-1)

[clang] Performance optimizations for function effects (nonblocking attribute etc.) (PR #96844)

2024-07-17 Thread Doug Wyatt via cfe-commits
dougsonos wrote: It would be great if we could merge this soon, please; I'd to start another PR for the 2nd-pass effects analysis and it has a dependency or two on these changes. https://github.com/llvm/llvm-project/pull/96844 ___ cfe-commits mailing

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

2024-07-17 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/16] Add BinPackBinaryOperations --- clang/include/clang/Format/Format

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

2024-07-17 Thread Ameer J via cfe-commits
ameerj wrote: > I'm not finding the true/false every clear, can we use an enum? Reworked this to now be an enum. Please let me know if the intent is more clear now or if anything needs further clarification. https://github.com/llvm/llvm-project/pull/95013 __

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

2024-07-17 Thread Ameer J via cfe-commits
https://github.com/ameerj edited https://github.com/llvm/llvm-project/pull/95013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-17 Thread Ameer J via cfe-commits
https://github.com/ameerj edited https://github.com/llvm/llvm-project/pull/95013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][Fuchsia] Include new/delete in baremetal targets (PR #99279)

2024-07-17 Thread via cfe-commits
https://github.com/PiJoules approved this pull request. https://github.com/llvm/llvm-project/pull/99279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Fix calculation of dependencies for multi-dimensional iteration space (PR #99347)

2024-07-17 Thread via cfe-commits
https://github.com/jprotze updated https://github.com/llvm/llvm-project/pull/99347 >From 033b032670a4c61cfd03c295572f2494b6d66031 Mon Sep 17 00:00:00 2001 From: Joachim Jenke Date: Wed, 17 Jul 2024 17:08:59 +0200 Subject: [PATCH] Fix calculation of dependencies for multi-dimensional iteration

[clang] [libc] [libcxx] [libc][libcxx] Support for building libc++ against LLVM libc (PR #99287)

2024-07-17 Thread Michael Jones via cfe-commits
https://github.com/michaelrj-google commented: This change seems fine from the libc side https://github.com/llvm/llvm-project/pull/99287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0bb68b5 - Performance optimizations for function effects (nonblocking attribute etc.) (#96844)

2024-07-17 Thread via cfe-commits
Author: Doug Wyatt Date: 2024-07-17T13:36:36-04:00 New Revision: 0bb68b55715487447ffceaa1ab59f7a0bc8c7979 URL: https://github.com/llvm/llvm-project/commit/0bb68b55715487447ffceaa1ab59f7a0bc8c7979 DIFF: https://github.com/llvm/llvm-project/commit/0bb68b55715487447ffceaa1ab59f7a0bc8c7979.diff LO

[clang] Performance optimizations for function effects (nonblocking attribute etc.) (PR #96844)

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

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-17 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 791161516f48f41ae90f1231fdfc7374f43b5a9f de8986c5a21ad69c5688f262efd899677d672120 --e

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-17 Thread via cfe-commits
yronglin wrote: Thanks for the review! We Lexing the partition along with the module name now. https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[libclc] libclc: increase fp16 support (PR #98149)

2024-07-17 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/98149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] libclc: increase fp16 support (PR #98149)

2024-07-17 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/98149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] libclc: increase fp16 support (PR #98149)

2024-07-17 Thread Fraser Cormack via cfe-commits
@@ -181,3 +181,15 @@ _CLC_OVERLOAD _CLC_DEF double atan(double x) _CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, atan, double); #endif // cl_khr_fp64 + +#ifdef cl_khr_fp16 frasercrmck wrote: Can this be `_CLC_DEFINE_UNARY_BUILTIN_FP16(atan)`? https://g

[clang-tools-extra] [libc] clang-tidy: readability-redundant-smartptr-get does not remove -> (#97964) (PR #98757)

2024-07-17 Thread via cfe-commits
@@ -502,6 +502,12 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`readability-redundant-smartptr-get + ` identify

[clang-tools-extra] [libc] clang-tidy: readability-redundant-smartptr-get does not remove -> (#97964) (PR #98757)

2024-07-17 Thread via cfe-commits
https://github.com/akshaykumars614 updated https://github.com/llvm/llvm-project/pull/98757 >From 283ec53fe19f0008c3c04210ea5c9b20c3d9781c Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Sat, 13 Jul 2024 14:14:53 -0400 Subject: [PATCH 1/6] clang-tidy: readability-redundant-smartptr-get does

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-17 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/99360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 858147d - [CMake][Fuchsia] Include new/delete in baremetal targets (#99279)

2024-07-17 Thread via cfe-commits
Author: Petr Hosek Date: 2024-07-17T10:54:08-07:00 New Revision: 858147d0b88b50f6829834a059d95924ea8e5d4d URL: https://github.com/llvm/llvm-project/commit/858147d0b88b50f6829834a059d95924ea8e5d4d DIFF: https://github.com/llvm/llvm-project/commit/858147d0b88b50f6829834a059d95924ea8e5d4d.diff LO

[clang] [CMake][Fuchsia] Include new/delete in baremetal targets (PR #99279)

2024-07-17 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek closed https://github.com/llvm/llvm-project/pull/99279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc] clang-tidy: readability-redundant-smartptr-get does not remove -> (#97964) (PR #98757)

2024-07-17 Thread via cfe-commits
https://github.com/akshaykumars614 updated https://github.com/llvm/llvm-project/pull/98757 >From 283ec53fe19f0008c3c04210ea5c9b20c3d9781c Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Sat, 13 Jul 2024 14:14:53 -0400 Subject: [PATCH 1/6] clang-tidy: readability-redundant-smartptr-get does

[clang-tools-extra] [libc] clang-tidy: readability-redundant-smartptr-get does not remove -> (#97964) (PR #98757)

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

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-17 Thread Vitaly Buka via cfe-commits
@@ -3742,6 +3751,124 @@ struct MemorySanitizerVisitor : public InstVisitor { setOriginForNaryOp(I); } + // Given two shadows ..., ..., return the interleaved value + // ABABABAB ... + // + // Width == number of elements in A == number of elements in B + Val

[clang] Remove FiniteMathOnly and use only NoHonorINFs and NoHonorNANs. (PR #97342)

2024-07-17 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/97342 >From aea6519809340024226d587303e26c800c1a3756 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Mon, 1 Jul 2024 12:56:07 -0700 Subject: [PATCH 01/12] [NFC] Add assertion to ensure that FiniteMathOnly to

[clang] [llvm] Remove 3dnow from X86TargetParser. (PR #99352)

2024-07-17 Thread James Y Knight via cfe-commits
@@ -171,14 +171,14 @@ constexpr FeatureBitset FeaturesClearwaterforest = // Geode Processor. constexpr FeatureBitset FeaturesGeode = -FeatureX87 | FeatureCMPXCHG8B | FeatureMMX | Feature3DNOW | Feature3DNOWA; jyknight wrote: Possibly not? We didn't enabl

[clang] 321a0c0 - The pragma STDC CX_LIMITED_RANGE ON should have precedence. (#98520)

2024-07-17 Thread via cfe-commits
Author: Zahira Ammarguellat Date: 2024-07-17T14:05:51-04:00 New Revision: 321a0c00425adeab84bce657cac85ae4634df910 URL: https://github.com/llvm/llvm-project/commit/321a0c00425adeab84bce657cac85ae4634df910 DIFF: https://github.com/llvm/llvm-project/commit/321a0c00425adeab84bce657cac85ae4634df910

[clang] The pragma STDC CX_LIMITED_RANGE ON should have precedence. (PR #98520)

2024-07-17 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam closed https://github.com/llvm/llvm-project/pull/98520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][PAC] Sign block addresses used in indirectbr. (PR #97647)

2024-07-17 Thread Ahmed Bougacha via cfe-commits
ahmedbougacha wrote: > The difference should be not be signed IMO as stated above. We discussed this in the sync-up, but for the record I don't think we can get away with not signing and nothing else. It defeats the purpose of signing these in the first place: an arbitrary write becomes a br

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-17 Thread Vitaly Buka via cfe-commits
@@ -2483,13 +2484,21 @@ struct MemorySanitizerVisitor : public InstVisitor { using OriginCombiner = Combiner; /// Propagate origin for arbitrary operation. - void setOriginForNaryOp(Instruction &I) { + /// + /// Optionally skips n trailing operands. + void setOriginFo

[clang] ead486c - [ClangLinkerWrapper] Fix intermediate file naming for multi-arch compilation (#99325)

2024-07-17 Thread via cfe-commits
Author: Saiyedul Islam Date: 2024-07-17T23:42:10+05:30 New Revision: ead486ca61ab06d46aa4b30c91d1f40e5e5e43e5 URL: https://github.com/llvm/llvm-project/commit/ead486ca61ab06d46aa4b30c91d1f40e5e5e43e5 DIFF: https://github.com/llvm/llvm-project/commit/ead486ca61ab06d46aa4b30c91d1f40e5e5e43e5.diff

[clang] [ClangLinkerWrapper] Fix intermediate file naming for multi-arch compilation (PR #99325)

2024-07-17 Thread Saiyedul Islam via cfe-commits
https://github.com/saiislam closed https://github.com/llvm/llvm-project/pull/99325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (PR #89713)

2024-07-17 Thread via cfe-commits
cor3ntin wrote: I can try to look at that this week. Either way be ill-formed is much better than being incorrect https://github.com/llvm/llvm-project/pull/89713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-17 Thread Vitaly Buka via cfe-commits
@@ -2483,13 +2484,21 @@ struct MemorySanitizerVisitor : public InstVisitor { using OriginCombiner = Combiner; /// Propagate origin for arbitrary operation. - void setOriginForNaryOp(Instruction &I) { + /// + /// Optionally skips n trailing operands. + void setOriginFo

[clang-tools-extra] [libc] clang-tidy: readability-redundant-smartptr-get does not remove -> (#97964) (PR #98757)

2024-07-17 Thread via cfe-commits
https://github.com/akshaykumars614 reopened https://github.com/llvm/llvm-project/pull/98757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-17 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/99360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-17 Thread Vitaly Buka via cfe-commits
@@ -3742,6 +3751,124 @@ struct MemorySanitizerVisitor : public InstVisitor { setOriginForNaryOp(I); } + // Given two shadows ..., ..., return the interleaved value + // ABABABAB ... + // + // Width == number of elements in A == number of elements in B + Val

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-17 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/99360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix crash in concept deprecation (PR #98622)

2024-07-17 Thread Matheus Izvekov via cfe-commits
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator( tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(), /*DiagID=*/0); - if (const AutoType *AutoT = R->getAs()) -CheckConstrainedAuto( -AutoT, -

[clang] [clang][test] Split AArch64 target feature checks across multiple lines. NFC (PR #99365)

2024-07-17 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/99365 Whenever these tests change, it's difficult to see why they don't match, and the diff after you've fixed them isn't easy to grok. By splitting them with a sed pipe, we fix both issues simultaneously. >From 91

<    1   2   3   4   5   >