[clang-tools-extra] Extend support for specifying languages and version in add_new_check.py (PR #100129)

2024-07-26 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 13996378d81c8fa9a364aeaafd7382abbc1db83a...ed5cdfdd4696f4af2f6cd3dd09d4104744b74cc5 clang

[clang-tools-extra] Extend support for specifying languages and version in add_new_check.py (PR #100129)

2024-07-26 Thread Nathan James via cfe-commits
https://github.com/njames93 updated https://github.com/llvm/llvm-project/pull/100129 >From ed5cdfdd4696f4af2f6cd3dd09d4104744b74cc5 Mon Sep 17 00:00:00 2001 From: Nathan James Date: Tue, 23 Jul 2024 15:24:52 +0100 Subject: [PATCH] Extend support for specifying languages and version in add_new_

[clang] [ASTMatchers] Extend hasName matcher when matching templates (PR #100349)

2024-07-26 Thread Nathan James via cfe-commits
https://github.com/njames93 updated https://github.com/llvm/llvm-project/pull/100349 >From a81c1b2ee0bd0d0622abf1d5ec06846a2e2e3a27 Mon Sep 17 00:00:00 2001 From: Nathan James Date: Wed, 24 Jul 2024 12:43:39 +0100 Subject: [PATCH] [ASMMatchers] Extend hasName matcher when matching templates Al

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-07-26 Thread via cfe-commits
https://github.com/skc7 updated https://github.com/llvm/llvm-project/pull/99439 >From 2bcca883eae902238cb49d44ed24aa1304364646 Mon Sep 17 00:00:00 2001 From: skc7 Date: Thu, 18 Jul 2024 11:49:24 +0530 Subject: [PATCH] [Sanitizer] Make sanitizer passes idempotent. --- clang/test/CodeGenObjC/no-

[clang] [Clang] fix generic lambda inside requires-clause of friend function template (PR #99813)

2024-07-26 Thread Zhikai Zeng via cfe-commits
@@ -1691,10 +1691,7 @@ class ConstraintRefersToContainingTemplateChecker using inherited::TransformTemplateTypeParmType; QualType TransformTemplateTypeParmType(TypeLocBuilder &TLB, TemplateTypeParmTypeLoc TL, bool) { -assert(TL.g

[clang] [Clang] fix generic lambda inside requires-clause of friend function template (PR #99813)

2024-07-26 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght updated https://github.com/llvm/llvm-project/pull/99813 >From 5d7f291e35930e07f52a7ac17a09f93690b64def Mon Sep 17 00:00:00 2001 From: Backl1ght Date: Sun, 21 Jul 2024 23:43:24 +0800 Subject: [PATCH 1/2] fix --- clang/docs/ReleaseNotes.rst | 2 ++

[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)

2024-07-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr commented: ![Screenshot from 2024-07-27 07-04-02](https://github.com/user-attachments/assets/5a7c4b26-2c68-4bb1-8480-4b7ff9e4be87) The three regressions all have similar stack traces: ``` #5 0x0bba9f4c clang::Redeclarable::getFirstDecl() /home/fedora/interp

[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)

2024-07-26 Thread Timm Baeder via cfe-commits
@@ -14,33 +14,29 @@ struct DelBase { constexpr DelBase() = delete; // expected-note {{'DelBase' has been explicitly marked deleted here}} tbaederr wrote: The second bullet point of the comment at the top of the file is obsolete now. https://github.com/llvm/l

[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)

2024-07-26 Thread Timm Baeder via cfe-commits
@@ -122,22 +122,20 @@ static bool CheckFieldsInitialized(InterpState &S, SourceLocation Loc, } // Check Fields in all bases - for (const Record::Base &B : R->bases()) { + unsigned BaseIndex = 0; + const CXXRecordDecl *CD = dyn_cast(R->getDecl()); tbaed

[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)

2024-07-26 Thread Timm Baeder via cfe-commits
@@ -122,22 +122,20 @@ static bool CheckFieldsInitialized(InterpState &S, SourceLocation Loc, } // Check Fields in all bases - for (const Record::Base &B : R->bases()) { + unsigned BaseIndex = 0; + const CXXRecordDecl *CD = dyn_cast(R->getDecl()); tbaed

[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)

2024-07-26 Thread Timm Baeder via cfe-commits
@@ -122,22 +122,20 @@ static bool CheckFieldsInitialized(InterpState &S, SourceLocation Loc, } // Check Fields in all bases - for (const Record::Base &B : R->bases()) { + unsigned BaseIndex = 0; + const CXXRecordDecl *CD = dyn_cast(R->getDecl()); + for (const CXXBaseS

[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)

2024-07-26 Thread Timm Baeder via cfe-commits
@@ -122,22 +122,20 @@ static bool CheckFieldsInitialized(InterpState &S, SourceLocation Loc, } // Check Fields in all bases - for (const Record::Base &B : R->bases()) { + unsigned BaseIndex = 0; + const CXXRecordDecl *CD = dyn_cast(R->getDecl()); + for (const CXXBaseS

[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)

2024-07-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/100761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-26 Thread via cfe-commits
https://github.com/akshaykumars614 updated https://github.com/llvm/llvm-project/pull/100177 >From a9850211dae37e5b3d0cbbaf7eb25435ad8810f9 Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Tue, 23 Jul 2024 14:32:24 -0400 Subject: [PATCH 1/4] clang-tidy: readability-redundant-smartptr-get doe

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

2024-07-26 Thread via cfe-commits
https://github.com/akshaykumars614 updated https://github.com/llvm/llvm-project/pull/100177 >From a9850211dae37e5b3d0cbbaf7eb25435ad8810f9 Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Tue, 23 Jul 2024 14:32:24 -0400 Subject: [PATCH 1/3] clang-tidy: readability-redundant-smartptr-get doe

[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)

2024-07-26 Thread Phoebe Wang via cfe-commits
@@ -1185,6 +1189,9 @@ Currently, only the following parameter attributes are defined: value should be sign-extended to the extent required by the target's ABI (which is usually 32-bits) by the caller (for a parameter) or the callee (for a return value). +``noext``

[libunwind] [libunwind] fix unwinding from signal handler (PR #92291)

2024-07-26 Thread David Tenty via cfe-commits
daltenty wrote: This is breaking a number of tests for the UBSAN on AIX, the traceback produced by the runtime are no longer correct. Before this change: ``` UndefinedBehaviorSanitizer:DEADLYSIGNAL ==52887862==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x (pc 0x1784

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-26 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Building abseil-cpp with the new Clang runs into errors. Are they expected? Nevermind, that's a different failure. Still investigating. https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang-format] Handle parenthesized list in RemoveParentheses (PR #100852)

2024-07-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Also, reformat clang-format source to remove redundant parentheses enclosing single list items. Fixes #100768. --- Full diff: https://github.com/llvm/llvm-project/pull/100852.diff 4 Files Affected: - (

[clang] [clang-format] Handle parenthesized list in RemoveParentheses (PR #100852)

2024-07-26 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/100852 Also, reformat clang-format source to remove redundant parentheses enclosing single list items. Fixes #100768. >From f06f3ab5e59217348e72179c9581be338efa8789 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri,

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-26 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Building abseil-cpp with the new Clang runs into errors. Are they expected? Did you test the version I just pushed 25 minutes ago? I believe these particular breakages should be fixed there. We just implemented a rule change to account for the string_view failures, but in an

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-26 Thread Fangrui Song via cfe-commits
MaskRay wrote: Building abseil-cpp with the new Clang runs into errors. Are they expected? ```sh git clone https://github.com/abseil/abseil-cpp/ cd abseil-cpp cmake -GNinja -S. -Bout/release -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=/tmp/Rel/bin/clang++ -DCMAKE_C_COMPILER=/tmp/Rel/bin/cla

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [BOLT][DWARF][NFC] Add tests to check with an increased batch size (PR #100851)

2024-07-26 Thread Sayhaan Siddiqui via cfe-commits
https://github.com/sayhaan created https://github.com/llvm/llvm-project/pull/100851 Adds tests to check debug_ranges with an increased batch size and sets previous test's batch size at 1 to prevent a functional change. >From ace8031ce49898d2f59b32eb07f2208461da9028 Mon Sep 17 00:00:00 2001 Fro

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/100692 >From 1aa99ba557fd563dc55c9cd4c6d8ce7f05b3bd6d Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 24 Jul 2024 03:59:41 -0300 Subject: [PATCH] [clang] check deduction consistency when partial ordering fu

[clang] [flang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-07-26 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,162 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++23 \ +// RUN: -DWIN -emit-llvm -o - %s | FileCheck %s --check-prefixes=WIN + +// RUN: %clang_cc

[clang] [Modules] Fix using `va_list` with modules and a precompiled header. (PR #100837)

2024-07-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Volodymyr Sapsai (vsapsai) Changes Fix the false warning > incompatible pointer types passing 'va_list' (aka '__builtin_va_list') to parameter of type 'struct __va_list_tag *' [-Wincompatible-pointer-types] The warning is wrong because bo

[clang] [Modules] Fix using `va_list` with modules and a precompiled header. (PR #100837)

2024-07-26 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/100837 Fix the false warning > incompatible pointer types passing 'va_list' (aka '__builtin_va_list') to > parameter of type 'struct __va_list_tag *' [-Wincompatible-pointer-types] The warning is wrong because both in

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-07-26 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 01/11] [clang-tidy] Add bugprone-move-shared-pointer-contents chec

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-07-26 Thread via cfe-commits
@@ -0,0 +1,22 @@ +.. title:: clang-tidy - bugprone-move-shared-pointer-contents + +bugprone-move-shared-pointer-contents += + + +Detects calls to move the contents out of a ``std::shared_ptr`` rather +than moving the pointer itself. In other wor

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-07-26 Thread via cfe-commits
pizzud wrote: Should be resolved now. Thanks for your patience. https://github.com/llvm/llvm-project/pull/67467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-07-26 Thread via cfe-commits
@@ -0,0 +1,125 @@ +// RUN: %check_clang_tidy %s bugprone-move-shared-pointer-contents %t -- -config="{CheckOptions: {bugprone-move-shared-pointer-contents.SharedPointerClasses: '::std::shared_ptr;my::OtherSharedPtr;'}}" + +// Some dummy definitions we'll need. + +namespace std

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-07-26 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 01/10] [clang-tidy] Add bugprone-move-shared-pointer-contents chec

[clang] [clang-tools-extra] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-07-26 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 01/10] [clang-tidy] Add bugprone-move-shared-pointer-contents chec

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-07-26 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 1/9] [clang-tidy] Add bugprone-move-shared-pointer-contents check.

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-07-26 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 1/8] [clang-tidy] Add bugprone-move-shared-pointer-contents check.

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-07-26 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 1/7] [clang-tidy] Add bugprone-move-shared-pointer-contents check.

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-07-26 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > > @MaskRay can you talk more about your concerns? This won't affect compile > > time, and instrumenting a shadow load will cause an immediate crash of the > > application at runtime. This patch seems much more robust than counting on > > toolchains to always arrange to avoi

[clang] dbb8b7a - Reapply "[OpenMP][libc] Remove special handling for OpenMP printf (#98940)"

2024-07-26 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2024-07-26T17:21:56-05:00 New Revision: dbb8b7a0f4eea1aa333cec9a38aa6eb7ecf6c1dc URL: https://github.com/llvm/llvm-project/commit/dbb8b7a0f4eea1aa333cec9a38aa6eb7ecf6c1dc DIFF: https://github.com/llvm/llvm-project/commit/dbb8b7a0f4eea1aa333cec9a38aa6eb7ecf6c1dc.diff

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-07-26 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > In the worse case we need this, I'd hope that this is target-specific. What does this mean? https://github.com/llvm/llvm-project/pull/99439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-07-26 Thread Fangrui Song via cfe-commits
MaskRay wrote: > @MaskRay can you talk more about your concerns? This won't affect compile > time, and instrumenting a shadow load will cause an immediate crash of the > application at runtime. This patch seems much more robust than counting on > toolchains to always arrange to avoid double in

[clang] [libcxx] [clang] Add -Wimplicit-fallthrough to -Wextra (PR #97926)

2024-07-26 Thread Max Coplan via cfe-commits
Max =?utf-8?b?8J+RqPCfj73igI3wn5K7?= Copl Message-ID: In-Reply-To: vegerot wrote: @AaronBallman I stacked this diff on top of #100821 to remove that build error. https://github.com/llvm/llvm-project/pull/97926 ___ cfe-commits mailing list cfe-commits

[clang] [libcxx] [clang] Add -Wimplicit-fallthrough to -Wextra (PR #97926)

2024-07-26 Thread Max Coplan via cfe-commits
Max =?utf-8?b?8J+RqPCfj73igI3wn5K7?= Copl Message-ID: In-Reply-To: https://github.com/vegerot updated https://github.com/llvm/llvm-project/pull/97926 >From eb83d32dcf26cf5a8f749400beaccf6688b9107d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20=F0=9F=91=A8=F0=9F=8F=BD=E2=80=8D=F0=9F=92=BB=20Co

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-26 Thread Chris B via cfe-commits
@@ -8001,6 +8001,12 @@ NamedDecl *Sema::ActOnVariableDeclarator( } } + if (getLangOpts().HLSL) { +if (R->isHLSLSpecificType() && !NewVD->isImplicit()) { + Diag(D.getBeginLoc(), diag::err_hlsl_intangible_type_cannot_be_declared); llvm-beanz wrot

[clang] [HLSL][NFC] Initialize DiagnoseHLSLAvailability members (PR #100778)

2024-07-26 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/100778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] {CXXDefaultArgExpr, CXXDefaultInitExpr}::hasRewrittenInit return true iff the init expression was really rebuild (PR #99748)

2024-07-26 Thread Shafik Yaghmour via cfe-commits
@@ -1579,11 +1579,11 @@ void JSONNodeDumper::VisitMaterializeTemporaryExpr( } void JSONNodeDumper::VisitCXXDefaultArgExpr(const CXXDefaultArgExpr *Node) { - attributeOnlyIfTrue("hasRewrittenInit", Node->hasRewrittenInit()); + JOS.attribute("hasRewrittenInit", Node->hasRewrit

[clang] [Clang][AST] {CXXDefaultArgExpr, CXXDefaultInitExpr}::hasRewrittenInit return true iff the init expression was really rebuild (PR #99748)

2024-07-26 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/99748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] {CXXDefaultArgExpr, CXXDefaultInitExpr}::hasRewrittenInit return true iff the init expression was really rebuild (PR #99748)

2024-07-26 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: The code mostly makes sense, can we update the summary to clarify the goal of this change? This is what goes in the git log and it is important this is detailed enough to understand the change w/o looking at the details of the change itself. https://github

[clang] [libc] [Clang] Suppress missing architecture error when doing LTO (PR #100652)

2024-07-26 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/100652 >From 5017fe0cc33af9b7731786122c21602258b51c9a Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 25 Jul 2024 15:40:40 -0500 Subject: [PATCH 1/2] [Clang] Suppress missing architecture error when doing LTO

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread via cfe-commits
@@ -10897,6 +10902,53 @@ Attr *Sema::getImplicitCodeSegOrSectionAttrForFunction(const FunctionDecl *FD, return nullptr; } +// Should only be called when getFunctionEffects() returns a non-empty set. +// Decl should be a FunctionDecl or BlockDecl. +void Sema::maybeAddDeclWit

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread Doug Wyatt via cfe-commits
@@ -10897,6 +10902,53 @@ Attr *Sema::getImplicitCodeSegOrSectionAttrForFunction(const FunctionDecl *FD, return nullptr; } +// Should only be called when getFunctionEffects() returns a non-empty set. +// Decl should be a FunctionDecl or BlockDecl. +void Sema::maybeAddDeclWit

[clang] fea5914 - Revert "[OpenMP][libc] Remove special handling for OpenMP printf (#98940)"

2024-07-26 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2024-07-26T16:39:12-05:00 New Revision: fea5914c926e2f013a8b5e27eaa74c7047fb2c71 URL: https://github.com/llvm/llvm-project/commit/fea5914c926e2f013a8b5e27eaa74c7047fb2c71 DIFF: https://github.com/llvm/llvm-project/commit/fea5914c926e2f013a8b5e27eaa74c7047fb2c71.diff

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-26 Thread Helena Kotas via cfe-commits
@@ -8001,6 +8001,12 @@ NamedDecl *Sema::ActOnVariableDeclarator( } } + if (getLangOpts().HLSL) { +if (R->isHLSLSpecificType() && !NewVD->isImplicit()) { + Diag(D.getBeginLoc(), diag::err_hlsl_intangible_type_cannot_be_declared); hekota wrote:

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-07-26 Thread Helena Kotas via cfe-commits
@@ -290,3 +294,296 @@ void SemaHLSL::DiagnoseAttrStageMismatch( << A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage) << (AllowedStages.size() != 1) << join(StageStrings, ", "); } + +namespace { + +/// This class implements HLSL availability diagnostics for default

[clang] [clang][Driver] Support passing arbitrary args to -cc1as with -Xclangas. (PR #100714)

2024-07-26 Thread Fangrui Song via cfe-commits
MaskRay wrote: I closed #52878 as working as intended. I think zig should specify a different `-mcpu=` or `-march=`. Sorry but I've closed the feature request #97517 as I don't think Clang can sign up addressing a potential surge of compatibility issues "please remove the incompatible target-

[clang] [HLSL][NFC] Initialize DiagnoseHLSLAvailability members (PR #100778)

2024-07-26 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/100778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Initialize DiagnoseHLSLAvailability members (PR #100778)

2024-07-26 Thread Helena Kotas via cfe-commits
hekota wrote: > Does this have any behavior change that can be tested? No, it does not. I'll add [NFC] to the title. https://github.com/llvm/llvm-project/pull/100778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [HLSL] Initialize DiagnoseHLSLAvailability members (PR #100778)

2024-07-26 Thread Chris B via cfe-commits
llvm-beanz wrote: Does this have any behavior change that can be tested? https://github.com/llvm/llvm-project/pull/100778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-26 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/98940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 069e8bc - [OpenMP][libc] Remove special handling for OpenMP printf (#98940)

2024-07-26 Thread via cfe-commits
Author: Joseph Huber Date: 2024-07-26T16:03:36-05:00 New Revision: 069e8bcd82c4420239f95c7e6a09e1f756317cfc URL: https://github.com/llvm/llvm-project/commit/069e8bcd82c4420239f95c7e6a09e1f756317cfc DIFF: https://github.com/llvm/llvm-project/commit/069e8bcd82c4420239f95c7e6a09e1f756317cfc.diff

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread Doug Wyatt via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

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

2024-07-26 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/98940 >From 9195ed11dde78e04c831a5bcb6f9c1cc0e6f0304 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 15 Jul 2024 12:42:09 -0500 Subject: [PATCH] [OpenMP][libc] Remove special handling for OpenMP printf Summary:

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-07-26 Thread via cfe-commits
b-sumner wrote: @MaskRay can you talk more about your concerns? This won't affect compile time, and instrumenting a shadow load will cause an immediate crash of the application at runtime. This seems much more robust than counting on toolchains to always arrange to avoid double instrumentati

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread via cfe-commits
@@ -873,30 +873,17 @@ class Sema final : public SemaBase { /// Warn when implicitly casting 0 to nullptr. void diagnoseZeroToNullptrConversion(CastKind Kind, const Expr *E); - // - function effects --- + /// All functions/lambdas/blocks which have bodies and which ha

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-07-26 Thread Fangrui Song via cfe-commits
MaskRay wrote: In the worse case we need this, I'd hope that this is target-specific. https://github.com/llvm/llvm-project/pull/99439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-07-26 Thread Fangrui Song via cfe-commits
MaskRay wrote: > all previous proposals to add such "re-run" protection ended up with "the > pipeline is wrong". But implementation is so trivial, so I don't mind just to > have it implemented. While the implementation is trivial, I also share the concern whether sanitizers should do this. Th

[clang] [llvm] [APFloat] Add support for f8E3M4 IEEE 754 type (PR #99698)

2024-07-26 Thread Thomas Raoux via cfe-commits
https://github.com/ThomasRaoux approved this pull request. I'm not particularly familiar with this format but the changes look reasonable and consistent with the other formats. LGTM https://github.com/llvm/llvm-project/pull/99698 ___ cfe-commits maili

[clang] [clang] Check inline defs when emitting speculative vtable (PR #100785)

2024-07-26 Thread Fabian Parzefall via cfe-commits
FPar wrote: Yes, certainly! The example below demonstrates a case where the `available_externally` vtable mismatches the actual definition, and holds a reference to a symbol that does not exist in the final program. You can see the mismatch by compiling with `-O1 -flto=thin`. The generated LL

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

2024-07-26 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/98940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-26 Thread Matheus Izvekov via cfe-commits
@@ -5399,11 +5434,85 @@ static QualType GetImplicitObjectParameterType(ASTContext &Context, return Context.getLValueReferenceType(RawType); } +static TemplateDeductionResult FinishTemplateArgumentDeduction( +Sema &S, FunctionTemplateDecl *FTD, int ArgIdx, QualType P, Qu

[clang] [HLSL] Initialize DiagnoseHLSLAvailability members (PR #100778)

2024-07-26 Thread Helena Kotas via cfe-commits
@@ -650,7 +650,10 @@ class DiagnoseHLSLAvailability bool HasMatchingEnvironmentOrNone(const AvailabilityAttr *AA); public: - DiagnoseHLSLAvailability(Sema &SemaRef) : SemaRef(SemaRef) {} + DiagnoseHLSLAvailability(Sema &SemaRef) + : SemaRef(SemaRef), +CurrentS

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

2024-07-26 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Do we have the varargs handling pass run even with O0? Yes, it's a mandatory pass for NVPTX and AMDGPU. I added an extra pass in LTO recently just to let vararg functions be inlined, it's not necessary for correctness. https://github.com/llvm/llvm-project/pull/98940 _

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-07-26 Thread via cfe-commits
b-sumner wrote: LGTM https://github.com/llvm/llvm-project/pull/99439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-26 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: Do we have the varargs handling pass run even with O0? https://github.com/llvm/llvm-project/pull/98940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

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

2024-07-26 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/98940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-26 Thread Matheus Izvekov via cfe-commits
@@ -5399,11 +5434,85 @@ static QualType GetImplicitObjectParameterType(ASTContext &Context, return Context.getLValueReferenceType(RawType); } +static TemplateDeductionResult FinishTemplateArgumentDeduction( +Sema &S, FunctionTemplateDecl *FTD, int ArgIdx, QualType P, Qu

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread Doug Wyatt via cfe-commits
@@ -873,30 +873,17 @@ class Sema final : public SemaBase { /// Warn when implicitly casting 0 to nullptr. void diagnoseZeroToNullptrConversion(CastKind Kind, const Expr *E); - // - function effects --- + /// All functions/lambdas/blocks which have bodies and which ha

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/99656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread Doug Wyatt via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-07-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. LGTM, but please git some time others to respond https://github.com/llvm/llvm-project/pull/99439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [clang][Driver] Support passing arbitrary args to -cc1as with -Xclangas. (PR #100714)

2024-07-26 Thread Alex Rønne Petersen via cfe-commits
https://github.com/alexrp edited https://github.com/llvm/llvm-project/pull/100714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Support passing arbitrary args to -cc1as with -Xclangas. (PR #100714)

2024-07-26 Thread Alex Rønne Petersen via cfe-commits
https://github.com/alexrp updated https://github.com/llvm/llvm-project/pull/100714 From 63d2e2bb4836ca46b4d48958c253263ec624a638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Fri, 26 Jul 2024 09:40:42 +0200 Subject: [PATCH] [clang][Driver] Support passing arbitra

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-07-26 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > > ThreadSanitizer is missing > > Have added the flag for tsan-module, But not sure about tsan, which is > function pass. How do we make that idempotent? We merged Module and function passes for other sanitizers, and we should do for tsan as well. So implementing for module

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread Doug Wyatt via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] [llvm] Finish deleting the le32/le64 targets (PR #98497)

2024-07-26 Thread Steven Johnson via cfe-commits
steven-johnson wrote: Note that Halide has removed its dependency on the le32/le64 targets as of https://github.com/halide/Halide/pull/8344. https://github.com/llvm/llvm-project/pull/98497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread Doug Wyatt via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/99656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/99656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread Doug Wyatt via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] [libcxx] Reapply "[Clang] Implement resolution for CWG1835 (#92957, #98547)" (PR #100425)

2024-07-26 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: > I am still concerned about the double error on the `t.A<1 < 4>::x` example. The ideal outcome would be to turn the second error into a note. How feasible to fix you think that is? That's trivial to fix, just need to add a note variant of the "missing template" diagnostic.

[clang] [clang-tools-extra] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-26 Thread Matheus Izvekov via cfe-commits
@@ -5425,34 +5534,112 @@ static bool isAtLeastAsSpecializedAs(Sema &S, SourceLocation Loc, // the partial ordering is done: TemplateDeductionInfo Info(Loc); switch (TPOC) { - case TPOC_Call: + case TPOC_Call: { if (DeduceTemplateArguments(S, TemplateParams, Args

[clang] [clang] Check inline defs when emitting speculative vtable (PR #100785)

2024-07-26 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Can you give a self-contained example that shows why this is a problem? (I mean, I can imagine there could be some interaction that causes issues, but I'm not sure what that interaction is, in this context.) https://github.com/llvm/llvm-project/pull/100785 ___

[clang] [clang-tools-extra] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-26 Thread Matheus Izvekov via cfe-commits
@@ -5399,11 +5434,85 @@ static QualType GetImplicitObjectParameterType(ASTContext &Context, return Context.getLValueReferenceType(RawType); } +static TemplateDeductionResult FinishTemplateArgumentDeduction( +Sema &S, FunctionTemplateDecl *FTD, int ArgIdx, QualType P, Qu

[clang] [clang-tools-extra] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-26 Thread Matheus Izvekov via cfe-commits
@@ -5399,11 +5434,85 @@ static QualType GetImplicitObjectParameterType(ASTContext &Context, return Context.getLValueReferenceType(RawType); } +static TemplateDeductionResult FinishTemplateArgumentDeduction( +Sema &S, FunctionTemplateDecl *FTD, int ArgIdx, QualType P, Qu

[clang] [clang-tools-extra] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-26 Thread Matheus Izvekov via cfe-commits
@@ -859,8 +861,10 @@ class PackDeductionScope { // by this pack expansion, then clear out the deduction. DeducedFromEarlierParameter = !Deduced[Index].isNull(); DeducedPack Pack(Index); -Pack.Saved = Deduced[Index]; -Deduced[Index] = TemplateArgument(); +

[clang] [clang-tools-extra] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-26 Thread Matheus Izvekov via cfe-commits
@@ -5346,7 +5346,6 @@ static EvalStmtResult EvaluateStmt(StmtResult &Result, EvalInfo &Info, const Expr *RetExpr = cast(S)->getRetValue(); FullExpressionRAII Scope(Info); if (RetExpr && RetExpr->isValueDependent()) { - EvaluateDependentExpr(RetExpr, Info); ---

  1   2   3   4   >