[clang] [test][OpenMP] Avoid writing to a potentially write-protected dir (PR #94931)

2024-06-09 Thread Karl-Johan Karlsson via cfe-commits
https://github.com/karka228 edited https://github.com/llvm/llvm-project/pull/94931 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [test][OpenMP] Avoid writing to a potentially write-protected dir (PR #94931)

2024-06-09 Thread Karl-Johan Karlsson via cfe-commits
https://github.com/karka228 updated https://github.com/llvm/llvm-project/pull/94931 >From c5b2765d9f4bd2a8412c0722a052148673411f94 Mon Sep 17 00:00:00 2001 From: Karl-Johan Karlsson Date: Mon, 10 Jun 2024 07:45:48 +0200 Subject: [PATCH 1/2] [test][OpenMP] Avoid writing to a potentially write-p

[clang] a47e40b - [clang][Interp] Disallow ptr-to-int casts on dummy pointers

2024-06-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-10T08:49:49+02:00 New Revision: a47e40bce086c506b672cbd8fbb2abdc6619c0a6 URL: https://github.com/llvm/llvm-project/commit/a47e40bce086c506b672cbd8fbb2abdc6619c0a6 DIFF: https://github.com/llvm/llvm-project/commit/a47e40bce086c506b672cbd8fbb2abdc6619c0a6.diff LO

[clang] [clang][NVPTX] Define macro indicating the PTX version (PR #94934)

2024-06-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Victor Lomuller (Naghasan) Changes Define __PTX_VERSION__ macro to indicate the used PTX version. Usually each new PTX version brings a new sm version and the associated instructions. However, some of these instructions can also be made a

[clang] [clang][NVPTX] Define macro indicating the PTX version (PR #94934)

2024-06-09 Thread Victor Lomuller via cfe-commits
https://github.com/Naghasan created https://github.com/llvm/llvm-project/pull/94934 Define __PTX_VERSION__ macro to indicate the used PTX version. Usually each new PTX version brings a new sm version and the associated instructions. However, some of these instructions can also be made avialabl

[clang] [test][OpenMP] Avoid writing to a potentially write-protected dir (PR #94931)

2024-06-09 Thread Karl-Johan Karlsson via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -emit-llvm -verify -fopenmp %s +// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s karka228 wrote: It seems like this was a bad idea. When I test this locally this test works for me, but it seems like the it fail in the test

[clang] [llvm] [Offload][CUDA] Add initial cuda_runtime.h overlay (PR #94821)

2024-06-09 Thread Johannes Doerfert via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang++ -foffload-via-llvm --offload-arch=native %s -o %t +// RUN: %t | %fcheck-generic + +// UNSUPPORTED: aarch64-unknown-linux-gnu +// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO +// UNSUPPORTED: x86_64-pc-linux-gnu +// UNSUPPORTED: x86_64-pc-linux-gnu-

[clang] [test][OpenMP] Avoid writing to a potentially write-protected dir (PR #94931)

2024-06-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Karl-Johan Karlsson (karka228) Changes The test clang/test/OpenMP/error_unsupport_feature.c don't check the output written to the current directory. The current directory may be write protected e.g. in a sandboxed environment. This patch

[clang] [test][OpenMP] Avoid writing to a potentially write-protected dir (PR #94931)

2024-06-09 Thread Karl-Johan Karlsson via cfe-commits
https://github.com/karka228 created https://github.com/llvm/llvm-project/pull/94931 The test clang/test/OpenMP/error_unsupport_feature.c don't check the output written to the current directory. The current directory may be write protected e.g. in a sandboxed environment. This patch replace th

[clang] [Driver] Add winsysroot alias to the GNU driver (PR #94731)

2024-06-09 Thread via cfe-commits
https://github.com/Andarwinux updated https://github.com/llvm/llvm-project/pull/94731 >From c31dc726e7c0c20f12d6ea3152dfde1c40819f49 Mon Sep 17 00:00:00 2001 From: Andarwinux <144242044+andarwi...@users.noreply.github.com> Date: Fri, 7 Jun 2024 07:07:40 + Subject: [PATCH] [Driver] Add winsys

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

2024-06-09 Thread Younan Zhang via cfe-commits
zyn0217 wrote: +1 for being too late because 18.1.7 just got rolled out a few days ago (I thought 18.1.6 was the final version of 18.x!), and there's probably no 18.1.8. https://github.com/llvm/llvm-project/pull/93206 ___ cfe-commits mailing list cfe-

[clang] [Clang] Fix two issues of CTAD for aggregates (PR #94889)

2024-06-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes Fixes two issues in two ways: 1) A `designated-initializer-list` is also a `braced-init-list` and thus it's subject to `[over.match.class.deduct]p1.8`, which means the brace elision should also apply to desi

[clang] [Clang] Fix two issues of CTAD for aggregates (PR #94889)

2024-06-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/94889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix two issues of CTAD for aggregates (PR #94889)

2024-06-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/94889 >From 217c00f47aaa65b113d1c1cfd93a9c4e1d235c1a Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 9 Jun 2024 11:49:18 +0800 Subject: [PATCH 1/2] [Clang] Fix two issues of CTAD for aggregates --- clang/lib/S

[clang] [Clang] Fix two issues of CTAD for aggregates (PR #94889)

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

[clang] [clang-format] Add option to remove leading blank lines (PR #91221)

2024-06-09 Thread via cfe-commits
https://github.com/sstwcw updated https://github.com/llvm/llvm-project/pull/91221 >From 72e15ffb87eff94d51af69c0f804084ab7abe474 Mon Sep 17 00:00:00 2001 From: sstwcw Date: Mon, 6 May 2024 14:34:08 + Subject: [PATCH 1/4] [clang-format] Add option to remove leading blank lines --- clang/do

[clang] [Clang][Comments] Attach comments to decl even if preproc directives are in between (PR #88367)

2024-06-09 Thread via cfe-commits
https://github.com/hdoc updated https://github.com/llvm/llvm-project/pull/88367 >From a98d117c68b33d2e6632a832ff77b0e8258469e6 Mon Sep 17 00:00:00 2001 From: hdoc Date: Thu, 11 Apr 2024 01:54:18 -0700 Subject: [PATCH 1/5] Attach comments to decl even if preproc directives are in between --- c

[clang-tools-extra] [clangd] Make it possible to enable misc-const-correctness clang-tidy check (PR #94920)

2024-06-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! I will wait a couple of days before merging, in case @kadircet has any objection :) https://github.com/llvm/llvm-project/pull/94920 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-09 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/94560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-09 Thread via cfe-commits
@@ -22858,6 +22858,36 @@ TEST_F(FormatTest, FormatsLambdas) { " //\n" "});"); + FormatStyle LLVMStyle = getLLVMStyleWithColumns(60); + + verifyFormat("int main() {\n" + " very_long_function_name_yes_it_is_really_long(\n" + "

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-09 Thread via cfe-commits
@@ -22858,6 +22858,36 @@ TEST_F(FormatTest, FormatsLambdas) { " //\n" "});"); + FormatStyle LLVMStyle = getLLVMStyleWithColumns(60); + + verifyFormat("int main() {\n" + " very_long_function_name_yes_it_is_really_long(\n" + "

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-09 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/94560 >From 624e74b3066930a5a2bb15d6c0b2ddb4f94d3b79 Mon Sep 17 00:00:00 2001 From: c8ef Date: Thu, 6 Jun 2024 10:44:57 +0800 Subject: [PATCH 1/4] fix incorrectly indents lambda trailing return --- clang/lib/Format/Conti

[clang-tools-extra] [clang-tidy] fix false positives for the functions with the same name as standard library functions in misc-include-cleaner (PR #94923)

2024-06-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/94923 >From e467b03cc120eedc580c185232f000e0d8aa0cc7 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 10 Jun 2024 09:04:27 +0800 Subject: [PATCH] [clang-tidy] fix false positives for the functions with the s

[clang-tools-extra] [clang-tidy] fix false positives for the functions with the same name as standard library functions in misc-include-cleaner (PR #94923)

2024-06-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes Fixes: #93335 For decl with body, we should provide physical locations also. Because it may be the function which have the same name as std library. --- Full diff: https://github.com/llvm/llvm-proje

[clang-tools-extra] [clang-tidy] fix false positives for the functions with the same name as standard library functions in misc-include-cleaner (PR #94923)

2024-06-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/94923 Fixes: #93335 For decl with body, we should provide physical locations also. Because it may be the function which have the same name as std library. >From e467b03cc120eedc580c185232f000e0d8aa0cc7 Mon Sep 17

[clang] [clang-format] add an option to insert a space only for non-code block empty braces, not for empty parentheses (PR #93634)

2024-06-09 Thread Owen Pan via cfe-commits
owenca wrote: > See [#93635 > (comment)](https://github.com/llvm/llvm-project/issues/93635#issuecomment-2138778128). @khei4 maybe an `enum` for `SpaceInEmptyBraces` with `Always`, `Never`, and `Custom`. (IMO `Leave` doesn't make sense.) With `Custom`, a list of boolean suboptions e.g. `Functi

[clang] [clang-format] add an option to insert a space only for non-code block empty braces, not for empty parentheses (PR #93634)

2024-06-09 Thread Owen Pan via cfe-commits
@@ -1864,7 +1894,11 @@ FormatStyle getWebKitStyle() { Style.ObjCSpaceAfterProperty = true; Style.PointerAlignment = FormatStyle::PAS_Left; Style.SpaceBeforeCpp11BracedList = true; - Style.SpaceInEmptyBlock = true; + Style.SpaceInEmptyBraces = FormatStyle::SIEBO_Custom;

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-09 Thread Owen Pan via cfe-commits
owenca wrote: > Technically also applies to attributes applied to the return type of the > lambda, i.e. > > ``` > int main() { > very_long_function_name_yes_it_is_really_long( > // also happens with constexpr specifier > [](auto n) [[attribute]] > -> std::enable_if_t< >

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-09 Thread Owen Pan via cfe-commits
@@ -22858,6 +22858,36 @@ TEST_F(FormatTest, FormatsLambdas) { " //\n" "});"); + FormatStyle LLVMStyle = getLLVMStyleWithColumns(60); + + verifyFormat("int main() {\n" + " very_long_function_name_yes_it_is_really_long(\n" + "

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-09 Thread Owen Pan via cfe-commits
@@ -1457,6 +1457,11 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) { !Current.isOneOf(tok::colon, tok::comment)) { return ContinuationIndent; } + if (Current.is(TT_TrailingReturnArrow) && + Previous.isOneOf(tok::kw_noexcept, tok::k

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-09 Thread Owen Pan via cfe-commits
@@ -22858,6 +22858,36 @@ TEST_F(FormatTest, FormatsLambdas) { " //\n" "});"); + FormatStyle LLVMStyle = getLLVMStyleWithColumns(60); + + verifyFormat("int main() {\n" + " very_long_function_name_yes_it_is_really_long(\n" + "

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-09 Thread Owen Pan via cfe-commits
@@ -22858,6 +22858,36 @@ TEST_F(FormatTest, FormatsLambdas) { " //\n" "});"); + FormatStyle LLVMStyle = getLLVMStyleWithColumns(60); + + verifyFormat("int main() {\n" + " very_long_function_name_yes_it_is_really_long(\n" + "

[clang] [ObjC][CodeGen] Assume a for-in loop is in bounds and cannot overflow (PR #94885)

2024-06-09 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/94885 >From 46f89e7456939424b5cb740ec55a89c474f8ebfd Mon Sep 17 00:00:00 2001 From: Rose Date: Sat, 8 Jun 2024 22:30:53 -0400 Subject: [PATCH] [ObjC][CodeGen] Assume a for-in loop is in bounds and cannot overflow

[clang] [Clang][Comments] Support for parsing headers in Doxygen \par commands (PR #91100)

2024-06-09 Thread via cfe-commits
@@ -149,6 +149,63 @@ class TextTokenRetokenizer { addToken(); } + /// Check if this line starts with @par or \par + bool startsWithParCommand() { +unsigned Offset = 1; + +/// Skip all whitespace characters at the beginning. +/// This needs to backtrack beca

[clang] [Clang][Comments] Support for parsing headers in Doxygen \par commands (PR #91100)

2024-06-09 Thread via cfe-commits
https://github.com/hdoc updated https://github.com/llvm/llvm-project/pull/91100 >From 8f150b83a3575fa612b21a2f91cb499e356b34b2 Mon Sep 17 00:00:00 2001 From: hdoc Date: Sat, 4 May 2024 18:50:16 -0700 Subject: [PATCH 1/3] Support for parsing headers in Doxygen \par commands --- .../include/clan

[clang] [Clang][Comments] Add argument parsing for @throw @throws @exception (PR #84726)

2024-06-09 Thread via cfe-commits
@@ -89,6 +89,31 @@ class TextTokenRetokenizer { } } + /// Extract a template type + bool lexTemplate(SmallString<32> &WordText) { hdoc wrote: Added some more test cases that check this edge case behavior, like unequal numbers of opening and closing b

[clang] [Clang][Comments] Add argument parsing for @throw @throws @exception (PR #84726)

2024-06-09 Thread via cfe-commits
https://github.com/hdoc updated https://github.com/llvm/llvm-project/pull/84726 >From 49fd778d21adb49080d1f9b360aa5cda2b7359a6 Mon Sep 17 00:00:00 2001 From: hdoc Date: Mon, 11 Mar 2024 01:13:25 -0700 Subject: [PATCH 01/11] Comment parsing: add argument parsing for @throw @throws @exception Do

[clang-tools-extra] [clangd] Make it possible to enable misc-const-correctness clang-tidy check (PR #94920)

2024-06-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (geza-herman) Changes Before this PR, it wasn't possible to enable misc-const-correctness: disableUnusableChecks() forcefully disabled it because the check is slow. It was implemented this way before clangd got the FastC

[clang-tools-extra] [clangd] Make it possible to enable misc-const-correctness clang-tidy check (PR #94920)

2024-06-09 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-tools-extra] [clangd] Make it possible to enable misc-const-correctness clang-tidy check (PR #94920)

2024-06-09 Thread via cfe-commits
https://github.com/geza-herman created https://github.com/llvm/llvm-project/pull/94920 Before this PR, it wasn't possible to enable misc-const-correctness: disableUnusableChecks() forcefully disabled it because the check is slow. It was implemented this way before clangd got the FastCheckFilt

[clang] [Clang][Comments] Add argument parsing for @throw @throws @exception (PR #84726)

2024-06-09 Thread via cfe-commits
https://github.com/hdoc updated https://github.com/llvm/llvm-project/pull/84726 >From 49fd778d21adb49080d1f9b360aa5cda2b7359a6 Mon Sep 17 00:00:00 2001 From: hdoc Date: Mon, 11 Mar 2024 01:13:25 -0700 Subject: [PATCH 01/10] Comment parsing: add argument parsing for @throw @throws @exception Do

[clang] [libclang/python] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-06-09 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/78114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-06-09 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Since https://github.com/llvm/llvm-project/issues/83962 is now closed and the minimum Python version updated to 3.8, this is now finally ready for review. I've updated this with the changes to the Python bindings of the past couple months. I have no idea idea what the erro

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-06-09 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum ready_for_review https://github.com/llvm/llvm-project/pull/78114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Comments] Attach comments to decl even if preproc directives are in between (PR #88367)

2024-06-09 Thread via cfe-commits
hdoc wrote: @AaronBallman Added the blurb to the release notes, let me know if that matches your expectations or if any changes are required. Thank you! https://github.com/llvm/llvm-project/pull/88367 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [Clang][Comments] Attach comments to decl even if preproc directives are in between (PR #88367)

2024-06-09 Thread via cfe-commits
@@ -533,6 +533,8 @@ __rdtscp(unsigned int *__A) { /// \see __rdpmc #define _rdpmc(A) __rdpmc(A) +; hdoc wrote: Agreed, I think it will need to change at some point and I will see if we can get support for doing that work. https://github.com/llvm/llvm-projec

[clang] [Clang][Comments] Attach comments to decl even if preproc directives are in between (PR #88367)

2024-06-09 Thread via cfe-commits
https://github.com/hdoc updated https://github.com/llvm/llvm-project/pull/88367 >From a98d117c68b33d2e6632a832ff77b0e8258469e6 Mon Sep 17 00:00:00 2001 From: hdoc Date: Thu, 11 Apr 2024 01:54:18 -0700 Subject: [PATCH 1/4] Attach comments to decl even if preproc directives are in between --- c

[clang] [Clang][OpenMP] throw compilation error instead of crash in Stmt::OMPScopeDirectiveClass case (#77535) (PR #84135)

2024-06-09 Thread via cfe-commits
github-actions[bot] wrote: @Puellaquae Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a bui

[clang] dbe63e3 - [Clang][OpenMP] throw compilation error instead of crash in Stmt::OMPScopeDirectiveClass case (#77535) (#84135)

2024-06-09 Thread via cfe-commits
Author: Puelloc Date: 2024-06-09T14:29:41-07:00 New Revision: dbe63e3d4dc9e4a53c95a6f8fd24c071d0a603e2 URL: https://github.com/llvm/llvm-project/commit/dbe63e3d4dc9e4a53c95a6f8fd24c071d0a603e2 DIFF: https://github.com/llvm/llvm-project/commit/dbe63e3d4dc9e4a53c95a6f8fd24c071d0a603e2.diff LOG:

[clang] [Clang][OpenMP] throw compilation error instead of crash in Stmt::OMPScopeDirectiveClass case (#77535) (PR #84135)

2024-06-09 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/84135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-06-09 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/78114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-06-09 Thread Jannick Kremer via cfe-commits
@@ -2286,192 +2869,151 @@ class TypeKind(BaseEnumeration): Describes the kind of type. """ -# The unique kind objects, indexed by id. -_kinds = [] -_name_map = None - @property -def spelling(self): +def spelling(self) -> str: """Retrie

[clang] [clang]Add additional test coverage for `__is_trivially_relocatable(T)` (PR #91412)

2024-06-09 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: ping @corentin @shafik can you help me land this additional test coverage? It doesn't change any behavior, just documents the behavior we currently have. https://github.com/llvm/llvm-project/pull/91412 ___ cfe-commits mailing list cfe-co

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-06-09 Thread Jannick Kremer via cfe-commits
@@ -665,867 +1312,858 @@ class CursorKind(BaseEnumeration): A CursorKind describes the kind of entity that a cursor points to. """ -# The required BaseEnumeration declarations. -_kinds = [] -_name_map = None - @staticmethod -def get_all_kinds(): +

[clang] [clang-format] Fix bad comment indentation before ifdef after braceless if (PR #94776)

2024-06-09 Thread Owen Pan via cfe-commits
owenca wrote: This patch formats ``` void f() { if (foo) bar(); // Comment #if BAZ baz(); #endif } ``` to ``` void f() { if (foo) bar(); // Comment #if BAZ baz(); #endif } ``` The trailing comment shouldn't be wrapped. https://github.com/llvm/llvm-project/pull/94776 _

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-06-09 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/78114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-06-09 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/78114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Cover CWG issues about `export template` (PR #94876)

2024-06-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > We never implemented export template - and no one did, therefore we are not > affected by changes to it (no one did except for EDG, i don't even know if > they shipped it) When I said "wording changes that do not affect implementations", I meant a hypothetical conforming impl

[clang] Fix codegen of consteval functions returning an empty class, and related issues (PR #93115)

2024-06-09 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/93115 >From 816ceb271c28ff6c4dc05485000deec087674e37 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 23 May 2024 18:38:04 -0700 Subject: [PATCH] Fix codegen of consteval functions returning an empty class,

[clang] [llvm] [RISCV] Add riscv_atomic.h and Zawrs/Zalrsc builtins (PR #94578)

2024-06-09 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: lr/sc builtins are extremely fragile: there's no reasonable way for the compiler to guarantee that the sc is placed in such a way that it will eventually succeed. (The equivalent intrinsics do exist on ARM, but ARM has significantly stronger guarantees here. Even then, i

[clang] [clang]Add additional test coverage for `__is_trivially_relocatable(T)` (PR #91412)

2024-06-09 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/91412 >From 532e1c6976a1cb2abf897d0a9312813f2f1d13f1 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 8 May 2024 03:09:38 +0330 Subject: [PATCH] [clang] [test] Add additional test coverage for `__is_trivially

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

2024-06-09 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I'm not sure messing with the linkage this way will interact well with various C++ features. In particular, there are various places that check the "language linkage", which you're not modifying: from the perspective of anything outside of codegen, these functions are ju

[clang] Assume a for-in loop is in bounds and cannot overflow (PR #94883)

2024-06-09 Thread via cfe-commits
AtariDreams wrote: > Why did you close this PR so soon after creating it? See here: https://github.com/llvm/llvm-project/pull/94885 https://github.com/llvm/llvm-project/pull/94883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] Assume a for-in loop is in bounds and cannot overflow (PR #94883)

2024-06-09 Thread via cfe-commits
AtariDreams wrote: > Why did you close this PR so soon after creating it? Superseded https://github.com/llvm/llvm-project/pull/94883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add winsysroot alias to the GNU driver (PR #94731)

2024-06-09 Thread via cfe-commits
https://github.com/Andarwinux updated https://github.com/llvm/llvm-project/pull/94731 >From 10df14537925cbf719152e1307fe296f2037ca3b Mon Sep 17 00:00:00 2001 From: Andarwinux <144242044+andarwi...@users.noreply.github.com> Date: Fri, 7 Jun 2024 07:07:40 + Subject: [PATCH] [Driver] Add winsys

[clang] [Driver] Add winsysroot alias to the GNU driver (PR #94731)

2024-06-09 Thread via cfe-commits
https://github.com/Andarwinux updated https://github.com/llvm/llvm-project/pull/94731 >From fa0683f976cdb04f85f28069ce35a009be0c84b1 Mon Sep 17 00:00:00 2001 From: Andarwinux <144242044+andarwi...@users.noreply.github.com> Date: Fri, 7 Jun 2024 07:07:40 + Subject: [PATCH] [Driver] Add winsys

[clang] [clang] NFCI: improve TemplateArgument and TemplateName dump methods (PR #94905)

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

[clang] [clang] improve TemplateArgument and TemplateName dump methods (PR #94905)

2024-06-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes These will work as AST Text node dumpers, as usual, instead of AST printers. Note that for now, the TemplateName dumper is using the TemplateArgument dumper through an implicit conversion. This can be fi

[clang] [clang] improve TemplateArgument and TemplateName dump methods (PR #94905)

2024-06-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/94905 These will work as AST Text node dumpers, as usual, instead of AST printers. Note that for now, the TemplateName dumper is using the TemplateArgument dumper through an implicit conversion. This can be fixed in

[clang] e090bac - [clang] NFC: add new cwg2398 tests

2024-06-09 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2024-06-09T13:44:45-03:00 New Revision: e090bac638e56ff9db87e622cdf925f2b99dfc30 URL: https://github.com/llvm/llvm-project/commit/e090bac638e56ff9db87e622cdf925f2b99dfc30 DIFF: https://github.com/llvm/llvm-project/commit/e090bac638e56ff9db87e622cdf925f2b99dfc30.dif

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

2024-06-09 Thread via cfe-commits
cor3ntin wrote: > It would be great if this fix could be backported. I think it might be too late. cc @tstellar https://github.com/llvm/llvm-project/pull/93206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] Assume a for-in loop is in bounds and cannot overflow (PR #94883)

2024-06-09 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: Why did you close this PR so soon after creating it? https://github.com/llvm/llvm-project/pull/94883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

2024-06-09 Thread via cfe-commits
tobim wrote: It would be great if this fix could be backported. https://github.com/llvm/llvm-project/pull/93206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add winsysroot alias to the GNU driver (PR #94731)

2024-06-09 Thread via cfe-commits
https://github.com/Andarwinux updated https://github.com/llvm/llvm-project/pull/94731 >From e894ff532f35647954d1ff2904c5ce4e79abc059 Mon Sep 17 00:00:00 2001 From: Andarwinux <144242044+andarwi...@users.noreply.github.com> Date: Fri, 7 Jun 2024 07:07:40 + Subject: [PATCH] [Driver] Add winsys

[clang-tools-extra] [llvm] [mlir] Use StringRef::starts_with (NFC) (PR #94886)

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

[clang-tools-extra] [llvm] [mlir] Use StringRef::starts_with (NFC) (PR #94886)

2024-06-09 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph approved this pull request. https://github.com/llvm/llvm-project/pull/94886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix(93512): skip alignment checks on incomplete types (PR #94542)

2024-06-09 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/94542 >From 417093b489f17b0d22701f3c3b990388997c25a0 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 6 Jun 2024 01:55:54 +0300 Subject: [PATCH] fix(93512): skip alignment checks on incomplete types --- clang

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-09 Thread Emilia Kond via cfe-commits
rymiel wrote: Technically also applies to attributes applied to the return type of the lambda, i.e. ``` int main() { very_long_function_name_yes_it_is_really_long( // also happens with constexpr specifier [](auto n) [[attribute]] -> std::enable_if_t< std::is_arithme

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-09 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/94560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-09 Thread Andrzej Warzyński via cfe-commits
@@ -1146,6 +1150,54 @@ void CodeGenAction::embedOffloadObjects() { } } +void CodeGenAction::linkBuiltinBCLibs() { banach-space wrote: +1 https://github.com/llvm/llvm-project/pull/94763 ___ cfe-commits mailing lis

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-09 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,18 @@ + +!-- +! RUN lines +!-- +! Embed something that can be easily checked +! RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu -o - -mlink-builtin-bitcode %S/Inputs/bclib.bc %s 2>&1 | FileCheck %s + +! CHECK: define internal void @libfun_ +

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-09 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,18 @@ + +!-- +! RUN lines +!-- +! Embed something that can be easily checked +! RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu -o - -mlink-builtin-bitcode %S/Inputs/bclib.bc %s 2>&1 | FileCheck %s banach-space wrote: 1. Wh

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-09 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,18 @@ + +!-- +! RUN lines +!-- banach-space wrote: In the past, folks asked not to add such comments in tests. Let's stick with that. https://github.com/llvm/llvm-project/pull/94763 ___ cfe-

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-09 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,18 @@ + +!-- +! RUN lines +!-- +! Embed something that can be easily checked +! RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu -o - -mlink-builtin-bitcode %S/Inputs/bclib.bc %s 2>&1 | FileCheck %s + +! CHECK: define internal void @libfun_ +

[clang] [Driver] Add winsysroot alias to the GNU driver (PR #94731)

2024-06-09 Thread via cfe-commits
https://github.com/Andarwinux updated https://github.com/llvm/llvm-project/pull/94731 >From ac4330da86a97f47e7da00192295f8866cfb41e2 Mon Sep 17 00:00:00 2001 From: Andarwinux <144242044+andarwi...@users.noreply.github.com> Date: Fri, 7 Jun 2024 07:07:40 + Subject: [PATCH] [Driver] Add winsys

[clang] 5bb9c08 - [clang][Interp] Reject compound assign operators pre-C++14

2024-06-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-09T14:58:21+02:00 New Revision: 5bb9c08d8895e9d5122411c8612521e9a84220b4 URL: https://github.com/llvm/llvm-project/commit/5bb9c08d8895e9d5122411c8612521e9a84220b4 DIFF: https://github.com/llvm/llvm-project/commit/5bb9c08d8895e9d5122411c8612521e9a84220b4.diff LO

[clang] 69cd2d2 - [clang][Interp] Handle __extension__ for complex values

2024-06-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-09T14:29:12+02:00 New Revision: 69cd2d288d465b01a120d7544e99061921c66c28 URL: https://github.com/llvm/llvm-project/commit/69cd2d288d465b01a120d7544e99061921c66c28 DIFF: https://github.com/llvm/llvm-project/commit/69cd2d288d465b01a120d7544e99061921c66c28.diff LO

[clang] [clang] Cover CWG issues about `export template` (PR #94876)

2024-06-09 Thread via cfe-commits
cor3ntin wrote: We never implemented `export template` - and no one did, therefore we are not affected by changes to it (no one did except for EDG, i don't even know if they shipped it) It is perfectly reasonable not to have tests whatsoever for that either (although I find the pre-c++20 diag

[clang] cb8e936 - [clang][Interp] Implement ~ operator for complex values

2024-06-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-09T14:29:12+02:00 New Revision: cb8e9360d821f4fb03d571940a7e09d750d2cf2f URL: https://github.com/llvm/llvm-project/commit/cb8e9360d821f4fb03d571940a7e09d750d2cf2f DIFF: https://github.com/llvm/llvm-project/commit/cb8e9360d821f4fb03d571940a7e09d750d2cf2f.diff LO

[clang] [Sema][CTAD] Allow user defined conversion for copy-list-initialization (PR #94752)

2024-06-09 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/94752 From 8e1f3aa676b891c9566344ad2be046898df34a3a Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 7 Jun 2024 14:38:08 +0200 Subject: [PATCH 1/2] [CTAD] Allow user defined conversion --- clang/include/clang/Se

[clang] [Sema][CTAD] Allow user defined conversion for copy-list-initialization (PR #94752)

2024-06-09 Thread Gábor Spaits via cfe-commits
spaits wrote: @zyn0217 Thank you for checking my PR. I was able to simplify the `std::initializer_list` definition. I have also created two different "categories" for the test. One test contains almost the exact code as the one in the reported issue with the same class names. The other one is

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,83 @@ +.. title:: clang-tidy - bugprone-exception-rethrow + +bugprone-exception-rethrow +== + +Identifies problematic exception rethrowing, especially with caught exception +variables or empty throw statements outside catch blocks. + +In C++ exce

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,83 @@ +.. title:: clang-tidy - bugprone-exception-rethrow + +bugprone-exception-rethrow +== + +Identifies problematic exception rethrowing, especially with caught exception +variables or empty throw statements outside catch blocks. + +In C++ exce

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,83 @@ +.. title:: clang-tidy - bugprone-exception-rethrow + +bugprone-exception-rethrow +== + +Identifies problematic exception rethrowing, especially with caught exception +variables or empty throw statements outside catch blocks. + +In C++ exce

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,83 @@ +.. title:: clang-tidy - bugprone-exception-rethrow + +bugprone-exception-rethrow +== + +Identifies problematic exception rethrowing, especially with caught exception +variables or empty throw statements outside catch blocks. + +In C++ exce

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,68 @@ +//===--- ExceptionRethrowCheck.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: Apa

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/86448 >From 8ed57a657d9b87bfaaa5c4394fc3fcaf670ba94c Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sun, 24 Mar 2024 18:39:54 + Subject: [PATCH 1/7] [clang-tidy] Added bugprone-exception-rethrow check Identifie

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

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

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,68 @@ +//===--- ExceptionRethrowCheck.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: Apa

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,68 @@ +//===--- ExceptionRethrowCheck.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: Apa

  1   2   >