[clang] [analyzer] Improve some comments in ArrayBoundCheckerV2 (NFC) (PR #83545)

2024-03-03 Thread Gábor Spaits via cfe-commits
https://github.com/spaits approved this pull request. https://github.com/llvm/llvm-project/pull/83545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Parse and Sema support for declare target in local scope (PR #83223)

2024-03-03 Thread Sandeep Kosuri via cfe-commits
https://github.com/sandeepkosuri updated https://github.com/llvm/llvm-project/pull/83223 >From cbf1b4409e379309ae3d942b3dbec0964b9ee0d1 Mon Sep 17 00:00:00 2001 From: Sandeep Kosuri Date: Tue, 27 Feb 2024 23:19:41 -0600 Subject: [PATCH 1/2] [OpenMP] Parse and Sema support for declare target in

[clang] [clang] Add some CodeGen tests for CWG 4xx issues (PR #83715)

2024-03-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/83715 This patch covers the following defect reports: [CWG438](https://cplusplus.github.io/CWG/issues/438.html) "Possible flaw in wording for multiple accesses to object between sequence points", [CWG439](https://cplu

[clang] [clang] Add some CodeGen tests for CWG 4xx issues (PR #83715)

2024-03-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/83715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add some CodeGen tests for CWG 4xx issues (PR #83715)

2024-03-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/83715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add some CodeGen tests for CWG 4xx issues (PR #83715)

2024-03-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch covers the following defect reports: [CWG438](https://cplusplus.github.io/CWG/issues/438.html) "Possible flaw in wording for multiple accesses to object between sequence points", [CWG439](htt

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-03 Thread via cfe-commits
@@ -5042,7 +5042,7 @@ void RecordDecl::completeDefinition() { // Layouts are dumped when computed, so if we are dumping for all complete // types, we need to force usage to get types that wouldn't be used elsewhere. - if (Ctx.getLangOpts().DumpRecordLayoutsComplete) + i

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-03 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/83688 >From 4abc148104769bd756042c73edeb7ee54397a05f Mon Sep 17 00:00:00 2001 From: Sirraide Date: Sat, 2 Mar 2024 20:41:22 +0100 Subject: [PATCH 1/3] [Clang] [Sema] Do not attempt to dump the layout of dependent typ

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-03 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Great example, thanks! Now I understand the "two-level" case better. I don't have any other concerns about the refactor, so feel free to land it or wait for other folks' opinions. https://github.com/llvm/llvm-project/pull/83542 ___ cfe

[clang] [clang][AST] fix dereference on class/struct layouts check. (PR #83686)

2024-03-03 Thread Jack Ren via cfe-commits
bjrjk wrote: Hello, this is a mininal reproducer execute with `clang++ -Xclang -fdump-record-layouts-complete test.cpp`: ```cpp template struct integral_constant { static constexpr const _Tp value = __v; typedef integral_constant type; }; template using _BoolConstant = integral_constant;

[clang] [Clang][Sema] Fix missing warning when comparing mismatched enums in … (PR #81418)

2024-03-03 Thread Stephan Bergmann via cfe-commits
stbergmann wrote: This change started to break the following C++26 code: ``` $ cat test.cc enum E1 { E11 }; enum E2 { E21 = E11, E22 = 1, E23 = E21 + E22 }; ``` ``` clang++ -std=c++26 -fsyntax-only test.cc test.cc:5:15: error: invalid arithmetic between different enumeration types ('

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-03 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This might also fix #83671 https://github.com/llvm/llvm-project/pull/83688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-03 Thread via cfe-commits
Sirraide wrote: > This might also fix #83671 >From what I saw, that’s a different problem, and there’s a different pr for >that already, but I’ll double-check. https://github.com/llvm/llvm-project/pull/83688 ___ cfe-commits mailing list cfe-commits@l

[clang] [clang][AST] fix dereference on class/struct layouts check. (PR #83686)

2024-03-03 Thread David CARLIER via cfe-commits
devnexen wrote: it seems [there is an ongoing fix](https://github.com/llvm/llvm-project/pull/83688), could you possibly try so we can just close this one. https://github.com/llvm/llvm-project/pull/83686 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-03 Thread via cfe-commits
Sirraide wrote: Oh, apparently, there’s *yet another* problem here; it seems we should also check for `isInvalidDecl()`. https://github.com/llvm/llvm-project/pull/83688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-03 Thread Jack Ren via cfe-commits
bjrjk wrote: > > This might also fix #83671 > > From what I saw, that’s a different problem, and there’s a different pr for > that already, but I’ll double-check. Seems not same problem, root cause are different. https://github.com/llvm/llvm-project/pull/83688

[clang] [clang][AST] fix dereference on class/struct layouts check. (PR #83686)

2024-03-03 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I posted a different, even shorter reduction in https://github.com/llvm/llvm-project/issues/83671. https://github.com/llvm/llvm-project/pull/83686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-03 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/83688 >From 4abc148104769bd756042c73edeb7ee54397a05f Mon Sep 17 00:00:00 2001 From: Sirraide Date: Sat, 2 Mar 2024 20:41:22 +0100 Subject: [PATCH 1/4] [Clang] [Sema] Do not attempt to dump the layout of dependent typ

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-03 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/83688 >From 4abc148104769bd756042c73edeb7ee54397a05f Mon Sep 17 00:00:00 2001 From: Sirraide Date: Sat, 2 Mar 2024 20:41:22 +0100 Subject: [PATCH 1/5] [Clang] [Sema] Do not attempt to dump the layout of dependent typ

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-03 Thread via cfe-commits
Sirraide wrote: > This might also fix #83671 Actually, it seems to fix your reduced test case, hmm... https://github.com/llvm/llvm-project/pull/83688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [clang][AST] fix dereference on class/struct layouts check. (PR #83686)

2024-03-03 Thread via cfe-commits
Sirraide wrote: > it seems [there is an ongoing > fix](https://github.com/llvm/llvm-project/pull/83688), could you possibly try > so we can just close this one. Yeah, it seems that the pr I opened for #83684 also fixes both the reduced test cases for this issue (and it also doesn’t crash anym

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-03 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/83688 >From 4abc148104769bd756042c73edeb7ee54397a05f Mon Sep 17 00:00:00 2001 From: Sirraide Date: Sat, 2 Mar 2024 20:41:22 +0100 Subject: [PATCH 1/6] [Clang] [Sema] Do not attempt to dump the layout of dependent typ

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-03 Thread via cfe-commits
Sirraide wrote: So yeah, this pr indeed also seems to fix #83671 as well. https://github.com/llvm/llvm-project/pull/83688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] fix dereference on class/struct layouts check. (PR #83686)

2024-03-03 Thread David CARLIER via cfe-commits
https://github.com/devnexen closed https://github.com/llvm/llvm-project/pull/83686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add bugprone-suspicious-stringview-data-usage check (PR #83716)

2024-03-03 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/83716 This check identifies suspicious usages of std::string_view::data() that could lead to reading out-of-bounds data due to inadequate or incorrect string null termination. Closes #80854 >From ce8017e7db56a43f2e

[clang-tools-extra] [clang-tidy] Add bugprone-suspicious-stringview-data-usage check (PR #83716)

2024-03-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Piotr Zegar (PiotrZSL) Changes This check identifies suspicious usages of std::string_view::data() that could lead to reading out-of-bounds data due to inadequate or incorrect string null termination. Closes #80854 --- Full

[clang-tools-extra] [clang-tidy] Add bugprone-suspicious-stringview-data-usage check (PR #83716)

2024-03-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes This check identifies suspicious usages of std::string_view::data() that could lead to reading out-of-bounds data due to inadequate or incorrect string null termination. Closes #80854 --- Full diff: h

[clang-tools-extra] eb3b063 - [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (#82689)

2024-03-03 Thread via cfe-commits
Author: AMS21 Date: 2024-03-03T12:13:25+01:00 New Revision: eb3b063995d6b4f8f3bc22eeecbf239ffaecc29f URL: https://github.com/llvm/llvm-project/commit/eb3b063995d6b4f8f3bc22eeecbf239ffaecc29f DIFF: https://github.com/llvm/llvm-project/commit/eb3b063995d6b4f8f3bc22eeecbf239ffaecc29f.diff LOG: [c

[clang-tools-extra] [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (PR #82689)

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

[clang] [Clang][Sema] Fix missing warning when comparing mismatched enums in … (PR #81418)

2024-03-03 Thread via cfe-commits
Kupa-Martin wrote: @stbergmann is right. @erichkeane How should I proceed? Should I open a revert PR? Or should I open a separate issue? https://github.com/llvm/llvm-project/pull/81418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [Clang][Driver] Merge the different strategies of how libc++ is included (PR #83721)

2024-03-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/83721 None >From 756f80f22744bb0f2bfb81e6c4010054f1279337 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 1 Mar 2024 20:49:30 +0100 Subject: [PATCH] [Clang][Driver] Merge the different strategies of how l

[clang] [Clang][Driver] Merge the different strategies of how libc++ is included (PR #83721)

2024-03-03 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 b873847a53ae638e2146e3657fe33efe30c2afe1 756f80f22744bb0f2bfb81e6c4010054f1279337 --

[clang] users/philnik777/add libcxx03 include strategy (PR #83723)

2024-03-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/83723 - [Clang][Driver] Merge the different strategies of how libc++ is included - [Clang][Driver] Add special-casing for including libc++ in C++03 >From 756f80f22744bb0f2bfb81e6c4010054f1279337 Mon Sep 17 00:00:00

[clang] [Clang][Driver] Add special-casing for including libc++ in C++03 (PR #83723)

2024-03-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/83723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Add special-casing for including libc++ in C++03 (PR #83723)

2024-03-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/83723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forward` (PR #82673)

2024-03-03 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Overall, LGTM https://github.com/llvm/llvm-project/pull/82673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forward` (PR #82673)

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

[clang] [lld] [llvm] [X86] Use generic CPU tuning when tune-cpu is empty (PR #83631)

2024-03-03 Thread via cfe-commits
AtariDreams wrote: > > This is a turbulent change to both upstream and downstream tests without > > any profit as far as I can tell. > > > > > > I did a similar change for 64-bit a few years ago: > > https://reviews.llvm.org/D129647 > > > > > > In comparison, this patch is not to solve a

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/83625 >From b62919c2ce24feb3c75a5bbecce3d6b6ee8e5b7e Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Tue, 16 Jan 2024 16:40:47 -0600 Subject: [PATCH 1/3] [Frontend] Add leaf constructs and association to Ope

[clang] [ObjC] Set visibility of IvarOffsetGV when it is created in ObjCIvarOffsetVariable (PR #83726)

2024-03-03 Thread via cfe-commits
https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/83726 It makes sense to set the visibility of the IvarOffsetGV when a new value for it is made in the heap. >From 5396049175e77825c5e9de9296d3e8045b454dd6 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@

[clang] [ObjC] Set visibility of IvarOffsetGV when it is created in ObjCIvarOffsetVariable (PR #83726)

2024-03-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: AtariDreams (AtariDreams) Changes It makes sense to set the visibility of the IvarOffsetGV when a new value for it is made in the heap. --- Full diff: https://github.com/llvm/llvm-project/pull/83726.diff 1 Files Affected: - (mo

[clang] [ObjC] Set visibility of IvarOffsetGV when it is created in ObjCIvarOffsetVariable (PR #83726)

2024-03-03 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-em

[clang] Reland "[clang][modules] Print library module manifest path." (PR #82160)

2024-03-03 Thread Mark de Wever via cfe-commits
https://github.com/mordante updated https://github.com/llvm/llvm-project/pull/82160 >From cb3f20463548110617fd555ac11ee58d5b8b7ad5 Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Sun, 18 Feb 2024 12:57:33 +0100 Subject: [PATCH 1/2] Reland "[clang][modules] Print library module manifest path

[clang] [clang][StaticAnalyzer] fix function evalCall() typo in CheckerDocumentation (PR #83677)

2024-03-03 Thread via cfe-commits
mzyKi wrote: > Makes sense, but how did it build before the fix? I thought by inheriting > from `Checker` it would take the address of the member function with the > expected signature to store them inside vectors. How could it take the > address of a nonexisting member function? I think ```ev

[clang] [ObjC] Set visibility of IvarOffsetGV when it is created in ObjCIvarOffsetVariable (PR #83726)

2024-03-03 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/83726 >From 07e6cc851a0855c8c3b1b1de4bceb6a90aa3774f Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:52:58 -0500 Subject: [PATCH] [ObjC] Set visibility of

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. > Add members "leafs" and "association" to .td describing OpenMP/ACC > directives: "leafs" are the leaf constructs for composite/combined > constructs, and "association" is the source language construct to which the > directive a

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan edited https://github.com/llvm/llvm-project/pull/83625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Kiran Chandramohan via cfe-commits
@@ -619,44 +595,22 @@ bool clang::isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind) { } bool clang::isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind) { - return DKind == OMPD_taskloop || DKind == OMPD_taskloop_simd || - DKind == OMPD_master_taskloop || DKind

[clang] [ObjC] Set visibility of IvarOffsetGV when it is created in ObjCIvarOffsetVariable (PR #83726)

2024-03-03 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/83726 >From 0c00edec5ff4736187f11138334541a75cebccf0 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:52:58 -0500 Subject: [PATCH] [ObjC] Set visibility of

[clang] [ObjC] Set visibility of IvarOffsetGV when it is created in ObjCIvarOffsetVariable (PR #83726)

2024-03-03 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 03f150bb5688be72ae4dfb43fbe6795aae493e6d 0c00edec5ff4736187f11138334541a75cebccf0 --

[clang] [ObjC] Set visibility of IvarOffsetGV when it is created in ObjCIvarOffsetVariable (PR #83726)

2024-03-03 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/83726 >From d9ea5f5bc8f2d294b467205e41da508def66dcec Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:52:58 -0500 Subject: [PATCH] [ObjC] Set visibility of

[clang] 0c89427 - Reland "[clang][modules] Print library module manifest path." (#82160)

2024-03-03 Thread via cfe-commits
Author: Mark de Wever Date: 2024-03-03T17:58:08+01:00 New Revision: 0c89427b99f6f6d7c217c70ff880ca097340f9a4 URL: https://github.com/llvm/llvm-project/commit/0c89427b99f6f6d7c217c70ff880ca097340f9a4 DIFF: https://github.com/llvm/llvm-project/commit/0c89427b99f6f6d7c217c70ff880ca097340f9a4.diff

[clang] Reland "[clang][modules] Print library module manifest path." (PR #82160)

2024-03-03 Thread Mark de Wever via cfe-commits
https://github.com/mordante closed https://github.com/llvm/llvm-project/pull/82160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[clang][modules] Print library module manifest path." (PR #82160)

2024-03-03 Thread Mark de Wever via cfe-commits
mordante wrote: > @mordante if we want this for 18, we need to land and backport it in this > week. Thanks for the reminder, it got a bit under my radar. I'll ask a backport tomorrow unless a CI starts to complain again. https://github.com/llvm/llvm-project/pull/82160

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2024-03-03 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @AaronBallman Thanks for the review. Sorry for responding so late - I've missed your review. The tests aren't actually unrelated to the path. This is the file where I discovered the crash, so I just used it to demonstrate that it's fixed. I'm not sure how to split things, si

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-03-03 Thread via cfe-commits
AtariDreams wrote: @rjmccall ping https://github.com/llvm/llvm-project/pull/81335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/83709 >From 91d6e4c6e0ae2e1d79edf496df22978a4e1f3e1a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 2 Mar 2024 22:08:29 -0800 Subject: [PATCH 1/2] [clang-format] Handle common C++ non-keyword types as such Fixes #

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-03-03 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/81335 >From b6d0f6b4a0c631345313fd3bebf86ac8b9473fac Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:51:15 -0500 Subject: [PATCH 1/2] [ObjC] Add pre-commi

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", zygoloid wrote: Does `byte`

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
@@ -66,13 +72,17 @@ bool FormatToken::isSimpleTypeSpecifier() const { case tok::kw_decltype: case tok::kw__Atomic: return true; + case tok::identifier: +return IsCpp && std::binary_search(CppNonKeywordTypes.begin(), + CppNonKey

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
zygoloid wrote: Another possibility to consider for the original bug: `(single_identifier)` is almost certainly a cast, not redundant parentheses, unless `single_identifier` names a macro argument. So I wonder if that would be a better heuristic to use to fix the regression. https://github.co

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -66,13 +72,17 @@ bool FormatToken::isSimpleTypeSpecifier() const { case tok::kw_decltype: case tok::kw__Atomic: return true; + case tok::identifier: +return IsCpp && std::binary_search(CppNonKeywordTypes.begin(), + CppNonKey

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

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

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
owenca wrote: > Another possibility to consider for the original bug: `(single_identifier)` > is almost certainly a cast, not redundant parentheses, unless > `single_identifier` names a macro argument. So I wonder if that would be a > better heuristic to use to fix the regression. I don’t thi

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
zygoloid wrote: > > Another possibility to consider for the original bug: `(single_identifier)` > > is almost certainly a cast, not redundant parentheses, unless > > `single_identifier` names a macro argument. So I wonder if that would be a > > better heuristic to use to fix the regression. >

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang][Sema] Warn on return of pointer/reference to compound literal (PR #83741)

2024-03-03 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/83741 Emit a warning if pointer/reference to compound literal is returned from a function. In C, compound literals in block scope are lvalues that have automatic storage duration. In C++, compound literals in block s

[clang] [clang][Sema] Warn on return of pointer/reference to compound literal (PR #83741)

2024-03-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Youngsuk Kim (JOE1994) Changes Emit a warning if pointer/reference to compound literal is returned from a function. In C, compound literals in block scope are lvalues that have automatic storage duration. In C++, compound literals in blo

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-03-03 Thread via cfe-commits
AtariDreams wrote: @JOE1994 Thoughts on this? https://github.com/llvm/llvm-project/pull/81335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
owenca wrote: > > > Another possibility to consider for the original bug: > > > `(single_identifier)` is almost certainly a cast, not redundant > > > parentheses, unless `single_identifier` names a macro argument. So I > > > wonder if that would be a better heuristic to use to fix the regressi

[clang] [clang][Sema] Warn on return of pointer/reference to compound literal (PR #83741)

2024-03-03 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 0c90e8837a9e5f27985ccaf85120083db9e1b43e fc0cb9c44ec7945f1a88420675b667167908e07c --

[clang] [clang][Sema] Warn on return of pointer/reference to compound literal (PR #83741)

2024-03-03 Thread via cfe-commits
https://github.com/AtariDreams commented: Isn't this warning a duplicate of what is already here? https://github.com/llvm/llvm-project/pull/83741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [clang][Sema] Warn on return of pointer/reference to compound literal (PR #83741)

2024-03-03 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: > Isn't this warning a duplicate of what is already here? The diganostic warning is not emitted when `clang` is run without the `-analyze` flag. https://github.com/llvm/llvm-project/pull/83741 ___ cfe-commits mailing list cfe-commits@l

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-03-03 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: > @JOE1994 Thoughts on this? I'm not an ideal reviewer for this as I'm unfamiliar with ObjC side of Clang, but I'll come back to leave a review and to help merge this if this doesn't get merged by the end of the day :) https://github.com/llvm/llvm-project/pull/81335

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", owenca wrote: Good point abo

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
zygoloid wrote: > This patch does not only fix formatting of C-casting to a C++ standard type. > It correctly identifies (most of) such types and might have fixed other kinds > of bugs. Sure, this patch seems like a good change. But it does not fix #83400. https://github.com/llvm/llvm-project

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/83709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
owenca wrote: > > This patch does not only fix formatting of C-casting to a C++ standard > > type. It correctly identifies (most of) such types and might have fixed > > other kinds of bugs. > > Sure, this patch seems like a good change. But it does not fix #83400. It does fix the example give

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
owenca wrote: > But looking for a parenthesized single identifier addresses all of the > examples in the issue. I don't think it would work, but you are welcome to submit a patch to prove me wrong. 🙂 https://github.com/llvm/llvm-project/pull/83709

[clang] [clang][Sema] Add diagnostics for out-of-bounds vector access (PR #76569)

2024-03-03 Thread via cfe-commits
https://github.com/implicitfield closed https://github.com/llvm/llvm-project/pull/76569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-03 Thread Brad Smith via cfe-commits
@@ -203,3 +203,12 @@ // RELOCATABLE-NOT: "-l // RELOCATABLE-NOT: crt{{[^./\\]+}}.o +// Check that the -X flag is passed to the linker on riscv64 brad0 wrote: When I was putting the diff together I was questioning whether I should combine the two into one ins

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +// Sorted common C++ non-keyword types. +static SmallVector CppNonKeywordTypes = { +"byte", "int16_t", "int32_t", "int64_t", "int8_t", +"size_t", "uint16_t", "uint32_t", "uint64

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-03 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/83216 >From 35aee78eda1f3e7ac9e217982227c0769eda5ae1 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Tue, 27 Feb 2024 21:07:09 -0500 Subject: [PATCH] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BSD

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-03 Thread Brad Smith via cfe-commits
brad0 wrote: I fixed up the tesets. https://github.com/llvm/llvm-project/pull/83216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-03 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/83216 >From 6c68cdaef71eacbad4fc2f6b81d2845c08b124fd Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Tue, 27 Feb 2024 21:07:09 -0500 Subject: [PATCH] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BSD

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-03 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/83709 >From 91d6e4c6e0ae2e1d79edf496df22978a4e1f3e1a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 2 Mar 2024 22:08:29 -0800 Subject: [PATCH 1/3] [clang-format] Handle common C++ non-keyword types as such Fixes #

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-03 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/83216 >From 31bb7cee2eb783a242734f3778269efcdb460a4c Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Tue, 27 Feb 2024 21:07:09 -0500 Subject: [PATCH] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BSD

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
@@ -619,44 +595,22 @@ bool clang::isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind) { } bool clang::isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind) { - return DKind == OMPD_taskloop || DKind == OMPD_taskloop_simd || - DKind == OMPD_master_taskloop || DKind

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz edited https://github.com/llvm/llvm-project/pull/83625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >