[clang] [llvm] [llvm-ar][Archive] Use getDefaultTargetTriple instead of host triple for the fallback archive format. (PR #82888)

2024-02-27 Thread James Henderson via cfe-commits
https://github.com/jh7370 approved this pull request. LGTM. I considered if there was any way of testing this, but the only way I ould think of was to have lit know the default target triple (it might well do that) and then somehow leverage that to convert to a check for the "expected" format

[clang] [llvm] [llvm-ar][Archive] Use getDefaultTargetTriple instead of host triple for the fallback archive format. (PR #82888)

2024-02-27 Thread James Henderson via cfe-commits
https://github.com/jh7370 edited https://github.com/llvm/llvm-project/pull/82888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm-ar][Archive] Use getDefaultTargetTriple instead of host triple for the fallback archive format. (PR #82888)

2024-02-27 Thread James Henderson via cfe-commits
https://github.com/jh7370 edited https://github.com/llvm/llvm-project/pull/82888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-27 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/82476 From a21881d82fe3674b344d4a3807e9d2590c98ce93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Tue, 14 Nov 2023 09:28:45 +0100 Subject: [PATCH 01/11]

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-27 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -65,12 +65,24 @@ void check_fseek(void) { fclose(fp); } +void check_fseeko(void) { alejandro-alvarez-sonarsource wrote: Added https://github.com/llvm/llvm-project/pull/82476 ___ cfe-commits mailing list cfe-co

[clang] [clang] Refactor target attribute mangling. (PR #81893)

2024-02-27 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: ping https://github.com/llvm/llvm-project/pull/81893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-27 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -5,7 +5,7 @@ // suppressed. #pragma clang system_header -typedef struct __sFILE { alejandro-alvarez-sonarsource wrote: I had to modify this line after adding `vfscanf` (and now `vfprintf`) to `system-header-simulator-for-valist.h` The reason is that they

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-27 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource edited https://github.com/llvm/llvm-project/pull/82476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-27 Thread Jay Foad via cfe-commits
https://github.com/jayfoad requested changes to this pull request. I've added _some_ inline comments, but really I don't want to spend the time to review this properly (or maintain it, or extend it for new architectures in future). All this logic already exists in SIInsertWaitcnts. Duplicating

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-27 Thread Jay Foad via cfe-commits
@@ -2378,6 +2409,215 @@ bool SIGfx12CacheControl::enableVolatileAndOrNonTemporal( return Changed; } +bool SIGfx6CacheControl::handleNonAtomicForPreciseMemory( +MachineBasicBlock::iterator &MI) { + assert(MI->mayLoadOrStore()); + + MachineInstr &Inst = *MI; + AMDGPU::

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-27 Thread Jay Foad via cfe-commits
@@ -2378,6 +2409,215 @@ bool SIGfx12CacheControl::enableVolatileAndOrNonTemporal( return Changed; } +bool SIGfx6CacheControl::handleNonAtomicForPreciseMemory( +MachineBasicBlock::iterator &MI) { + assert(MI->mayLoadOrStore()); + + MachineInstr &Inst = *MI; + AMDGPU::

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-27 Thread Jay Foad via cfe-commits
https://github.com/jayfoad edited https://github.com/llvm/llvm-project/pull/79236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-27 Thread Jay Foad via cfe-commits
@@ -355,6 +356,18 @@ class SICacheControl { MachineBasicBlock::iterator &MI) const { return false; } + +public: + // The following is for supporting precise memory mode. When the feature + // precise-memory is enabled, an s_waitcnt ins

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-02-27 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > That'd mean that we "just" need to replace LazySpecializationInfo > *LazySpecializations = nullptr; with the on-disk hash table approach. That > would probably require centralizing that logic somewhere in the ASTReader > (the way this PR does) but with minimal changes wrt D

[clang-tools-extra] [clang-tidy] Fix `cppcoreguidelines-missing-std-forward` false positive for deleted functions (PR #83055)

2024-02-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/83055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Remove deprecated `ValueModel::merge()` function. (PR #82602)

2024-02-27 Thread via cfe-commits
martinboehme wrote: Failing CI is for trailing whitespace in a file not touched by this PR. https://github.com/llvm/llvm-project/pull/82602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] aaec22f - [clang][dataflow] Remove deprecated `ValueModel::merge()` function. (#82602)

2024-02-27 Thread via cfe-commits
Author: martinboehme Date: 2024-02-27T09:49:16+01:00 New Revision: aaec22ffbc9fb0a3b12957166ebf35a7bb2c31e0 URL: https://github.com/llvm/llvm-project/commit/aaec22ffbc9fb0a3b12957166ebf35a7bb2c31e0 DIFF: https://github.com/llvm/llvm-project/commit/aaec22ffbc9fb0a3b12957166ebf35a7bb2c31e0.diff

[clang] [clang][dataflow] Remove deprecated `ValueModel::merge()` function. (PR #82602)

2024-02-27 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/82602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][nullability] Don't discard expression state before end of full-expression. (PR #82611)

2024-02-27 Thread via cfe-commits
martinboehme wrote: Failing CI looks like an infrastructure failure. https://github.com/llvm/llvm-project/pull/82611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-27 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/82922 >From 556fcefed9645aa0a0a965ff8f22d8accdf9eefc Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 25 Feb 2024 13:23:17 + Subject: [PATCH 1/7] [TBAA] Skip all bitfields when generating !tbaa.struct metadata.

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-27 Thread Balázs Kéri via cfe-commits
https://github.com/balazske approved this pull request. https://github.com/llvm/llvm-project/pull/82476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Issue #63106: [сlang] Representation of ellipsis in AST (PR #80976)

2024-02-27 Thread Shahid Iqbal via cfe-commits
@@ -2698,9 +2698,16 @@ StmtResult Parser::ParseCXXCatchBlock(bool FnCatch) { Declarator ExDecl(DS, Attributes, DeclaratorContext::CXXCatch); ParseDeclarator(ExDecl); ExceptionDecl = Actions.ActOnExceptionDeclarator(getCurScope(), ExDecl); - } else -ConsumeToken

[clang] Issue #63106: [сlang] Representation of ellipsis in AST (PR #80976)

2024-02-27 Thread Shahid Iqbal via cfe-commits
@@ -1053,6 +1053,10 @@ class VarDecl : public DeclaratorDecl, public Redeclarable { LLVM_PREFERRED_TYPE(bool) unsigned ExceptionVar : 1; +/// To Check the ellipsis +LLVM_PREFERRED_TYPE(bool) +unsigned EllipsisVar : 1; shahidiqbal13 wrote:

[clang] Issue #63106: [сlang] Representation of ellipsis in AST (PR #80976)

2024-02-27 Thread Shahid Iqbal via cfe-commits
@@ -1053,6 +1053,10 @@ class VarDecl : public DeclaratorDecl, public Redeclarable { LLVM_PREFERRED_TYPE(bool) unsigned ExceptionVar : 1; +/// To Check the ellipsis shahidiqbal13 wrote: Will do it , its expected https://github.com/llvm/llvm-proje

[clang] Issue #63106: [сlang] Representation of ellipsis in AST (PR #80976)

2024-02-27 Thread Shahid Iqbal via cfe-commits
@@ -1474,6 +1478,16 @@ class VarDecl : public DeclaratorDecl, public Redeclarable { NonParmVarDeclBits.ExceptionVar = EV; } + /// Determine the Ellipsis (...) or not + bool isEllipsisVariable() const { +return isa(this) ? false : NonParmVarDeclBits.EllipsisVar; +

[clang] Issue #63106: [сlang] Representation of ellipsis in AST (PR #80976)

2024-02-27 Thread Shahid Iqbal via cfe-commits
@@ -115,6 +115,10 @@ void JSONNodeDumper::Visit(const Decl *D) { else if (D->isThisDeclarationReferenced()) JOS.attribute("isReferenced", true); + if (const VarDecl *ND = dyn_cast(D)) + if (ND->isEllipsisVariable()) + JOS.attribute("catch_all", true);

[clang] Issue #63106: [сlang] Representation of ellipsis in AST (PR #80976)

2024-02-27 Thread Shahid Iqbal via cfe-commits
@@ -271,6 +271,9 @@ void TextNodeDumper::Visit(const Decl *D) { OS << " hidden"; if (D->isImplicit()) OS << " implicit"; + if (const VarDecl *ND = dyn_cast(D)) + if (ND->isEllipsisVariable()) + OS << " catch_all"; shahidiqbal13 wrote: Will do it

[clang] Issue #63106: [сlang] Representation of ellipsis in AST (PR #80976)

2024-02-27 Thread Shahid Iqbal via cfe-commits
@@ -16983,7 +16983,7 @@ VarDecl *Sema::BuildExceptionDeclaration(Scope *S, /// ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch /// handler. -Decl *Sema::ActOnExceptionDeclarator(Scope *S, Declarator &D) { +Decl *Sema::ActOnExceptionDeclarator(Scope *S

[clang] Issue #63106: [сlang] Representation of ellipsis in AST (PR #80976)

2024-02-27 Thread Shahid Iqbal via cfe-commits
@@ -41,7 +41,7 @@ void TestCatch2() { try { } // CHECK-NEXT:CXXCatchStmt -// CHECK-NEXT: NULL +// CHECK-NEXT: VarDecl {{.*}} '' shahidiqbal13 wrote: Can't do much here , its intently being created the var of unknown type https://github.com/l

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

2024-02-27 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/81869 >From 72bbd9d38cb6e292d92391fcf04154cfbc336192 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Thu, 15 Feb 2024 09:52:22 + Subject: [PATCH 1/4] [flang][clang] Add Visibility specific help text for

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-02-27 Thread via cfe-commits
https://github.com/mahtohappy created https://github.com/llvm/llvm-project/pull/83124 When in-place new-ing a local variable of an array of trivial type, the generated code calls 'memset' with the correct size of the array. #fixes 41441 >From 2a42e43d5816d13938efae03afed21db6be3539f Mon Sep 1

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-02-27 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (mahtohappy) Changes When in-place new-ing a local variable of an array of trivial type, the generated code calls 'memset' with the correct size of the array. #fixes 41441 --- Full diff: https://github.com/llvm/llvm-project/pull/831

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From 6a439dd61803e7da91a7791453ca7b9acb90b1b6 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 26 Feb 2024 22:39:05 +0100 Subject: [PATCH] [Clang] Fix __has_cpp_attribute and C++11 attributes with a

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-02-27 Thread via cfe-commits
mahtohappy wrote: It fixes this issue https://github.com/llvm/llvm-project/issues/41441 https://godbolt.org/z/8qoz3GM9h https://github.com/llvm/llvm-project/pull/83124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-02-27 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/83126 RuntimeInterfaceBuilder wires up JITed expressions with the hardcoded Interpreter runtime. It's used only for value printing right now, but it is not limited to that. The default implementation focuses on

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-02-27 Thread via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Stefan Gränitz (weliveindetail) Changes RuntimeInterfaceBuilder wires up JITed expressions with the hardcoded Interpreter runtime. It's used only for value

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-02-27 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta edited https://github.com/llvm/llvm-project/pull/83124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Issue #63106: [сlang] Representation of ellipsis in AST (PR #80976)

2024-02-27 Thread via cfe-commits
cor3ntin wrote: > Using an extra bit for that in `Decl` (that is the base class of all > declaration), seems a bit heavy handed as bits in that part of the astnode > are precious. > Did you consider storing the EllipsisLoc in CXXCatchStmt ? Please address this question first. Thanks! https://

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-02-27 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: This is an early proposal. I'd like to collect feedback before polishing. Let's focus on the conceptual questions. I tried to keep the patch minimal, so that it's easier to review. Each of the three commits depends on the previous ones. They should work and be reviewed in

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-02-27 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail commented: This is an early proposal. I'd like to collect feedback before polishing. Let's focus on the conceptual questions. I tried to keep the patch minimal, so that it's easier to review. Each of the three commits depends on the previous ones. They shoul

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-02-27 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail edited https://github.com/llvm/llvm-project/pull/83126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-02-27 Thread Stefan Gränitz via cfe-commits
@@ -741,9 +775,8 @@ Expr *Interpreter::SynthesizeExpr(Expr *E) { auto *OutValue = CStyleCastPtrExpr(S, Ctx.VoidPtrTy, (uintptr_t)&LastValue); // Build `__clang_Interpreter_SetValue*` call. - RuntimeInterfaceBuilder Builder(*this, Ctx, S, E, {ThisInterp, OutValue}); + Exp

[clang] a28a7d4 - [clang][Interp][NFC] Remove leftover comments

2024-02-27 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-27T14:15:22+01:00 New Revision: a28a7d41ef1a60795719fa3e6e2f7dc3b7fc3d27 URL: https://github.com/llvm/llvm-project/commit/a28a7d41ef1a60795719fa3e6e2f7dc3b7fc3d27 DIFF: https://github.com/llvm/llvm-project/commit/a28a7d41ef1a60795719fa3e6e2f7dc3b7fc3d27.diff LO

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-27 Thread Florian Hahn via cfe-commits
fhahn wrote: > Whitespace is weird in a few places; otherwise looks fine. Argh yes, should be fixed in the latest version. Still need to figure out how to make sure all changes are formatted once the branch contains merges (before the format checker complains and shows the commits) https://gi

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-02-27 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: vgvassilev wrote: I was wondering if we can extend that functionality via a callback mechanism which should be cheaper. We also have some pending work (which I was planning on working when time permits) in that

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

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

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The changes need a release note since this is fixing a bug in Clang 17 https://github.com/llvm/llvm-project/pull/83065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -std=gnu++17 -fsyntax-only -fms-compatibility -verify %s - -void f() { - // GNU-style attributes are prohibited in this position. +// RUN: %clang_cc1 -std=gnu++17 -fsyntax-only -fms-compatibility -verify %s AaronBallman wrote:

[clang] 19cec9c - [clang-format] Add AlignConsecutiveTableGenDefinitions option. (#83008)

2024-02-27 Thread via cfe-commits
Author: Hirofumi Nakamura Date: 2024-02-27T22:31:23+09:00 New Revision: 19cec9ca1206c4707064cc2fc2344de75dfbd8c9 URL: https://github.com/llvm/llvm-project/commit/19cec9ca1206c4707064cc2fc2344de75dfbd8c9 DIFF: https://github.com/llvm/llvm-project/commit/19cec9ca1206c4707064cc2fc2344de75dfbd8c9.d

[clang] [clang-format] Add AlignConsecutiveTableGenDefinitions option. (PR #83008)

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

[clang] [clang-format] Add AlignConsecutiveTableGenDefinitions option. (PR #83008)

2024-02-27 Thread Hirofumi Nakamura via cfe-commits
hnakamura5 wrote: Thank you! https://github.com/llvm/llvm-project/pull/83008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-02-27 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/83124 >From a4c9d01926176beddbd9b7e704ed23d8a3356c2b Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Tue, 27 Feb 2024 03:13:51 -0800 Subject: [PATCH] [Clang][Sema] placement new initializes typedef array with corre

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From 497b6639231f9d3141cc3278b3e476edd1d642d2 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 27 Feb 2024 14:40:42 +0100 Subject: [PATCH] [Clang] Fix __has_cpp_attribute and C++11 attributes with a

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From f97ef5d3efc94585e531339a233cfb3007734d9a Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 27 Feb 2024 14:40:42 +0100 Subject: [PATCH] [Clang] Fix __has_cpp_attribute and C++11 attributes with a

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman requested changes to this pull request. Thank you for working on this, but I'm generally not in favor of this patch. I do not think we should expose all LLVM IR (function) attributes directly in Clang for a whole host of reasons: * User experience is very poor.

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -285,6 +285,10 @@ Bug Fixes to C++ Support templates when determining the primary template of an explicit specialization. - Fixed a crash in Microsoft compatibility mode where unqualified dependent base class lookup searches the bases of an incomplete class. + (`#7821

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++23 -isystem %S/Inputs -fsyntax-only -verify=expected,cxx20_23,cxx23-triple x86_64-linux -Wno-string-plus-int -Wno-pointer-arith -Wno-zero-length-array -Wno-c99-designator -fcxx-exceptions -pedantic %s -Wno-comment -Wno-tautologica

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From f97ef5d3efc94585e531339a233cfb3007734d9a Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 27 Feb 2024 14:40:42 +0100 Subject: [PATCH 1/2] [Clang] Fix __has_cpp_attribute and C++11 attributes wit

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-02-27 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/83027 From efd1411ff7fa93a84cb3d385cb55aa411af9e9ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Wed, 21 Feb 2024 14:46:01 +0100 Subject: [PATCH 1/2] [c

[clang] f2bb6c4 - [NFC][HLSL] Fix broken test (#83062)

2024-02-27 Thread via cfe-commits
Author: Natalie Chouinard Date: 2024-02-27T09:19:24-05:00 New Revision: f2bb6c4415954535b32780cd5fb48411ebe0042c URL: https://github.com/llvm/llvm-project/commit/f2bb6c4415954535b32780cd5fb48411ebe0042c DIFF: https://github.com/llvm/llvm-project/commit/f2bb6c4415954535b32780cd5fb48411ebe0042c.d

[clang] [NFC][HLSL] Fix broken test (PR #83062)

2024-02-27 Thread Natalie Chouinard via cfe-commits
https://github.com/sudonatalie closed https://github.com/llvm/llvm-project/pull/83062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-02-27 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang created https://github.com/llvm/llvm-project/pull/83136 None >From 421a5e4c0a6d7beda71118a36650e72c3d6f2377 Mon Sep 17 00:00:00 2001 From: Phoebe Wang Date: Tue, 27 Feb 2024 22:16:38 +0800 Subject: [PATCH] [X86] Add Support for X86 TLSDESC Relocations --- clang/

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang-driver Author: Phoebe Wang (phoebewang) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/83136.diff 7 Files Affected: - (modified) clang/lib/Driver/ToolChains/CommonArgs.cpp (+2-1) - (modified)

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Phoebe Wang (phoebewang) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/83136.diff 7 Files Affected: - (modified) clang/lib/Driver/ToolChains/CommonArgs.cpp (+2-1) - (modified) clang/test/Driver/tls-dialect.c (+1-1)

[clang] [Clang] [Sema] Handle placeholders in '.*' expressions (PR #83103)

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

[clang] [Clang] [Sema] Handle placeholders in '.*' expressions (PR #83103)

2024-02-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for the fix! Please be sure to add a release note to `clang/docs/ReleaseNotes.rst` so users know about the fix (and be sure to mention the issue # in the release note). https://github.com/llvm/llvm-project/pull/83103

[clang] [Clang] [Sema] Handle placeholders in '.*' expressions (PR #83103)

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -14474,6 +14474,23 @@ ExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, CurFPFeatureOverrides()); } + // If this is the .* operator, which is not overloadable, just + // create a built-in binary operator. + if (Opc ==

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-02-27 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 5ec535b1bda4c87aac951e65cc5b65c910e92579 421a5e4c0a6d7beda71118a36650e72c3d6f2377 --

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM modulo the testing request from @AMP999 https://github.com/llvm/llvm-project/pull/83065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang][analyzer] Model allocation behavior or getdelim/geline (PR #83138)

2024-02-27 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource created https://github.com/llvm/llvm-project/pull/83138 `getdelim` and `getline` may free, allocate, or re-allocate the input buffer, ensuring its size is enough to hold the incoming line, the delimiter, and the null terminator. `*lineptr` must

[clang] [clang][analyzer] Model allocation behavior or getdelim/geline (PR #83138)

2024-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Alejandro Álvarez Ayllón (alejandro-alvarez-sonarsource) Changes `getdelim` and `getline` may free, allocate, or re-allocate the input buffer, ensuring its size is enough to hold the incoming line, the delimiter, and the

[clang] [clang][analyzer] Model allocation behavior or getdelim/geline (PR #83138)

2024-02-27 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/83138 From ad17cfb588500d095b4e402bd2f2197772f89b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Wed, 21 Feb 2024 16:08:04 +0100 Subject: [PATCH 1/2] [c

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-27 Thread Yaxun Liu via cfe-commits
@@ -1306,15 +1306,73 @@ float min(float __x, float __y) { return __builtin_fminf(__x, __y); } __DEVICE__ double min(double __x, double __y) { return __builtin_fmin(__x, __y); } -#if !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__) -__host__ inline static int min(int __a

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-02-27 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/83136 >From cdc9ee6c322af0ceed162f3f714bcd0a22e020c3 Mon Sep 17 00:00:00 2001 From: Phoebe Wang Date: Tue, 27 Feb 2024 22:16:38 +0800 Subject: [PATCH] [X86] Add Support for X86 TLSDESC Relocations --- clang/lib/Dr

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-27 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/82956 >From ebad3ba006445f290d17c338cc1b39293c18cdad Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Sun, 25 Feb 2024 11:13:40 -0500 Subject: [PATCH] [HIP] fix host min/max in header CUDA defines min/max funct

[clang] [Clang][Sema] Fix missing warning when comparing mismatched enums in … (PR #81418)

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

[clang] 8c2ae42 - [Clang][Sema] Fix missing warning when comparing mismatched enums in … (#81418)

2024-02-27 Thread via cfe-commits
Author: Kupa-Martin Date: 2024-02-27T06:58:59-08:00 New Revision: 8c2ae42b3e1c6aa7c18f873edcebff7c0b45a37e URL: https://github.com/llvm/llvm-project/commit/8c2ae42b3e1c6aa7c18f873edcebff7c0b45a37e DIFF: https://github.com/llvm/llvm-project/commit/8c2ae42b3e1c6aa7c18f873edcebff7c0b45a37e.diff L

[clang] [Clang][Sema] Fix missing warning when comparing mismatched enums in … (PR #81418)

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

[clang] [Clang][Sema] Fix missing warning when comparing mismatched enums in … (PR #81418)

2024-02-27 Thread via cfe-commits
github-actions[bot] wrote: @Kupa-Martin 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 bu

[clang] [clang][analyzer]Add C++ polymorphic ptr arithmetic checker (PR #82977)

2024-02-27 Thread via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/82977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-27 Thread Erich Keane via cfe-commits
erichkeane wrote: > Since we didn’t bring this up in the RFC, do we have any idea as to what we > should do with `[[clang::assume]]`? > > My suggestion would be to keep the current semantics for `[[clang::assume]]` > (and `__attribute__((assume))`, but probably _not_ `[[assume]]`) iff the > a

[clang] [CLANG][DWARF] Do not emit -ggnu-pubnames for split dwarf version 5. (PR #82840)

2024-02-27 Thread Alexander Yermolovich via cfe-commits
https://github.com/ayermolo closed https://github.com/llvm/llvm-project/pull/82840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b3ae6c2 - [CLANG][DWARF] Do not emit -ggnu-pubnames for split dwarf version 5. (#82840)

2024-02-27 Thread via cfe-commits
Author: Alexander Yermolovich Date: 2024-02-27T07:05:21-08:00 New Revision: b3ae6c205e4afcf1a9f7d7204a659a27ca700237 URL: https://github.com/llvm/llvm-project/commit/b3ae6c205e4afcf1a9f7d7204a659a27ca700237 DIFF: https://github.com/llvm/llvm-project/commit/b3ae6c205e4afcf1a9f7d7204a659a27ca7002

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: There are a few things in how the `handle` function works that are incorrect/not necessary, but like Aaron, I'm pretty solidly against this patch in concept. Aaron had some good reasoning, and mine opinion reflects all of it. https://github.com/llvm/ll

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-27 Thread zhijian lin via cfe-commits
@@ -337,12 +350,77 @@ CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const { return CharUnits::fromQuantity(4); } +ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(QualType Ty, + uint64_t &TypeSize) const { + + asse

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-27 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 70e61f5 - [clang][Interp][NFC] Rename InitPtr{,Pop} to FinishInit{,Pop}

2024-02-27 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-27T16:14:37+01:00 New Revision: 70e61f50958bebedffb1be285fdefb0e2f0a URL: https://github.com/llvm/llvm-project/commit/70e61f50958bebedffb1be285fdefb0e2f0a DIFF: https://github.com/llvm/llvm-project/commit/70e61f50958bebedffb1be285fdefb0e2f0a.diff LO

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-27 Thread William Moses via cfe-commits
wsmoses wrote: @AaronBallman @erichkeane, do you have any suggestions for paths forward, for use cases where it is guaranteed that the attribute is valid and the user (or perhaps more specifically, another Clang-tool) needs to provide information to LLVM through Clang AST/source. For example,

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-27 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-27 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-27 Thread William Moses via cfe-commits
wsmoses wrote: As another option, what if this always emits string attributes prefixed with "clang_". And any other tools that semantic assurances for what they do with it. Thus the attribute won't be tied to any LLVM attributes. https://github.com/llvm/llvm-project/pull/83059

[clang] Issue #63106: [сlang] Representation of ellipsis in AST (PR #80976)

2024-02-27 Thread Shahid Iqbal via cfe-commits
shahidiqbal13 wrote: Hi @cor3ntin , I tried but didn't work as per design, Can you pls review this , I m not updating the Decl , updating the VarDecl https://github.com/llvm/llvm-project/pull/80976 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-27 Thread Erich Keane via cfe-commits
erichkeane wrote: > @AaronBallman @erichkeane, do you have any suggestions for paths forward, for > use cases where it is guaranteed that the attribute is valid and the user (or > perhaps more specifically, another Clang-tool) needs to provide information > to LLVM through Clang AST/source. >

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-27 Thread William Moses via cfe-commits
wsmoses wrote: So my understanding was that the annotate attribute didn't modify codegen (and thus LLVM string attributes), but perhaps I didn't use it properly. Is there any reference for that? https://github.com/llvm/llvm-project/pull/83059 ___ cfe

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-27 Thread Erich Keane via cfe-commits
erichkeane wrote: > So my understanding was that the annotate attribute didn't modify codegen > (and thus LLVM string attributes), but perhaps I didn't use it properly. > > Is there any reference for that? I'm not sure what you mean by that? the 'annotate' attribute just ends up in an LLVM-s

[clang] [clang] Refactor target attribute mangling. (PR #81893)

2024-02-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Hi- Sorry for the delay, I didn't see the updated commit, so thanks for the ping. In general this is 'about right', but I don't like the 'getManglingSuffix' type of thing. I believe we should have these functions take an ostream and append to it, that

[clang] 55783bd - [HIP] fix host min/max in header (#82956)

2024-02-27 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2024-02-27T10:52:55-05:00 New Revision: 55783bd0f9cfc30aa93c718919dab5419d86a2c6 URL: https://github.com/llvm/llvm-project/commit/55783bd0f9cfc30aa93c718919dab5419d86a2c6 DIFF: https://github.com/llvm/llvm-project/commit/55783bd0f9cfc30aa93c718919dab5419d86a2c6.dif

[clang] [HIP] fix host min/max in header (PR #82956)

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

[clang] d612d59 - [clang][Interp] Fix local lvalue compound literals

2024-02-27 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-27T16:57:17+01:00 New Revision: d612d593eff4af7976250023bbff34d2c10f7526 URL: https://github.com/llvm/llvm-project/commit/d612d593eff4af7976250023bbff34d2c10f7526 DIFF: https://github.com/llvm/llvm-project/commit/d612d593eff4af7976250023bbff34d2c10f7526.diff LO

  1   2   3   4   >