[clang] `__noop` not marked as constexpr #102064 (PR #105983)

2024-08-25 Thread via cfe-commits
https://github.com/ofAlpaca created https://github.com/llvm/llvm-project/pull/105983 Resolves #102064 I think the problem is that the function `bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp)` return default `false` directly when visiting expression of `__no

[clang] `__noop` not marked as constexpr #102064 (PR #105983)

2024-08-25 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] `__noop` not marked as constexpr #102064 (PR #105983)

2024-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: ofAlpaca (ofAlpaca) Changes Resolves #102064 I think the problem is that the function `bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp)` return default `false` directly when visiting expression of `__noo

[clang] 1193f7d - [NFC] Use const members of `StringToOffsetTable` (#105824)

2024-08-25 Thread via cfe-commits
Author: Rahul Joshi Date: 2024-08-25T05:40:21-07:00 New Revision: 1193f7d6487d2d94009f8d8d27da3907136482b9 URL: https://github.com/llvm/llvm-project/commit/1193f7d6487d2d94009f8d8d27da3907136482b9 DIFF: https://github.com/llvm/llvm-project/commit/1193f7d6487d2d94009f8d8d27da3907136482b9.diff L

[clang] [llvm] [NFC] Use const members of `StringToOffsetTable` (PR #105824)

2024-08-25 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/105824 ___ 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-08-25 Thread via cfe-commits
yronglin wrote: friendly ping~ 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] [llvm] [NFC] Use const members of `StringToOffsetTable` (PR #105824)

2024-08-25 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,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/3089 Here is the relevant piece of

[clang-tools-extra] [clang-tidy] Use upper case letters for bool conversion suffix (PR #104882)

2024-08-25 Thread via cfe-commits
https://github.com/Da-Viper updated https://github.com/llvm/llvm-project/pull/104882 >From 8a4f6af9fc1f44c2f8b5fd3693ca14eaf776fd02 Mon Sep 17 00:00:00 2001 From: Ebuka Ezike Date: Sun, 11 Aug 2024 21:39:35 +0100 Subject: [PATCH 01/14] [clang-tidy] use upper cace letters for bool conversion su

[clang] [compiler-rt] [libcxx] [lld] [lldb] [llvm] [mlir] [polly] python: use raw strings for regex (PR #105990)

2024-08-25 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] [compiler-rt] [libcxx] [lld] [lldb] [llvm] [mlir] [polly] python: use raw strings for regex (PR #105990)

2024-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Paul Zander (negril) Changes Changed in python version 3.12: A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+\. \d+") now emits

[clang] [compiler-rt] [libcxx] [lld] [lldb] [llvm] [mlir] [polly] python: use raw strings for regex (PR #105990)

2024-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Paul Zander (negril) Changes Changed in python version 3.12: A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+\. \d+") now emits a

[clang-tools-extra] [clang-tidy] Use upper case letters for bool conversion suffix (PR #104882)

2024-08-25 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/104882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

2024-08-25 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/105996 None >From 0e4c511107f76da085a8019cf2eca78c3a5a0754 Mon Sep 17 00:00:00 2001 From: yronglin Date: Mon, 26 Aug 2024 02:09:31 +0800 Subject: [PATCH] [Clang][Interp] Implement constexpr vector unary operators +,

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

2024-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes --- Patch is 22.02 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/105996.diff 8 Files Affected: - (modified) clang/include/clang/AST/ASTContext.h (+8) - (modified)

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

2024-08-25 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/105996 >From 0e4c511107f76da085a8019cf2eca78c3a5a0754 Mon Sep 17 00:00:00 2001 From: yronglin Date: Mon, 26 Aug 2024 02:09:31 +0800 Subject: [PATCH 1/2] [Clang][Interp] Implement constexpr vector unary operators +, -

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

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

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

2024-08-25 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 5c94dd73b2df1f6b469e858ff29055ac117e8494 0e4c511107f76da085a8019cf2eca78c3a5a0754 --e

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

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

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

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

[clang] [Clang] Overflow Pattern Exclusion - rename some patterns, enhance docs (PR #105709)

2024-08-25 Thread Justin Stitt via cfe-commits
@@ -4806,6 +4806,34 @@ getOverflowPatternBinOp(const BinaryOperator *E) { return {}; } +/// Compute and set the OverflowPatternExclusion bit based on whether the JustinStitt wrote: I wanted to avoid calling `getOverflowPatternBinOp()` as it is more expensiv

[clang] [Clang] Overflow Pattern Exclusion - rename some patterns, enhance docs (PR #105709)

2024-08-25 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt edited https://github.com/llvm/llvm-project/pull/105709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [AST] Fix MS 1920+ placeholder return type mangling for lambdas (PR #105999)

2024-08-25 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/105999 Fixes https://github.com/llvm/llvm-project/pull/104722. Missed handling `decltype(auto)` trailing return types for lambdas. This was a mistake and regression on my part with my PR, https://github.com/llvm/llvm

[clang] [clang-cl] [AST] Fix MS 1920+ placeholder return type mangling for lambdas (PR #105999)

2024-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Max Winkler (MaxEW707) Changes Fixes https://github.com/llvm/llvm-project/pull/104722. Missed handling `decltype(auto)` trailing return types for lambdas. This was a mistake and regression on my part with my PR, https://github.com/llvm/ll

[clang] [clang-cl] [AST] Reapply #102848 Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #104722)

2024-08-25 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @zmodem I have a fix for https://ci.chromium.org/ui/p/chromium/builders/ci/ToTWin. This was an accidental regression on my part, sorry. The fix is here https://github.com/llvm/llvm-project/pull/105999. https://github.com/llvm/llvm-project/pull/104722 __

[clang] [Clang] Match MSVC handling of duplicate header search paths in Microsoft compatibility modes. (PR #105738)

2024-08-25 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/105738 >From 79b2ceb45cbc4ffb823f56e4c5eedb62f475c780 Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Thu, 22 Aug 2024 09:44:56 -0700 Subject: [PATCH] [Clang] Match MSVC handling of duplicate header search paths

[clang] [Clang] Start moving X86Builtins.def to X86Builtins.td (PR #106005)

2024-08-25 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/106005 This starts moving `X86Builtins.def` to be a tablegen file. It's quite large, so I think it'd be good to move things in multiple steps to avoid a bunch of merge conflicts due to the amount of time this takes

[clang] [Clang] Start moving X86Builtins.def to X86Builtins.td (PR #106005)

2024-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-x86 Author: Nikolas Klauser (philnik777) Changes This starts moving `X86Builtins.def` to be a tablegen file. It's quite large, so I think it'd be good to move things in multiple steps to avoid a bunch of merge conflic

[clang] [clang][Driver] Define soft float macros for PPC. (PR #106012)

2024-08-25 Thread Alex Rønne Petersen via cfe-commits
https://github.com/alexrp created https://github.com/llvm/llvm-project/pull/106012 Fixes #105972. From 5d52fe0d6d9bad77193a114eaef324d1799f2444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sun, 25 Aug 2024 22:47:37 +0200 Subject: [PATCH] [clang][Driver] Define

[clang] [clang][Driver] Define soft float macros for PPC. (PR #106012)

2024-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-powerpc @llvm/pr-subscribers-clang Author: Alex Rønne Petersen (alexrp) Changes Fixes #105972. --- Full diff: https://github.com/llvm/llvm-project/pull/106012.diff 1 Files Affected: - (modified) clang/lib/Basic/Targets/PPC.cpp (+5-3) `

[clang] [clang][Driver] Define soft float macros for PPC. (PR #106012)

2024-08-25 Thread Alex Rønne Petersen via cfe-commits
alexrp wrote: FWIW, if this patch is good, it would be nice to get it into 19.x. https://github.com/llvm/llvm-project/pull/106012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-25 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/101469 >From 82ab798fc72c6de64ae527d96393f0dc67307e98 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 1 Aug 2024 12:30:22 +0200 Subject: [PATCH 1/6] [Clang] Add [[clang::diagnose_specializations]] --- cl

[clang] [clang-format] Fix misalignments of pointers in angle brackets (PR #106013)

2024-08-25 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/106013 Fixes #105898. >From a880299cd884d064e2bd03af308afa52736fa75d Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 25 Aug 2024 14:30:32 -0700 Subject: [PATCH] [clang-format] Fix misalignments of pointers in angle

[clang] [clang-format] Fix misalignments of pointers in angle brackets (PR #106013)

2024-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #105898. --- Full diff: https://github.com/llvm/llvm-project/pull/106013.diff 2 Files Affected: - (modified) clang/lib/Format/WhitespaceManager.cpp (+2-1) - (modified) clang/unittests/Format/Forma

[clang] `__noop` not marked as constexpr #102064 (PR #105983)

2024-08-25 Thread via cfe-commits
ofAlpaca wrote: @DanielJump Could you kindly help me review my commit? Besides, I'm not sure how to solve the failed build test on GitHub. The failed case is `C:\ws\src\clang\unittests\Support\TimeProfilerTest.cpp:278` on Windows platform. It shows the following difference. ``` With diff: @@ -7,

[clang] [clang-cl] [AST] Fix MS 1920+ placeholder return type mangling for lambdas (PR #105999)

2024-08-25 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/105999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Match MSVC handling of duplicate header search paths in Microsoft compatibility modes. (PR #105738)

2024-08-25 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann ready_for_review https://github.com/llvm/llvm-project/pull/105738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Match MSVC handling of duplicate header search paths in Microsoft compatibility modes. (PR #105738)

2024-08-25 Thread Tom Honermann via cfe-commits
tahonermann wrote: It took me a few tries to get the tests tweaked just right for the `clang-cl` driver to pass on Windows, but the tests now pass and this PR is now ready for review. https://github.com/llvm/llvm-project/pull/105738 ___ cfe-commits m

[clang] [clang][test] Rewrote test to work with lit internal shell syntax (PR #105902)

2024-08-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM on my side. Thanks. But I didn't take a detailed look into https://discourse.llvm.org/t/rfc-enabling-the-lit-internal-shell-by-default/80179/29. So it might be good to wait for people there to approve this https://github.com/llvm/

[clang] [C++20] [Modules] Warn for duplicated decls in mutliple module units (PR #105799)

2024-08-25 Thread Chuanqi Xu via cfe-commits
@@ -9955,6 +9955,45 @@ void ASTReader::finishPendingActions() { } PendingDefinitions.clear(); + for (auto [D, Previous] : PendingWarningForDuplicatedDefsInModuleUnits) { +auto hasDefinitionImpl = [this](Decl *D, auto hasDefinitionImpl) { + if (auto *VD = dyn_cast

[clang] [clang-tools-extra] [clang-tidy] Add support for bsl::optional (PR #101450)

2024-08-25 Thread Dhyey Shah via cfe-commits
https://github.com/dayshah approved this pull request. huge for bloomberg 🔥 https://github.com/llvm/llvm-project/pull/101450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Update TODO comment check (PR #104868)

2024-08-25 Thread Alan Rosenthal via cfe-commits
@@ -24,3 +24,7 @@ // TODO(b/12345): find the holy grail // TODO (b/12345): allow spaces before parentheses // TODO(asdf) allow missing semicolon +// TODO: bug 12345678 - Remove this after the 2047q4 compatibility window expires. +// TODO: example.com/my-design-doc - Manually f

[clang-tools-extra] [clang-tidy] Update TODO comment check (PR #104868)

2024-08-25 Thread Alan Rosenthal via cfe-commits
https://github.com/AlanRosenthal updated https://github.com/llvm/llvm-project/pull/104868 >From 5f84cc47cde13732ed61eccc0b17f6c420a64ab7 Mon Sep 17 00:00:00 2001 From: Alan Rosenthal Date: Thu, 22 Aug 2024 21:42:04 + Subject: [PATCH 1/2] [clang-tidy] Update TODO comment check The doc for g

[clang-tools-extra] [clang-tidy] Update TODO comment check (PR #104868)

2024-08-25 Thread Alan Rosenthal via cfe-commits
https://github.com/AlanRosenthal updated https://github.com/llvm/llvm-project/pull/104868 >From 5f84cc47cde13732ed61eccc0b17f6c420a64ab7 Mon Sep 17 00:00:00 2001 From: Alan Rosenthal Date: Thu, 22 Aug 2024 21:42:04 + Subject: [PATCH 1/3] [clang-tidy] Update TODO comment check The doc for g

[clang] 88f9ac3 - [doc] [C++20] [Modules] Add docs and release notes for '-Wdecls-in-multiple-modules'

2024-08-25 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-08-26T10:52:05+08:00 New Revision: 88f9ac380d8b40742aea11c8278652711261abff URL: https://github.com/llvm/llvm-project/commit/88f9ac380d8b40742aea11c8278652711261abff DIFF: https://github.com/llvm/llvm-project/commit/88f9ac380d8b40742aea11c8278652711261abff.diff LO

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

2024-08-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Having debugged the failing scenario a bit (see [this comment](https://github.com/llvm/llvm-project/issues/99617#issuecomment-2309220224)), my sense is that we do not want to accept `MacroRefs` entries which are not in t

[clang] 2579b41 - [clang-cl] [AST] Fix MS 1920+ placeholder return type mangling for lambdas (#105999)

2024-08-25 Thread via cfe-commits
Author: Max Winkler Date: 2024-08-25T20:48:07-07:00 New Revision: 2579b411a13799534c8b8a22246134b88ba7785d URL: https://github.com/llvm/llvm-project/commit/2579b411a13799534c8b8a22246134b88ba7785d DIFF: https://github.com/llvm/llvm-project/commit/2579b411a13799534c8b8a22246134b88ba7785d.diff L

[clang] [clang-cl] [AST] Fix MS 1920+ placeholder return type mangling for lambdas (PR #105999)

2024-08-25 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/105999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AArch64] Add SME2.1 feature macros (PR #105657)

2024-08-25 Thread Amara Emerson via cfe-commits
aemerson wrote: These need to be back ported onto the release branch ASAP. https://github.com/llvm/llvm-project/pull/105657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] poor diagnostic due to overloading in extern "C" block (PR #106033)

2024-08-25 Thread via cfe-commits
https://github.com/s-watanabe314 created https://github.com/llvm/llvm-project/pull/106033 Fixes #80235 When trying to overload a function within `extern "C"`, the diagnostic `functions that differ only in their return type cannot be overloaded` is given. This diagnostic is inappropriate becau

[clang] poor diagnostic due to overloading in extern "C" block (PR #106033)

2024-08-25 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] poor diagnostic due to overloading in extern "C" block (PR #106033)

2024-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (s-watanabe314) Changes Fixes #80235 When trying to overload a function within `extern "C"`, the diagnostic `functions that differ only in their return type cannot be overloaded` is given. This diagnostic is inappropriate because ov

[clang] [clang-cl] [AST] Fix MS 1920+ placeholder return type mangling for lambdas (PR #105999)

2024-08-25 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-buildbot1` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/3102 Here is the relevant piece of the b

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-25 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/106036 Fixes #92196 https://eel.is/c++draft/macro.names#2 > A translation unit shall not #define or #undef names lexically identical to > keywords, to the identifiers listed in Table > [4](https://eel.is/c++draft/

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #92196 https://eel.is/c++draft/macro.names#2 > A translation unit shall not #define or #undef names lexically identical to keywords, to the identifiers listed in Table [4](https://eel.is/c++draft/l

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-08-25 Thread via cfe-commits
cor3ntin wrote: I think this is reasonable. We are missing a changelog entry though https://github.com/llvm/llvm-project/pull/89934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-08-25 Thread via cfe-commits
@@ -91,15 +91,60 @@ void bar() { namespace GH82104 { -template int Zero = 0; +template int Value = sizeof...(D); -template -using T14 = decltype([]() { return Zero; }()); +template +using T14 = decltype([](auto Param) { + return Value + V + (int)sizeof(Param); +}("hell

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

2024-08-25 Thread via cfe-commits
@@ -10705,7 +10705,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/1815.html";>1815 CD4 Lifetime extension in aggregate initialization -No +Clang 19 cor3ntin wrote: ```suggestion Clang 20 ``` https:

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

2024-08-25 Thread via cfe-commits
@@ -5567,19 +5568,35 @@ ExprResult Sema::BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field) { ImmediateCallVisitor V(getASTContext()); if (!NestedDefaultChecking) V.TraverseDecl(Field); - if (V.HasImmediateCalls) { + + // CWG1815 + // Support lifetime ext

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

2024-08-25 Thread via cfe-commits
@@ -5567,19 +5568,35 @@ ExprResult Sema::BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field) { ImmediateCallVisitor V(getASTContext()); if (!NestedDefaultChecking) V.TraverseDecl(Field); - if (V.HasImmediateCalls) { + + // CWG1815 + // Support lifetime ext

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-08-25 Thread Younan Zhang via cfe-commits
@@ -91,15 +91,60 @@ void bar() { namespace GH82104 { -template int Zero = 0; +template int Value = sizeof...(D); -template -using T14 = decltype([]() { return Zero; }()); +template +using T14 = decltype([](auto Param) { + return Value + V + (int)sizeof(Param); +}("hell

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-08-25 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > We are missing a changelog entry though No release entry because this was intended to be a fix for 19 regression and we now want to backport it :) https://github.com/llvm/llvm-project/pull/89934 ___ cfe-commits mailing list cfe-commi

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-25 Thread Younan Zhang via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { zyn0217 wrote: Can you reference some wording here? Are those hardcoded names

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

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

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread via cfe-commits
@@ -972,8 +972,30 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( // equivalence. LocalInstantiationScope ScopeForParameters(S); if (auto *FD = DeclInfo.getDecl()->getAsFunction()) -for (auto *PVD : FD->parameters()) - ScopeForParameters

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread via cfe-commits
@@ -972,8 +972,30 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( // equivalence. LocalInstantiationScope ScopeForParameters(S); if (auto *FD = DeclInfo.getDecl()->getAsFunction()) -for (auto *PVD : FD->parameters()) - ScopeForParameters

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM. This fixes the bug, however we should explore a more robust solution https://github.com/llvm/llvm-project/pull/102131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread via cfe-commits
cor3ntin wrote: should we rename `SubstituteConstraintExpressionWithoutSatisfaction` to make it clear it only works to compare them? https://github.com/llvm/llvm-project/pull/102131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-25 Thread Yanzuo Liu via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { + const LangOptions &Lang = PP.getLangOpts(); + const StringRef Name = II->getName(); + + if

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread Younan Zhang via cfe-commits
@@ -972,8 +972,30 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( // equivalence. LocalInstantiationScope ScopeForParameters(S); if (auto *FD = DeclInfo.getDecl()->getAsFunction()) -for (auto *PVD : FD->parameters()) - ScopeForParameters

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > should we rename SubstituteConstraintExpressionWithoutSatisfaction to make it > clear it only works to compare them? Good idea. How about `SubstituteConstraintExpressionForEquivalenceChecking` then? We can rename it in the next PR. https://github.com/llvm/llvm-project/pull/

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/102131 >From aa99ac433c9d383bfca732c19e5082a555f64c2d Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 6 Aug 2024 20:08:43 +0800 Subject: [PATCH 1/3] [Clang][Concepts] Fix the constraint equivalence checking for

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/102131 >From aa99ac433c9d383bfca732c19e5082a555f64c2d Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 6 Aug 2024 20:08:43 +0800 Subject: [PATCH 1/4] [Clang][Concepts] Fix the constraint equivalence checking for

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 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 3364284d87035eaac9662d345d4ddee2714f8fd7 811bfc9011adf48bb22cce3e0ece0f7539bd095c --e

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-25 Thread Oleksandr T. via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { a-tarasyuk wrote: >From my, attribute names aren't typical language keywords,

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-25 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-25 Thread via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { cor3ntin wrote: `likely` is reserved, `likely()` is not. Also, as we support a

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-25 Thread via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { cor3ntin wrote: Can we tablegen that somehow? https://github.com/llvm/llvm-pr

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-25 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-08-25 Thread via cfe-commits
@@ -5421,34 +5635,139 @@ static bool isAtLeastAsSpecializedAs(Sema &S, SourceLocation Loc, // the partial ordering is done: TemplateDeductionInfo Info(Loc); switch (TPOC) { - case TPOC_Call: -if (DeduceTemplateArguments(S, TemplateParams, Args2.data(), Args2.size(

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-25 Thread Oleksandr T. via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { a-tarasyuk wrote: > Can we tablegen that somehow? @cor3ntin Oke, I'll check..

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

2024-08-25 Thread via cfe-commits
@@ -1307,6 +1304,62 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams, return TemplateDeductionResult::Success; } +/// Deduce the template arguments by comparing the list of parameter +/// types to the list of argument types, as in the parameter-type

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

2024-08-25 Thread via cfe-commits
cor3ntin wrote: @mizvekov please avoid force pushing (prefer merging from main and push new commits) - otherwise github sometimes eat comments which makes review difficult. I previously mentioned that your changes to `getMoreSpecializedTemplate` probably needed explicit object parameters tests

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread via cfe-commits
@@ -972,8 +972,30 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( // equivalence. LocalInstantiationScope ScopeForParameters(S); if (auto *FD = DeclInfo.getDecl()->getAsFunction()) -for (auto *PVD : FD->parameters()) - ScopeForParameters

[clang] e6974da - [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (#102131)

2024-08-25 Thread via cfe-commits
Author: Younan Zhang Date: 2024-08-26T14:30:26+08:00 New Revision: e6974daa7bc100c8b88057d50f3ec3eca7282243 URL: https://github.com/llvm/llvm-project/commit/e6974daa7bc100c8b88057d50f3ec3eca7282243 DIFF: https://github.com/llvm/llvm-project/commit/e6974daa7bc100c8b88057d50f3ec3eca7282243.diff

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/102131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

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

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-08-25 Thread via cfe-commits
cor3ntin wrote: Does it makes sense to also support function templates? For example, my understanding is that specializing `is_pointer_interconvertible_with_class()` would be UB https://github.com/llvm/llvm-project/pull/101469 ___ cfe-commits mailing

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread Younan Zhang via cfe-commits
zyn0217 wrote: /cherry-pick e6974daa7 https://github.com/llvm/llvm-project/pull/102131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread via cfe-commits
llvmbot wrote: >/cherry-pick e6974daa7 Error: Command failed due to missing milestone. https://github.com/llvm/llvm-project/pull/102131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-08-25 Thread via cfe-commits
@@ -0,0 +1,120 @@ +//===--- IncorrectEnableSharedFromThisCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-08-25 Thread via cfe-commits
https://github.com/MichelleCDjunaidi edited https://github.com/llvm/llvm-project/pull/102299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 milestoned https://github.com/llvm/llvm-project/pull/102131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread Younan Zhang via cfe-commits
zyn0217 wrote: /cherry-pick e6974daa https://github.com/llvm/llvm-project/pull/102131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread Younan Zhang via cfe-commits
@@ -972,8 +972,30 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( // equivalence. LocalInstantiationScope ScopeForParameters(S); if (auto *FD = DeclInfo.getDecl()->getAsFunction()) -for (auto *PVD : FD->parameters()) - ScopeForParameters

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-08-25 Thread via cfe-commits
MichelleCDjunaidi wrote: @5chmidti Thanks for the pointers, I've implemented your suggestion. For future knowledge, what do you mean by > it is technically not in the format of the RecursiveASTVisitor and may be > confusing ? Is there a guide that can point out what format Visit should have?

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-25 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#106043 https://github.com/llvm/llvm-project/pull/102131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix misalignments of pointers in angle brackets (PR #106013)

2024-08-25 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/106013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits