[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91876 >From a4b877b240ede15260f08fcb4a4622dd45a13d0a Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 11 May 2024 20:18:52 -0700 Subject: [PATCH 1/6] [analyzer] Allow recursive functions to be trivial. --- .../Che

[clang] [Documentation][Blocks ABI] Fix typoed integer (PR #65688)

2024-05-12 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta closed https://github.com/llvm/llvm-project/pull/65688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5082fea - [Documentation][Blocks ABI] Fix typoed integer (#65688)

2024-05-12 Thread via cfe-commits
Author: Alcaro Date: 2024-05-13T12:03:39+05:30 New Revision: 5082feabd155a59d7ae0249713def100516b839d URL: https://github.com/llvm/llvm-project/commit/5082feabd155a59d7ae0249713def100516b839d DIFF: https://github.com/llvm/llvm-project/commit/5082feabd155a59d7ae0249713def100516b839d.diff LOG: [

[clang] [Clang][Sema] Fix malformed AST for anonymous class access in template. (PR #90842)

2024-05-12 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. Nothing further on my side, LGTM https://github.com/llvm/llvm-project/pull/90842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Documentation][Blocks ABI] Fix typoed integer (PR #65688)

2024-05-12 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta updated https://github.com/llvm/llvm-project/pull/65688 >From eede884bb0e374d6ce0db4811ab1a62fc21f4c2c Mon Sep 17 00:00:00 2001 From: Alcaro Date: Fri, 4 Jun 2021 09:25:40 +0200 Subject: [PATCH] Fix typoed integer --- clang/docs/Block-ABI-Apple.rst | 2 +- 1 file cha

[clang] [Clang][Sema] Fix malformed AST for anonymous class access in template. (PR #90842)

2024-05-12 Thread via cfe-commits
martinboehme wrote: @zygoloid @shafik Any additional comments here, or is this good to go? https://github.com/llvm/llvm-project/pull/90842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [clang-format] Fix FormatToken::isSimpleTypeSpecifier() (PR #91712)

2024-05-12 Thread Owen Pan via cfe-commits
owenca wrote: @dyung I've reverted all relevant commits in commit 1fadb2b0c881ced247931f442fdee6c4ed96dccb. https://github.com/llvm/llvm-project/pull/91712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91876 >From a4b877b240ede15260f08fcb4a4622dd45a13d0a Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 11 May 2024 20:18:52 -0700 Subject: [PATCH 1/5] [analyzer] Allow recursive functions to be trivial. --- .../Che

[clang] 1fadb2b - Revert "[clang-format] Fix FormatToken::isSimpleTypeSpecifier() (#91712)"

2024-05-12 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-05-12T23:15:35-07:00 New Revision: 1fadb2b0c881ced247931f442fdee6c4ed96dccb URL: https://github.com/llvm/llvm-project/commit/1fadb2b0c881ced247931f442fdee6c4ed96dccb DIFF: https://github.com/llvm/llvm-project/commit/1fadb2b0c881ced247931f442fdee6c4ed96dccb.diff LOG:

[clang-tools-extra] [flang] [lld] [llvm] Use StringRef::operator== instead of StringRef::equals (NFC) (PR #91864)

2024-05-12 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/91864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e74a34b - [NFC] [Serialization] Merge IdentID with IdentifierID

2024-05-12 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-05-13T14:05:02+08:00 New Revision: e74a34b6932965dfdc182b69f779e5bee551585a URL: https://github.com/llvm/llvm-project/commit/e74a34b6932965dfdc182b69f779e5bee551585a DIFF: https://github.com/llvm/llvm-project/commit/e74a34b6932965dfdc182b69f779e5bee551585a.diff LO

[clang] [serialization] no transitive decl change (PR #91914)

2024-05-12 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/91914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [serialization] no transitive decl change (PR #91914)

2024-05-12 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/91914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [serialization] no transitive decl change (PR #91914)

2024-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes Following of https://github.com/llvm/llvm-project/pull/86912 Motivation Example The motivation of the patch series is that, for a module interface unit `X`, when the dependent modules of `X` c

[clang] [serialization] no transitive decl change (PR #91914)

2024-05-12 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 ready_for_review https://github.com/llvm/llvm-project/pull/91914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [serialization] no transitive decl change (PR #91914)

2024-05-12 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/91914 Following of https://github.com/llvm/llvm-project/pull/86912 Motivation Example The motivation of the patch series is that, for a module interface unit `X`, when the dependent modules of `X` changes, if

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-05-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/91303 >From a1cefd4b17bb540568472e753b7d4684a99bdda9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 10 Apr 2024 16:42:36 +0200 Subject: [PATCH] Memberpointers --- clang/lib/AST/CMakeLists.tx

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-05-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/91303 >From c8bddc0573c62f288314b4407ba500dcc9b84425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 10 Apr 2024 16:42:36 +0200 Subject: [PATCH] Memberpointers --- clang/lib/AST/CMakeLists.tx

[clang] [clang-format] Fix FormatToken::isSimpleTypeSpecifier() (PR #91712)

2024-05-12 Thread via cfe-commits
dyung wrote: Hi @owenca, this change is causing a test failure in the sanitizer bot (https://lab.llvm.org/buildbot/#/builders/5/builds/43303), that is still failing as of your most recent fix de641e2 (https://lab.llvm.org/buildbot/#/builders/5/builds/43334). Can you please revert if you need

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-12 Thread Fangrui Song via cfe-commits
@@ -45,10 +45,10 @@ # RUN: ld.lld -Ttext 0x201000 %t.o -o %t4 # RUN: llvm-readelf -S -l %t4 | FileCheck %s --check-prefix=USER3 # USER3: .text PROGBITS 00201000 001000 01 -# USER3-NEX: .rodata PROGBITS 00202000 002000 08 -# USER3-NEX: .aw PROGB

[clang] Reland "[Win32][ELF] Make CodeView a DebugInfoFormat only for COFF format", second try (PR #88245)

2024-05-12 Thread Phoebe Wang via cfe-commits
phoebewang wrote: Ping? https://github.com/llvm/llvm-project/pull/88245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-12 Thread via cfe-commits
https://github.com/JoverZhang edited https://github.com/llvm/llvm-project/pull/91588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [WIP][clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-12 Thread via cfe-commits
JoverZhang wrote: > Please add an entry to the release notes here: > > https://github.com/llvm/llvm-project/blob/502e77df1fc4aa859db6709e14e93af6207e4dc4/clang-tools-extra/docs/ReleaseNotes.rst?plain=1#L176 > > > do note that the entries are sorted by their check names. > Otherwise looks good.

[clang-tools-extra] [WIP][clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-12 Thread via cfe-commits
https://github.com/JoverZhang updated https://github.com/llvm/llvm-project/pull/91588 >From 19bf94ca3c093a6904482eab599f8366cad1384e Mon Sep 17 00:00:00 2001 From: Jover Zhang Date: Thu, 9 May 2024 20:56:51 +0800 Subject: [PATCH 1/3] [clang-tidy] Ignore `if consteval` in else-after-return ---

[clang-tools-extra] [WIP][clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-12 Thread via cfe-commits
https://github.com/JoverZhang updated https://github.com/llvm/llvm-project/pull/91588 >From 19bf94ca3c093a6904482eab599f8366cad1384e Mon Sep 17 00:00:00 2001 From: Jover Zhang Date: Thu, 9 May 2024 20:56:51 +0800 Subject: [PATCH 1/3] [clang-tidy] Ignore `if consteval` in else-after-return ---

[clang] de641e2 - [clang-format] Fix buildbot failures

2024-05-12 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-05-12T18:56:18-07:00 New Revision: de641e289269061f8bdb138bb5c50e27ef4b354f URL: https://github.com/llvm/llvm-project/commit/de641e289269061f8bdb138bb5c50e27ef4b354f DIFF: https://github.com/llvm/llvm-project/commit/de641e289269061f8bdb138bb5c50e27ef4b354f.diff LOG:

[clang] 626025a - Revert "[clang-format] Fix buildbot failures"

2024-05-12 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-05-12T18:35:35-07:00 New Revision: 626025ac7796b70cde9fc0fd4f688c3441949d04 URL: https://github.com/llvm/llvm-project/commit/626025ac7796b70cde9fc0fd4f688c3441949d04 DIFF: https://github.com/llvm/llvm-project/commit/626025ac7796b70cde9fc0fd4f688c3441949d04.diff LOG:

[clang] [clang] visit constraint of NTTP (PR #91842)

2024-05-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/91842 >From 0ebdcec675c39b26b8bee1a8b07c12fae2c58523 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sat, 11 May 2024 14:04:23 +0800 Subject: [PATCH] [clang] visit constraint of NTTP --- clang/docs/ReleaseNotes.rst

[clang] [clang] visit constraint of NTTP (PR #91842)

2024-05-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/91842 >From 4133001711b82c93e057e1bd05476c5d052d597f Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sat, 11 May 2024 14:04:23 +0800 Subject: [PATCH] [clang] visit constraint of NTTP --- clang/docs/ReleaseNotes.rst

[clang] 5bde801 - [X86][vectorcall] Pass built types byval when xmm0~6 exhausted (#91846)

2024-05-12 Thread via cfe-commits
Author: Phoebe Wang Date: 2024-05-13T08:31:49+08:00 New Revision: 5bde8017a1109128d011510dcf4ba79140a224fe URL: https://github.com/llvm/llvm-project/commit/5bde8017a1109128d011510dcf4ba79140a224fe DIFF: https://github.com/llvm/llvm-project/commit/5bde8017a1109128d011510dcf4ba79140a224fe.diff L

[clang] [X86][vectorcall] Pass built types byval when xmm0~6 exhausted (PR #91846)

2024-05-12 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/91846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91876 >From a4b877b240ede15260f08fcb4a4622dd45a13d0a Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 11 May 2024 20:18:52 -0700 Subject: [PATCH 1/4] [analyzer] Allow recursive functions to be trivial. --- .../Che

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91876 >From a4b877b240ede15260f08fcb4a4622dd45a13d0a Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 11 May 2024 20:18:52 -0700 Subject: [PATCH 1/3] [analyzer] Allow recursive functions to be trivial. --- .../Che

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-12 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: > You should add a test for mutually recursive functions. I suspect something > like this doesn't work: > > ```c++ > int non_trivial(); > int f(bool b) { return g(!b) + non_trivial(); } > int g(bool b) { return b ? f(b) : 1; } > > getFieldTrivial().f(true); // exp

[clang] [CodeGen] Revert "Generate assume loads only with -fstrict-vtable-pointers" (PR #91900)

2024-05-12 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/91900 >From d2e06b957cada08371131874219973c7cbd9b196 Mon Sep 17 00:00:00 2001 From: Rose Date: Sun, 12 May 2024 16:45:07 -0400 Subject: [PATCH] [CodeGen] Revert "Generate assume loads only with -fstrict-vtable-poi

[clang] [CodeGen] Revert "Generate assume loads only with -fstrict-vtable-pointers" (PR #91900)

2024-05-12 Thread via cfe-commits
https://github.com/AtariDreams edited https://github.com/llvm/llvm-project/pull/91900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Revert "Generate assume loads only with -fstrict-vtable-pointers" (PR #91900)

2024-05-12 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/91900 >From 74e4d18ffe6efed565a6bd736eb7e289e7ede73b Mon Sep 17 00:00:00 2001 From: Rose Date: Sun, 12 May 2024 16:45:07 -0400 Subject: [PATCH] [CodeGen] Revert "Generate assume loads only with -fstrict-vtable-poi

[clang] [ARM][clang] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-05-12 Thread Chris Copeland via cfe-commits
chrisnc wrote: I'd like to also address #47815, but I wasn't able to find the right path to answer "is this M-profile" from `TargetInfo`. Would appreciate any suggestions on that. I think it may require `dynamic_cast`-ing the `TargetInfo` to an `ARMTargetInfo`, and then change one of the metho

[clang] [CodeGen] Revert "Generate assume loads only with -fstrict-vtable-pointers" (PR #91900)

2024-05-12 Thread via cfe-commits
https://github.com/AtariDreams edited https://github.com/llvm/llvm-project/pull/91900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[CodeGen] Emit vtable assumptions without requiring -fstrict-vtable-pointers" (PR #91900)

2024-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: AtariDreams (AtariDreams) Changes This was supposed to be a temporary measure, but unfortunately as things tend to go in software development, temporary measures become permanent. In the 9 years since then, we have greatly improved the wa

[clang] Revert "[CodeGen] Emit vtable assumptions without requiring -fstrict-vtable-pointers" (PR #91900)

2024-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: AtariDreams (AtariDreams) Changes This was supposed to be a temporary measure, but unfortunately as things tend to go in software development, temporary measures become permanent. In the 9 years since then, we have greatly improve

[clang] Revert "[CodeGen] Emit vtable assumptions without requiring -fstrict-vtable-pointers" (PR #91900)

2024-05-12 Thread via cfe-commits
https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/91900 This was supposed to be a temporary measure, but unfortunately as things tend to go in software development, temporary measures become permanent. In the 9 years since then, we have greatly improved the way I

[clang] [ARM][clang] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-05-12 Thread Chris Copeland via cfe-commits
https://github.com/chrisnc edited https://github.com/llvm/llvm-project/pull/91870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM][clang] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-05-12 Thread Chris Copeland via cfe-commits
https://github.com/chrisnc updated https://github.com/llvm/llvm-project/pull/91870 >From b72b63c51b1859e1a7e792eda20549ef93c8d6c0 Mon Sep 17 00:00:00 2001 From: Chris Copeland Date: Sat, 11 May 2024 00:15:50 -0700 Subject: [PATCH] [ARM][clang] Fix warning for VFP function calls from interrupts

[clang-tools-extra] [flang] [lld] [llvm] Use StringRef::operator== instead of StringRef::equals (NFC) (PR #91864)

2024-05-12 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar approved this pull request. https://github.com/llvm/llvm-project/pull/91864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [flang] [lld] [llvm] Use StringRef::operator== instead of StringRef::equals (NFC) (PR #91864)

2024-05-12 Thread Amir Ayupov via cfe-commits
https://github.com/aaupov approved this pull request. BOLT changes LGTM https://github.com/llvm/llvm-project/pull/91864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add attribute for consteval builtins; Declare constexpr builtins as constexpr in C++ (PR #91894)

2024-05-12 Thread Mital Ashok via cfe-commits
MitalAshok wrote: Currently, GCC's behaviour for builtin function redeclarations is to just ignore `constexpr`: . This is slightly stricter, allowing non-`constexpr` redeclarations for `constexpr` builtins but still disallowing `constexpr` declarations for non-

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-05-12 Thread Mital Ashok via cfe-commits
MitalAshok wrote: This is on top of #91894 [P2641R4](https://wg21.link/P2641R4) Currently, this doesn't strictly check "whose complete object's lifetime began within `E`". A bunch of the static_asserts I have for objects under construction should be ill-formed instead of false, but some of th

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-05-12 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 17daa204feadf9c28fc13b7daa69c3cbe865b238 253f58f0e34bc6dedbbfe17f68cfe9baa3a9146f --

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-05-12 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/91895 None >From 56aed689dc5825fc5bacc6dfdff58ee0eaf71f82 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 12 May 2024 19:48:24 +0100 Subject: [PATCH 1/2] [Clang] Add attribute for consteval builtins; Declare

[clang] [Clang] Add attribute for consteval builtins; Declare constexpr builtins as constexpr in C++ (PR #91894)

2024-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes Also support redeclaring now-constexpr builtins without constexpr --- Full diff: https://github.com/llvm/llvm-project/pull/91894.diff 6 Files Affected: - (modified) clang/include/clang/Basic/Builtins.h (

[clang] [Clang] Add attribute for consteval builtins; Declare constexpr builtins as constexpr in C++ (PR #91894)

2024-05-12 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/91894 Also support redeclaring now-constexpr builtins without constexpr >From 56aed689dc5825fc5bacc6dfdff58ee0eaf71f82 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 12 May 2024 19:48:24 +0100 Subject: [PATC

[clang] [analyzer] Allow recursive functions to be trivial. (PR #91876)

2024-05-12 Thread Mital Ashok via cfe-commits
MitalAshok wrote: You should add a test for mutually recursive functions. I suspect something like this doesn't work: ```c++ int non_trivial(); int f(bool b) { return g(!b) + non_trivial(); } int g(bool b) { return b ? f(b) : 1; } getFieldTrivial().f(true); // expected-warning

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-12 Thread Eli Friedman via cfe-commits
@@ -1950,8 +1950,22 @@ ConstantLValueEmitter::tryEmitBase(const APValue::LValueBase &base) { if (D->hasAttr()) return CGM.GetWeakRefReference(D).getPointer(); -if (auto FD = dyn_cast(D)) - return CGM.GetAddrOfFunction(FD); +if (auto FD = dyn_cast(D)) {

[clang] [Clang] Added check for unexpanded pack in attribute [[assume]] (PR #91893)

2024-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Azmat Yusuf (azmat-y) Changes Added a check for unexpanded parameter pack in attribute [[assume]]. Tested it with expected-error statements from clang fronted. This fixes #91232. @Sirraide --- Full diff: https://github.com/llvm/llvm-pro

[clang] [Clang] Added check for unexpanded pack in attribute [[assume]] (PR #91893)

2024-05-12 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] Added check for unexpanded pack in attribute [[assume]] (PR #91893)

2024-05-12 Thread Azmat Yusuf via cfe-commits
https://github.com/azmat-y created https://github.com/llvm/llvm-project/pull/91893 Added a check for unexpanded parameter pack in attribute [[assume]]. Tested it with expected-error statements from clang fronted. This fixes #91232. @Sirraide >From cbb35bd010f2d46ae70367549a2838841a55aeb7 Mon

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: amdgpu changes lgtm https://github.com/llvm/llvm-project/pull/91854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #91879)

2024-05-12 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/91879 >From 6969f06f39363deda92d473ec14a08663c71f3b1 Mon Sep 17 00:00:00 2001 From: yronglin Date: Sun, 12 May 2024 14:42:09 +0800 Subject: [PATCH] [Analyzer][CFG] Correctly handle rebuilted default arg and default i

[clang] 17daa20 - [Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer (#87933)

2024-05-12 Thread via cfe-commits
Author: yronglin Date: 2024-05-13T01:16:36+08:00 New Revision: 17daa204feadf9c28fc13b7daa69c3cbe865b238 URL: https://github.com/llvm/llvm-project/commit/17daa204feadf9c28fc13b7daa69c3cbe865b238 DIFF: https://github.com/llvm/llvm-project/commit/17daa204feadf9c28fc13b7daa69c3cbe865b238.diff LOG:

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

2024-05-12 Thread via cfe-commits
https://github.com/yronglin closed https://github.com/llvm/llvm-project/pull/87933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][vectorcall] Pass built types byval when xmm0~6 exhausted (PR #91846)

2024-05-12 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/91846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-12 Thread via cfe-commits
yronglin wrote: > > I'd like to proposal a separate PR for static analyzer. #91879 WDYT? > > That sounds good to me. Thanks for your confirmation! If you don’t have any concerns, I'd like to land this PR. 🤩 https://github.com/llvm/llvm-project/pull/87933 __

[clang] [llvm] [X86][Driver] Do not add `-evex512` for `-march=native` when the target doesn't support AVX512 (PR #91694)

2024-05-12 Thread Mike Lothian via cfe-commits
FireBurn wrote: No worries, it's fixed now, llvm, nodejs and libreoffice are all compiling fine again https://github.com/llvm/llvm-project/pull/91694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #91879)

2024-05-12 Thread via cfe-commits
@@ -2433,6 +2429,30 @@ CFGBlock *CFGBuilder::VisitChildren(Stmt *S) { return B; } +CFGBlock *CFGBuilder::VisitCXXDefaultArgExpr(CXXDefaultArgExpr *Arg, + AddStmtChoice asc) { + if (Arg->hasRewrittenInit()) { +if (asc.alwaysAdd

[clang] Pass QualifiedRenameRule strings by reference to reduce copies (PR #69848)

2024-05-12 Thread Joe Loser via cfe-commits
https://github.com/JoeLoser approved this pull request. https://github.com/llvm/llvm-project/pull/69848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-12 Thread Richard Smith via cfe-commits
zygoloid wrote: > I'd like to proposal a separate PR for static analyzer. #91879 WDYT? That sounds good to me. https://github.com/llvm/llvm-project/pull/87933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #91879)

2024-05-12 Thread Richard Smith via cfe-commits
@@ -2433,6 +2429,30 @@ CFGBlock *CFGBuilder::VisitChildren(Stmt *S) { return B; } +CFGBlock *CFGBuilder::VisitCXXDefaultArgExpr(CXXDefaultArgExpr *Arg, + AddStmtChoice asc) { + if (Arg->hasRewrittenInit()) { +if (asc.alwaysAdd

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #91879)

2024-05-12 Thread Richard Smith via cfe-commits
@@ -2433,6 +2429,30 @@ CFGBlock *CFGBuilder::VisitChildren(Stmt *S) { return B; } +CFGBlock *CFGBuilder::VisitCXXDefaultArgExpr(CXXDefaultArgExpr *Arg, + AddStmtChoice asc) { + if (Arg->hasRewrittenInit()) { +if (asc.alwaysAdd

[clang-tools-extra] [WIP][clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-12 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %check_clang_tidy -std=c++20 %s readability-else-after-return %t 5chmidti wrote: While `consteval` was added in C++20, `if consteval` is a C++23 feature. Please use `-std=c++23` https://en.cppreference.com/w/cpp/language/if#Consteval_i

[clang-tools-extra] [WIP][clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-12 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: Please add an entry to the release notes here: https://github.com/llvm/llvm-project/blob/502e77df1fc4aa859db6709e14e93af6207e4dc4/clang-tools-extra/docs/ReleaseNotes.rst?plain=1#L176 do note that the entries are sorted by their check names. Otherwise looks

[clang-tools-extra] [WIP][clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

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

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-12 Thread Jim M . R . Teichgräber via cfe-commits
https://github.com/J-MR-T edited https://github.com/llvm/llvm-project/pull/91891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-12 Thread Jim M . R . Teichgräber via cfe-commits
https://github.com/J-MR-T edited https://github.com/llvm/llvm-project/pull/91891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-12 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] Disallow VLA type compound literals (PR #91891)

2024-05-12 Thread Jim M . R . Teichgräber via cfe-commits
https://github.com/J-MR-T created https://github.com/llvm/llvm-project/pull/91891 C99-C23 6.5.2.5 says: The type name shall specify an object type or an array of unknown size, but not a variable length array type. Closes issue #89835 . I ran `git clang-format`'ed my changes and ran the clang

[clang] [llvm] [X86][Driver] Do not add `-evex512` for `-march=native` when the target doesn't support AVX512 (PR #91694)

2024-05-12 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > You'll be probably building 18.1.6 with 18.1.5... and that's when you'll > notice the issue. I'm just about finished building 18.1.5 with your patch. So > hopefully all those issues will be gone. I'll report back Okay... This is a combined problem which I never thought befo

[clang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [mlir] [openmp] [polly] fix(python): fix comparison to None (PR #91857)

2024-05-12 Thread Mircea Trofin via cfe-commits
https://github.com/mtrofin approved this pull request. LGTM for the `ctx_profile` part. https://github.com/llvm/llvm-project/pull/91857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][Driver] Do not add `-evex512` for `-march=native` when the target doesn't support AVX512 (PR #91694)

2024-05-12 Thread Mike Lothian via cfe-commits
FireBurn wrote: You'll be probably building 18.1.6 with 18.1.5... and that's when you'll notice the issue. I'm just about finished building 18.1.5 with your patch. So hopefully all those issues will be gone. I'll report back https://github.com/llvm/llvm-project/pull/91694 _

[clang] [llvm] [X86][Driver] Do not add `-evex512` for `-march=native` when the target doesn't support AVX512 (PR #91694)

2024-05-12 Thread Phoebe Wang via cfe-commits
phoebewang wrote: @FireBurn Sorry, I just noticed #91719. The above comments were based on the issue #91076. I didn't look at the source, but the command line doesn't have an AVX512 option. So I'm assuming the code may related function multi-versioning with manually specified target attribute

[clang-tools-extra] [WIP][clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Jover (JoverZhang) Changes Fixes #91561. --- Full diff: https://github.com/llvm/llvm-project/pull/91588.diff 2 Files Affected: - (modified) clang-tools-extra/clang-tidy/readability/ElseAfterRe

[clang-tools-extra] [WIP][clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-12 Thread via cfe-commits
https://github.com/JoverZhang ready_for_review https://github.com/llvm/llvm-project/pull/91588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [WIP][clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-12 Thread via cfe-commits
JoverZhang wrote: > Thanks for your patch! Would you be able to add a test case for this please? Yes, thanks. I added a test case. https://github.com/llvm/llvm-project/pull/91588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang-tools-extra] [WIP][clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-12 Thread via cfe-commits
https://github.com/JoverZhang updated https://github.com/llvm/llvm-project/pull/91588 >From 19bf94ca3c093a6904482eab599f8366cad1384e Mon Sep 17 00:00:00 2001 From: Jover Zhang Date: Thu, 9 May 2024 20:56:51 +0800 Subject: [PATCH 1/2] [clang-tidy] Ignore `if consteval` in else-after-return ---

[clang-tools-extra] [WIP][clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-12 Thread via cfe-commits
https://github.com/JoverZhang updated https://github.com/llvm/llvm-project/pull/91588 >From 19bf94ca3c093a6904482eab599f8366cad1384e Mon Sep 17 00:00:00 2001 From: Jover Zhang Date: Thu, 9 May 2024 20:56:51 +0800 Subject: [PATCH 1/2] [clang-tidy] Ignore `if consteval` in else-after-return ---

[clang] [clang][NFC] Remove class layout scissor (PR #89055)

2024-05-12 Thread Nathan Sidwell via cfe-commits
https://github.com/urnathan closed https://github.com/llvm/llvm-project/pull/89055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1d6bf0c - [clang][NFC] Remove class layout scissor (#89055)

2024-05-12 Thread via cfe-commits
Author: Nathan Sidwell Date: 2024-05-12T09:45:00-04:00 New Revision: 1d6bf0ca29322b08e8b50681d440e7182441b025 URL: https://github.com/llvm/llvm-project/commit/1d6bf0ca29322b08e8b50681d440e7182441b025 DIFF: https://github.com/llvm/llvm-project/commit/1d6bf0ca29322b08e8b50681d440e7182441b025.diff

[clang] [llvm] [X86][Driver] Do not add `-evex512` for `-march=native` when the target doesn't support AVX512 (PR #91694)

2024-05-12 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > @tstellar Can a note be added somewhere about this? Folks upgrading to > llvm-18.1.6 will get errors unless they drop -march=native if they were on > 18.1.5 Although I agree we should add a note, I don't think this patch affects much. The problem only coccurs when combinin

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-12 Thread via cfe-commits
@@ -109,16 +109,16 @@ CHECK-NEXT: 0x000e: [DW_RLE_offset_pair ]: {{.*}}[0x[[RANGELIST_OFFSET_STAR CHECK-NEXT: 0x0011: [DW_RLE_end_of_list ] CHECK: .debug_names contents: -CHECK-NEX:T Name Index @ 0x0 { -CHECK-NEX:T Header { -CHECK-NEX:T Length: 0x7C -CHECK-NEX

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-12 Thread via cfe-commits
@@ -1,6 +1,6 @@ // RUN: llvm-mc -filetype=asm -triple powerpc-ibm-aix-xcoff %s | FileCheck %s -// CHECK-label: .csect .text[PR],2 klensy wrote: actual: `.csect ..text..[PR],5` https://github.com/llvm/llvm-project/pull/91854 _

[clang] [llvm] [X86][Driver] Do not add `-evex512` for `-march=native` when the target doesn't support AVX512 (PR #91694)

2024-05-12 Thread Mike Lothian via cfe-commits
FireBurn wrote: @tstellar Can a note be added somewhere about this? Folks upgrading to llvm-18.1.6 will get errors unless they drop -march=native if they were on 18.1.5 https://github.com/llvm/llvm-project/pull/91694 ___ cfe-commits mailing list cfe-

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-05-12 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/88182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-05-12 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx commented: > Please fix the commit message before you merge; otherwise LGTM For the commit message I was thinking something along the following lines: `At the moment, Clang is rather liberal in assuming that 0 (and by extension unqualified) is always a safe default.

[clang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [mlir] [openmp] [polly] fix(python): fix comparison to None (PR #91857)

2024-05-12 Thread Oleksandr Alex Zinenko via cfe-commits
https://github.com/ftynse approved this pull request. LGTM for the MLIR part. Please seek approval from relevant reviewers for all other subprojects. https://github.com/llvm/llvm-project/pull/91857 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-12 Thread via cfe-commits
@@ -382,7 +382,7 @@ void foo18() { // CHECK-NEXT: [[A:%.*a.*]] = getelementptr inbounds [[STRUCT_G]], ptr [[G]], i32 0, i32 0 // CHECK-NEXT: store i32 2, ptr [[A]], align 4 // CHECK-NEXT: [[F:%.*f.*]] = getelementptr inbounds [[STRUCT_G]], ptr [[G]], i32 0, i32 1 -// CHECk-NE

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-05-12 Thread Romaric Jodin via cfe-commits
rjodinchr wrote: > > It has nothing to do with OpenMP. The goal was just to get something in the > > llvm IR that we could check for. The `assume` attribute allows us to pass a > > string that we can then check in a llvm pass. > > Could you investigate whether 'annotate' would do what you want

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

2024-05-12 Thread via cfe-commits
yronglin wrote: @zygoloid IIUC, since `CXXDefaultArgExpr` and `CXXDefaultInitExpr` were not added to CFG before and were fall back to constant evaluation in ExprEngine, they were not processed correctly in StaticAnalyzer. In CFG: https://github.com/llvm/llvm-project/blob/63224d717108d927e998d