[clang] [clang][dataflow] Handle this-capturing lambdas in field initializers. (PR #99519)

2024-07-18 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/99519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] fix crash in include cleaner (PR #99514)

2024-07-18 Thread Yuxuan Shui via cfe-commits
https://github.com/yshui updated https://github.com/llvm/llvm-project/pull/99514 >From 93b2fec10a374fd09b128a70052f9a17c176aa20 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Thu, 18 Jul 2024 16:07:45 +0100 Subject: [PATCH] [clangd] [IncludeCleaner] Use correct file ID --- clang-tools-extra/

[clang-tools-extra] [clangd] fix crash in include cleaner (PR #99514)

2024-07-18 Thread Yuxuan Shui via cfe-commits
yshui wrote: Looks like I definitely don't understand what's going on. Instead let me try a more conservative fix. This should preserve what the current code is doing and just fix the assertion failure. https://github.com/llvm/llvm-project/pull/99514 ___

[clang-tools-extra] [clangd] fix crash in include cleaner (PR #99514)

2024-07-18 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 7e6a73959ae97b1f9476a90290a492ba90cb950d 93b2fec10a374fd09b128a70052f9a17c176aa20 --e

[clang] [clang][dataflow] Handle this-capturing lambdas in field initializers. (PR #99519)

2024-07-18 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/99519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] Ignore import/include directives with missing filenames (PR #99520)

2024-07-18 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/99520 Previously source input like `#import ` resulted in infinite calls append the same token into `CurDirTokens`. This patch now ignores those directive lines if they won't actually end up being compiled. (e.g.

[clang] [clang-scan-deps] Ignore import/include directives with missing filenames (PR #99520)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes Previously source input like `#import ` resulted in infinite calls append the same token into `CurDirTokens`. This patch now ignores those directive lines if they won't actually end up being compiled. (e

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

2024-07-18 Thread via cfe-commits
zeroomega wrote: Hi, This test introduced TimeProfilerTest and it is currently breaking on windows. It looks like related to the path separator. Error message: ``` Script: -- C:\b\s\w\ir\x\w\llvm_build\tools\clang\unittests\Support\.\ClangSupportTests.exe --gtest_filter=TimeProfilerTest.Templ

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-18 Thread Matheus Izvekov via cfe-commits
@@ -23,3 +23,104 @@ namespace PR41576 { } static_assert(f(3, 4) == 6); // expected-note {{instantiation}} } + +namespace PR85667 { + +template +struct identity { + using type = T; +}; + +template void f() { + + static_assert([](Is... x) { +return ([I(x)] { + re

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-18 Thread Matheus Izvekov via cfe-commits
@@ -14636,6 +14645,20 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { /*IsInstantiation*/ true); SavedContext.pop(); + // Parts other than the capture e.g. the lambda body might still contain a + // pattern that an outer fold exp

[clang] 8c8e0dd - [clang][Interp][test] Use fixed triple in cxx11 test

2024-07-18 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-07-18T18:25:08+02:00 New Revision: 8c8e0ddae96882247717b8ae1739abcf09726eab URL: https://github.com/llvm/llvm-project/commit/8c8e0ddae96882247717b8ae1739abcf09726eab DIFF: https://github.com/llvm/llvm-project/commit/8c8e0ddae96882247717b8ae1739abcf09726eab.diff LO

[clang] [FMV][AArch64] Do not optimize away runtime checks for implied features (PR #99522)

2024-07-18 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/99522 When generating the body of the ifunc resolver, clang skips runtime checks for features that are implied from the command line. We bend this rule for certain features (memtag, bti, dgh), but this happens quite

[clang] [FMV][AArch64] Do not optimize away runtime checks for implied features (PR #99522)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexandros Lamprineas (labrinea) Changes When generating the body of the ifunc resolver, clang skips runtime checks for features that are implied from the command line. We bend this rule for certain features (memtag, bti, dgh), but this h

[clang] [FMV][AArch64] Do not optimize away runtime checks for implied features (PR #99522)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Alexandros Lamprineas (labrinea) Changes When generating the body of the ifunc resolver, clang skips runtime checks for features that are implied from the command line. We bend this rule for certain features (memtag, bti, dgh), bu

[clang] [clang-format] Fix a bug in annotating `*` in `#define`s (PR #99433)

2024-07-18 Thread Hirofumi Nakamura via cfe-commits
hnakamura5 wrote: This change certainly fixes the issue, but also seems specific for the reported code. For example it does not work well for the case the line contains something else as, ``` #define FN(N) void fn(void *addr) { a + f(addr, 0, N * two); } ``` This results the annotations where

[clang-tools-extra] [clangd] fix crash in include cleaner (PR #99514)

2024-07-18 Thread Yuxuan Shui via cfe-commits
https://github.com/yshui updated https://github.com/llvm/llvm-project/pull/99514 >From 08083ebb5637b84426afd059ee162cf085bfa823 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Thu, 18 Jul 2024 16:07:45 +0100 Subject: [PATCH] [clangd] [IncludeCleaner] Use correct file ID --- clang-tools-extra/

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-07-18 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/99477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-07-18 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: I agree that this should be off by default or the guidelines have to be amended if this is to be on by default. It sounds to me like the enforcement of the rule does not account for having a forwarding reference as a parameter and using it instead of for

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-07-18 Thread Julian Schmidt via cfe-commits
@@ -129,15 +129,19 @@ void MissingStdForwardCheck::registerMatchers(MatchFinder *Finder) { unless(anyOf(hasAncestor(typeLoc()), hasAncestor(expr(hasUnevaluatedContext()); + auto StaticCast = cxxStaticCastExpr( + hasSourceExpression(declRefEx

[clang] [APINotes] Support annotating C++ methods (PR #99512)

2024-07-18 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. Minor nit on naming, don't think it matters. https://github.com/llvm/llvm-project/pull/99512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [APINotes] Support annotating C++ methods (PR #99512)

2024-07-18 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd edited https://github.com/llvm/llvm-project/pull/99512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Support annotating C++ methods (PR #99512)

2024-07-18 Thread Saleem Abdulrasool via cfe-commits
@@ -794,6 +831,33 @@ void APINotesWriter::Implementation::writeObjCMethodBlock( } } +void APINotesWriter::Implementation::writeCXXMethodBlock( +llvm::BitstreamWriter &Stream) { + llvm::BCBlockRAII Scope(Stream, CXX_METHOD_BLOCK_ID, 3); + + if (CXXMethods.empty()) +

[clang-tools-extra] [clang-tidy][NFC] Fix gsl::not_null template parameter (PR #99472)

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

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

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

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-18 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: Just a couple of nits, I will do a more comprehensive review later. https://github.com/llvm/llvm-project/pull/98788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-18 Thread Matheus Izvekov via cfe-commits
@@ -980,19 +986,69 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +// Build the type for a deduction guide generated from an inherited constructor +// [over.match.class.deduct]p1.10: +// ... the

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-18 Thread Matheus Izvekov via cfe-commits
@@ -1254,8 +1341,221 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(SemaR

[clang] 1c55586 - [clang] Fix typo in comments

2024-07-18 Thread Cyndy Ishida via cfe-commits
Author: Cyndy Ishida Date: 2024-07-18T10:12:36-07:00 New Revision: 1c55586e9a475a09b7d769e7fc9a254e7150c972 URL: https://github.com/llvm/llvm-project/commit/1c55586e9a475a09b7d769e7fc9a254e7150c972 DIFF: https://github.com/llvm/llvm-project/commit/1c55586e9a475a09b7d769e7fc9a254e7150c972.diff

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

2024-07-18 Thread Petr Hosek via cfe-commits
@@ -0,0 +1,34 @@ +#=== +# Define targets for linking against the selected C library +# +# After including this file, the following targets are defined: +# - libcxx-libc-headers: An interface target that al

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-07-18 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/97308 >From 9c4a7dae3ab2cb58708e39317a1c8f19b3709eb2 Mon Sep 17 00:00:00 2001 From: yronglin Date: Mon, 1 Jul 2024 23:20:58 +0800 Subject: [PATCH] Reapply "[Clang][CWG1815] Support lifetime extension of temporary cre

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-07-18 Thread via cfe-commits
https://github.com/yronglin ready_for_review https://github.com/llvm/llvm-project/pull/97308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-07-18 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/97308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes The PR reapply https://github.com/llvm/llvm-project/pull/92527. Implemented CWG1815 and fixed the bugs mentioned in the comments of https://github.com/llvm/llvm-project/pull/92527 and https://github.com/llvm/llvm-

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

2024-07-18 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM. I think all the concerns have been addressed. Give it until tomorrow before landing in case @ChuanqiXu9 @Bigcheese @AaronBallman have additional comments Thanks a lot https://github.com/llvm/llvm-project/pull/90574

[clang] [APINotes] Support annotating C++ methods (PR #99512)

2024-07-18 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/99512 >From 117596b16e143e44c2b6c17184840490490e16a7 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Thu, 18 Jul 2024 15:49:24 +0100 Subject: [PATCH] [APINotes] Support annotating C++ methods This adds support for a

[clang] [APINotes] Support annotating C++ methods (PR #99512)

2024-07-18 Thread Egor Zhdan via cfe-commits
@@ -794,6 +831,33 @@ void APINotesWriter::Implementation::writeObjCMethodBlock( } } +void APINotesWriter::Implementation::writeCXXMethodBlock( +llvm::BitstreamWriter &Stream) { + llvm::BCBlockRAII Scope(Stream, CXX_METHOD_BLOCK_ID, 3); + + if (CXXMethods.empty()) +

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-07-18 Thread via cfe-commits
yronglin wrote: There still has a experimental-new-constant-interpreter issue need fix. https://github.com/llvm/llvm-project/pull/97308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-18 Thread via cfe-commits
yronglin wrote: Thank you, I can't finish this PR without your help. https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-18 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/99287 >From 7d7a7882b713e056f9194b2dd7d792fb9bb86bb5 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 17 Jul 2024 00:32:39 -0700 Subject: [PATCH 1/3] [libc][libcxx] Support for building libc++ against LLVM libc

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

2024-07-18 Thread Petr Hosek via cfe-commits
@@ -27,6 +27,9 @@ if (NOT LIBCXX_USE_COMPILER_RT) endif() endif() +check_cxx_compiler_flag(-nostdlibinc CXX_SUPPORTS_NOSTDLIBINC_FLAG) +check_cxx_compiler_flag(-nolibc CXX_SUPPORTS_NOLIBC_FLAG) petrhosek wrote: They're used now that I moved `-nostdlibinc` a

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

2024-07-18 Thread Petr Hosek via cfe-commits
@@ -784,6 +794,10 @@ config_define_if_not(LIBCXX_ENABLE_WIDE_CHARACTERS _LIBCPP_HAS_NO_WIDE_CHARACTER config_define_if_not(LIBCXX_ENABLE_TIME_ZONE_DATABASE _LIBCPP_HAS_NO_TIME_ZONE_DATABASE) config_define_if_not(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS _LIBCPP_HAS_NO_VEN

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

2024-07-18 Thread Petr Hosek via cfe-commits
@@ -0,0 +1,34 @@ +#=== +# Define targets for linking against the selected C library +# +# After including this file, the following targets are defined: +# - libcxx-libc-headers: An interface target that al

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

2024-07-18 Thread Petr Hosek via cfe-commits
@@ -226,6 +226,15 @@ set(LIBCXX_ABI_DEFINES "" CACHE STRING "A semicolon separated list of ABI macros set(LIBCXX_EXTRA_SITE_DEFINES "" CACHE STRING "Extra defines to add into __config_site") option(LIBCXX_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF) +# C Library

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

2024-07-18 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/99287 >From 7d7a7882b713e056f9194b2dd7d792fb9bb86bb5 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 17 Jul 2024 00:32:39 -0700 Subject: [PATCH 1/4] [libc][libcxx] Support for building libc++ against LLVM libc

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

2024-07-18 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/99287 >From 7d7a7882b713e056f9194b2dd7d792fb9bb86bb5 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 17 Jul 2024 00:32:39 -0700 Subject: [PATCH 1/5] [libc][libcxx] Support for building libc++ against LLVM libc

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

2024-07-18 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/99287 >From 7d7a7882b713e056f9194b2dd7d792fb9bb86bb5 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 17 Jul 2024 00:32:39 -0700 Subject: [PATCH 1/6] [libc][libcxx] Support for building libc++ against LLVM libc

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

2024-07-18 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/99287 >From 7d7a7882b713e056f9194b2dd7d792fb9bb86bb5 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 17 Jul 2024 00:32:39 -0700 Subject: [PATCH 1/7] [libc][libcxx] Support for building libc++ against LLVM libc

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

2024-07-18 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/99287 >From 7d7a7882b713e056f9194b2dd7d792fb9bb86bb5 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 17 Jul 2024 00:32:39 -0700 Subject: [PATCH 1/7] [libc][libcxx] Support for building libc++ against LLVM libc

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

2024-07-18 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/99534 Reverts llvm/llvm-project#98320 Breaks windows tests: ``` Step 8 (test-build-unified-tree-check-clang-unit) failure: test (failure) TEST 'Clang-Unit :: Support/./ClangSupportTests.exe/1/3' FAI

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

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-support @llvm/pr-subscribers-clang-driver Author: Utkarsh Saxena (usx95) Changes Reverts llvm/llvm-project#98320 Breaks windows tests: ``` Step 8 (test-build-unified-tree-check-clang-unit) failure: test (failure) TEST 'Clang-U

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

2024-07-18 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/99534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 04bcd74 - Revert "Add source file name for template instantiations in -ftime-trace" (#99534)

2024-07-18 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2024-07-18T19:49:01+02:00 New Revision: 04bcd74df73af6fed16bfd0d6784fc0aec582bc0 URL: https://github.com/llvm/llvm-project/commit/04bcd74df73af6fed16bfd0d6784fc0aec582bc0 DIFF: https://github.com/llvm/llvm-project/commit/04bcd74df73af6fed16bfd0d6784fc0aec582bc0.diff

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

2024-07-18 Thread Petr Hosek via cfe-commits
petrhosek wrote: > I like this approach much better. In a future refactor, I would move > `-nostdlibinc` and `-nostdlib` to the interface target, and eventually > libc++abi and libunwind should use those targets too when building. But this > is a fine first step. I believe I address all comme

[clang] [clang][NFC] Move Bounds Safety Sema code to `SemaBoundsSafety.cpp` (PR #99330)

2024-07-18 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna approved this pull request. https://github.com/llvm/llvm-project/pull/99330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Generate nuw GEPs for struct member accesses (PR #99538)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Hari Limaye (hazzlim) Changes Generate nuw GEPs for struct member accesses, as these are always constant positive offsets derived from the index of the struct member. Regression tests are updated using update_cc_test_checks.py wh

[clang] [clang] Generate nuw GEPs for struct member accesses (PR #99538)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines @llvm/pr-subscribers-clang Author: Hari Limaye (hazzlim) Changes Generate nuw GEPs for struct member accesses, as these are always constant positive offsets derived from the index of the struct member. Regression tests are updated using upda

[clang] [clang] Generate nuw GEPs for struct member accesses (PR #99538)

2024-07-18 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 13a8f8d51962b59949496c460ea0b8ad22ae908a 1430198f390dd5947d605476f5598615d85d3478 --e

[clang] [clang] Generate nuw GEPs for struct member accesses (PR #99538)

2024-07-18 Thread Hari Limaye via cfe-commits
hazzlim wrote: This seemed like the right place to make the change - please let me know if not! I've not restricted this to a subset of languages because it seems fairly unambiguous that nuw holds for these inbounds struct member accesses, but it could be limited to e.g. C/C++ if that is more

[clang] [llvm] AMDGPU: Add back half and bfloat support for global_load_tr16 pats (PR #99540)

2024-07-18 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng created https://github.com/llvm/llvm-project/pull/99540 half and bfloat are common types for 16-bit elements. The support of them was original there and dropped due to some reasons. This work adds the support of the float types back. >From 31601c539553d7af0efd947

[clang] [llvm] AMDGPU: Add back half and bfloat support for global_load_tr16 pats (PR #99540)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Changpeng Fang (changpeng) Changes half and bfloat are common types for 16-bit elements. The support of them was original there and dropped due to some reasons. This work adds the support of the float types back. --- Patch is 22.45 KiB

[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-18 Thread via cfe-commits
https://github.com/ofAlpaca created https://github.com/llvm/llvm-project/pull/99542 Resolve #97087 Since it's my first-time sending pull request for LLVM, I'm not sure if I made it right. Here are my steps before sending pull request. 1. Adding changes to the source code. 2. Build the released

[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-18 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] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: ofAlpaca (ofAlpaca) Changes Resolve #97087 Since it's my first-time sending pull request for LLVM, I'm not sure if I made it right. Here are my steps before sending pull request. 1. Adding changes to the source code. 2. Build the released

[clang-tools-extra] 507c18b - [clang-tidy] Few tiny fixes after #99084

2024-07-18 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2024-07-18T18:19:37Z New Revision: 507c18b445ef88d985d95181db8107f669aed998 URL: https://github.com/llvm/llvm-project/commit/507c18b445ef88d985d95181db8107f669aed998 DIFF: https://github.com/llvm/llvm-project/commit/507c18b445ef88d985d95181db8107f669aed998.diff LOG: [

[clang] [llvm] AMDGPU: Add back half and bfloat support for global_load_tr16 pats (PR #99540)

2024-07-18 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/99540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-18 Thread via cfe-commits
https://github.com/ofAlpaca edited https://github.com/llvm/llvm-project/pull/99542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Fix gsl::not_null template parameter (PR #99472)

2024-07-18 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/99472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 5431a31 - [clang-tidy][NFC] Fix gsl::not_null template parameter (#99472)

2024-07-18 Thread via cfe-commits
Author: Rafael Stahl Date: 2024-07-18T20:21:19+02:00 New Revision: 5431a31f87387763cca8d014e7c07394bab7a1ad URL: https://github.com/llvm/llvm-project/commit/5431a31f87387763cca8d014e7c07394bab7a1ad DIFF: https://github.com/llvm/llvm-project/commit/5431a31f87387763cca8d014e7c07394bab7a1ad.diff

[clang-tools-extra] [clang-tidy][NFC] Fix gsl::not_null template parameter (PR #99472)

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

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.load` (PR #99258)

2024-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/99258 >From 235b288dbb6060b1b4c862cebaba9f04bad3405f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 16 Jul 2024 18:34:35 -0400 Subject: [PATCH] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.

[clang] [llvm] AMDGPU: Add back half and bfloat support for global_load_tr16 pats (PR #99540)

2024-07-18 Thread Matt Arsenault via cfe-commits
@@ -1590,10 +1590,14 @@ let OtherPredicates = [isGFX12Plus] in { let WaveSizePredicate = isWave32 in { defm : GlobalFLATLoadPats ; defm : GlobalFLATLoadPats ; +defm : GlobalFLATLoadPats ; +defm : GlobalFLATLoadPats ; } let WaveSizePredicate = isWave64 in

[clang] 280d90d - AMDGPU: Add back half and bfloat support for global_load_tr16 pats (#99540)

2024-07-18 Thread via cfe-commits
Author: Changpeng Fang Date: 2024-07-18T11:23:35-07:00 New Revision: 280d90d0fdb2734af6c071064c6f87a8fe8d06d0 URL: https://github.com/llvm/llvm-project/commit/280d90d0fdb2734af6c071064c6f87a8fe8d06d0 DIFF: https://github.com/llvm/llvm-project/commit/280d90d0fdb2734af6c071064c6f87a8fe8d06d0.diff

[clang] [llvm] AMDGPU: Add back half and bfloat support for global_load_tr16 pats (PR #99540)

2024-07-18 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng closed https://github.com/llvm/llvm-project/pull/99540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add back half and bfloat support for global_load_tr16 pats (PR #99540)

2024-07-18 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/99540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-18 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/99545 Fix the Windows test. >From 1047bd2fad795c33c6d228ed117b75025422ddb9 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 18 Jul 2024 17:52:10 + Subject: [PATCH 1/2] Reapply "Add source file name for templa

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

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Utkarsh Saxena (usx95) Changes Fix the Windows test. --- Patch is 27.13 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/99545.diff 13 Files Affected: - (adde

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-07-18 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. This shouldn't be default behavior. Add support for this behavior under dedicated option that need to be opt-in. For context, we had problem in our project with some other check recently. Simply check allowed to ignore return

[clang] [Clang] Introduce 'clang-nvlink-wrapper' to work around 'nvlink' (PR #96561)

2024-07-18 Thread Joseph Huber via cfe-commits
jhuber6 wrote: The CI seems to fail because it's not building the tool yet, the patch should enable that dependency but maybe the bot doesn't know how to pick it up until it lands. https://github.com/llvm/llvm-project/pull/96561 ___ cfe-commits maili

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.load` (PR #99258)

2024-07-18 Thread Matt Arsenault via cfe-commits
@@ -155,6 +155,12 @@ BUILTIN(__builtin_amdgcn_raw_buffer_store_b32, "viQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_store_b64, "vV2iQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_store_b96, "vV3iQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_store_b128, "vV4iQbiiIi"

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.load` (PR #99258)

2024-07-18 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. probably should change the stores to unsigned to match in a separate patch https://github.com/llvm/llvm-project/pull/99258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.load` (PR #99258)

2024-07-18 Thread Shilei Tian via cfe-commits
shiltian wrote: > probably should change the stores to unsigned to match in a separate patch Doing it right now. https://github.com/llvm/llvm-project/pull/99258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-18 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Note: 4 days to branch-out https://github.com/llvm/llvm-project/pull/89490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add back half and bfloat support for global_load_tr16 pats (PR #99540)

2024-07-18 Thread Changpeng Fang via cfe-commits
@@ -1590,10 +1590,14 @@ let OtherPredicates = [isGFX12Plus] in { let WaveSizePredicate = isWave32 in { defm : GlobalFLATLoadPats ; defm : GlobalFLATLoadPats ; +defm : GlobalFLATLoadPats ; +defm : GlobalFLATLoadPats ; } let WaveSizePredicate = isWave64 in

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/99546 None >From e93ddb989d3360b1606247200ab15e21a1dc222c Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 18 Jul 2024 14:28:27 -0400 Subject: [PATCH] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgc

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#99546** https://app.graphite.dev/github/pr/llvm/llvm-project/99546?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 * `main` This stack of pull requests is managed by Graphi

[clang] [llvm] AMDGPU: Add back half and bfloat support for global_load_tr16 pats (PR #99540)

2024-07-18 Thread Matt Arsenault via cfe-commits
@@ -1590,10 +1590,14 @@ let OtherPredicates = [isGFX12Plus] in { let WaveSizePredicate = isWave32 in { defm : GlobalFLATLoadPats ; defm : GlobalFLATLoadPats ; +defm : GlobalFLATLoadPats ; +defm : GlobalFLATLoadPats ; } let WaveSizePredicate = isWave64 in

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

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

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Shilei Tian (shiltian) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/99546.diff 3 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsAMDGPU.def (+6-6) - (modified) clang/test/CodeGenOpenCL/built

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Matt Arsenault via cfe-commits
@@ -3,12 +3,12 @@ #pragma OPENCL EXTENSION cl_khr_fp16 : enable -typedef char i8; -typedef short i16; -typedef int i32; -typedef int i64 __attribute__((ext_vector_type(2))); -typedef int i96 __attribute__((ext_vector_type(3))); -typedef int i128 __attribute__((ext_vector_type

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Matt Arsenault via cfe-commits
@@ -3,12 +3,12 @@ #pragma OPENCL EXTENSION cl_khr_fp16 : enable -typedef char i8; -typedef short i16; -typedef int i32; -typedef int i64 __attribute__((ext_vector_type(2))); -typedef int i96 __attribute__((ext_vector_type(3))); -typedef int i128 __attribute__((ext_vector_type

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Shilei Tian via cfe-commits
@@ -3,12 +3,12 @@ #pragma OPENCL EXTENSION cl_khr_fp16 : enable -typedef char i8; -typedef short i16; -typedef int i32; -typedef int i64 __attribute__((ext_vector_type(2))); -typedef int i96 __attribute__((ext_vector_type(3))); -typedef int i128 __attribute__((ext_vector_type

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/99546 >From f0047a50df27e22a2db4e8b9d75f07c9270d470e Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 18 Jul 2024 14:28:27 -0400 Subject: [PATCH] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/99546 >From de113a6635eab7fc37eea9f8c189b208c9be869a Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 18 Jul 2024 14:28:27 -0400 Subject: [PATCH] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/99546 >From 8744711331a026941a37ce90f49dd5ecbd3c6faf Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 18 Jul 2024 14:28:27 -0400 Subject: [PATCH] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/99546 >From fb2a4b230640abd444ee224150d446447bf9a9ac Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 18 Jul 2024 14:28:27 -0400 Subject: [PATCH] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_

[clang] [clang] Diagnose use of deprecated template alias (PR #97619)

2024-07-18 Thread via cfe-commits
https://github.com/premanandrao updated https://github.com/llvm/llvm-project/pull/97619 >From e1076942f07b1d2de857688c88de6ff966861650 Mon Sep 17 00:00:00 2001 From: Premanand M Rao Date: Wed, 3 Jul 2024 11:20:42 -0700 Subject: [PATCH 1/3] [clang] Diagnose use of deprecated template alias Issu

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Matt Arsenault via cfe-commits
@@ -3,12 +3,12 @@ #pragma OPENCL EXTENSION cl_khr_fp16 : enable -typedef char i8; -typedef short i16; -typedef int i32; -typedef int i64 __attribute__((ext_vector_type(2))); -typedef int i96 __attribute__((ext_vector_type(3))); -typedef int i128 __attribute__((ext_vector_type

[clang] [FMV][AArch64] Do not optimize away runtime checks for implied features (PR #99522)

2024-07-18 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. Strong support for this from me. Thanks! https://github.com/llvm/llvm-project/pull/99522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/99546 >From de0d01f14657aa22a71264694c5dfcbecc538ae7 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 18 Jul 2024 14:28:27 -0400 Subject: [PATCH] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_

[clang] [llvm] [clang][ARM64EC] Add support for hybrid_patchable attribute. (PR #99478)

2024-07-18 Thread Eli Friedman via cfe-commits
@@ -6886,6 +6886,13 @@ static void checkAttributesAfterMerging(Sema &S, NamedDecl &ND) { } } + if (HybridPatchableAttr *Attr = ND.getAttr()) { +if (!ND.isExternallyVisible()) { + S.Diag(Attr->getLocation(), + diag::warn_attribute_hybrid_patchable_n

<    1   2   3   4   5   >