[clang] 9154a32 - [clang-format][doc] Fix typos

2024-05-05 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-05-05T00:18:55-07:00 New Revision: 9154a324bfce5dee27cb04708bd250b030d6cdd2 URL: https://github.com/llvm/llvm-project/commit/9154a324bfce5dee27cb04708bd250b030d6cdd2 DIFF: https://github.com/llvm/llvm-project/commit/9154a324bfce5dee27cb04708bd250b030d6cdd2.diff LOG:

[clang-tools-extra] [clang-tidy] Improve modernize-use-std-print diagnostic (PR #91071)

2024-05-05 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/91071 >From d25fa679a70947d42fe3125858741508475d67c0 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sat, 4 May 2024 17:41:37 +0100 Subject: [PATCH] [clang-tidy] Improve modernize-use-std-print diagnostic Include th

[clang-tools-extra] [clang-tidy] Improve modernize-use-std-print diagnostic (PR #91071)

2024-05-05 Thread Mike Crowe via cfe-commits
mikecrowe wrote: @5chmidti wrote: > LGTM, thanks Please can you land this for me since I don't have permission to do so myself? (Assuming you do have permission.) Thanks. https://github.com/llvm/llvm-project/pull/91071 ___ cfe-commits mailing list c

[clang-tools-extra] [clang-tidy][docs] Fix modernize-use-std-print docs (PR #91069)

2024-05-05 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/91069 >From 442cc7464ea4972d25e6fe518ac466b540a399eb Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sat, 4 May 2024 17:21:02 +0100 Subject: [PATCH] [clang-tidy][docs] Fix modernize-use-std-print docs The set of fun

[clang] [Clang] No longer require complete types with __builtin_launder (PR #91070)

2024-05-05 Thread via cfe-commits
https://github.com/cor3ntin commented: Should we try to force an instantiation in codegen for complete-but-not-yet-instantiated classes? https://github.com/llvm/llvm-project/pull/91070 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] 7d913c5 - [clang][Modules] Make `Module::Requirement` a struct (NFC) (#67900)

2024-05-05 Thread via cfe-commits
Author: David Stone Date: 2024-05-05T09:45:04+02:00 New Revision: 7d913c5ea9fd0dd455fe60364a8075aa0924d6b7 URL: https://github.com/llvm/llvm-project/commit/7d913c5ea9fd0dd455fe60364a8075aa0924d6b7 DIFF: https://github.com/llvm/llvm-project/commit/7d913c5ea9fd0dd455fe60364a8075aa0924d6b7.diff L

[clang] [clang][Modules] Make `Module::Requirement` a struct (PR #67900)

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

[clang-tools-extra] [clang-tidy][docs] Fix modernize-use-std-print docs (PR #91069)

2024-05-05 Thread Mike Crowe via cfe-commits
mikecrowe wrote: @5chmidti wrote: > LGTM, thanks Please can you land this for me since I don't have permission to do so myself? (Assuming you do have permission.) Thanks. https://github.com/llvm/llvm-project/pull/91069 ___ cfe-commits mailing list c

[clang] [clang-format] Handle Java switch expressions (PR #91112)

2024-05-05 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/91112 Also adds AllowShortCaseExpressionOnASingleLine option and AlignCaseArrows suboption of AlignConsecutiveShortCaseStatements. Fixes #55903. >From be8569c3721337317635a2f0640237a2d5acd73a Mon Sep 17 00:00:00 2001

[clang] [clang-format] Handle Java switch expressions (PR #91112)

2024-05-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Owen Pan (owenca) Changes Also adds AllowShortCaseExpressionOnASingleLine option and AlignCaseArrows suboption of AlignConsecutiveShortCaseStatements. Fixes #55903. --- Patch is 26.58 KiB, truncated to 20.00 KiB below, full version: ht

[clang] [clang-format] Handle Java switch expressions (PR #91112)

2024-05-05 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/91112 >From be8569c3721337317635a2f0640237a2d5acd73a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 5 May 2024 00:21:55 -0700 Subject: [PATCH 1/2] [clang-format] Handle Java switch expressions Also adds AllowShortC

[clang] [clang-format] Handle Java switch expressions (PR #91112)

2024-05-05 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/91112 >From 31a45ace7d828c63b31d0ba20ed07f2a0340c41d Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 5 May 2024 00:21:55 -0700 Subject: [PATCH] [clang-format] Handle Java switch expressions Also adds AllowShortCaseE

[clang] [clang-format] Handle Java switch expressions (PR #91112)

2024-05-05 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/91112 >From beab69244ce686a1d53342979d46f269a46c79de Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 5 May 2024 00:21:55 -0700 Subject: [PATCH] [clang-format] Handle Java switch expressions Also adds AllowShortCaseE

[clang] [clang] Enable FPContract with optnone (PR #91061)

2024-05-05 Thread Serge Pavlov via cfe-commits
@@ -968,10 +968,7 @@ class FPOptionsOverride { setAllowFPContractAcrossStatement(); } - void setDisallowOptimizations() { -setFPPreciseEnabled(true); -setDisallowFPContract(); - } + void setDisallowOptimizations() { setFPPreciseEnabled(true); } -

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-05-05 Thread Michael Buch via cfe-commits
Michael137 wrote: > @Michael137 said: > > > Btw, as a follow-up to this patch should we check that this is compatible > > with dsymutil (i.e., running dsymutil --verify)? I suspect it might need a > > fixup (given LLDB doesn't even support this tag) Yup, dsymutil looks good now, thanks > The

[clang] [analyzer] Fix false double free when including 3rd-party headers with overloaded delete operator as system headers (PR #85224)

2024-05-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/85224 >From b3e6a2273e9c35ac4cc3ac16aebcf4ea0d89ef74 Mon Sep 17 00:00:00 2001 From: Ella Ma Date: Thu, 14 Mar 2024 20:41:20 +0800 Subject: [PATCH 1/2] wip: the first workaround --- .../StaticAnalyzer/Checkers/Malloc

[clang] [analyzer] Fix false double free when including 3rd-party headers with overloaded delete operator as system headers (PR #85224)

2024-05-05 Thread Balazs Benics via cfe-commits
steakhal wrote: I had a deeper look at the patch and I think it's good. To be on the safe side, I canonicalize `FD` to prefer decls with definitions if the redeclchain contains a definition. This ensures that if we have a definition, `L` will refer to the beginning of that definition. I'll mer

[clang] [analyzer] Fix false double free when including 3rd-party headers with overloaded delete operator as system headers (PR #85224)

2024-05-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/85224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix false double free when including 3rd-party headers with overloaded delete operator as system headers (PR #85224)

2024-05-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/85224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Propagate pragma set fast-math flags to floating point builtins (PR #90377)

2024-05-05 Thread Karl-Johan Karlsson via cfe-commits
karka228 wrote: > LGTM. Thanks. I will close the issue #87758. Thanks @andykaylor and @zahiraam for reviewing. https://github.com/llvm/llvm-project/pull/90377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-05 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 created https://github.com/llvm/llvm-project/pull/91119 Resolves #89264 Values should not be stored in addresses of labels, this throws a fatal error when this happens. >From 36b1ee31d8d740cdbee6a1787d7ef81d6abeb8ad Mon Sep 17 00:00:00 2001 From: Rajveer Date: S

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rajveer Singh Bharadwaj (Rajveer100) Changes Resolves #89264 Values should not be stored in addresses of labels, this throws a fatal error when this happens. --- Full diff: https://github.com/llvm/llvm-project/pull/91119.diff 2 Files A

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-05 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 updated https://github.com/llvm/llvm-project/pull/91119 >From c1d62262d2545e4999f08f2ba28a12c71789926f Mon Sep 17 00:00:00 2001 From: Rajveer Date: Sun, 5 May 2024 18:05:00 +0530 Subject: [PATCH] [clang][analyzer] Check for label location bindings in `DereferenceC

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-05 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 72eaa0ed9934bfaa2449091bbc6e45648d1396d6 c1d62262d2545e4999f08f2ba28a12c71789926f --

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-05 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 updated https://github.com/llvm/llvm-project/pull/91119 >From dcc23f7751ba2ceb281a9b027907dbf849ba65c6 Mon Sep 17 00:00:00 2001 From: Rajveer Date: Sun, 5 May 2024 18:05:00 +0530 Subject: [PATCH] [clang][analyzer] Check for label location bindings in `DereferenceC

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-05 Thread Rajveer Singh Bharadwaj via cfe-commits
Rajveer100 wrote: @steakhal https://github.com/llvm/llvm-project/pull/91119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. The `llvm::errs()` are for only debugging stuff. The print to the stderr. However, to form a bug report you need to use the `reportBug` here, and you also need to define a new `BugType` for representing this bug kind. Once that'

[clang] [llvm] [SCCP] Swap out range metadata to range attribute (PR #90134)

2024-05-05 Thread Jinsong Ji via cfe-commits
jsji wrote: With this, range attribute may prevent us from doing tailcall. eg: https://godbolt.org/z/7cfTqe4Wq A fix is proposed here: https://github.com/llvm/llvm-project/pull/91122 Please help to have a look. Thanks. https://github.com/llvm/llvm-project/pull/90134 ___

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread via cfe-commits
https://github.com/AMS21 created https://github.com/llvm/llvm-project/pull/91124 Finds usage of C-Style initialization that can be rewritten with C++-11 uniform initializers. Background: For an upcoming project it will be a requirement for us to use C++-11 uniform initializers when ever possib

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (AMS21) Changes Finds usage of C-Style initialization that can be rewritten with C++-11 uniform initializers. Background: For an upcoming project it will be a requirement for us to use C++-11 uniform initializers when ever poss

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (AMS21) Changes Finds usage of C-Style initialization that can be rewritten with C++-11 uniform initializers. Background: For an upcoming project it will be a requirement for us to use C++-11 uniform initializers when ev

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 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 a415b4dfcc02e3e82b8c8a7836f7c04b9d65dc9b b46ceac9284c92b4ac55a5c489a0b7a8bff8d32e --

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread via cfe-commits
https://github.com/AMS21 updated https://github.com/llvm/llvm-project/pull/91124 >From 369bb3fe0b47872a06adb89e0414a56c26904e2c Mon Sep 17 00:00:00 2001 From: AMS21 Date: Tue, 16 Apr 2024 08:56:13 +0200 Subject: [PATCH] [clang-tidy] Add `modernize-use-uniform-initializer` check Finds usage of C

[clang-tools-extra] [clang-tidy] Improve modernize-use-std-print diagnostic (PR #91071)

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

[clang-tools-extra] 7e4d16d - [clang-tidy] Improve modernize-use-std-print diagnostic (#91071)

2024-05-05 Thread via cfe-commits
Author: Mike Crowe Date: 2024-05-05T17:20:31+02:00 New Revision: 7e4d16d73c22079997dd59d8e7d8f41bdbac5a50 URL: https://github.com/llvm/llvm-project/commit/7e4d16d73c22079997dd59d8e7d8f41bdbac5a50 DIFF: https://github.com/llvm/llvm-project/commit/7e4d16d73c22079997dd59d8e7d8f41bdbac5a50.diff LO

[clang-tools-extra] [clang-tidy] Improve modernize-use-std-print diagnostic (PR #91071)

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

[clang-tools-extra] 9aad38b - [clang-tidy] fix false-positives for templates in `bugprone-return-const-ref-from-parameter` (#90273)

2024-05-05 Thread via cfe-commits
Author: Julian Schmidt Date: 2024-05-05T17:51:33+02:00 New Revision: 9aad38b61586cab8b125c3f522789267f9b749a9 URL: https://github.com/llvm/llvm-project/commit/9aad38b61586cab8b125c3f522789267f9b749a9 DIFF: https://github.com/llvm/llvm-project/commit/9aad38b61586cab8b125c3f522789267f9b749a9.diff

[clang-tools-extra] [clang-tidy] fix false-positives for templates in `bugprone-return-const-ref-from-parameter` (PR #90273)

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

[clang-tools-extra] 716eab7 - [clang-tidy][docs] Fix modernize-use-std-print docs (#91069)

2024-05-05 Thread via cfe-commits
Author: Mike Crowe Date: 2024-05-05T17:52:59+02:00 New Revision: 716eab783713cc99046c89478c126b1a2e000940 URL: https://github.com/llvm/llvm-project/commit/716eab783713cc99046c89478c126b1a2e000940 DIFF: https://github.com/llvm/llvm-project/commit/716eab783713cc99046c89478c126b1a2e000940.diff LO

[clang-tools-extra] [clang-tidy][docs] Fix modernize-use-std-print docs (PR #91069)

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

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-05 Thread via cfe-commits
https://github.com/antangelo updated https://github.com/llvm/llvm-project/pull/91046 >From 767173a0dfde9858c90867cc5d476da90e5ba898 Mon Sep 17 00:00:00 2001 From: Antonio Abbatangelo Date: Tue, 30 Apr 2024 22:58:18 -0400 Subject: [PATCH 1/3] [AArch64] Support preserve_none calling convention -

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-05-05 Thread Alexandre Ganea via cfe-commits
aganea wrote: Hello, This causes a warning when building LLDB on Windows, `clang::BuiltinType::UnresolvedTemplate` isn't handled in the case in the file indicated below (sorry my locale is French). Would you have a chance to take a look @zyn0217 please? ``` [6325/7521] Building CXX object too

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-05 Thread Andrew Pinski via cfe-commits
@@ -5658,17 +5658,20 @@ experimental at this time. def PreserveNoneDocs : Documentation { let Category = DocCatCallingConvs; let Content = [{ -On X86-64 target, this attribute changes the calling convention of a function. +On X86-64 and AArch64 targets, this attribute chang

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-05 Thread via cfe-commits
https://github.com/antangelo updated https://github.com/llvm/llvm-project/pull/91046 >From 767173a0dfde9858c90867cc5d476da90e5ba898 Mon Sep 17 00:00:00 2001 From: Antonio Abbatangelo Date: Tue, 30 Apr 2024 22:58:18 -0400 Subject: [PATCH 1/5] [AArch64] Support preserve_none calling convention -

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

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

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

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

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/91124 ___ 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 `modernize-use-uniform-initializer` check (PR #91124)

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

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,174 @@ +// RUN: %check_clang_tidy -std=c++11 %s modernize-use-uniform-initializer %t + +int cinit_0 = 0; +// CHECK-MESSAGES: :[[@LINE-1]]:13: warning: Use uniform initializer instead of C-style initializer [modernize-use-uniform-initializer] +// CHECK-FIXES: int cinit_

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

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

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

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

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Overall, i would see this as readability check. And I would see this as configurable check, so I could select one of: ` = 10;`, or `(10);` or `{10};` and stick to that convention. Other thing, in project not so long ago we had issues with {} initialization.

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

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

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,174 @@ +// RUN: %check_clang_tidy -std=c++11 %s modernize-use-uniform-initializer %t + +int cinit_0 = 0; +// CHECK-MESSAGES: :[[@LINE-1]]:13: warning: Use uniform initializer instead of C-style initializer [modernize-use-uniform-initializer] +// CHECK-FIXES: int cinit_

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

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

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

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

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

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

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

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

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

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

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,34 @@ +.. title:: clang-tidy - modernize-use-uniform-initializer + +modernize-use-uniform-initializer += + +Finds usage of C-Style initialization that can be rewritten with +C++-11 uniform initializers. + +Example +--- + +.. code-bloc

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread Piotr Zegar via cfe-commits
@@ -84,6 +84,29 @@ SourceLocation findNextTerminator(SourceLocation Start, const SourceManager &SM, return findNextAnyTokenKind(Start, SM, LangOpts, tok::comma, tok::semi); } +SourceLocation findNextTokenKind(SourceLocation Start, const SourceManager &SM, +

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,174 @@ +// RUN: %check_clang_tidy -std=c++11 %s modernize-use-uniform-initializer %t + +int cinit_0 = 0; +// CHECK-MESSAGES: :[[@LINE-1]]:13: warning: Use uniform initializer instead of C-style initializer [modernize-use-uniform-initializer] +// CHECK-FIXES: int cinit_

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Fix pointed out nits https://github.com/llvm/llvm-project/pull/91124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-05-05 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @aganea Oops, this is an oversight I think, because I don't build lldb locally nor run its tests... I'm proposing a PR https://github.com/llvm/llvm-project/pull/91132, can you help me confirm if that works? https://github.com/llvm/llvm-project/pull/89019 __

[clang] 7e59223 - [test] %clang_cc1: remove redundant actions

2024-05-05 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-05T10:46:06-07:00 New Revision: 7e59223ac4b045178c287a56154113d5989572f4 URL: https://github.com/llvm/llvm-project/commit/7e59223ac4b045178c287a56154113d5989572f4 DIFF: https://github.com/llvm/llvm-project/commit/7e59223ac4b045178c287a56154113d5989572f4.diff

[clang] [llvm] [ARM] Armv8-R does not require fp64 or neon. (PR #88287)

2024-05-05 Thread Chris Copeland via cfe-commits
chrisnc wrote: If there's no other feedback, could someone hit the merge button for me? https://github.com/llvm/llvm-project/pull/88287 ___ 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 `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Regarding the problem of {} initialization and std::vector, I believe we could restrict this check to not warn on classes that have a constructor taking a `std:: initializer_list`. I believe AUTOSAR has an exception for that. https://github.com/llvm/llvm-project/pull/91124

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Consider also that this check should probably not apply to variables of type `auto`, see AUTOSAR rule A8-5-3. https://github.com/llvm/llvm-project/pull/91124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] d33937b - [test] %clang_cc1: remove redundant actions

2024-05-05 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-05T11:42:04-07:00 New Revision: d33937b6236767137a1ec3393d0933f10eed4ffe URL: https://github.com/llvm/llvm-project/commit/d33937b6236767137a1ec3393d0933f10eed4ffe DIFF: https://github.com/llvm/llvm-project/commit/d33937b6236767137a1ec3393d0933f10eed4ffe.diff

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,79 @@ +//===--- UseInternalLinkageCheck.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] new check misc-use-internal-linkage (PR #90830)

2024-05-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,79 @@ +//===--- UseInternalLinkageCheck.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] new check misc-use-internal-linkage (PR #90830)

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

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-05 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: Regarding unit build: `google-global-names-in-headers` is one of the checks that check file extensions: https://github.com/llvm/llvm-project/blob/d33937b6236767137a1ec3393d0933f10eed4ffe/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp#L42

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,79 @@ +//===--- UseInternalLinkageCheck.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] new check misc-use-internal-linkage (PR #90830)

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

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

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

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow trivial operator++ (PR #91102)

2024-05-05 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91102 >From b3ae3d7a2a8885777b691e7fde237f5745e764a1 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 4 May 2024 20:29:03 -0700 Subject: [PATCH 1/2] [alpha.webkit.UncountedCallArgsChecker] Allow trivial operator++

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow trivial operator++ (PR #91102)

2024-05-05 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa edited https://github.com/llvm/llvm-project/pull/91102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-05 Thread Doug Wyatt via cfe-commits
@@ -4639,6 +4644,312 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +class Decl; +class CXXMethodDecl; +struct FunctionEffectDiff; +class FunctionEf

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-05 Thread Doug Wyatt via cfe-commits
@@ -4639,6 +4644,312 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +class Decl; +class CXXMethodDecl; +struct FunctionEffectDiff; +class FunctionEf

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-05 Thread Doug Wyatt via cfe-commits
@@ -4639,6 +4644,312 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +class Decl; +class CXXMethodDecl; +struct FunctionEffectDiff; +class FunctionEf

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-05 Thread Doug Wyatt via cfe-commits
@@ -4639,6 +4644,312 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +class Decl; +class CXXMethodDecl; +struct FunctionEffectDiff; +class FunctionEf

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-05 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 57f13b5 - [HLSL] Remove overridden -S

2024-05-05 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-05T12:53:34-07:00 New Revision: 57f13b51bdb373534ba5e507868b353a015107de URL: https://github.com/llvm/llvm-project/commit/57f13b51bdb373534ba5e507868b353a015107de DIFF: https://github.com/llvm/llvm-project/commit/57f13b51bdb373534ba5e507868b353a015107de.diff

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-05-05 Thread Eli Friedman via cfe-commits
@@ -908,6 +908,69 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) { incrementProfileCounter(&S); } +bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression, + bool HasEmptyBody) { + if (CGM.getCode

[clang] cc1: Report an error for multiple actions unless separated by -main-file-name (PR #91140)

2024-05-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/91140 When multiple actions are specified, the last one is used and others are overridden. This might lead to confusion if the user is used to driver's `-S -emit-llvm` behavior. ``` %clang_cc1 -S -emit-llvm a.c # -

[clang] cc1: Report an error for multiple actions unless separated by -main-file-name (PR #91140)

2024-05-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes When multiple actions are specified, the last one is used and others are overridden. This might lead to confusion if the user is used to driver's `-S -emit-llvm` behavior. ``` %clang_cc1 -S -emit-llvm a.c

[clang] [clang] solve crash due to function overloading. (PR #90255)

2024-05-05 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -emit-llvm < %s efriedma-quic wrote: Have you seen https://llvm.org/docs/TestingGuide.html#regression-test-structure ? If you have any ideas for improving the documentation, please let me know (or better, propose a patch; it

[clang] [clang][dataflow] Fix crash when `operator=` result type is not destination type. (PR #90898)

2024-05-05 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/90898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Fix crash when `operator=` result type is not destination type. (PR #90898)

2024-05-05 Thread Gábor Horváth via cfe-commits
@@ -556,14 +556,23 @@ class TransferVisitor : public ConstStmtVisitor { copyRecord(*LocSrc, *LocDst, Env); - // If the expr is a glvalue, we can reasonably assume the operator is - // returning T& and thus we can assign it `LocDst`. - if (S->isGLValue())

[clang] [clang-format] Don't allow comma in front of structural enum (PR #91056)

2024-05-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Emilia Kond (rymiel) Changes Assume that a comma in front of `enum` means it is actually a part of an elaborated type in a template parameter list. Fixes https://github.com/llvm/llvm-project/issues/47782 --- Full diff: https://git

[clang] [Clang][AArch64] Fixed incorrect _BitInt alignment (PR #90602)

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

[clang] [Clang][AArch64] Fixed incorrect _BitInt alignment (PR #90602)

2024-05-05 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: LG https://github.com/llvm/llvm-project/pull/90602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Fixed incorrect _BitInt alignment (PR #90602)

2024-05-05 Thread Eli Friedman via cfe-commits
@@ -518,6 +518,16 @@ class TargetInfo : public TransferrableTargetInfo, /// getInt128Align() - Returns the alignment of Int128. unsigned getInt128Align() const { return Int128Align; } + /// getBitIntAlign/Width - Return aligned size of '_BitInt' and + /// 'unsigned _BitI

[clang] [Clang][AArch64] Fixed incorrect _BitInt alignment (PR #90602)

2024-05-05 Thread Eli Friedman via cfe-commits
@@ -1674,4 +1679,4 @@ void RenderScript64TargetInfo::getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const { Builder.defineMacro("__RENDERSCRIPT__"); AArch64leTargetInfo::getTargetDefines(Opts, Builder); -} +

[clang] Revert "Revert "[OpenMP][TR12] change property of map-type modifier."… (PR #91141)

2024-05-05 Thread via cfe-commits
https://github.com/jyu2-git created https://github.com/llvm/llvm-project/pull/91141 … (#90885)" This reverts commit eea81aa29848361eb5b24f24d2af643fdeb9adfd. Also change isMapType as @vitalybuka suggested. Hope this fix sanitizer build problem. >From 563c1254162d7b42fd7579514f45df326216f508

[clang] [clang-format] Don't allow comma in front of structural enum (PR #91056)

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

[clang] Revert "Revert "[OpenMP][TR12] change property of map-type modifier."… (PR #91141)

2024-05-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (jyu2-git) Changes … (#90885)" This reverts commit eea81aa29848361eb5b24f24d2af643fdeb9adfd. Also change isMapType as @vitalybuka suggested. Hope this fix sanitizer build problem. --- Patch is 29.74 KiB, truncated to 20.00 KiB be

[clang] [llvm] [clang backend] In AArch64's DataLayout, specify a minimum function alignment of 4. (PR #90702)

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

[clang] [llvm] [clang backend] In AArch64's DataLayout, specify a minimum function alignment of 4. (PR #90702)

2024-05-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Which email address do you want the commit associated with? The GitHub "squash and merge" button wants to attribute it to your "sonosphere.com" address, but it looks like the commits themselves are using an "apple.com" address. https://github.com/llvm/llvm-project/pull/90

  1   2   >