[clang-tools-extra] [clangd][SymbolCollector] Treat ObjC methods as spelled (PR #76410)

2024-02-01 Thread David Goldman via cfe-commits
https://github.com/DavidGoldman closed https://github.com/llvm/llvm-project/pull/76410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix INF/NAN warning. (PR #80290)

2024-02-01 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/80290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Allow w64 ballot to be used on w32 targets (PR #80183)

2024-02-01 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/80183 >From 26b75cdba1aebc881e52dc82ca61e1082ef67a5e Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 31 Jan 2024 13:18:04 -0600 Subject: [PATCH] [AMDGPU] Allow w64 ballot to be used on w32 targets Summary: Curr

[clang] [AMDGPU] Allow w64 ballot to be used on w32 targets (PR #80183)

2024-02-01 Thread Joseph Huber via cfe-commits
@@ -4,13 +4,10 @@ // RUN: %clang_cc1 -triple amdgcn-- -target-cpu gfx1010 -target-feature -wavefrontsize64 -verify -S -o - %s // RUN: %clang_cc1 -triple amdgcn-- -target-cpu gfx1010 -verify -S -o - %s +// expected-no-diagnostics + typedef unsigned long ulong; void test_ba

[clang] Fix INF/NAN warning. (PR #80290)

2024-02-01 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/80290 >From 529879c78ae4c1bf4d04110b543f37c1d1af20f7 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Thu, 1 Feb 2024 05:26:00 -0800 Subject: [PATCH 1/2] Fix INF/NAN warning. --- .../clang/Basic/DiagnosticCommonKin

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-01 Thread Qizhi Hu via cfe-commits
jcsxky wrote: details: ```cpp template constexpr int FuncAlign(int param = alignof(FunctionTemplateParam)); template <> template constexpr int Problem::FuncAlign(int param) { // depth of FunctionTemplateParam in default // initialization of alignof(Func

[llvm] [compiler-rt] [clang] [clang-tools-extra] [compiler-rt] Mark more calls as blocking (PR #77789)

2024-02-01 Thread Pavel Labath via cfe-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/77789 >From 97c29cab7c7d8af9bf7a5d79baf468154bb83fad Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 11 Jan 2024 12:50:37 +0100 Subject: [PATCH] [compiler-rt] Mark more calls as blocking If we're in a blocking c

[llvm] [clang] [AArch64] Support optional constant offset for constraint "S" (PR #80255)

2024-02-01 Thread Peter Smith via cfe-commits
smithp35 wrote: Just to make sure I've understood: * x86_64's support for constraint "s" was hoisted into the target independent TargetLowering in https://reviews.llvm.org/D61560 * Clang's implementation of constraint "s" isn't restricted to non-PIC/non-PIE like GCC's * We can implement constr

[llvm] [clang] [clang-tools-extra] Apply format only if --format is specified (PR #79466)

2024-02-01 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/79466 >From 67a266e7bc5682d5f674c0424858ba86f7c9a192 Mon Sep 17 00:00:00 2001 From: Kugan <34810920+kug...@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:12:10 + Subject: [PATCH] Apply format only if --forma

[llvm] [clang] [clang-tools-extra] Apply format only if --format is specified (PR #79466)

2024-02-01 Thread Dmitry Polukhin via cfe-commits
dmpolukhin wrote: @AaronBallman @bcardosolopes please take a look. https://github.com/llvm/llvm-project/pull/79466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-01 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80288 >From 3d7adb18e15668216f39b2ba757b7b52bca99812 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 1 Feb 2024 20:54:46 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align cr

[clang] [polly] [clang-tools-extra] [llvm] [polly] Add polly-debug flag to print debug info from all parts of polly (PR #78549)

2024-02-01 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur requested changes to this pull request. https://github.com/llvm/llvm-project/pull/78549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [polly] [llvm] [polly] Add polly-debug flag to print debug info from all parts of polly (PR #78549)

2024-02-01 Thread Michael Kruse via cfe-commits
@@ -0,0 +1,32 @@ +//===-PollyDebug.inc -Provide support for debugging Polly passes-*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clang] [polly] [llvm] [polly] Add polly-debug flag to print debug info from all parts of polly (PR #78549)

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

[llvm] [clang-tools-extra] [polly] [clang] [polly] Add polly-debug flag to print debug info from all parts of polly (PR #78549)

2024-02-01 Thread Michael Kruse via cfe-commits
@@ -0,0 +1,32 @@ +//===-PollyDebug.inc -Provide support for debugging Polly passes-*- C++ -*-===// Meinersbur wrote: Please use a `.h` extension for this file, it's a normal header file https://github.com/llvm/llvm-project/pull/78549 ___

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

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

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

2024-02-01 Thread Utkarsh Saxena via cfe-commits
@@ -453,26 +454,68 @@ bool DeadCodeScan::isDeadCodeRoot(const clang::CFGBlock *Block) { return isDeadRoot; } -static bool isValidDeadStmt(const Stmt *S) { +// Check if the given `DeadStmt` is a coroutine statement and is a substmt of +// the coroutine statement. +static boo

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

2024-02-01 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,65 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -std=c++20 -fsyntax-only -verify -Wunreachable-code + +#include "Inputs/std-coroutine.h" + +extern void abort (void) __attribute__ ((__noreturn__)); + +struct task { + struct promise_type { +std::suspend_

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

2024-02-01 Thread Utkarsh Saxena via cfe-commits
@@ -493,26 +454,68 @@ bool DeadCodeScan::isDeadCodeRoot(const clang::CFGBlock *Block) { return isDeadRoot; } -static bool isValidDeadStmt(const Stmt *S) { +// Check if the given `DeadStmt` is a coroutine statement and is a substmt of +// the coroutine statement. ---

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

2024-02-01 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 commented: Skipping coroutine statements SG. Change mostly LG. Left few comments. https://github.com/llvm/llvm-project/pull/77454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

2024-02-01 Thread Utkarsh Saxena via cfe-commits
@@ -493,26 +454,68 @@ bool DeadCodeScan::isDeadCodeRoot(const clang::CFGBlock *Block) { return isDeadRoot; } -static bool isValidDeadStmt(const Stmt *S) { +// Check if the given `DeadStmt` is a coroutine statement and is a substmt of +// the coroutine statement. +static boo

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

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

[clang] [Clang][AArch64] Emit 'unimplemented' diagnostic for SME (PR #80295)

2024-02-01 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm created https://github.com/llvm/llvm-project/pull/80295 When a function F has ZA and ZT0 state, calls another function G that only shares ZT0 state with its caller, F will have to save ZA before the call to G, and restore it afterwards (rather than setting up a l

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

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

[clang] [Clang][AArch64] Emit 'unimplemented' diagnostic for SME (PR #80295)

2024-02-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sander de Smalen (sdesmalen-arm) Changes When a function F has ZA and ZT0 state, calls another function G that only shares ZT0 state with its caller, F will have to save ZA before the call to G, and restore it afterwards (rather than settin

[clang] [Clang][AArch64] Emit 'unimplemented' diagnostic for SME (PR #80295)

2024-02-01 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 c2675ba91aa22e7530465f027fbd853c05b95192 12600c89a2603615225bbdeafea94f98782bb9c8 --

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

2024-02-01 Thread Utkarsh Saxena via cfe-commits
@@ -453,26 +454,68 @@ bool DeadCodeScan::isDeadCodeRoot(const clang::CFGBlock *Block) { return isDeadRoot; } -static bool isValidDeadStmt(const Stmt *S) { +// Check if the given `DeadStmt` is a coroutine statement and is a substmt of +// the coroutine statement. +static boo

[clang-tools-extra] [llvm] [AMDGPU] Add pal metadata 3.0 support to callable pal funcs (PR #67104)

2024-02-01 Thread David Stuttard via cfe-commits
https://github.com/dstutt updated https://github.com/llvm/llvm-project/pull/67104 >From 259138920126f09149b488fc54e8d2a7da969ca4 Mon Sep 17 00:00:00 2001 From: David Stuttard Date: Thu, 24 Aug 2023 16:45:50 +0100 Subject: [PATCH 1/3] [AMDGPU] Add pal metadata 3.0 support to callable pal funcs

[clang] [Clang][AArch64] Emit 'unimplemented' diagnostic for SME (PR #80295)

2024-02-01 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm updated https://github.com/llvm/llvm-project/pull/80295 >From 6759819e531424ecc84f11c493b63d3092e4cabd Mon Sep 17 00:00:00 2001 From: Sander de Smalen Date: Thu, 1 Feb 2024 14:01:58 + Subject: [PATCH 1/2] NFC: Refactor code in SemaChecking [to squash] ---

[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

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

[clang] [flang] [llvm] [lld] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-02-01 Thread Pierre van Houtryve via cfe-commits
@@ -139,10 +139,10 @@ bool AMDGPURemoveIncompatibleFunctions::checkFunction(Function &F) { const GCNSubtarget *ST = static_cast(TM->getSubtargetImpl(F)); - // Check the GPU isn't generic. Generic is used for testing only - // and we don't want this pass to interfere

[clang-tools-extra] [llvm] [AMDGPU] Add pal metadata 3.0 support to callable pal funcs (PR #67104)

2024-02-01 Thread David Stuttard via cfe-commits
dstutt wrote: Yes, this is still relevant (sorry, I had forgotten about it). Just double checking that extra changes are not required after recent update to getPGMRSrc1. https://github.com/llvm/llvm-project/pull/67104 ___ cfe-commits mailing list cfe

[lld] [flang] [clang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-02-01 Thread Konstantin Zhuravlyov via cfe-commits
https://github.com/kzhuravl approved this pull request. LGTM! Thanks! https://github.com/llvm/llvm-project/pull/76955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [lld] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-02-01 Thread Konstantin Zhuravlyov via cfe-commits
https://github.com/kzhuravl edited https://github.com/llvm/llvm-project/pull/76955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Make +pauth enabled in Armv8.3-a by default (PR #78027)

2024-02-01 Thread David Spickett via cfe-commits
DavidSpickett wrote: Just for citations here, the A profile manual says: FEAT_PAuth is mandatory in Armv8.3 implementations. The R Profile manual says: The Armv8-R AArch64 architecture supports FEAT_PAuth2 feature defined in Armv8-A architecture with a modified definition of PAC field as descri

[clang] [Clang][NFC] Remove TemplateArgumentList::OnStack (PR #79760)

2024-02-01 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane I added the following release note: > > > Removed support for constructing on-stack `TemplateArgumentList`s. > > Interfaces should instead use `ArrayRef` to pass template > > arguments. > > I'm not entirely sure how to benchmark these changes. Perhaps I could

[clang] [llvm] [AArch64] Make +pauth enabled in Armv8.3-a by default (PR #78027)

2024-02-01 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/78027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AArch64] Make +pauth enabled in Armv8.3-a by default (PR #78027)

2024-02-01 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett approved this pull request. LGTM. I think the reason we didn't do this is because we have so far: * Used nop space encodings * Used a CPU that would enable it * Been adding -mbranch-protection and friends anyway, so adding +pauth didn't seem like a big deal. Bu

[clang] [llvm] [AArch64] Make +pauth enabled in Armv8.3-a by default (PR #78027)

2024-02-01 Thread David Spickett via cfe-commits
@@ -1280,7 +1282,7 @@ INSTANTIATE_TEST_SUITE_P( AArch64::AEK_DOTPROD, AArch64::AEK_FP, AArch64::AEK_SIMD, AArch64::AEK_FP16, AArch64::AEK_FP16FML, AArch64::AEK_RAS, AArch64::AEK_RCPC, AArch64::AEK_LSE, AArch64::AEK_SB, -

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-01 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 created https://github.com/llvm/llvm-project/pull/80299 This implements the annotation of the values in TableGen. The main changes are, - parseTableGenValue(), the simplified parser method for the syntax of values. - modified consumeToken() to parseTableGenValue in

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Hirofumi Nakamura (hnakamura5) Changes This implements the annotation of the values in TableGen. The main changes are, - parseTableGenValue(), the simplified parser method for the syntax of values. - modified consumeToken() to parse

[clang] [llvm] [AArch64] Make +pauth enabled in Armv8.3-a by default (PR #78027)

2024-02-01 Thread David Spickett via cfe-commits
DavidSpickett wrote: And the code formatter is going crazy over some of this code :) One of these days we'll fix it. You can ignore it for now, save yourself and my downstream colleagues a massive headache with the merge. https://github.com/llvm/llvm-project/pull/78027 ___

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-01 Thread Hirofumi Nakamura via cfe-commits
@@ -816,7 +816,7 @@ void FormatTokenLexer::handleTableGenMultilineString() { auto CloseOffset = Lex->getBuffer().find("}]", OpenOffset); if (CloseOffset == StringRef::npos) return; - auto Text = Lex->getBuffer().substr(OpenOffset, CloseOffset + 2); + auto Text = Lex->

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This needs a release note and some tests as well. https://github.com/llvm/llvm-project/pull/80040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/80040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-01 Thread Erich Keane via cfe-commits
@@ -8265,6 +8265,9 @@ def warn_condition_is_assignment : Warning<"using the result of an " def warn_free_nonheap_object : Warning<"attempt to call %0 on non-heap %select{object %2|object: block expression|object: lambda-to-function-pointer conversion}1">, InGroup; +def

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-01 Thread Erich Keane via cfe-commits
@@ -10098,6 +10098,23 @@ static bool isVector(QualType QT, QualType ElementType) { return false; } +bool Sema::IsPointerToPointer(QualType LHSType, QualType RHSType) { + if (const PointerType *LHSPointer = dyn_cast(LHSType)) { erichkeane wrote: I think th

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-01 Thread Hirofumi Nakamura via cfe-commits
@@ -256,6 +256,18 @@ class AnnotatingParser { } } } + if (Style.isTableGen()) { +if (CurrentToken->isOneOf(tok::comma, tok::equal)) { + // They appears as a separator. Unless it is not in class definition. + next(); +

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on this! I think we want to go in a different direction for this fix. I think the real issue is that we're missing a call to `Sema::CheckFunctionCall()` within `handleCleanupAttr()`. That's currently a private function in `Sema`,

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-01 Thread Hirofumi Nakamura via cfe-commits
@@ -388,6 +400,28 @@ class AnnotatingParser { Contexts.back().IsExpression = !IsForOrCatch; } +if (Style.isTableGen()) { + if (FormatToken *Prev = OpeningParen.Previous) { +if (Prev->is(TT_TableGenCondOperator)) { + Contexts.back().IsTableGe

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-01 Thread Hirofumi Nakamura via cfe-commits
@@ -549,6 +583,22 @@ class AnnotatingParser { if (CurrentToken->is(tok::comma)) Contexts.back().CanBeExpression = true; + if (Style.isTableGen()) { +if (CurrentToken->is(tok::comma)) { + if (Contexts.back().IsTableGenCondOpe) +Cu

[clang] [Sema] Fix crash in __datasizeof with unknown types (PR #80300)

2024-02-01 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov created https://github.com/llvm/llvm-project/pull/80300 Fixes #80284. Calling `getASTRecordLayout` on invalid types may crash and results of `__datasizeof` on invalid types can be arbitrary, so just use whatever `sizeof` returns. >From beeedb29d4dd1213d754ccc

[clang] [Sema] Fix crash in __datasizeof with unknown types (PR #80300)

2024-02-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clangd Author: Ilya Biryukov (ilya-biryukov) Changes Fixes #80284. Calling `getASTRecordLayout` on invalid types may crash and results of `__datasizeof` on invalid types can be arbitrary, so just use whatever `sizeof` return

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-01 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 edited https://github.com/llvm/llvm-project/pull/80299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-01 Thread Hirofumi Nakamura via cfe-commits
@@ -833,13 +885,207 @@ class AnnotatingParser { Left->setType(TT_ArrayInitializerLSquare); } FormatToken *Tok = CurrentToken; + if (Style.isTableGen()) { +if (CurrentToken->isOneOf(tok::comma, tok::minus, tok::ellipsis)) { + // '-' and

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-01 Thread Hirofumi Nakamura via cfe-commits
@@ -1423,11 +1692,30 @@ class AnnotatingParser { if (!Tok->getPreviousNonComment()) Line.IsContinuation = true; } + if (Style.isTableGen()) { +if (Tok->is(Keywords.kw_assert)) { + if (!parseTableGenValue()) +return false

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-01 Thread Hirofumi Nakamura via cfe-commits
@@ -1423,11 +1692,30 @@ class AnnotatingParser { if (!Tok->getPreviousNonComment()) Line.IsContinuation = true; } + if (Style.isTableGen()) { +if (Tok->is(Keywords.kw_assert)) { + if (!parseTableGenValue()) +return false

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-01 Thread Hirofumi Nakamura via cfe-commits
@@ -915,10 +1163,12 @@ class AnnotatingParser { Previous->setType(TT_SelectorName); } } -if (CurrentToken->is(tok::colon) && OpeningBrace.is(TT_Unknown)) +if (CurrentToken->is(tok::colon) && OpeningBrace.is(TT_Unknown) && +

[llvm] [lld] [clang] [AMDGPU] Rename COV module flag to amdhsa_code_object_version (PR #79905)

2024-02-01 Thread Emma Pilkington via cfe-commits
@@ -25,4 +25,4 @@ entry: } !llvm.module.flags = !{!0} -!0 = !{i32 1, !"amdgpu_code_object_version", i32 500} +!0 = !{i32 1, !"amdhsa_code_object_version", i32 500} epilk wrote: Sure, I'll make a PR for that too after this lands. https://github.com/llvm/llvm-

[clang] fcd3752 - [HIP] fix HIP detection for /usr (#80190)

2024-02-01 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2024-02-01T10:33:51-05:00 New Revision: fcd3752342ebd193d4eef39b9c0730599eca4486 URL: https://github.com/llvm/llvm-project/commit/fcd3752342ebd193d4eef39b9c0730599eca4486 DIFF: https://github.com/llvm/llvm-project/commit/fcd3752342ebd193d4eef39b9c0730599eca4486.dif

[clang] [HIP] fix HIP detection for /usr (PR #80190)

2024-02-01 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/80190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-01 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 edited https://github.com/llvm/llvm-project/pull/80299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Remove TemplateArgumentList::OnStack (PR #79760)

2024-02-01 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane I ended up writing a python script that compiles the TUs in `clang/lib` with `-print-stats` and then sums up the total bytes allocated by `ASTContext`. Ended up with a 0.4% decrease in memory usage. This does however rely on `compile_commands.json`, and boost does

[llvm] [clang-tools-extra] [clang] [AArch64] Implement -fno-plt for SelectionDAG/GlobalISel (PR #78890)

2024-02-01 Thread David Green via cfe-commits
@@ -201,17 +201,27 @@ define dso_local void @rv_marker_3() personality ptr @__gxx_personality_v0 { ; GISEL-NEXT:bl _objc_object ; GISEL-NEXT: Ltmp1: ; GISEL-NEXT: ; %bb.1: ; %invoke.cont -; GISEL-NEXT:ldp x29, x30, [sp, #16] ; 16-byte Folded Reload +; GISEL-NEXT: Ll

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-02-01 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Ping @erichkeane https://github.com/llvm/llvm-project/pull/78243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AArch64] Make +pauth enabled in Armv8.3-a by default (PR #78027)

2024-02-01 Thread Anatoly Trosinenko via cfe-commits
atrosinenko wrote: @DavidSpickett Thank you for the comments! I will rebase the branch as-is to a recent version of `main` to retest it before merging. https://github.com/llvm/llvm-project/pull/78027 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [Clang][NFC] Remove TemplateArgumentList::OnStack (PR #79760)

2024-02-01 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane I ended up writing a python script that compiles the TUs in > `clang/lib` with `-print-stats` and then sums up the total bytes allocated by > `ASTContext`. Ended up with a 0.4% decrease in memory usage. > > This does however rely on `compile_commands.json`, and

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-02-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I think this looks fine now... WDYT @cor3ntin ? https://github.com/llvm/llvm-project/pull/78243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[llvm] [clang] [AArch64] Make +pauth enabled in Armv8.3-a by default (PR #78027)

2024-02-01 Thread Anatoly Trosinenko via cfe-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/78027 >From c2ab29bf1c01653e3e90248dda3c86dd973be6ec Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Thu, 18 Jan 2024 19:54:04 +0300 Subject: [PATCH 1/2] [AArch64] Make Armv8.3-a extension set +pauth by def

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-02-01 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/78243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang][analyzer] Add missing stream related functions to StdLibraryFunctionsChecker. (PR #76979)

2024-02-01 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/76979 From e4932449fd2407cee888f3f0e5dc00c6ce637221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Thu, 4 Jan 2024 18:16:12 +0100 Subject: [PATCH 1/6] [clang][analyzer] Add missing stream rel

[clang] [clang-tools-extra] [llvm] [clang][analyzer] Add missing stream related functions to StdLibraryFunctionsChecker. (PR #76979)

2024-02-01 Thread Balázs Kéri via cfe-commits
@@ -1385,14 +1385,16 @@ Improvements - Improved the ``unix.StdCLibraryFunctions`` checker by modeling more - functions like ``send``, ``recv``, ``readlink``, ``fflush``, ``mkdtemp``, - ``getcwd`` and ``errno`` behavior. + functions like ``send``, ``recv``, ``re

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-02-01 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. Sounds like this is all good from the C++ side. I'm fine with this bleeding into HLSL while we figure out what we need to do. It would be super nice if we can just leave this enabled for HLSL as an extension. A lot of our users want it,

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-02-01 Thread Chris B via cfe-commits
@@ -3,8 +3,8 @@ extern groupshared float f; extern float groupshared f; // Ok, redeclaration? -// NOTE:lambda is not enabled except for hlsl202x. -// expected-error@+2 {{expected expression}} +// expected-warning@+3 {{lambdas are a C++11 extension}} +// expected-error@+2 {{

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-02-01 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/73376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] Reapply "[AMDGPU] Add InstCombine rule for ballot.i64 intrinsic in wave32 mode." (PR #80303)

2024-02-01 Thread Valery Pykhtin via cfe-commits
https://github.com/vpykhtin created https://github.com/llvm/llvm-project/pull/80303 This reverts https://github.com/llvm/llvm-project/pull/78429 and reapplies https://github.com/llvm/llvm-project/pull/71556 with added lit test constraint: `REQUIRES: amdgpu-registered-target` >From 5c85b0b869

[llvm] [clang] Reapply "[AMDGPU] Add InstCombine rule for ballot.i64 intrinsic in wave32 mode." (PR #80303)

2024-02-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-backend-amdgpu Author: Valery Pykhtin (vpykhtin) Changes This reverts https://github.com/llvm/llvm-project/pull/78429 and reapplies https://github.com/llvm/llvm-project/pull/71556 with added lit test constraint: `R

[clang] [Clang][NFC] Remove TemplateArgumentList::OnStack (PR #79760)

2024-02-01 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/79760 >From 2e3e1a1dcaf1a6483e326c0d537af50e264098bb Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Sun, 28 Jan 2024 11:03:52 -0500 Subject: [PATCH] [Clang][NFC] Remove TemplateArgumentList::OnStack ---

[clang] [Clang][NFC] Remove TemplateArgumentList::OnStack (PR #79760)

2024-02-01 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane How does this sound? > Removed support for constructing on-stack `TemplateArgumentList`s; interfaces > should instead use `ArrayRef` to pass template arguments. > This reduces AST memory usage by 0.4% when compiling clang. https://github.com/llvm/llvm-project/pu

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-02-01 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/78243 >From 2f691fa57791b40c7598df9b83f3ba3417c07c39 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 12 Jan 2024 13:45:15 -0500 Subject: [PATCH 1/2] [Clang][Parse] Diagnose member template declarations

[llvm] [clang-tools-extra] [AMDGPU] Add pal metadata 3.0 support to callable pal funcs (PR #67104)

2024-02-01 Thread David Stuttard via cfe-commits
https://github.com/dstutt updated https://github.com/llvm/llvm-project/pull/67104 >From 259138920126f09149b488fc54e8d2a7da969ca4 Mon Sep 17 00:00:00 2001 From: David Stuttard Date: Thu, 24 Aug 2023 16:45:50 +0100 Subject: [PATCH 1/4] [AMDGPU] Add pal metadata 3.0 support to callable pal funcs

[clang] [Clang][NFC] Remove TemplateArgumentList::OnStack (PR #79760)

2024-02-01 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane How does this sound? > > > Removed support for constructing on-stack `TemplateArgumentList`s; > > interfaces should instead use `ArrayRef` to pass template > > arguments. Transitioning internal uses to `ArrayRef` > > reduces AST memory usage by 0.4% when compil

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-02-01 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/78243 >From 07999d290eaf5476189865b8050153d1e25011d2 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 12 Jan 2024 13:45:15 -0500 Subject: [PATCH] [Clang][Parse] Diagnose member template declarations wit

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-01 Thread via cfe-commits
cor3ntin wrote: Can you add a test for CWG2363 just showing we have the intended behavior ? (in CXX/drs/26xx.cpp) https://github.com/llvm/llvm-project/pull/80171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] Fix INF/NAN warning. (PR #80290)

2024-02-01 Thread Aaron Ballman via cfe-commits
@@ -72,7 +72,9 @@ def warn_pragma_debug_unexpected_argument : Warning< def warn_fp_nan_inf_when_disabled : Warning< "use of %select{infinity|NaN}0%select{| via a macro}1 is undefined behavior " - "due to the currently enabled floating-point options">, + "due to the current

[clang] Fix INF/NAN warning. (PR #80290)

2024-02-01 Thread Aaron Ballman via cfe-commits
@@ -3288,7 +3288,7 @@ void Preprocessor::HandleIfdefDirective(Token &Result, return; } - emitMacroExpansionWarnings(MacroNameTok); + emitMacroExpansionWarnings(MacroNameTok, true); AaronBallman wrote: ```suggestion emitMacroExpansionWarnings(MacroNa

[clang] Fix INF/NAN warning. (PR #80290)

2024-02-01 Thread Aaron Ballman via cfe-commits
@@ -9132,7 +9132,7 @@ bool Sema::SemaBuiltinUnorderedCompare(CallExpr *TheCall, unsigned BuiltinID) { if (BuiltinID == Builtin::BI__builtin_isunordered && TheCall->getFPFeaturesInEffect(getLangOpts()).getNoHonorNaNs()) Diag(TheCall->getBeginLoc(), diag::warn_fp_nan

[clang] Fix INF/NAN warning. (PR #80290)

2024-02-01 Thread Aaron Ballman via cfe-commits
@@ -2847,12 +2848,15 @@ class Preprocessor { !SourceMgr.isInMainFile(Identifier.getLocation())) emitRestrictExpansionWarning(Identifier); -if (Info->getName() == "INFINITY") - if (getLangOpts().NoHonorInfs) -emitRestrictInfNaNWarning(Identifier,

[clang] [Sema] Fix crash in __datasizeof with unknown types (PR #80300)

2024-02-01 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks for the fix! https://github.com/llvm/llvm-project/pull/80300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [Sema] Fix crash in __datasizeof with unknown types (PR #80300)

2024-02-01 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov updated https://github.com/llvm/llvm-project/pull/80300 >From beeedb29d4dd1213d754cccefaf52cd0658a92d3 Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Thu, 1 Feb 2024 16:12:23 +0100 Subject: [PATCH] [Sema] Fix crash in __datasizeof with unknown types Fixes #

[clang] 9acd61e - [Sema] Fix crash in __datasizeof with unknown types (#80300)

2024-02-01 Thread via cfe-commits
Author: Ilya Biryukov Date: 2024-02-01T17:09:32+01:00 New Revision: 9acd61ec1999ac3a54371d0a8b9d922ef5ca2b50 URL: https://github.com/llvm/llvm-project/commit/9acd61ec1999ac3a54371d0a8b9d922ef5ca2b50 DIFF: https://github.com/llvm/llvm-project/commit/9acd61ec1999ac3a54371d0a8b9d922ef5ca2b50.diff

[clang] [clang-tools-extra] [llvm] [Sema] Fix crash in __datasizeof with unknown types (PR #80300)

2024-02-01 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov closed https://github.com/llvm/llvm-project/pull/80300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Remove TemplateArgumentList::OnStack (PR #79760)

2024-02-01 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/79760 >From 2ea817f2103cf146e21128358c1064871a309664 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Sun, 28 Jan 2024 11:03:52 -0500 Subject: [PATCH] [Clang][NFC] Remove TemplateArgumentList::OnStack ---

[clang] [Clang][NFC] Remove TemplateArgumentList::OnStack (PR #79760)

2024-02-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/79760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix INF/NAN warning. (PR #80290)

2024-02-01 Thread Zahira Ammarguellat via cfe-commits
@@ -72,7 +72,9 @@ def warn_pragma_debug_unexpected_argument : Warning< def warn_fp_nan_inf_when_disabled : Warning< "use of %select{infinity|NaN}0%select{| via a macro}1 is undefined behavior " - "due to the currently enabled floating-point options">, + "due to the current

[clang] Fix INF/NAN warning. (PR #80290)

2024-02-01 Thread Zahira Ammarguellat via cfe-commits
@@ -9132,7 +9132,7 @@ bool Sema::SemaBuiltinUnorderedCompare(CallExpr *TheCall, unsigned BuiltinID) { if (BuiltinID == Builtin::BI__builtin_isunordered && TheCall->getFPFeaturesInEffect(getLangOpts()).getNoHonorNaNs()) Diag(TheCall->getBeginLoc(), diag::warn_fp_nan

[clang] [OpenMP] Move unsupported structured bindings diagnostic (PR #80216)

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

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-02-01 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/78243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c5f4619 - [Clang][Parse] Diagnose member template declarations with multiple declarators (#78243)

2024-02-01 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-02-01T11:19:04-05:00 New Revision: c5f461918cece4362fb70c7b16de4e95c1af8e5f URL: https://github.com/llvm/llvm-project/commit/c5f461918cece4362fb70c7b16de4e95c1af8e5f DIFF: https://github.com/llvm/llvm-project/commit/c5f461918cece4362fb70c7b16de4e95c1af8e5f

[clang] Fix INF/NAN warning. (PR #80290)

2024-02-01 Thread Zahira Ammarguellat via cfe-commits
@@ -3288,7 +3288,7 @@ void Preprocessor::HandleIfdefDirective(Token &Result, return; } - emitMacroExpansionWarnings(MacroNameTok); + emitMacroExpansionWarnings(MacroNameTok, true); zahiraam wrote: The bool argument is not needed since I am removing th

<    1   2   3   4   5   6   >