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

2024-07-22 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > It looks like my release note has conflict. > Should I edit the file through `resolve conflits` and hit `commit merge`? Conflicts in release notes are very typical. You can resolve them in any way you prefer. https://github.com/llvm/llvm-project/pull/99542

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

2024-07-22 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only %s +// expected-no-diagnostics +struct X {}; +namespace NS { +bool operator==(X, X); +} +using namespace NS; +struct Y { +X x; +friend bool operator==(Y, Y); +}; +bool operator==(Y, Y) = default; --

[clang-tools-extra] 2f5dc59 - [IncludeCleaner] Also check for spellings of physical headers (#99843)

2024-07-22 Thread via cfe-commits
Author: kadir çetinkaya Date: 2024-07-22T14:58:07+02:00 New Revision: 2f5dc596b5719e5ed7f6978dafbce994f425a033 URL: https://github.com/llvm/llvm-project/commit/2f5dc596b5719e5ed7f6978dafbce994f425a033 DIFF: https://github.com/llvm/llvm-project/commit/2f5dc596b5719e5ed7f6978dafbce994f425a033.dif

[clang-tools-extra] [IncludeCleaner] Also check for spellings of physical headers (PR #99843)

2024-07-22 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/99843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-07-22 Thread Piyou Chen via cfe-commits
BeMg wrote: Update: 1. Remove all the `__riscv_feature_bits.length` checker due to unnecessary now. 2. Rebase with origin/main for tablegen change 3. Extract some common code as helper function 4. Replace RequireFeautreBits with getExtensionBitmask and compute the concrete bitmask inside CodeGe

[clang] Fix assertion failure during conversion function overload resolution. (PR #98671)

2024-07-22 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/98671 >From 47db72077258ebe086059f116bbf7fb32c184c8d Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Fri, 12 Jul 2024 13:57:33 -0400 Subject: [PATCH 1/3] Fix assertion failure during operator overload resolution. --- c

[clang] Fix assertion failure during conversion function overload resolution. (PR #98671)

2024-07-22 Thread Daniel M. Katz via cfe-commits
katzdm wrote: Looking further into this, I think this is a narrow problem that arises when selecting a function from an overload set which includes a specialization of a conversion function template. Consider a class: ```cpp struct S { template void fn(); template operator T(); }; ``` W

[clang] [Clang][CodeGen] Add metadata for load from reference (PR #98746)

2024-07-22 Thread Yingwei Zheng via cfe-commits
@@ -2799,9 +2799,37 @@ CodeGenFunction::EmitLoadOfReference(LValue RefLVal, llvm::LoadInst *Load = Builder.CreateLoad(RefLVal.getAddress(), RefLVal.isVolatile()); CGM.DecorateInstructionWithTBAA(Load, RefLVal.getTBAAInfo()); - return makeNaturalAddressForPointer(Load

[clang] [clang-fuzzer-dictionary] Fix build failure with libfuzzer (PR #99871)

2024-07-22 Thread Raphael Isemann via cfe-commits
https://github.com/Teemperor created https://github.com/llvm/llvm-project/pull/99871 When building Clang with LLVM_USE_SANITIZE_COVERAGE=ON, libfuzzer is linked against the Clang fuzz targets to inject the main fuzzing loop. The clang-fuzzer-dictionary, which also resides in the same source tr

[clang] [clang-fuzzer-dictionary] Fix build failure with libfuzzer (PR #99871)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Raphael Isemann (Teemperor) Changes When building Clang with LLVM_USE_SANITIZE_COVERAGE=ON, libfuzzer is linked against the Clang fuzz targets to inject the main fuzzing loop. The clang-fuzzer-dictionary, which also resides in the same so

[clang] 0284b4b - [Clang][NEON] Add neon target guard to intrinsics (#99870)

2024-07-22 Thread via cfe-commits
Author: Lukacma Date: 2024-07-22T14:21:31+01:00 New Revision: 0284b4b4b603192ce9eb29d3a34c23ea7378bee1 URL: https://github.com/llvm/llvm-project/commit/0284b4b4b603192ce9eb29d3a34c23ea7378bee1 DIFF: https://github.com/llvm/llvm-project/commit/0284b4b4b603192ce9eb29d3a34c23ea7378bee1.diff LOG:

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

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

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

2024-07-22 Thread via cfe-commits
Lukacma wrote: This PR fixes and reapplies #98624 https://github.com/llvm/llvm-project/pull/99870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Disallow applying `onwership_returns` to functions that return non-pointers (PR #99564)

2024-07-22 Thread Pavel Skripkin via cfe-commits
pskrgag wrote: I think, it would be even better to drop second argument for `ownership_returns`, since it mirrors the behavior of `alloc_size`. And also allow any return type. But I am not sure if it's possible to make such change directly. Maybe we should start with deprecation for couple of

[clang] [Clang] Fix handling of qualified id-expressions in unevaluated contexts (PR #99807)

2024-07-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you for the fix! https://github.com/llvm/llvm-project/pull/99807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3c459cf - [Clang] Fix handling of qualified id-expressions in unevaluated contexts (#99807)

2024-07-22 Thread via cfe-commits
Author: cor3ntin Date: 2024-07-22T15:57:22+02:00 New Revision: 3c459cfcaebdaf7cabac33a0e18bf6588cef4cdb URL: https://github.com/llvm/llvm-project/commit/3c459cfcaebdaf7cabac33a0e18bf6588cef4cdb DIFF: https://github.com/llvm/llvm-project/commit/3c459cfcaebdaf7cabac33a0e18bf6588cef4cdb.diff LOG:

[clang] [Clang] Fix handling of qualified id-expressions in unevaluated contexts (PR #99807)

2024-07-22 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/99807 ___ 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 new check bugprone-tagged-union-member-count (PR #89925)

2024-07-22 Thread via cfe-commits
___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Add builtin_cpu_is P11 support (PR #99550)

2024-07-22 Thread David Tenty via cfe-commits
https://github.com/daltenty commented: Should there be a lit test for the linux part as well? https://github.com/llvm/llvm-project/pull/99550 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [llvm] [PowerPC] Add builtin_cpu_is P11 support (PR #99550)

2024-07-22 Thread David Tenty via cfe-commits
https://github.com/daltenty edited https://github.com/llvm/llvm-project/pull/99550 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Add builtin_cpu_is P11 support (PR #99550)

2024-07-22 Thread David Tenty via cfe-commits
@@ -103,6 +105,7 @@ PPC_CPU("ppc476",SYS_CALL,44,BUILTIN_PPC_FALSE,0) PPC_CPU("power8",SYS_CALL,45,USE_SYS_CONF,AIX_PPC8_VALUE) PPC_CPU("power9",SYS_CALL,46,USE_SYS_CONF,AIX_PPC9_VALUE) PPC_CPU("power10",SYS_CALL,47,USE_SYS_CONF,AIX_PPC10_VALUE) +PPC_CPU("power11",SYS_CALL,48,U

[clang] [llvm] [PowerPC] Add builtin_cpu_is P11 support (PR #99550)

2024-07-22 Thread David Tenty via cfe-commits
@@ -84,6 +85,7 @@ #define AIX_PPC8_VALUE 0x0001 #define AIX_PPC9_VALUE 0x0002 #define AIX_PPC10_VALUE 0x0004 +#define AIX_PPC11_VALUE 0x0008 daltenty wrote: We've discussed with the AIX OS team, and this is the value in their development build

[clang] [Clang] Fix handling of qualified id-expressions in unevaluated contexts (PR #99807)

2024-07-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/1986 Here is the relevant piece of the bu

[clang] Fix issue https://github.com/llvm/llvm-project/issues/98018. (PR #99672)

2024-07-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Please update the patch title and description to describe what changes the patch is making rather than just linking to an issue. https://github.com/llvm/llvm-project/pull/99672 ___ cfe-commits mailing list cf

[clang] Fix issue https://github.com/llvm/llvm-project/issues/98018. (PR #99672)

2024-07-22 Thread Aaron Ballman via cfe-commits
@@ -8208,7 +8208,8 @@ void Sema::CheckInfNaNFunction(const CallExpr *Call, << 1 << 0 << Call->getSourceRange(); else if ((IsStdFunction(FDecl, "isinf") || (IsStdFunction(FDecl, "isfinite") || - (FDecl->getIdentifier() && FDecl->getName() == "in

[clang] Fix issue https://github.com/llvm/llvm-project/issues/98018. (PR #99672)

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

[clang] [llvm] [WIP][RISCV] Support __builtin_cpu_init and __builtin_cpu_supports (PR #99700)

2024-07-22 Thread Philip Reames via cfe-commits
https://github.com/preames updated https://github.com/llvm/llvm-project/pull/99700 >From ddf2c58a864576586b89cc611e2bea15b8cf18ba Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Fri, 19 Jul 2024 10:46:19 -0700 Subject: [PATCH 1/2] [WIP][RISCV] Support __builtin_cpu_init and __builtin_cpu_su

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

2024-07-22 Thread via cfe-commits
Author: Samira Bazuzi Date: 2024-07-22T10:22:23-04:00 New Revision: 83c2bfdacb0593b3a72e93098a55afdcd93d865f URL: https://github.com/llvm/llvm-project/commit/83c2bfdacb0593b3a72e93098a55afdcd93d865f DIFF: https://github.com/llvm/llvm-project/commit/83c2bfdacb0593b3a72e93098a55afdcd93d865f.diff

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

2024-07-22 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand closed 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] [llvm] [WIP][RISCV] Support __builtin_cpu_init and __builtin_cpu_supports (PR #99700)

2024-07-22 Thread Philip Reames via cfe-commits
@@ -1020,3 +1020,64 @@ std::string RISCVISAInfo::getTargetFeatureForExtension(StringRef Ext) { return isExperimentalExtension(Name) ? "experimental-" + Name.str() : Name.str(); } + +struct RISCVExtBit { + const StringRef ext; + uint64

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #99723)

2024-07-22 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > This is a refreshed version of #91271. Given how long it's been since I > updated that PR, it seemed better to just start fresh. May be #91271 should be closed then, In `Driver/fp-contract.c`, all the `//RUN` lines where you removed the `-Werror` should now have `//WARN` chec

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

2024-07-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot2` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/1949 Here is the relevant piece of the bu

[clang] [Sema] Default arguments for template parameters affect ContainsUnexpandedPacks (PR #99880)

2024-07-22 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov created https://github.com/llvm/llvm-project/pull/99880 This addresses the FIXME in the code. There are tests for the new behavior in a follow up fix for #99877, which also addresses other bugs that prevent exposing the wrong results of `ContainsUnexpandedPac

[clang] [Sema] Default arguments for template parameters affect ContainsUnexpandedPacks (PR #99880)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ilya Biryukov (ilya-biryukov) Changes This addresses the FIXME in the code. There are tests for the new behavior in a follow up fix for #99877, which also addresses other bugs that prevent exposing the wrong results of `ContainsUnexpand

[clang] [Sema] Fix computations of "unexpanded packs" in substituted lambdas (PR #99882)

2024-07-22 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov created https://github.com/llvm/llvm-project/pull/99882 This addresses a crash in https://github.com/llvm/llvm-project/issues/99877 that happens on nested lambdas that use template parameter packs, see the added test. Before this patch, the code computing the '

[clang] [Sema] Fix computations of "unexpanded packs" in substituted lambdas (PR #99882)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ilya Biryukov (ilya-biryukov) Changes This addresses a crash in https://github.com/llvm/llvm-project/issues/99877 that happens on nested lambdas that use template parameter packs, see the added test. Before this patch, the code computing

[clang] [llvm] [WIP][RISCV] Support __builtin_cpu_init and __builtin_cpu_supports (PR #99700)

2024-07-22 Thread Philip Reames via cfe-commits
https://github.com/preames updated https://github.com/llvm/llvm-project/pull/99700 >From ddf2c58a864576586b89cc611e2bea15b8cf18ba Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Fri, 19 Jul 2024 10:46:19 -0700 Subject: [PATCH 1/3] [WIP][RISCV] Support __builtin_cpu_init and __builtin_cpu_su

[clang] [Sema] Fix computations of "unexpanded packs" in substituted lambdas (PR #99882)

2024-07-22 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: This PR also includes changes from #99880, which I separated into another commit to simplify the review as this PR is a bit involved. https://github.com/llvm/llvm-project/pull/99882 ___ cfe-commits mailing list cfe-commits@lists.l

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

2024-07-22 Thread Ameer J via cfe-commits
https://github.com/ameerj updated https://github.com/llvm/llvm-project/pull/95013 >From a50f3d4395efd09eea8ba2e750bb785857f9a550 Mon Sep 17 00:00:00 2001 From: ameerj Date: Mon, 10 Jun 2024 12:09:40 -0400 Subject: [PATCH 01/17] Add BinPackBinaryOperations --- clang/include/clang/Format/Format

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-22 Thread Saleem Abdulrasool via cfe-commits
@@ -783,51 +783,76 @@ static void ProcessVersionedAPINotes( } } +static std::optional +UnwindNamespaceContext(DeclContext *DC, api_notes::APINotesManager &APINotes) { + if (auto NamespaceContext = dyn_cast(DC)) { +for (auto Reader : APINotes.findAPINotes(NamespaceContex

[clang] [clang-fuzzer-dictionary] Fix build failure with libfuzzer (PR #99871)

2024-07-22 Thread Raphael Isemann via cfe-commits
Teemperor wrote: FWIW, this dictionary is (at least was supposed) to be used by oss-fuzz, but because of the build issue it's [disabled since about 2 years](https://github.com/google/oss-fuzz/blob/7c41fbc6e984df411981e3c9a4b47a573cd327ea/projects/llvm/build.sh#L183) https://github.com/llvm/llv

[clang] [analyzer] Model builtin-like functions as builtin functions (PR #99886)

2024-07-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/99886 Some template function instantiations don't have a body, even though their templates did have a body. Examples are: `std::move`, `std::forward`, `std::addressof` etc. They had bodies before https://github.com/l

[clang] [analyzer] Model builtin-like functions as builtin functions (PR #99886)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes Some template function instantiations don't have a body, even though their templates did have a body. Examples are: `std::move`, `std::forward`, `std::addressof` etc. They had bodies befo

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Ilya Biryukov via cfe-commits
@@ -81,7 +81,6 @@ std::string GetMetadata(json::Object *Event) { if (json::Object *Args = Event->getObject("args")) { if (auto Detail = Args->getString("detail")) OS << Detail; -// Use only filename to not include os-specific path separators. il

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Ilya Biryukov via cfe-commits
@@ -152,7 +152,13 @@ void clang::ParseAST(Sema &S, bool PrintStats, bool SkipFunctionBodies) { bool HaveLexer = S.getPreprocessor().getCurrentLexer(); if (HaveLexer) { -llvm::TimeTraceScope TimeScope("Frontend"); +llvm::TimeTraceScope TimeScope("Frontend", [&]() {

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Ilya Biryukov via cfe-commits
@@ -209,7 +208,7 @@ constexpr int slow_init_list[] = {1, 1, 2, 3, 5, 8, 13, 21}; // 25th line ASSERT_TRUE(compileFromString(Code, "-std=c++20", "test.cc")); std::string Json = teardownProfiler(); ASSERT_EQ(R"( -Frontend +Frontend (, test.cc) ilya-biryuko

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-22 Thread Saleem Abdulrasool via cfe-commits
@@ -456,6 +458,7 @@ template <> struct MappingTraits { IO.mapOptional("EnumKind", T.EnumConvenienceKind); IO.mapOptional("SwiftCopyable", T.SwiftCopyable); IO.mapOptional("Methods", T.Methods); +IO.mapOptional("Tags", T.Tags); compnerd wrote: I

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

2024-07-22 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: > > We already do that :) the problem is when what follows `A` _doesn't_ > > unambiguously look like a template argument list: > > Sure, but before CWG1835, we would perform the lookup anyway and treat the > `<0>` as a template argument list, even if it isn't unambiguously a

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Utkarsh Saxena via cfe-commits
@@ -152,7 +152,13 @@ void clang::ParseAST(Sema &S, bool PrintStats, bool SkipFunctionBodies) { bool HaveLexer = S.getPreprocessor().getCurrentLexer(); if (HaveLexer) { -llvm::TimeTraceScope TimeScope("Frontend"); +llvm::TimeTraceScope TimeScope("Frontend", [&]() {

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Utkarsh Saxena via cfe-commits
@@ -81,7 +81,6 @@ std::string GetMetadata(json::Object *Event) { if (json::Object *Args = Event->getObject("args")) { if (auto Detail = Args->getString("detail")) OS << Detail; -// Use only filename to not include os-specific path separators. us

[clang] [Sema] Fix computations of "unexpanded packs" in substituted lambdas (PR #99882)

2024-07-22 Thread via cfe-commits
cor3ntin wrote: At first glance this seems like a duplicate of https://github.com/llvm/llvm-project/pull/86265 https://github.com/llvm/llvm-project/pull/99882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [RISCV] Allow YAML file to control multilib selection (PR #98856)

2024-07-22 Thread via cfe-commits
ArcaneNibble wrote: ping? also *boop* @MaskRay you are listed as the code owner for "Driver parts not covered by someone else" https://github.com/llvm/llvm-project/pull/98856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/99866 >From e0d76b97e386421ac2e653c206f49f827b24e65b Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Mon, 22 Jul 2024 12:16:48 + Subject: [PATCH 1/2] Record mainfile name in the Frontend time trace --- clang/lib

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Utkarsh Saxena via cfe-commits
@@ -209,7 +208,7 @@ constexpr int slow_init_list[] = {1, 1, 2, 3, 5, 8, 13, 21}; // 25th line ASSERT_TRUE(compileFromString(Code, "-std=c++20", "test.cc")); std::string Json = teardownProfiler(); ASSERT_EQ(R"( -Frontend +Frontend (, test.cc) usx95 wrote:

[clang] [Sema] Fix computations of "unexpanded packs" in substituted lambdas (PR #99882)

2024-07-22 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: > At first glance this seems like a duplicate of #86265 That seems right, I was not aware of the other PR, thanks for pointing this out. I still feel that avoiding the use of the flag from `LambdaScopeInfo` is an overall improvement that makes the code simpler, but the othe

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

2024-07-22 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > I'm not sure I follow. If we "treat the `<0>` as a template argument list, > even if it isn't unambiguously a template argument list.", then aren't > applying CWG1835 at all. Yes, in that case. But I am arguing for selectively applying it. I thought that could work, but I a

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

2024-07-22 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @mizvekov Consider a slightly altered version of the motivating example [in the DR](https://cplusplus.github.io/CWG/issues/1835.html): ```cpp template void end(); template bool Foo(T it0, T it1) { return it0->end < it1->end || it0->end > it1->end; } ``` `< it1->end || it0

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

2024-07-22 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: Just FYI, I wasn't aware of this PR and have ended up with an alternative approach to tracking the unexpanded packs in #99882. (Thanks @cor3ntin for pointing this out) I'll let the reviewers decide if we should go with this change or mine, also happy to have some combinat

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

2024-07-22 Thread via cfe-commits
Author: premanandrao Date: 2024-07-22T10:57:28-04:00 New Revision: d8e0b0d6854757c4fc0c120995cf76457c347a1e URL: https://github.com/llvm/llvm-project/commit/d8e0b0d6854757c4fc0c120995cf76457c347a1e DIFF: https://github.com/llvm/llvm-project/commit/d8e0b0d6854757c4fc0c120995cf76457c347a1e.diff

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

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

[clang] 613d2c3 - [clang][Interp][NFC] Avoid hitting an assertion in invalid code

2024-07-22 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-07-22T16:59:31+02:00 New Revision: 613d2c393992eee470405f1859aaf5fd1837e36c URL: https://github.com/llvm/llvm-project/commit/613d2c393992eee470405f1859aaf5fd1837e36c DIFF: https://github.com/llvm/llvm-project/commit/613d2c393992eee470405f1859aaf5fd1837e36c.diff LO

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/99866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AIX] Detect `#pragma mc_func` (PR #99888)

2024-07-22 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/99888 `#pragma mc_func` is an IBM XL feature that should be replaced by inline assembly. This PR adds an option `-ferr-pragma-mc-func-aix` to detect uses of `#pragma mc_func` and reports an error if the option is in

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-22 Thread David Tenty via cfe-commits
@@ -632,13 +632,33 @@ // PPCPOWER10:#define __PCREL__ 1 // PPCPOWER10-NOT:#define __ROP_PROTECT__ 1 // +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-none-none -target-cpu pwr11 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPCPOWER11 %

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-22 Thread David Tenty via cfe-commits
@@ -3485,9 +3485,11 @@ unsigned PPCInstrInfo::getSpillTarget() const { // With P10, we may need to spill paired vector registers or accumulator // registers. MMA implies paired vectors, so we can just check that. bool IsP10Variant = Subtarget.isISA3_1() || Subtarget.paire

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-22 Thread David Tenty via cfe-commits
@@ -156,6 +164,14 @@ enum PPCMachineCombinerPattern : unsigned { NoInstr, NoInstr, PPC::SPILL_QUADWORD \ } +#define Pwr11StoreOpcodes \ daltenty wrote: Ditto: re

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-22 Thread David Tenty via cfe-commits
@@ -124,6 +124,14 @@ enum PPCMachineCombinerPattern : unsigned { PPC::RESTORE_UACC, NoInstr, NoInstr, PPC::RESTORE_QUADWORD \ } +#define Pwr11LoadOpcodes \ daltenty wrote: Ditto ear

[clang] [AIX] Detect `#pragma mc_func` (PR #99888)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Qiongsi Wu (qiongsiwu) Changes `#pragma mc_func` is an IBM XL feature that should be replaced by inline assembly. This PR adds an option `-ferr-pragma-mc-func-aix` to detect uses of `#pragma mc_func` and reports an error if the opt

[clang] [AIX] Detect `#pragma mc_func` (PR #99888)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qiongsi Wu (qiongsiwu) Changes `#pragma mc_func` is an IBM XL feature that should be replaced by inline assembly. This PR adds an option `-ferr-pragma-mc-func-aix` to detect uses of `#pragma mc_func` and reports an error if the option is

[clang] 280b04f - Record mainfile name in the Frontend time trace (#99866)

2024-07-22 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2024-07-22T17:10:41+02:00 New Revision: 280b04f65a169f09249031e5e12a30584ce2e8e0 URL: https://github.com/llvm/llvm-project/commit/280b04f65a169f09249031e5e12a30584ce2e8e0 DIFF: https://github.com/llvm/llvm-project/commit/280b04f65a169f09249031e5e12a30584ce2e8e0.diff

[clang] Record mainfile name in the Frontend time trace (PR #99866)

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

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-07-22 Thread Fanbo Meng via cfe-commits
https://github.com/fanbo-meng updated https://github.com/llvm/llvm-project/pull/91384 >From aff8d6092d638092235712ca809eb0afd84d1ad6 Mon Sep 17 00:00:00 2001 From: Fanbo Meng Date: Tue, 7 May 2024 13:36:38 -0400 Subject: [PATCH 01/13] [SystemZ][z/OS] Implement z/OS XPLINK ABI The XPLINK callin

[clang] [llvm] [ARM][AArch64] Split FEAT_SHA1 from FEAT_SHA256. (PR #99816)

2024-07-22 Thread Jon Roelofs via cfe-commits
jroelofs wrote: I think you also need: ``` diff --git a/llvm/lib/Target/AArch64/AArch64FMV.td b/llvm/lib/Target/AArch64/AArch64FMV.td index 7a40c83b2bb2..8f42ece439a7 100644 --- a/llvm/lib/Target/AArch64/AArch64FMV.td +++ b/llvm/lib/Target/AArch64/AArch64FMV.td @@ -75,7 +75,7 @@ def : FMVExtensi

[clang] [Clang][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-07-22 Thread Alexey Bataev via cfe-commits
@@ -21703,32 +21703,37 @@ const ValueDecl *SemaOpenMP::getOpenMPDeclareMapperVarName() const { return cast(DSAStack->getDeclareMapperVarRef())->getDecl(); } -OMPClause *SemaOpenMP::ActOnOpenMPNumTeamsClause(Expr *NumTeams, +OMPClause *SemaOpenMP::ActOnOpenMPNumTeamsClause(A

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-07-22 Thread Fanbo Meng via cfe-commits
https://github.com/fanbo-meng updated https://github.com/llvm/llvm-project/pull/91384 >From aff8d6092d638092235712ca809eb0afd84d1ad6 Mon Sep 17 00:00:00 2001 From: Fanbo Meng Date: Tue, 7 May 2024 13:36:38 -0400 Subject: [PATCH 01/14] [SystemZ][z/OS] Implement z/OS XPLINK ABI The XPLINK callin

[clang] e970989 - [clang][OpenMP] Avoid names that hide existing variables, NFC

2024-07-22 Thread Krzysztof Parzyszek via cfe-commits
Author: Krzysztof Parzyszek Date: 2024-07-22T10:22:20-05:00 New Revision: e9709899db7d4a8b1c36475e90e4a934335f3d95 URL: https://github.com/llvm/llvm-project/commit/e9709899db7d4a8b1c36475e90e4a934335f3d95 DIFF: https://github.com/llvm/llvm-project/commit/e9709899db7d4a8b1c36475e90e4a934335f3d95

[clang] [Sema] Fix computations of "unexpanded packs" in substituted lambdas (PR #99882)

2024-07-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/99882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix computations of "unexpanded packs" in substituted lambdas (PR #99882)

2024-07-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: Thanks for working on this. I did a rough look, and I think the general approach looks good. Although this unfortunately happens to be a duplicate work of #86265 (sorry I didn't get around to that during the 19 development cycle due to my timeframe), I thi

[clang] [Sema] Fix computations of "unexpanded packs" in substituted lambdas (PR #99882)

2024-07-22 Thread Younan Zhang via cfe-commits
@@ -353,7 +353,11 @@ Sema::DiagnoseUnexpandedParameterPacks(SourceLocation Loc, } if (!EnclosingStmtExpr) { -LSI->ContainsUnexpandedParameterPack = true; +// It is ok to have unexpanded packs in captures, template parameters +// and paramete

[clang] [Sema] Fix computations of "unexpanded packs" in substituted lambdas (PR #99882)

2024-07-22 Thread Younan Zhang via cfe-commits
@@ -0,0 +1,78 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++20 -verify %s zyn0217 wrote: It would be very nice if you can merge other tests from #86265 e.g. tests including constraints/noexcepts specifiers. That way this could completely supersede that. https:

[clang] [PS5] Adopt new compiler-rt naming scheme for the profile library. (PR #99862)

2024-07-22 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/99862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] add TargetParser for PPC target (PR #97541)

2024-07-22 Thread David Tenty via cfe-commits
https://github.com/daltenty approved this pull request. Sorry for the delay, LGTM https://github.com/llvm/llvm-project/pull/97541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] Don't use canonical type when checking dependence in Type::isOverloadable (PR #98563)

2024-07-22 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/98563 >From 5cefddec13ca2bafb58a6f714fd2bef435166c8d Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 11 Jul 2024 18:28:50 -0400 Subject: [PATCH 1/2] [Clang][AST] Don't use canonical type when checking

[clang] Fix assertion failure during conversion function overload resolution. (PR #98671)

2024-07-22 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: CC @zygoloid for a potential additional set of eyes https://github.com/llvm/llvm-project/pull/98671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP][RISCV] Support __builtin_cpu_init and __builtin_cpu_supports (PR #99700)

2024-07-22 Thread Philip Reames via cfe-commits
https://github.com/preames updated https://github.com/llvm/llvm-project/pull/99700 >From ddf2c58a864576586b89cc611e2bea15b8cf18ba Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Fri, 19 Jul 2024 10:46:19 -0700 Subject: [PATCH 1/4] [WIP][RISCV] Support __builtin_cpu_init and __builtin_cpu_su

[clang] [analyzer] Model builtin-like functions as builtin functions (PR #99886)

2024-07-22 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/99886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent checking destructor reference with an invalid initializer (PR #97860)

2024-07-22 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @shafik could you review this PR? thanks https://github.com/llvm/llvm-project/pull/97860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix assertion failure in invalid delete operator declaration check (PR #99308)

2024-07-22 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @shafik could you review this PR? thanks https://github.com/llvm/llvm-project/pull/99308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP][RISCV] Support __builtin_cpu_init and __builtin_cpu_supports (PR #99700)

2024-07-22 Thread Philip Reames via cfe-commits
https://github.com/preames edited https://github.com/llvm/llvm-project/pull/99700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-fuzzer-dictionary] Fix build failure with libfuzzer (PR #99871)

2024-07-22 Thread Jonas Devlieghere via cfe-commits
https://github.com/JDevlieghere approved this pull request. https://github.com/llvm/llvm-project/pull/99871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-22 Thread via cfe-commits
https://github.com/azhan92 updated https://github.com/llvm/llvm-project/pull/99511 >From 52100e3378c86eddb9a4757f8f3e175804a6dc76 Mon Sep 17 00:00:00 2001 From: Alison Zhang Date: Thu, 18 Jul 2024 10:27:40 -0400 Subject: [PATCH 1/9] Add support for -mcpu=pwr11 / -mtune=pwr11 --- clang/lib/Bas

[clang] [llvm] [WIP][RISCV] Support __builtin_cpu_init and __builtin_cpu_supports (PR #99700)

2024-07-22 Thread Philip Reames via cfe-commits
https://github.com/preames edited https://github.com/llvm/llvm-project/pull/99700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support __builtin_cpu_init and __builtin_cpu_supports (PR #99700)

2024-07-22 Thread Philip Reames via cfe-commits
https://github.com/preames edited https://github.com/llvm/llvm-project/pull/99700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Define ATOMIC_FLAG_INIT correctly for C++. (PR #97534)

2024-07-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for catching this! Can you also add some tests to `clang/test/Headers/`? We have some coverage for stdatomic.h in C, but not in C++ (I'd recommend trying to add a `RUN` line to the .c file with `-x c++` so it's tested in C++ mode and then en

[clang] [clang] Define ATOMIC_FLAG_INIT correctly for C++. (PR #97534)

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

[clang] [clang] Define ATOMIC_FLAG_INIT correctly for C++. (PR #97534)

2024-07-22 Thread Aaron Ballman via cfe-commits
@@ -750,6 +750,8 @@ Bug Fixes in This Version - Fixed `static_cast` to array of unknown bound. Fixes (#GH62863). +- Fixed the definition of ATOMIC_FLAG_INIT in stdatomic.h so it can be used in C++. AaronBallman wrote: ```suggestion - Fixed the definition of

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

2024-07-22 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: [Ping](https://github.com/llvm/llvm-project/pull/98547#issuecomment-2240040530) @cor3ntin @AaronBallman. https://github.com/llvm/llvm-project/pull/98547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-07-22 Thread Pranav Bhandarkar via cfe-commits
https://github.com/bhandarkar-pranav closed https://github.com/llvm/llvm-project/pull/93977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix computations of "unexpanded packs" in substituted lambdas (PR #99882)

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

[clang] [Sema] Fix computations of "unexpanded packs" in substituted lambdas (PR #99882)

2024-07-22 Thread via cfe-commits
@@ -353,7 +353,11 @@ Sema::DiagnoseUnexpandedParameterPacks(SourceLocation Loc, } if (!EnclosingStmtExpr) { -LSI->ContainsUnexpandedParameterPack = true; +// It is ok to have unexpanded packs in captures, template parameters +// and paramete

<    1   2   3   4   5   6   7   >