[clang] [clang-format] Allow decltype in requires clause (PR #78847)

2024-01-20 Thread Emilia Kond via cfe-commits
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { "concept C = (!Foo) && Bar;"); ASSERT_EQ(Tokens.size(), 19u) << Tokens; EXPECT_TOKEN(Tokens[15], tok::ampamp, TT_BinaryOperator); + + Tokens = annotate("void

[libclc] libclc: add some missing AMD gfx9 and gfx10 symlinks (PR #78884)

2024-01-20 Thread Zoltán Böszörményi via cfe-commits
https://github.com/zboszor updated https://github.com/llvm/llvm-project/pull/78884 From 26e8eaaa9b0be1fdc146b5b4e8d285a2e8a2edbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= Date: Sun, 21 Jan 2024 07:59:02 +0100 Subject: [PATCH 1/2] libclc: add some

[clang] [clang-format] NEVER allow && to be an unary operator. (PR #78852)

2024-01-20 Thread Emilia Kond via cfe-commits
https://github.com/rymiel converted_to_draft https://github.com/llvm/llvm-project/pull/78852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc] [clang] [flang] [llvm] [libcxx] [compiler-rt] [lld] [mlir] [libc++][hardening] Don't trigger redundant checks in the fast mode. (PR #77176)

2024-01-20 Thread Konstantin Varlamov via cfe-commits
https://github.com/var-const updated https://github.com/llvm/llvm-project/pull/77176 >From f86839d0bfc8b2070127dc3b2c609c2b3f7239ad Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Fri, 5 Jan 2024 20:08:27 -0800 Subject: [PATCH 1/2] [libc++][hardening] Don't trigger redundant checks in

[libcxx] [clang-tools-extra] [clang] [llvm] [libc++][hardening] Categorize assertions related to strict weak ordering (PR #77405)

2024-01-20 Thread Konstantin Varlamov via cfe-commits
https://github.com/var-const updated https://github.com/llvm/llvm-project/pull/77405 >From f6a3ba6f2fb00b17182b405312eca4e837fe8977 Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Mon, 8 Jan 2024 19:09:37 -0800 Subject: [PATCH] [libc++][hardening] Categorize assertions related to

[clang-tools-extra] [libc] [clang] [flang] [llvm] [libcxx] [compiler-rt] [lld] [mlir] [libc++][hardening] Classify assertions related to leaks and syscalls. (PR #77164)

2024-01-20 Thread Konstantin Varlamov via cfe-commits
https://github.com/var-const updated https://github.com/llvm/llvm-project/pull/77164 >From e28e7b3e1337cb960cdc8028a70a43740fa7d636 Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Thu, 21 Dec 2023 14:36:47 -0800 Subject: [PATCH 1/4] [libc++][hardening] Classify assertions related to

[clang-tools-extra] [libc] [clang] [flang] [llvm] [libcxx] [compiler-rt] [lld] [mlir] [libc++][hardening] Categorize assertions that produce incorrect results (PR #77183)

2024-01-20 Thread Konstantin Varlamov via cfe-commits
https://github.com/var-const closed https://github.com/llvm/llvm-project/pull/77183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc] [clang] [flang] [llvm] [libcxx] [compiler-rt] [lld] [mlir] [libc++][hardening] Categorize assertions that produce incorrect results (PR #77183)

2024-01-20 Thread Konstantin Varlamov via cfe-commits
https://github.com/var-const updated https://github.com/llvm/llvm-project/pull/77183 >From 2d62194c2c30b5072c8d42bf30d3b5163b1eb844 Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Fri, 5 Jan 2024 23:34:42 -0800 Subject: [PATCH 1/2] [libc++][hardening] Categorize assertions that

[libcxx] [clang-tools-extra] [clang] [llvm] [libc++][hardening] Categorize assertions that produce incorrect results (PR #77183)

2024-01-20 Thread Konstantin Varlamov via cfe-commits
https://github.com/var-const updated https://github.com/llvm/llvm-project/pull/77183 >From 2d62194c2c30b5072c8d42bf30d3b5163b1eb844 Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Fri, 5 Jan 2024 23:34:42 -0800 Subject: [PATCH 1/2] [libc++][hardening] Categorize assertions that

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-20 Thread Owen Pan via cfe-commits
owenca wrote: > The code is [self-hosted](https://git.rtems.org/rtems/) and [mirrored on > GitHub](https://github.com/RTEMS/rtems) with a [documented style > guide](https://docs.rtems.org/branches/master/eng/coding-formatting.html). In > addition, I have been and will continue to be willing

[clang] [clang][analyzer][NFC] Simplify argument range in StdLibraryFunctionsChecker (PR #78886)

2024-01-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ben Shi (benshi001) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/78886.diff 1 Files Affected: - (modified)

[clang] [clang][analyzer][NFC] Simplify argument range in StdLibraryFunctionsChecker (PR #78886)

2024-01-20 Thread Ben Shi via cfe-commits
https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/78886 None >From 7d0c3f5ce7f6a8d753bf6d5a2020baefeef35703 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Sun, 21 Jan 2024 15:20:24 +0800 Subject: [PATCH] [clang][analyzer][NFC] Simplify argument range in

[libclc] libclc: add some missing AMD gfx9 and gfx10 symlinks (PR #78884)

2024-01-20 Thread Zoltán Böszörményi via cfe-commits
https://github.com/zboszor updated https://github.com/llvm/llvm-project/pull/78884 From 26e8eaaa9b0be1fdc146b5b4e8d285a2e8a2edbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= Date: Sun, 21 Jan 2024 07:59:02 +0100 Subject: [PATCH] libclc: add some missing

[libclc] libclc: add some missing AMD gfx9 and gfx10 symlinks (PR #78884)

2024-01-20 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

[libclc] libclc: add some missing AMD gfx9 and gfx10 symlinks (PR #78884)

2024-01-20 Thread Zoltán Böszörményi via cfe-commits
https://github.com/zboszor created https://github.com/llvm/llvm-project/pull/78884 Fixes #44186 From fc8990d5fdfa07ea389fbb4682f06fc7d54d28c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= Date: Sun, 21 Jan 2024 07:59:02 +0100 Subject: [PATCH] libclc:

[llvm] [clang] [CMake][PGO] Build Sema.cpp to generate profdata for PGO builds (PR #77347)

2024-01-20 Thread Tom Stellard via cfe-commits
tstellar wrote: I split the new configuration option out into a separate PR: #78879, because it seems useful regardless of what the default is. We can continue to discuss the best default on this PR. https://github.com/llvm/llvm-project/pull/77347

[llvm] [clang] [CMake][PGO] Add option for using an external project to generate profile data (PR #78879)

2024-01-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Stellard (tstellar) Changes The new CLANG_PGO_TRAINING_DATA_SOURCE_DIR allows users to specify a CMake project to use for generating the profile data. For example, to use the llvm-test-suite to generate profile data you would do:

[llvm] [clang] [CMake][PGO] Add option for using an external project to generate profile data (PR #78879)

2024-01-20 Thread Tom Stellard via cfe-commits
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/78879 The new CLANG_PGO_TRAINING_DATA_SOURCE_DIR allows users to specify a CMake project to use for generating the profile data. For example, to use the llvm-test-suite to generate profile data you would do: $

[lld] [libcxx] [mlir] [lldb] [flang] [clang] [llvm] [clang-tools-extra] [compiler-rt] [clang-format] Add ShortReturnTypeColumn option. (PR #78011)

2024-01-20 Thread via cfe-commits
rmarker wrote: @mydeveloperday, do you have an opinion on this pull request? It addresses #78010 with minimal changes, or are you interested in exploring other possibilities? https://github.com/llvm/llvm-project/pull/78011 ___ cfe-commits mailing

[flang] [clang] [llvm] [clang-tools-extra] [lldb] [lld] [openmp] [compiler-rt] [libc] [mlir] [libcxx] [libc++][variant] P2637R3: Member `visit` (`std::variant`) (PR #76447)

2024-01-20 Thread Hristo Hristov via cfe-commits
https://github.com/Zingam closed https://github.com/llvm/llvm-project/pull/76447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [llvm] [clang-tools-extra] [lldb] [lld] [openmp] [compiler-rt] [libc] [mlir] [libcxx] [libc++][variant] P2637R3: Member `visit` (`std::variant`) (PR #76447)

2024-01-20 Thread Hristo Hristov via cfe-commits
Zingam wrote: The FreeBSD CI failure is unrelated and should be fixed upstream. Merging. https://github.com/llvm/llvm-project/pull/76447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[flang] [clang] [llvm] [lld] [clang-tools-extra] [lldb] [mlir] [compiler-rt] [libcxx] [clang-format] Add ShortReturnTypeColumn option. (PR #78011)

2024-01-20 Thread via cfe-commits
rmarker wrote: Merged main and fixed conflicts. https://github.com/llvm/llvm-project/pull/78011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [llvm] [lld] [clang-tools-extra] [lldb] [mlir] [compiler-rt] [libcxx] [clang-format] Add ShortReturnTypeColumn option. (PR #78011)

2024-01-20 Thread via cfe-commits
https://github.com/rmarker updated https://github.com/llvm/llvm-project/pull/78011 >From c4d28f82e108f9f12ccd0375e2a3502025b8c1e8 Mon Sep 17 00:00:00 2001 From: rmarker Date: Thu, 11 Jan 2024 15:01:18 +1030 Subject: [PATCH 1/3] [clang-format] Add ShortReturnTypeLength option. ---

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-20 Thread Jimmy Z via cfe-commits
jimmy-zx wrote: > Looks good overall. It's good that you wrote your own tests, but it would > also be nice to mirror tests in `clang/unittests/libclang/LibclangTest.cpp` > which test the same API. This way we can identify issues in binding layer > itself (when C++ tests pass, but Python tests

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-20 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx updated https://github.com/llvm/llvm-project/pull/77269 >From a5379ca876d9531d48b37b9ad9c864db98c7dcd6 Mon Sep 17 00:00:00 2001 From: Jimmy Z <51149050+jimmy...@users.noreply.github.com> Date: Mon, 8 Jan 2024 04:36:27 + Subject: [PATCH 1/3] [libclang/python]

[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

2024-01-20 Thread David Blaikie via cfe-commits
dwblaikie wrote: > @zmodem template parameter shadowing is an extension with > `-fms-compatibility`, if that works Given the prevalence (wellr, given how quickly folks have tripped over it probably indicates it's fairly prevalent), I think it'll need to be/should be pulled out into its own

[clang-tools-extra] [clang] [clangd] Add support to rename Objective-C selectors (PR #78872)

2024-01-20 Thread Alex Hoppen via cfe-commits
https://github.com/ahoppen updated https://github.com/llvm/llvm-project/pull/78872 >From 26d9d1a5a342df34cde921f7d9921e7b94dadd87 Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Tue, 19 Dec 2023 15:54:40 -0800 Subject: [PATCH 1/5] [Refactoring] Add capabilities to `SymbolName` to represent

[clang] f523a55 - [Sema] Use llvm::all_of (NFC)

2024-01-20 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-01-20T18:57:35-08:00 New Revision: f523a5522be221e4657daa111431106083e1c053 URL: https://github.com/llvm/llvm-project/commit/f523a5522be221e4657daa111431106083e1c053 DIFF: https://github.com/llvm/llvm-project/commit/f523a5522be221e4657daa111431106083e1c053.diff

[clang] 9b2c25c - [clang] Use SmallString::operator std::string (NFC)

2024-01-20 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-01-20T18:57:30-08:00 New Revision: 9b2c25c70466d6f081a2915e661840f965b6056a URL: https://github.com/llvm/llvm-project/commit/9b2c25c70466d6f081a2915e661840f965b6056a DIFF: https://github.com/llvm/llvm-project/commit/9b2c25c70466d6f081a2915e661840f965b6056a.diff

[clang] [Coverage] Map regions from system headers (PR #76950)

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

[clang-tools-extra] [llvm] [clang] [Clang][Builtin] add __builtin_exit (PR #74803)

2024-01-20 Thread via cfe-commits
https://github.com/W-50243 updated https://github.com/llvm/llvm-project/pull/74803 >From bcaaab24a927624669200113857fee842103d325 Mon Sep 17 00:00:00 2001 From: W-50243 Date: Thu, 7 Dec 2023 19:42:29 +0800 Subject: [PATCH 1/2] [Clang][Builtin] add __builtin_exit ---

[clang-tools-extra] [clang-tidy] Ignore user-defined literals in google-runtime-int (PR #78859)

2024-01-20 Thread Félix-Antoine Constantin via cfe-commits
@@ -56,11 +56,14 @@ void IntegerTypesCheck::registerMatchers(MatchFinder *Finder) { // http://google.github.io/styleguide/cppguide.html#64-bit_Portability // "Where possible, avoid passing arguments of types specified by // bitwidth typedefs to printf-based APIs." -

[clang-tools-extra] [clang-tidy] Ignore user-defined literals in google-runtime-int (PR #78859)

2024-01-20 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 updated https://github.com/llvm/llvm-project/pull/78859 From 8ea205ae2324d67f9adaf30d5662d2cde2096534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Sat, 20 Jan 2024 15:29:06 -0500 Subject: [PATCH 1/2] [clang-tidy] Ignore

[clang-tools-extra] [clang] [clangd] Add support to rename Objective-C selectors (PR #78872)

2024-01-20 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 b9a1e2ab8dead4863834f70cdae56104ec92d041 048d6f062e8a683af8ebcecf85b5c50bfb02454c --

[clang-tools-extra] [clang] [clangd] Add support to rename Objective-C selectors (PR #78872)

2024-01-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Alex Hoppen (ahoppen) Changes This adds support to rename Objective-C method declarations and calls to clangd. --- Patch is 54.98 KiB, truncated to 20.00 KiB below, full version:

[clang] [clang-tools-extra] [clangd] Add support to rename Objective-C selectors (PR #78872)

2024-01-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd @llvm/pr-subscribers-clang Author: Alex Hoppen (ahoppen) Changes This adds support to rename Objective-C method declarations and calls to clangd. --- Patch is 54.98 KiB, truncated to 20.00 KiB below, full version:

[clang] [clang-tools-extra] [clangd] Add support to rename Objective-C selectors (PR #78872)

2024-01-20 Thread Alex Hoppen via cfe-commits
https://github.com/ahoppen created https://github.com/llvm/llvm-project/pull/78872 This adds support to rename Objective-C method declarations and calls to clangd. >From 26d9d1a5a342df34cde921f7d9921e7b94dadd87 Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Tue, 19 Dec 2023 15:54:40 -0800

[clang] [CMake][PGO] Add libunwind to list of stage1 runtimes (PR #78869)

2024-01-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Stellard (tstellar) Changes This fixes the build since 8f90e6937a1fac80873bb2dab5f382c82ba1ba4e which made libcxxabi use llvm's libunwind by default. --- Full diff: https://github.com/llvm/llvm-project/pull/78869.diff 1 Files

[clang] [CMake][PGO] Add libunwind to list of stage1 runtimes (PR #78869)

2024-01-20 Thread Tom Stellard via cfe-commits
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/78869 This fixes the build since 8f90e6937a1fac80873bb2dab5f382c82ba1ba4e which made libcxxabi use llvm's libunwind by default. >From 0719f49ecc6dd69ae4698c3e84dbf175a1bf2ed3 Mon Sep 17 00:00:00 2001 From: Tom

[compiler-rt] [clang] [llvm] [lldb] [flang] [lld] [libcxx] [clang-tools-extra] [libc] [lld-macho] Find objects in library search path (PR #78628)

2024-01-20 Thread via cfe-commits
@@ -0,0 +1,14 @@ +# REQUIRES: x86 +# RUN: mkdir -p %t +# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %p/Inputs/libhello.s -o %t/hello.o +# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/main.o +# RUN: %lld -L %t %t/main.o %t/hello.o -o %t/a.out

[compiler-rt] [clang] [llvm] [lldb] [flang] [lld] [libcxx] [clang-tools-extra] [libc] [lld-macho] Find objects in library search path (PR #78628)

2024-01-20 Thread via cfe-commits
@@ -0,0 +1,14 @@ +# REQUIRES: x86 +# RUN: mkdir -p %t +# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %p/Inputs/libhello.s -o %t/hello.o +# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/main.o +# RUN: %lld -L %t %t/main.o %t/hello.o -o %t/a.out

[clang] [llvm] [CMake][Release] Add option for enabling PGO to release cache file. (PR #78823)

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

[clang] [llvm] [CMake][Release] Add option for enabling PGO to release cache file. (PR #78823)

2024-01-20 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/78823 >From b23e23f862bec32e42fa7aa96da1fe0c4ed38a54 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 6 Jan 2024 06:44:32 + Subject: [PATCH 1/2] [CMake][Release] Add option for enabling PGO to release

[clang] [llvm] [CMake][Release] Add option for enabling PGO to release cache file. (PR #78823)

2024-01-20 Thread Petr Hosek via cfe-commits
@@ -37,11 +63,26 @@ set(BOOTSTRAP_CLANG_BOOTSTRAP_TARGETS # Stage 2 Options set(STAGE2_PROJECTS "clang") -if (LLVM_RELEASE_ENABLE_LTO) +set(STAGE2_RUNTIMES "") + +if (LLVM_RELEASE_ENABLE_LTO OR LLVM_RELEASE_ENABLE_PGO) list(APPEND STAGE2_PROJECTS "lld") endif() + +if

[lldb] [clang] [libc] [flang] [lld] [clang-tools-extra] [llvm] [libcxx] [compiler-rt] [lld-macho] Find objects in library search path (PR #78628)

2024-01-20 Thread Shoaib Meenai via cfe-commits
@@ -0,0 +1,14 @@ +# REQUIRES: x86 +# RUN: mkdir -p %t +# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %p/Inputs/libhello.s -o %t/hello.o +# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/main.o +# RUN: %lld -L %t %t/main.o %t/hello.o -o %t/a.out

[clang] [clang-repl] We do not need to call new in the object allocation. (PR #78843)

2024-01-20 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/78843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2759e47 - [clang-repl] We do not need to call new in the object allocation. (#78843)

2024-01-20 Thread via cfe-commits
Author: Vassil Vassilev Date: 2024-01-20T17:00:38-08:00 New Revision: 2759e47067ea286f6302adcfe93b653cfaf6f2eb URL: https://github.com/llvm/llvm-project/commit/2759e47067ea286f6302adcfe93b653cfaf6f2eb DIFF:

[clang] [clang-repl] We do not need to call new in the object allocation. (PR #78843)

2024-01-20 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/78843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-20 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From e4ac395028e651721677d85caf6c76e3a7f79308 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align

[llvm] [clang] [clang-tools-extra] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-20 Thread Shafik Yaghmour via cfe-commits
@@ -11321,9 +11321,20 @@ Decl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) { << ClassType << ConvType; } - if (FunctionTemplateDecl *ConversionTemplate -= Conversion->getDescribedFunctionTemplate()) + if

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-20 Thread Gedare Bloom via cfe-commits
gedare wrote: > > Covering all double parens in a single sub-option is not precise enough for > > code bases that may want to have `__attribute__(( x ))` but also allow `if > > ( ( x ) )`. > > We should not go overboard with supporting all kinds of options/suboptions > imaginable. I don't

[clang] [Clang][AST] Fix a crash on attaching doc comments (PR #78716)

2024-01-20 Thread Dmitri Gribenko via cfe-commits
https://github.com/gribozavr approved this pull request. https://github.com/llvm/llvm-project/pull/78716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] Fix a crash on attaching doc comments (PR #78716)

2024-01-20 Thread Dmitri Gribenko via cfe-commits
gribozavr wrote: Thank you for the fix. Here's what happens here. This function receives the just-parsed decls, and its aim is to the comment in the same vicinity (I know this because I am the original author of the code). This first loop over `Decls` identifies the file in which we will be

[clang] [llvm] [WIP] Correct lowering of `fp128` intrinsics (PR #76558)

2024-01-20 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 updated https://github.com/llvm/llvm-project/pull/76558 >From e869ad1bc601d95b6364dc5619e79a06e8b0fc82 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Fri, 11 Aug 2023 22:16:01 -0400 Subject: [PATCH 1/5] [IR] Add an xpassing test for `f128` intrinsic lowering

[clang-tools-extra] [clang] [llvm] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-20 Thread Shourya Goel via cfe-commits
Sh0g0-1758 wrote: gentle ping @tbaederr . https://github.com/llvm/llvm-project/pull/78338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

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

[clang] a464e05 - [clang-format] Handle templated elaborated type specifier in function… (#77013)

2024-01-20 Thread via cfe-commits
Author: XDeme Date: 2024-01-20T14:47:58-08:00 New Revision: a464e05109088f1f3a0ca4c83d6dd900e83bdb4b URL: https://github.com/llvm/llvm-project/commit/a464e05109088f1f3a0ca4c83d6dd900e83bdb4b DIFF: https://github.com/llvm/llvm-project/commit/a464e05109088f1f3a0ca4c83d6dd900e83bdb4b.diff LOG:

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-20 Thread via cfe-commits
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/77013 >From 45d01cbc7ec958518b1739daa9e9b0dc35c2d194 Mon Sep 17 00:00:00 2001 From: XDeme Date: Thu, 4 Jan 2024 19:04:21 -0300 Subject: [PATCH 1/8] [clang-format] Handle templated elaborated type specifier in function

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-20 Thread Owen Pan via cfe-commits
@@ -3873,6 +3873,9 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) { const FormatToken = *FormatTok; nextToken(); + auto IsNonMacroIdentifier = [](FormatToken *Tok) { owenca wrote: Nit: ```suggestion auto IsNonMacroIdentifier = [](const

[clang] [clang-format]: Fix formatting of if statements with BlockIndent (PR #77699)

2024-01-20 Thread Owen Pan via cfe-commits
@@ -768,15 +768,25 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState , bool DryRun, // parenthesis by disallowing any further line breaks if there is no line // break after the opening parenthesis. Don't break if it doesn't conserve // columns. + const auto

[clang] [clang-format]: Fix formatting of if statements with BlockIndent (PR #77699)

2024-01-20 Thread Owen Pan via cfe-commits
@@ -768,15 +768,25 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState , bool DryRun, // parenthesis by disallowing any further line breaks if there is no line // break after the opening parenthesis. Don't break if it doesn't conserve // columns. + const auto

[clang] 8511436 - [Frontend] Use SmallString::operator std::string (NFC)

2024-01-20 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-01-20T14:30:36-08:00 New Revision: 851143608e2394487d849f56ea1d4b3d3d8f2ead URL: https://github.com/llvm/llvm-project/commit/851143608e2394487d849f56ea1d4b3d3d8f2ead DIFF: https://github.com/llvm/llvm-project/commit/851143608e2394487d849f56ea1d4b3d3d8f2ead.diff

[clang] 84cb8ea - [Sema] Use llvm::is_contained (NFC)

2024-01-20 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-01-20T14:30:30-08:00 New Revision: 84cb8eaeeb108234be1c8498688a014b87fd431d URL: https://github.com/llvm/llvm-project/commit/84cb8eaeeb108234be1c8498688a014b87fd431d DIFF: https://github.com/llvm/llvm-project/commit/84cb8eaeeb108234be1c8498688a014b87fd431d.diff

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-20 Thread via cfe-commits
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/77013 >From 45d01cbc7ec958518b1739daa9e9b0dc35c2d194 Mon Sep 17 00:00:00 2001 From: XDeme Date: Thu, 4 Jan 2024 19:04:21 -0300 Subject: [PATCH 1/7] [clang-format] Handle templated elaborated type specifier in function

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-20 Thread Owen Pan via cfe-commits
owenca wrote: > Covering all double parens in a single sub-option is not precise enough for > code bases that may want to have `__attribute__(( x ))` but also allow `if ( > ( x ) )`. We should not go overboard with supporting all kinds of options/suboptions imaginable. I don't think we

[clang-tools-extra] [clang] [llvm] [libcxx] [libc++][hardening] Classify assertions related to leaks and syscalls. (PR #77164)

2024-01-20 Thread Konstantin Varlamov via cfe-commits
https://github.com/var-const updated https://github.com/llvm/llvm-project/pull/77164 >From e28e7b3e1337cb960cdc8028a70a43740fa7d636 Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Thu, 21 Dec 2023 14:36:47 -0800 Subject: [PATCH 1/4] [libc++][hardening] Classify assertions related to

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-20 Thread Owen Pan via cfe-commits
@@ -14583,9 +14583,10 @@ TEST_F(FormatTest, UnderstandContextOfRecordTypeKeywords) { verifyFormat("template <> struct X < 15, i<3 && 42 < 50 && 33 < 28> {};"); verifyFormat("int i = SomeFunction(a b);"); - // FIXME: - // This now gets parsed incorrectly as class

[clang-tools-extra] [clang-tidy] Ignore user-defined literals in google-runtime-int (PR #78859)

2024-01-20 Thread Piotr Zegar via cfe-commits
@@ -56,11 +56,14 @@ void IntegerTypesCheck::registerMatchers(MatchFinder *Finder) { // http://google.github.io/styleguide/cppguide.html#64-bit_Portability // "Where possible, avoid passing arguments of types specified by // bitwidth typedefs to printf-based APIs." -

[clang-tools-extra] [clang-tidy] Ignore user-defined literals in google-runtime-int (PR #78859)

2024-01-20 Thread Piotr Zegar via cfe-commits
@@ -359,6 +359,9 @@ Changes in existing checks to ignore unused parameters when they are marked as unused and parameters of deleted functions and constructors. +- Improved :doc:`google-runtime-int` check to ignore + false positives on user defined-literals.

[compiler-rt] [clang] [flang] [libc] [lldb] [libcxx] [clang-tools-extra] [llvm] [lld] [lld-macho] Find objects in library search path (PR #78628)

2024-01-20 Thread Vincent Lee via cfe-commits
https://github.com/thevinster closed https://github.com/llvm/llvm-project/pull/78628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix poor spacing in `AlignArrayOfStructures: Left` (PR #77868)

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

[clang] 2fc2ee1 - [clang-format] Fix poor spacing in `AlignArrayOfStructures: Left` (#77868)

2024-01-20 Thread via cfe-commits
Author: XDeme Date: 2024-01-20T13:34:37-08:00 New Revision: 2fc2ee136c0183f40af4c0e7a8d27092b8ce3415 URL: https://github.com/llvm/llvm-project/commit/2fc2ee136c0183f40af4c0e7a8d27092b8ce3415 DIFF: https://github.com/llvm/llvm-project/commit/2fc2ee136c0183f40af4c0e7a8d27092b8ce3415.diff LOG:

[clang] [clang-format] Fix poor spacing in `AlignArrayOfStructures: Left` (PR #77868)

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

[clang] [clang-format] Fix poor spacing in `AlignArrayOfStructures: Left` (PR #77868)

2024-01-20 Thread via cfe-commits
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/77868 >From 9f705be37183ca030e7720707f75ffbf9feb670a Mon Sep 17 00:00:00 2001 From: XDeme Date: Fri, 12 Jan 2024 00:18:56 -0300 Subject: [PATCH 1/3] [clang-format] Fix poor spacing in `AlignArrayOfStructures: Left`

[clang] [clang-format] Fix poor spacing in `AlignArrayOfStructures: Left` (PR #77868)

2024-01-20 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 093e6bdd4bec8ce9b3baf1e8e0a07aa6549dd5d4 a0eec9816b91057bb15a7e3fb403e655b563d3e2 --

[clang] [clang-format] Fix poor spacing in `AlignArrayOfStructures: Left` (PR #77868)

2024-01-20 Thread via cfe-commits
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/77868 >From 9f705be37183ca030e7720707f75ffbf9feb670a Mon Sep 17 00:00:00 2001 From: XDeme Date: Fri, 12 Jan 2024 00:18:56 -0300 Subject: [PATCH 1/2] [clang-format] Fix poor spacing in `AlignArrayOfStructures: Left`

[clang] [clang-format] Fix poor spacing in `AlignArrayOfStructures: Left` (PR #77868)

2024-01-20 Thread Owen Pan via cfe-commits
@@ -1366,11 +1366,12 @@ void WhitespaceManager::alignArrayInitializersLeftJustified( auto = CellDescs.Cells; // Now go through and fixup the spaces. auto *CellIter = Cells.begin(); - // The first cell needs to be against the left brace. - if

[clang] [clang-format] Add MainIncludeChar option. (PR #78752)

2024-01-20 Thread Owen Pan via cfe-commits
@@ -0,0 +1,27 @@ +// Test the combination of regrouped include directives, via regexes and owenca wrote: > Ok I will move them there, thanks :) Should I remove these lit tests or are > they complementary? Please remove them from the lit tests.

[lld] [flang] [libcxx] [compiler-rt] [libc] [clang] [lldb] [clang-tools-extra] [llvm] [lld-macho] Find objects in library search path (PR #78628)

2024-01-20 Thread via cfe-commits
https://github.com/OldWorldOrdr updated https://github.com/llvm/llvm-project/pull/78628 >From e73fc2d0263e9e601f2964a90cfe347e8d2bb87c Mon Sep 17 00:00:00 2001 From: OldWorldOrdr Date: Thu, 18 Jan 2024 16:20:52 -0500 Subject: [PATCH 1/5] [lld-macho] Find objects in library search path ---

[clang-tools-extra] [clang-tidy] Ignore user-defined literals in google-runtime-int (PR #78859)

2024-01-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Félix-Antoine Constantin (felix642) Changes User-defined literals do not accept u?intXX(_t)? variables. So the check should not emit a warning. Fixes #54546 #25214 --- Full diff: https://github.com/llvm/llvm-project/pull/78859.diff

[clang-tools-extra] [clang-tidy] Ignore user-defined literals in google-runtime-int (PR #78859)

2024-01-20 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 created https://github.com/llvm/llvm-project/pull/78859 User-defined literals do not accept u?intXX(_t)? variables. So the check should not emit a warning. Fixes #54546 #25214 From 8ea205ae2324d67f9adaf30d5662d2cde2096534 Mon Sep 17 00:00:00 2001 From:

[clang] [clang-format] Fix poor spacing in `AlignArrayOfStructures: Left` (PR #77868)

2024-01-20 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. Sorry, seems I've missed this change. https://github.com/llvm/llvm-project/pull/77868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format] NEVER allow && to be an unary operator. (PR #78852)

2024-01-20 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: Never knew that, and I'm sad I do now... But based on the documentation one could just check the previous token to be one of `={,-+(`. https://github.com/llvm/llvm-project/pull/78852 ___ cfe-commits mailing list

[compiler-rt] [lld] [libcxx] [openmp] [llvm] [clang-tools-extra] [flang] [clang] [mlir] [libc] [lldb] [libc++][format] P2637R3: Member `visit` (`std::basic_format_arg`) (PR #76449)

2024-01-20 Thread Mark de Wever via cfe-commits
https://github.com/mordante approved this pull request. Still LGTM! https://github.com/llvm/llvm-project/pull/76449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libc] [flang] [mlir] [libcxx] [lldb] [clang-tools-extra] [openmp] [clang] [llvm] [lld] [libc++][variant] P2637R3: Member `visit` (`std::variant`) (PR #76447)

2024-01-20 Thread Mark de Wever via cfe-commits
https://github.com/mordante approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/76447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

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

[clang] [clang-format] Allow decltype in requires clause (PR #78847)

2024-01-20 Thread Björn Schäpers via cfe-commits
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { "concept C = (!Foo) && Bar;"); ASSERT_EQ(Tokens.size(), 19u) << Tokens; EXPECT_TOKEN(Tokens[15], tok::ampamp, TT_BinaryOperator); + + Tokens = annotate("void

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2024-01-20 Thread Mark de Wever via cfe-commits
https://github.com/mordante updated https://github.com/llvm/llvm-project/pull/76451 >From f3f0db64da4d341f8e4a2054f9f25c87f8eda829 Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Wed, 27 Dec 2023 17:34:10 +0100 Subject: [PATCH 1/7] [clang][modules] Print library module manifest path. This

[compiler-rt] [lld] [libcxx] [openmp] [llvm] [clang-tools-extra] [flang] [clang] [mlir] [libc] [lldb] [libc++][format] P2637R3: Member `visit` (`std::basic_format_arg`) (PR #76449)

2024-01-20 Thread Hristo Hristov via cfe-commits
H-G-Hristov wrote: @mordante Could you please have another look at the test/latest update. https://github.com/llvm/llvm-project/pull/76449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[llvm] [clang] [clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

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

[clang-tools-extra] [llvm] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-20 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,135 @@ +//===--- UseStdMinMaxCheck.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:

[llvm] [clang] [clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-20 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: @11happy, regarding the statement count: The tests work when I add `statementCountIs(1),` right after `compoundStmt(` -> `compoundStmt(statementCountIs(1),`. I removed the bound node, `Compound` and the `Compoind->size() > 1` check. But the tests should

[clang] [clang-tools-extra] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

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

[clang] [clang-tools-extra] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-20 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,129 @@ +//===--- UseStdMinMaxCheck.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:

[openmp] [libc] [mlir] [lld] [llvm] [clang] [clang-tools-extra] [compiler-rt] [lldb] [flang] [libcxx] [libc++][format] P2637R3: Member `visit` (`std::basic_format_arg`) (PR #76449)

2024-01-20 Thread Hristo Hristov via cfe-commits
@@ -1513,6 +1519,11 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c #define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK # endif +// Clang-18 has support for deducing this, but it does not set the FTM. +#if

[clang] [clang-format] Allow decltype in requires clause (PR #78847)

2024-01-20 Thread Björn Schäpers via cfe-commits
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { "concept C = (!Foo) && Bar;"); HazardyKnusperkeks wrote: I'm in favor. Just for the correctness. https://github.com/llvm/llvm-project/pull/78847

[clang] [clang-format] Support of TableGen statements in unwrapped line parser (PR #78846)

2024-01-20 Thread Björn Schäpers via cfe-commits
@@ -2743,6 +2760,14 @@ FormatToken *UnwrappedLineParser::parseIfThenElse(IfStmtKind *IfKind, } } + // TableGen's if statement has the form of `if then { ... }`. + if (Style.isTableGen()) { +while (!eof() && !(FormatTok->is(Keywords.kw_then))) {

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-01-20 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > Oh, sorry @HazardyKnusperkeks I missed this in your previous comment. > > I've updated the PR. > > As a side note, I tried adding these two tests but they fail, meaning the > cursor is still incorrectly computed with CRLF when replacing lines. > > This is due to

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-20 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > > I think splitting the two features would be better. > > I'm going to close this MR and create two new ones. > > > Also please add a note to the changelog. > > Where can I find the changelog? `clang/docs/ReleaseNotes.rst`

[clang] [clang-format] Add MainIncludeChar option. (PR #78752)

2024-01-20 Thread Björn Schäpers via cfe-commits
@@ -0,0 +1,27 @@ +// Test the combination of regrouped include directives, via regexes and HazardyKnusperkeks wrote: I've never run anything but the unit tests. I'd remove these, but I have no strong opinion on that matter.

  1   2   3   >