[clang] 0c7a605 - clangCodeGen: [MC/DC] Refactor CoverageGen.

2024-02-25 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-02-26T16:44:19+09:00 New Revision: 0c7a605ada6cb392e6e8c16dbccf2b7e59017399 URL: https://github.com/llvm/llvm-project/commit/0c7a605ada6cb392e6e8c16dbccf2b7e59017399 DIFF: https://github.com/llvm/llvm-project/commit/0c7a605ada6cb392e6e8c16dbccf2b7e59017399.dif

[clang-tools-extra] [clangd] Add support for textDocument/rangesFormatting (LSP 3.18) (PR #80180)

2024-02-25 Thread Tom Praschan via cfe-commits
tom-anders wrote: (ping) https://github.com/llvm/llvm-project/pull/80180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cace477 - [clang][AArch64] multilib: fix deduction of "-march=" option (#81474)

2024-02-25 Thread via cfe-commits
Author: Dominik Wójt Date: 2024-02-26T08:09:33+01:00 New Revision: cace477c0b6c3d9494ead66eb725c6e72f27b767 URL: https://github.com/llvm/llvm-project/commit/cace477c0b6c3d9494ead66eb725c6e72f27b767 DIFF: https://github.com/llvm/llvm-project/commit/cace477c0b6c3d9494ead66eb725c6e72f27b767.diff

[clang] [clang][AArch64] multilib: fix deduction of "-march=" option (PR #81474)

2024-02-25 Thread Dominik Wójt via cfe-commits
https://github.com/domin144 closed https://github.com/llvm/llvm-project/pull/81474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-02-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > @HighCommander4 I got a better idea. It seems that we don't need to add the > parameter! See #82957. I think all you need to do is to call `getStyle()` > with the default `""` for the `StringRef Code` argument to skip the > Objective-C guesser. Thanks. That does seem s

[clang-tools-extra] [clang-tidy] bugprone-unused-return-value config now supports regexes (PR #82952)

2024-02-25 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/82952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][Clang] Enable inscan modifier for generic datatypes (PR #82220)

2024-02-25 Thread Animesh Kumar via cfe-commits
https://github.com/animeshk-amd updated https://github.com/llvm/llvm-project/pull/82220 >From 26d8d82a3070700dd327337d37c757eb1db6f2cc Mon Sep 17 00:00:00 2001 From: Animesh Kumar Date: Mon, 19 Feb 2024 00:28:39 -0600 Subject: [PATCH] [OpenMP][Clang] Enable inscan modifier for generic datatypes

[clang] [OpenMP][Clang] Enable inscan modifier for generic datatypes (PR #82220)

2024-02-25 Thread Animesh Kumar via cfe-commits
https://github.com/animeshk-amd updated https://github.com/llvm/llvm-project/pull/82220 >From b5de1dd29956ae99ce7990554c4886453b2988e7 Mon Sep 17 00:00:00 2001 From: Animesh Kumar Date: Mon, 19 Feb 2024 00:28:39 -0600 Subject: [PATCH] [OpenMP][Clang] Enable inscan modifier for generic datatypes

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-02-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: @sam-mccall review ping :) https://github.com/llvm/llvm-project/pull/77556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8c5e9cf - [clang][Interp] Implement nullability argument checking

2024-02-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-26T06:19:25+01:00 New Revision: 8c5e9cf737138aba22a4a8f64ef2c5efc80dd7f9 URL: https://github.com/llvm/llvm-project/commit/8c5e9cf737138aba22a4a8f64ef2c5efc80dd7f9 DIFF: https://github.com/llvm/llvm-project/commit/8c5e9cf737138aba22a4a8f64ef2c5efc80dd7f9.diff LO

[clang] [clang-format] Add a parameter to getStyle() and guessLanguage() (PR #82911)

2024-02-25 Thread Owen Pan via cfe-commits
owenca wrote: I will abandon this pull request if #82957 gets approved. https://github.com/llvm/llvm-project/pull/82911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add a parameter to getStyle() and guessLanguage() (PR #82911)

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

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-02-25 Thread Owen Pan via cfe-commits
owenca wrote: @HighCommander4 I got a better idea. It seems that we don't need to add the parameter! See #82957. I think all you need to do is to call `getStyle()` with the default `""` for the `StringRef Code` argument to skip the Objective-C guesser. https://github.com/llvm/llvm-project/pul

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-02-25 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra approved this pull request. https://github.com/llvm/llvm-project/pull/72556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] constify or staticify some CGRecordLowering fns (PR #82874)

2024-02-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. I'm not sure there's really much point to passing around a const reference to a CGRecordLowering; all the uses are in one file, so const-correctness doesn't seem to help that much. But if you want to do it this way, that's fine; LGTM

[clang] [clang-format][NFC] Skip ObjCHeaderStyleGuesser for empty code (PR #82957)

2024-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/82957.diff 1 Files Affected: - (modified) clang/lib/Format/Format.cpp (+1-1) ``diff diff --git a/clang/lib/Format/Format.cpp b/clang/l

[clang] [clang-format][NFC] Skip ObjCHeaderStyleGuesser for empty code (PR #82957)

2024-02-25 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/82957 None >From 9334d008b4c7ae13fdeb674a6bb9b4dc62c6a1dd Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 25 Feb 2024 20:58:25 -0800 Subject: [PATCH] [clang-format][NFC] Skip ObjCHeaderStyleGuesser for empty code

[clang] [TBAA] Skip all bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-25 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: This seems like it messes up the metadata in a different way: we have no representation of the bitfield at all, so it looks like it's padding. I think we want to treat multiple adjacent bitfields as a single "field". So NamedBitfields from the testcase would have three fi

[clang] [clang-tools-extra] clangd: Show argument names for function pointer struct fields (PR #69011)

2024-02-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/69011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] clangd: Show argument names for function pointer struct fields (PR #69011)

2024-02-25 Thread Nathan Ridge via cfe-commits
@@ -6143,6 +6144,13 @@ static FunctionProtoTypeLoc GetPrototypeLoc(Expr *Fn) { } } + if (const auto *ME = dyn_cast(Fn)) { HighCommander4 wrote: nit: make this an `else if` (i.e. make it part of the chain just above), and then the `!Target` condition b

[clang] [clang-tools-extra] clangd: Show argument names for function pointer struct fields (PR #69011)

2024-02-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Thanks for the update! Looks good with a final nit. https://github.com/llvm/llvm-project/pull/69011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-25 Thread Yaxun Liu via cfe-commits
@@ -1306,14 +1306,50 @@ float min(float __x, float __y) { return __builtin_fminf(__x, __y); } __DEVICE__ double min(double __x, double __y) { return __builtin_fmin(__x, __y); } +// Define host min/max functions. + #if !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__) -_

[clang] [clang] Better bitfield access units (PR #65742)

2024-02-25 Thread Lu Weining via cfe-commits
@@ -132,6 +132,7 @@ class LLVM_LIBRARY_VISIBILITY LoongArch64TargetInfo : LoongArchTargetInfo(Triple, Opts) { LongWidth = LongAlign = PointerWidth = PointerAlign = 64; IntMaxType = Int64Type = SignedLong; +HasCheapUnalignedBitfieldAccess = true; --

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-25 Thread Joseph Huber via cfe-commits
@@ -1306,14 +1306,50 @@ float min(float __x, float __y) { return __builtin_fminf(__x, __y); } __DEVICE__ double min(double __x, double __y) { return __builtin_fmin(__x, __y); } +// Define host min/max functions. + #if !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__) -_

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-25 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 8be39b3901e3326ceebeaf0381f8cc57fdc0d464 e36760486cc794dd3dc1604b0969b83f25bdd757 --

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes CUDA defines min/max functions for host in global namespace. HIP header needs to define them too to be compatible. Currently only min/max(int, int) is defined. This causes wrong result for arguments that

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-25 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/82956 CUDA defines min/max functions for host in global namespace. HIP header needs to define them too to be compatible. Currently only min/max(int, int) is defined. This causes wrong result for arguments that are ou

[clang-tools-extra] [clang-tidy] Improved modernize-use-using by fixing a false-negative (PR #82947)

2024-02-25 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 updated https://github.com/llvm/llvm-project/pull/82947 From d1cbed0e2e83bd3544067fd25d7e811f1ab3f095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Sun, 25 Feb 2024 20:20:59 -0500 Subject: [PATCH 1/2] [clang-tidy] Improved moderniz

[clang-tools-extra] [clang-tidy] bugprone-unused-return-value config now supports regexes (PR #82952)

2024-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Félix-Antoine Constantin (felix642) Changes The parameter `CheckedReturnTypes` now supports regexes Fixes #63107 --- Full diff: https://github.com/llvm/llvm-project/pull/82952.diff 5 Files Affected: - (modified) clang-tools

[clang-tools-extra] [clang-tidy] bugprone-unused-return-value config now supports regexes (PR #82952)

2024-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Félix-Antoine Constantin (felix642) Changes The parameter `CheckedReturnTypes` now supports regexes Fixes #63107 --- Full diff: https://github.com/llvm/llvm-project/pull/82952.diff 5 Files Affected: - (modified) clang-tools-extra/

[clang-tools-extra] [clang-tidy] bugprone-unused-return-value config now supports regexes (PR #82952)

2024-02-25 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 created https://github.com/llvm/llvm-project/pull/82952 The parameter `CheckedReturnTypes` now supports regexes Fixes #63107 From 86bc8a57fd56a6b2593af8bcf85d50bbc0ce984e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Sun, 25 Feb

[clang] [clang][dataflow] Factor out built-in boolean model into an explicit module. (PR #82950)

2024-02-25 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand created https://github.com/llvm/llvm-project/pull/82950 Draft to demo how we can pull out the boolean model. Let's discuss specifics of namings, location, etc. The purpose of this refactoring is to enable us to compare the performance of different boolean models. In part

[clang] Revert "[clang][dataflow] Correctly handle `InitListExpr` of union type." (PR #82856)

2024-02-25 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/82856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ObjC] Defer to the LLVM backend for unaligned atomic load and stores (PR #79191)

2024-02-25 Thread James Y Knight via cfe-commits
jyknight wrote: > Don't know but everything passed now! Well, I'm not an expert on the objc codegen...but unless you, or someone else, can explain that my concern is invalid, I think this change cannot be made. https://github.com/llvm/llvm-project/pull/79191 ___

[clang] clang serialization unittests: fix some leaks (PR #82773)

2024-02-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. https://github.com/llvm/llvm-project/pull/82773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-02-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > @HighCommander4 see #82911 Thanks. I've prototyped the clangd changes on top of this, and it seem to be working (i.e. successfully avoiding the OOM for workflows that don't involve formatting the file). I've pushed the changes to my fork at https://github.com/HighComma

[clang-tools-extra] [clangd] Make all calls to format::getStyle() go through getFormatStyleForFile() (PR #82948)

2024-02-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (This patch is in preparation for a fix for https://github.com/clangd/clangd/issues/1384, which I haven't posted yet because I haven't figured out how to do stacked PRs yet. However, this patch seems independently useful and reviewable.) https://github.com/llvm/llvm-proj

[clang-tools-extra] [clangd] Make all calls to format::getStyle() go through getFormatStyleForFile() (PR #82948)

2024-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Nathan Ridge (HighCommander4) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/82948.diff 5 Files Affected: - (modified) clang-tools-extra/clangd/ClangdServer.cpp (+2-7) - (modified) clang-tools-extra/clang

[clang-tools-extra] [clangd] Make all calls to format::getStyle() go through getFormatStyleForFile() (PR #82948)

2024-02-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/82948 None >From e0cb66c8313c8ff1a934dc222165040de656b71e Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 25 Feb 2024 19:24:31 -0500 Subject: [PATCH] [clangd] Make all calls to format::getStyle() go thro

[clang-tools-extra] [clang-tidy] Improved modernize-use-using by fixing a false-negative (PR #82947)

2024-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Félix-Antoine Constantin (felix642) Changes The check needs a parent decl to match but if the typedef is in a function, the parent is a declStmt which is not a decl by itself. Improved the matcher to match on either a decl or a decls

[clang-tools-extra] [clang-tidy] Improved modernize-use-using by fixing a false-negative (PR #82947)

2024-02-25 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 updated https://github.com/llvm/llvm-project/pull/82947 From d1cbed0e2e83bd3544067fd25d7e811f1ab3f095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Sun, 25 Feb 2024 20:20:59 -0500 Subject: [PATCH] [clang-tidy] Improved modernize-us

[clang-tools-extra] [clang-tidy] Improved modernize-use-using by fixing a false-negative (PR #82947)

2024-02-25 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 created https://github.com/llvm/llvm-project/pull/82947 The check needs a parent decl to match but if the typedef is in a function, the parent is a declStmt which is not a decl by itself. Improved the matcher to match on either a decl or a declstmt and extract the d

[clang] 085f9b0 - [clang-format][doc] Update documentation for RemoveSemicolon

2024-02-25 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-25T16:08:37-08:00 New Revision: 085f9b0d146fc99bbb0e193593aad696fc50a056 URL: https://github.com/llvm/llvm-project/commit/085f9b0d146fc99bbb0e193593aad696fc50a056 DIFF: https://github.com/llvm/llvm-project/commit/085f9b0d146fc99bbb0e193593aad696fc50a056.diff LOG:

[clang] [ObjC] Add support for finally blocks (PR #82934)

2024-02-25 Thread via cfe-commits
https://github.com/AtariDreams converted_to_draft https://github.com/llvm/llvm-project/pull/82934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ObjC] Add support for finally blocks (PR #82934)

2024-02-25 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/82934 >From 3a4134ff040230e0f0e5054be57e28f779135728 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Sun, 25 Feb 2024 14:52:59 -0500 Subject: [PATCH] [ObjC] Add support for

[clang] [ObjC] Add support for finally blocks (PR #82934)

2024-02-25 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 529b5705db2ccefeee2c9b8cb5144e1f5a6420de 08abfad8feb3c54cc1bb9a8eea94e0e91c3ce678 --

[clang] [ObjC] Add support for finally blocks (PR #82934)

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

[clang] [ObjC] Add support for finally blocks (PR #82934)

2024-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: AtariDreams (AtariDreams) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/82934.diff 1 Files Affected: - (modified) clang/lib/Analysis/CFG.cpp (+61-10) ``diff diff --git a/clang/lib/Analysis/CFG.cpp b/clang/

[clang] [ObjC] Add support for finally blocks (PR #82934)

2024-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: AtariDreams (AtariDreams) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/82934.diff 1 Files Affected: - (modified) clang/lib/Analysis/CFG.cpp (+61-10) ``diff diff --git a/clang/lib/Analysis/CFG.cpp

[clang] [ObjC] Add support for finally blocks (PR #82934)

2024-02-25 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/82934 >From 08abfad8feb3c54cc1bb9a8eea94e0e91c3ce678 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Sun, 25 Feb 2024 14:52:59 -0500 Subject: [PATCH] [ObjC] Add support for

[clang] [ObjC] Add support for finally blocks (PR #82934)

2024-02-25 Thread via cfe-commits
https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/82934 None >From 80d60869a593d59501e14bb673c1bd8938c38028 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Sun, 25 Feb 2024 14:52:59 -0500 Subject: [PATCH] [ObjC] Add suppor

[clang] [clang-format] Add AlignConsecutiveTableGenCondOperatorColons option. (PR #82878)

2024-02-25 Thread Björn Schäpers via cfe-commits
@@ -849,7 +851,12 @@ void WhitespaceManager::alignConsecutiveAssignments() { } void WhitespaceManager::alignConsecutiveBitFields() { - if (!Style.AlignConsecutiveBitFields.Enabled) + alignConsecutiveColons(Style.AlignConsecutiveBitFields, TT_BitFieldColon); +} + +void Whites

[clang] [clang-format] Add a parameter to getStyle() and guessLanguage() (PR #82911)

2024-02-25 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/82911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang-tools-extra] [clangd] Prevent printing huge initializer lists in hover definitions (PR #79746)

2024-02-25 Thread Raoul Wols via cfe-commits
https://github.com/rwols updated https://github.com/llvm/llvm-project/pull/79746 >From 6d30615ba3fb59163938656827a60a838e160c31 Mon Sep 17 00:00:00 2001 From: Raoul Wols Date: Sat, 10 Feb 2024 20:52:03 +0100 Subject: [PATCH] [clangd] Do not render large initializer expressions from the preamble

[clang] Thread safety analysis: provide printSCFG definition. (PR #80277)

2024-02-25 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert approved this pull request. Thanks, looks good to me! https://github.com/llvm/llvm-project/pull/80277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [run-clang-tidy.py] Add option to ignore source files from compilation database (PR #82416)

2024-02-25 Thread via cfe-commits
github-actions[bot] wrote: @duddel 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 build,

[clang-tools-extra] [run-clang-tidy.py] Add option to ignore source files from compilation database (PR #82416)

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

[clang-tools-extra] 8dfc023 - [run-clang-tidy.py] Add option to ignore source files from compilation database (#82416)

2024-02-25 Thread via cfe-commits
Author: Alexander Scholz Date: 2024-02-25T17:42:57+01:00 New Revision: 8dfc023e80c35aded33b3e5e4739d3a487b95a7a URL: https://github.com/llvm/llvm-project/commit/8dfc023e80c35aded33b3e5e4739d3a487b95a7a DIFF: https://github.com/llvm/llvm-project/commit/8dfc023e80c35aded33b3e5e4739d3a487b95a7a.di

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-25 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,167 @@ +//===--- UnsafeCrtpCheck.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] Unsafe CRTP check (PR #82403)

2024-02-25 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,232 @@ +// RUN: %check_clang_tidy %s bugprone-unsafe-crtp %t + +namespace class_implicit_ctor { +template +class CRTP {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: the implicit default constructor of the CRTP is publicly accessible [bugprone-unsafe-crtp] +// CHECK-

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

2024-02-25 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,177 @@ +//===--- CrtpConstructorAccessibilityCheck.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-Li

[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

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

[clang] 411c5dd - [clang][Interp] Handle null function pointers

2024-02-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-25T17:26:36+01:00 New Revision: 411c5dde59fa4c427941143ca0ec8cd8fdaee407 URL: https://github.com/llvm/llvm-project/commit/411c5dde59fa4c427941143ca0ec8cd8fdaee407 DIFF: https://github.com/llvm/llvm-project/commit/411c5dde59fa4c427941143ca0ec8cd8fdaee407.diff LO

[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-25 Thread Vinayak Dev via cfe-commits
vinayakdsci wrote: @cor3ntin gentle ping. How exactly should I proceed? copy elision was made mandatory in C++17, so wouldn't a warning for C++ < 17 be allowable? I am very happy to implement any suggestions you have for this PR, but I am unable to get the code to work for C++ < 17 because the

[clang] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-02-25 Thread via cfe-commits
@@ -138,58 +163,79 @@ void run_foo_tml() { // CHECK: resolver_return1: // CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlEv._Mfrintts // CHECK: resolver_else2: -// CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlEv +// CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlE

[clang] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-02-25 Thread via cfe-commits
@@ -0,0 +1,16 @@ +// REQUIRES: arm-registered-target + +// RUN: %clang -flto -target thumbv7m-unknown-unknown-eabi -mbranch-protection=pac-ret %s -S -o - 2>&1 | FileCheck %s DanielKristofKiss wrote: Done https://github.com/llvm/llvm-project/pull/82819 _

[clang] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-02-25 Thread via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/82819 >From c5c2d720e822624fa7966297087b04e6b2fc2a86 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Fri, 23 Feb 2024 17:12:26 +0100 Subject: [PATCH 1/3] [NFC][ARM][AArch64] Deduplicated code. Add the SignR

[clang] [NFC][ARM][AArch64] Deduplicated code. (PR #82785)

2024-02-25 Thread via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/82785 >From c5c2d720e822624fa7966297087b04e6b2fc2a86 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Fri, 23 Feb 2024 17:12:26 +0100 Subject: [PATCH] [NFC][ARM][AArch64] Deduplicated code. Add the SignRetur

[clang-tools-extra] [clangd] Prevent printing huge initializer lists in hover definitions (PR #79746)

2024-02-25 Thread Raoul Wols via cfe-commits
https://github.com/rwols updated https://github.com/llvm/llvm-project/pull/79746 >From 06a84a493646b66a99a9e8e95a64ca09d952be28 Mon Sep 17 00:00:00 2001 From: Raoul Wols Date: Sat, 10 Feb 2024 20:52:03 +0100 Subject: [PATCH] [clangd] Do not render large initializer expressions from the preamble

[clang] [clang][Sema] Fix for enums overflowing (#24667) (PR #78742)

2024-02-25 Thread via cfe-commits
https://github.com/wheatman updated https://github.com/llvm/llvm-project/pull/78742 >From 5a3d785ef4eaa83d8944dedbb4cb1b79914fdacc Mon Sep 17 00:00:00 2001 From: Brian Wheatman Date: Fri, 19 Jan 2024 11:13:33 -0500 Subject: [PATCH] [clang][Sema] Fix for overflow in enumerators(#24667) Enums wh

[clang] [clang] Add __builtin_start_object_lifetime builtin. (PR #82776)

2024-02-25 Thread A. Jiang via cfe-commits
@@ -896,6 +896,12 @@ def Launder : Builtin { let Prototype = "void*(void*)"; } +def StartObjectLifeTime : Builtin { + let Spellings = ["__builtin_start_object_lifetime"]; frederick-vs-ja wrote: IMO if the intent of this intrinsic is to handle polymorphic c

[clang] [clang][Sema] Fix for enums overflowing (#24667) (PR #78742)

2024-02-25 Thread via cfe-commits
@@ -18,6 +19,40 @@ enum x // expected-warning {{enumeration values exceed rang { y = -9223372036854775807LL-1, // expected-warning {{ISO C restricts enumerator values to range of 'int'}} z = 9223372036854775808ULL };// expected-warning {{ISO C restric

[clang] [clang][Sema] Fix for enums overflowing (#24667) (PR #78742)

2024-02-25 Thread via cfe-commits
https://github.com/wheatman updated https://github.com/llvm/llvm-project/pull/78742 >From 294e0995a8e41623e7f82c4f11d2f93c64f4e403 Mon Sep 17 00:00:00 2001 From: Brian Wheatman Date: Fri, 19 Jan 2024 11:13:33 -0500 Subject: [PATCH] [clang][Sema] Fix for overflow in enumerators(#24667) Enums wh

[clang] [clang-format] Add AlignConsecutiveTableGenCondOperatorColons option. (PR #82878)

2024-02-25 Thread Hirofumi Nakamura via cfe-commits
@@ -849,7 +851,12 @@ void WhitespaceManager::alignConsecutiveAssignments() { } void WhitespaceManager::alignConsecutiveBitFields() { - if (!Style.AlignConsecutiveBitFields.Enabled) + alignConsecutiveColons(Style.AlignConsecutiveBitFields, TT_BitFieldColon); +} + +void Whites

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-25 Thread Balazs Benics via cfe-commits
steakhal wrote: > (In case you do intend to merge changes related to formatting, consider > adding the resulting commit hash into the blame-ignore file.) I dont intend to merge this. https://github.com/llvm/llvm-project/pull/82599 ___ cfe-commits mai

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-25 Thread via cfe-commits
whisperity wrote: (In case you do intend to merge changes related to formatting, consider adding the resulting commit hash into the blame-ignore file.) https://github.com/llvm/llvm-project/pull/82599 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [TBAA] Skip all bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Florian Hahn (fhahn) Changes At the moment, clang generates what I believe are incorrect !tbaa.struct fields for named bitfields. At the moment, the base type size is used for named bifields (e.g. sizeof(int)) instead of the bifie

[clang] [TBAA] Skip all bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-25 Thread Florian Hahn via cfe-commits
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/82922 At the moment, clang generates what I believe are incorrect !tbaa.struct fields for named bitfields. At the moment, the base type size is used for named bifields (e.g. sizeof(int)) instead of the bifield width per

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-02-25 Thread Matt Arsenault via cfe-commits
@@ -2067,6 +2067,10 @@ Constant *ConstantExpr::getBitCast(Constant *C, Type *DstTy, Constant *ConstantExpr::getAddrSpaceCast(Constant *C, Type *DstTy, bool OnlyIfReduced) { + // Skip cast if types are identical arsenm

[clang] 7110147 - [TBAA] Test for tbaa.struct creation for struct with named bitfields.

2024-02-25 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-02-25T13:17:08Z New Revision: 711014714716753f791291ed6a152e00899469a3 URL: https://github.com/llvm/llvm-project/commit/711014714716753f791291ed6a152e00899469a3 DIFF: https://github.com/llvm/llvm-project/commit/711014714716753f791291ed6a152e00899469a3.diff LOG:

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-25 Thread Balazs Benics via cfe-commits
steakhal wrote: I've submitted PRs to resolve the pending formatting issues. https://github.com/llvm/llvm-project/pull/82599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][NFC] Prepare for clang-format (PR #82921)

2024-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes This is the followup PR for #82599 to fix the cases where clang-format would regress the flow of the code. --- Full diff: https://github.com/llvm/llvm-project/pull/82921.diff 13 Files A

[clang] [clang][analyzer][NFC] Prepare for clang-format (PR #82921)

2024-02-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/82921 This is the followup PR for #82599 to fix the cases where clang-format would regress the flow of the code. >From 245de9ea5c33649ff7b3e359cd360361d4dc5ae3 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sun,

[clang] [clang][NFC] Prefer usings over typedefs (PR #82920)

2024-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/82920.diff 1 Files Affected: - (modified) clang/include/clang/Analysis/FlowSensitive/DataflowValues.h (+6-6) ``diff

[clang] [clang][NFC] Prefer usings over typedefs (PR #82920)

2024-02-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/82920 None >From fd85686af33570f0baf8ba60a0b0b8113e999c4a Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sun, 25 Feb 2024 12:37:49 +0100 Subject: [PATCH] [clang][NFC] Prefer usings over typedefs --- .../clang/A

[clang] [clang][NFC] Trim license header comments to 81 characters (PR #82919)

2024-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balazs Benics (steakhal) Changes clang-format would format these headers poorly by splitting it into multiple lines. ```regex //=.{78,} ``` --- Patch is 25.48 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llv

[clang] [clang][NFC] Trim license header comments to 81 characters (PR #82919)

2024-02-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/82919 clang-format would format these headers poorly by splitting it into multiple lines. ```regex //=.{78,} ``` >From 319329630e0d2a86b22dd435985026ea236f8e56 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sun

[clang] [clang] Clang should detect illegal copy constructor with template class as its parameter (PR #81251)

2024-02-25 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 updated https://github.com/llvm/llvm-project/pull/81251 >From bf51e9dfb160ec32b3f3a7d052c1da24f06a Mon Sep 17 00:00:00 2001 From: Rajveer Date: Fri, 9 Feb 2024 19:20:39 +0530 Subject: [PATCH] [clang] Clang should detect illegal copy constructor with template c

[clang] [clang] Clang should detect illegal copy constructor with template class as its parameter (PR #81251)

2024-02-25 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 updated https://github.com/llvm/llvm-project/pull/81251 >From 4bb6d4d1b5a813bc3a60c1bc6aab97ea863bd261 Mon Sep 17 00:00:00 2001 From: Rajveer Date: Fri, 9 Feb 2024 19:20:39 +0530 Subject: [PATCH] [clang] Clang should detect illegal copy constructor with template c

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-25 Thread Balazs Benics via cfe-commits
@@ -33,30 +33,17 @@ namespace ento { /// checking. /// /// \sa CheckerContext -class CheckerDocumentation : public Checker< check::PreStmt, - check::PostStmt, - check::PreObjCMessage, -

[clang] [clang] Clang should detect illegal copy constructor with template class as its parameter (PR #81251)

2024-02-25 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 updated https://github.com/llvm/llvm-project/pull/81251 >From 5c5a91dbdf7239025d7bc5961afc0f375d3b1627 Mon Sep 17 00:00:00 2001 From: Rajveer Date: Fri, 9 Feb 2024 19:20:39 +0530 Subject: [PATCH] [clang] Clang should detect illegal copy constructor with template c

[clang] [clang] Clang should detect illegal copy constructor with template class as its parameter (PR #81251)

2024-02-25 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 updated https://github.com/llvm/llvm-project/pull/81251 >From 7c58bd55bdd5c9a9cc838fec35e957f7952b2b52 Mon Sep 17 00:00:00 2001 From: Rajveer Date: Fri, 9 Feb 2024 19:20:39 +0530 Subject: [PATCH] [clang] Clang should detect illegal copy constructor with template c

[clang] [clang] Clang should detect illegal copy constructor with template class as its parameter (PR #81251)

2024-02-25 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 edited https://github.com/llvm/llvm-project/pull/81251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1f6a347 - Refactor: Let MCDC::State have DecisionByStmt and BranchByStmt

2024-02-25 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-02-25T18:33:53+09:00 New Revision: 1f6a347c8abf8868fb4630c404480226c2efc2c2 URL: https://github.com/llvm/llvm-project/commit/1f6a347c8abf8868fb4630c404480226c2efc2c2 DIFF: https://github.com/llvm/llvm-project/commit/1f6a347c8abf8868fb4630c404480226c2efc2c2.dif

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #75841)

2024-02-25 Thread Brad Smith via cfe-commits
brad0 wrote: Any chance of reviving this? https://github.com/llvm/llvm-project/pull/75841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-02-25 Thread Owen Pan via cfe-commits
owenca wrote: @HighCommander4 see #82911 https://github.com/llvm/llvm-project/pull/78925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add a parameter to getStyle() and guessLanguage() (PR #82911)

2024-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Add a boolean parameter GuessObjC that defaults to true. This allows e.g. clangd to bypass ObjCHeaderStyleGuesser.process() by passing false for the parameter. --- Full diff: https://github.com/llvm/llvm-pr

[clang] [clang-format] Add a parameter to getStyle() and guessLanguage() (PR #82911)

2024-02-25 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/82911 Add a boolean parameter GuessObjC that defaults to true. This allows e.g. clangd to bypass ObjCHeaderStyleGuesser.process() by passing false for the parameter. >From bd85fd1dff5ac7b72913ed175daec3809896e6c0 Mon Se