[clang] [clang-format] Fix a bug in annotating FunctionAnnotationRParen (PR #99802)

2024-07-21 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/99802 Fixes #37906. >From a24f1411ba233e9f14ffa87e6abd139616b8cfed Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 21 Jul 2024 00:08:20 -0700 Subject: [PATCH] [clang-format] Fix a bug in annotating FunctionAnnotati

[clang] [clang-format] Fix a bug in annotating FunctionAnnotationRParen (PR #99802)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #37906. --- Full diff: https://github.com/llvm/llvm-project/pull/99802.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+3-3) - (modified) clang/unittests/Format/TokenAnnot

[clang-tools-extra] [clang-tidy] Add modernize-use-cpp-style-comments check (PR #99713)

2024-07-21 Thread NagaChaitanya Vellanki via cfe-commits
https://github.com/chaitanyav updated https://github.com/llvm/llvm-project/pull/99713 >From 2d45f8196e99c3b6f5a75db6e5e3df7ce1fd8aef Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Fri, 19 Jul 2024 14:26:23 -0700 Subject: [PATCH] [clang-tidy] Add modernize-use-cpp-style-comments che

[clang] [Clang] Refactor uses of `Cand->Function` in SemaOverload.cpp (PR #98965)

2024-07-21 Thread via cfe-commits
https://github.com/vortex73 updated https://github.com/llvm/llvm-project/pull/98965 >From 60a51d9150fa3f31c3eab89e1f1da3b30d190b48 Mon Sep 17 00:00:00 2001 From: Vortex Date: Tue, 16 Jul 2024 03:01:14 +0530 Subject: [PATCH 1/6] [Clang] Refactor uses of in SemaOverload.cpp --- clang/lib/Sema/

[clang-tools-extra] [clang-tidy] Add modernize-use-cpp-style-comments check (PR #99713)

2024-07-21 Thread NagaChaitanya Vellanki via cfe-commits
https://github.com/chaitanyav updated https://github.com/llvm/llvm-project/pull/99713 >From 670bf7aa89e06c2aac03dead4b980a01fe0d9426 Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Fri, 19 Jul 2024 14:26:23 -0700 Subject: [PATCH] [clang-tidy] Add modernize-use-cpp-style-comments che

[clang-tools-extra] [clang-tidy] Add new check bugprone-tagged-union-member-count (PR #89925)

2024-07-21 Thread via cfe-commits
=?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= Message-ID: In-Reply-To: tigbr wrote: A @isuckatcs specifically requested [testing C and Objective-C or specifying in the check that those languages are not supported](https://githu

[clang] [Clang] Fix handling of qualified id-expressions in unevaluated contexts (PR #99807)

2024-07-21 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/99807 In #89713, we made qualified, parenthesized id-expression ill-formed in and address of expressions. The expected behavior should instead be to form a pointer (rather than a pointer to member) The fix has been

[clang] [Clang] Fix handling of qualified id-expressions in unevaluated contexts (PR #99807)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes In #89713, we made qualified, parenthesized id-expression ill-formed in and address of expressions. The expected behavior should instead be to form a pointer (rather than a pointer to member) The fix has been

[clang] [Clang][CodeGen] Add metadata for load from reference (PR #98746)

2024-07-21 Thread Nikita Popov via cfe-commits
@@ -2799,9 +2799,37 @@ CodeGenFunction::EmitLoadOfReference(LValue RefLVal, llvm::LoadInst *Load = Builder.CreateLoad(RefLVal.getAddress(), RefLVal.isVolatile()); CGM.DecorateInstructionWithTBAA(Load, RefLVal.getTBAAInfo()); - return makeNaturalAddressForPointer(Load

[clang] [PAC] Incorrect codegen for constant global init with polymorphic MI (PR #99741)

2024-07-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 approved this pull request. https://github.com/llvm/llvm-project/pull/99741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add -Wimplicit-fallthrough to -Wextra (PR #97926)

2024-07-21 Thread Nikita Popov via cfe-commits
nikic wrote: CTMark is not compiled with `-Wextra`, so we'd not get any useful data out of this patch. What changes does one have to do to enable `-Wimplicit-fallthrough` by default (not just for `-Wextra`)? https://github.com/llvm/llvm-project/pull/97926 __

[clang] [llvm] [LV] Support generating masks for switch terminators. (PR #99808)

2024-07-21 Thread Florian Hahn via cfe-commits
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/99808 Update createEdgeMask to created masks where the terminator in Src is a switch. We need to handle 2 separate cases: 1. Dst is not the default desintation. Dst is reached if any of the cases with destination == Dst

[clang] [llvm] [LV] Support generating masks for switch terminators. (PR #99808)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Florian Hahn (fhahn) Changes Update createEdgeMask to created masks where the terminator in Src is a switch. We need to handle 2 separate cases: 1. Dst is not the default desintation. Dst is reached if any of the cases with des

[clang] [Clang] Fix handling of qualified id-expressions in unevaluated contexts (PR #99807)

2024-07-21 Thread via cfe-commits
@@ -58,7 +58,8 @@ C++ Specific Potentially Breaking Changes versions of clang. The deprecation warning for the negative spelling can be disabled with `-Wno-deprecated-no-relaxed-template-template-args`. -- Clang now rejects pointer to member from parenthesized expression i

[clang] [libclang/python] Fix some type errors, add type annotations (PR #98745)

2024-07-21 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/98745 >From c0216b8a50f7ccc6ee24db69802055c3942a183e Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Sat, 13 Jul 2024 14:12:34 +0100 Subject: [PATCH 1/2] [libclang/python] Fix some type errors, add type annot

[clang] [libclang/python] Fix some type errors, add type annotations (PR #98745)

2024-07-21 Thread Jannick Kremer via cfe-commits
@@ -200,13 +236,16 @@ class _CXString(Structure): _fields_ = [("spelling", c_char_p), ("free", c_int)] -def __del__(self): +def __del__(self) -> None: conf.lib.clang_disposeString(self) @staticmethod -def from_result(res, fn=None, args=None): +

[clang] [libclang/python] Fix some type errors, add type annotations (PR #98745)

2024-07-21 Thread Jannick Kremer via cfe-commits
@@ -66,46 +66,77 @@ import collections.abc import os +import sys from enum import Enum +from typing import ( +Any, +Callable, +Generic, +Optional, +Type as TType, +TypeVar, +TYPE_CHECKING, +Union as TUnion, +) +from typing_extensions import P

[clang] [libclang/python] Fix some type errors, add type annotations (PR #98745)

2024-07-21 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: I added breaking change notes where I thought them appropriate, could you merge if you are happy with this? Regarding the relase: I believe I've taken care not to break anything (besides things noted in breaking change notes) so hopefully not much need for that. If any une

[clang] [Clang] Fix handling of qualified id-expressions in unevaluated contexts (PR #99807)

2024-07-21 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/99807 >From 0a243d09a38667a71b3e3f29456b488c5288185f Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 21 Jul 2024 11:49:45 +0200 Subject: [PATCH 1/2] [Clang] Fix handling of qualified id-expressions in uneval

[clang] [Clang] Fix handling of qualified id-expressions in unevaluated contexts (PR #99807)

2024-07-21 Thread via cfe-commits
@@ -58,7 +58,8 @@ C++ Specific Potentially Breaking Changes versions of clang. The deprecation warning for the negative spelling can be disabled with `-Wno-deprecated-no-relaxed-template-template-args`. -- Clang now rejects pointer to member from parenthesized expression i

[clang] [libclang/python] Fix some type errors, add type annotations (PR #98745)

2024-07-21 Thread Nikita Popov via cfe-commits
nikic wrote: https://github.com/llvm/llvm-project/pull/78114 should absolutely not go onto the release branch -- and with that in mind, please hold off on merging this PR until LLVM 19 has branched as well. https://github.com/llvm/llvm-project/pull/98745 ___

[clang] [libclang/python] Fix some type errors, add type annotations (PR #98745)

2024-07-21 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @nikic could you explain why? https://github.com/llvm/llvm-project/pull/98745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Fix some type errors, add type annotations (PR #98745)

2024-07-21 Thread Nikita Popov via cfe-commits
nikic wrote: @DeinAlptraum It's a major change to the clang python bindings. In general, please refrain from landing major changes immediately before branching (and certainly do not backport them to the release branch). https://github.com/llvm/llvm-project/pull/98745 __

[clang] [libclang/python] Fix some type errors, add type annotations (PR #98745)

2024-07-21 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Got it, thank you! https://github.com/llvm/llvm-project/pull/98745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (PR #99773)

2024-07-21 Thread via cfe-commits
@@ -518,6 +518,10 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`exception-escape ` EugeneZelenko wrote: Pl

[clang-tools-extra] [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (PR #99773)

2024-07-21 Thread via cfe-commits
@@ -518,6 +518,10 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`exception-escape ` + check to correctly detect exception ha

[clang-tools-extra] [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (PR #99773)

2024-07-21 Thread via cfe-commits
@@ -518,6 +518,10 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`exception-escape ` + check to correctly detect exception ha

[clang-tools-extra] [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (PR #99773)

2024-07-21 Thread Hana Dusíková via cfe-commits
@@ -518,6 +518,10 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`exception-escape ` hanickadot wrote: Oh, s

[clang] [Clang][Interp] Diagnose use sizeless vector type as the argument of `__builtin_vectorelements` (PR #99794)

2024-07-21 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/99794 >From 163c9201ddf944e9e7eeef54a620bcc89fbe9b3d Mon Sep 17 00:00:00 2001 From: yronglin Date: Sun, 21 Jul 2024 10:54:41 +0800 Subject: [PATCH 1/3] [Clang][Interp] Diagnose use sizeless vector type as the argumen

[clang] [Clang][Interp] Diagnose use sizeless vector type as the argument of `__builtin_vectorelements` (PR #99794)

2024-07-21 Thread via cfe-commits
@@ -1698,10 +1698,8 @@ bool Compiler::VisitUnaryExprOrTypeTraitExpr( if (Kind == UETT_VectorElements) { if (const auto *VT = E->getTypeOfArgument()->getAs()) return this->emitConst(VT->getNumElements(), E); - -// FIXME: Apparently we need to catch the fact that

[clang-tools-extra] [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (PR #99773)

2024-07-21 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/99773 From ebf1c6996f18cbd706ec3d76a1887c58c9ce3230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Sat, 20 Jul 2024 20:12:45 +0200 Subject: [PATCH] [clang-tidy] `bugprone-exception-esca

[clang] [Clang][Interp] Diagnose use sizeless vector type as the argument of `__builtin_vectorelements` (PR #99794)

2024-07-21 Thread via cfe-commits
@@ -29,6 +29,7 @@ #include "State.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Expr.h" +#include "clang/Basic/DiagnosticSema.h" yronglin wrote: Removed. https://github.com/llvm/llvm-project/pull/99794 __

[clang] [Clang][Interp] Diagnose use sizeless vector type as the argument of `__builtin_vectorelements` (PR #99794)

2024-07-21 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/99794 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Interp] Diagnose use sizeless vector type as the argument of `__builtin_vectorelements` (PR #99794)

2024-07-21 Thread via cfe-commits
@@ -2735,6 +2736,13 @@ inline bool InvalidDeclRef(InterpState &S, CodePtr OpPC, return CheckDeclRef(S, OpPC, DR); } +inline bool SizelessVectorElementSize(InterpState &S, CodePtr OpPC) { yronglin wrote: Thanks, agree 100%, it should keeps same behavior with

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-21 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/97911 >From f6c1a231681092189a621e2bc6af97300b2a7bfa Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Wed, 12 Jun 2024 21:06:26 +0100 Subject: [PATCH 1/6] [clang-tidy] Only expand macros in modernize-use-std-format/

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-21 Thread Mike Crowe via cfe-commits
mikecrowe wrote: @5chmidti wrote: > It should be possible to detect this case comparing the FileID of the call's > location and the format expression's location. If they differ, then they are > different arguments -> different macros. Although, I haven't checked that yet. I had thought so too

[clang] [Clang][AST] {CXXDefaultArgExpr, CXXDefaultInitExpr}::hasRewrittenInit return true iff the init expression was really rebuild (PR #99748)

2024-07-21 Thread via cfe-commits
https://github.com/yronglin closed https://github.com/llvm/llvm-project/pull/99748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7f17b6b - [MC] Migrate to new createAsmStreamer that avoids unused bool parameters

2024-07-21 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-07-21T09:23:45-07:00 New Revision: 7f17b6b740bd49b84430a46b366381bfc8b74fb0 URL: https://github.com/llvm/llvm-project/commit/7f17b6b740bd49b84430a46b366381bfc8b74fb0 DIFF: https://github.com/llvm/llvm-project/commit/7f17b6b740bd49b84430a46b366381bfc8b74fb0.diff

[clang] [Clang] fix generic lambda inside requires-clause of friend function template (PR #99813)

2024-07-21 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght created https://github.com/llvm/llvm-project/pull/99813 fixes https://github.com/llvm/llvm-project/issues/98258 The cause is that the assertion "Nothing should reference a value below the actual template depth" is incorrect since we can have a generic lambda inside

[clang] [Clang] fix generic lambda inside requires-clause of friend function template (PR #99813)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Zhikai Zeng (Backl1ght) Changes fixes https://github.com/llvm/llvm-project/issues/98258 The cause is that the assertion "Nothing should reference a value below the actual template depth" is incorrect since we can have a generic lambda ins

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/89490 >From d736bf96f5342752f17f7cb7c8e0f2a68ed3d996 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Sat, 20 Apr 2024 02:58:25 + Subject: [PATCH] [run-clang-tidy.py] Refactor, add progress indicator, add

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/89490 >From 89f05df307dc839cef0037495e2f233eacb10b22 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Sat, 20 Apr 2024 02:58:25 + Subject: [PATCH] [run-clang-tidy.py] Refactor, add progress indicator, add

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/89490 >From c0de68b59850f873a21ad5944b74b53fc3a1c4a8 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Sat, 20 Apr 2024 02:58:25 + Subject: [PATCH] [run-clang-tidy.py] Refactor, add progress indicator, add

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/89490 >From ba200d4376cd0e9086220cc08de939c40489cd04 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Sat, 20 Apr 2024 02:58:25 + Subject: [PATCH] [run-clang-tidy.py] Refactor, add progress indicator, add

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: Update: shutdown is now graceful on my machine. Please test on others if possible. 3.7+ is now required, which I think is fine given we want to make 3.8 the minimum across LLVM. Rebased on top of the `allow-no-checks` commit. https://github.com/llvm/llvm-project/pull/89490 ___

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. Stopping the execution is now graceful on my machine as well, thanks. https://github.com/llvm/llvm-project/pull/89490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [llvm] [ARM][AArch64] Split FEAT_SHA1 from FEAT_SHA256. (PR #99816)

2024-07-21 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea converted_to_draft https://github.com/llvm/llvm-project/pull/99816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM][AArch64] Split FEAT_SHA1 from FEAT_SHA256. (PR #99816)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-arm Author: Alexandros Lamprineas (labrinea) Changes These features can be detected individually in Function Multiversioning therefore we would like to support them as separate features. --- Patch is 109.44 KiB, truncated to 20.00 KiB below, f

[clang] [llvm] [ARM][AArch64] Split FEAT_SHA1 from FEAT_SHA256. (PR #99816)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Alexandros Lamprineas (labrinea) Changes These features can be detected individually in Function Multiversioning therefore we would like to support them as separate features. --- Patch is 109.44 KiB, tru

[clang] [llvm] Revert "Add source file name for template instantiations in -ftime-trace" (PR #99534)

2024-07-21 Thread David Blaikie via cfe-commits
dwblaikie wrote: (if you don't need a code review for a change, you can commit it directly without a pull request - if you're making a PR not for code review but for presubmit checks, please label to `skip-precommit-approval` to clarify that you aren't waiting for approval (and that the change

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: Just double checked and tested again, seems good to me. Please merge on my behalf, I do not have commit access. I'll keep an eye out if anything breaks. https://github.com/llvm/llvm-project/pull/89490 ___ cfe-commits mailing list cfe-c

[clang] [clang-format] Fix a bug in annotating FunctionAnnotationRParen (PR #99802)

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

[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-21 Thread via cfe-commits
https://github.com/ofAlpaca updated https://github.com/llvm/llvm-project/pull/99542 >From 2a381b47002db3c7a119a893c1a70e0b1604151f Mon Sep 17 00:00:00 2001 From: schiang Date: Thu, 18 Jul 2024 09:53:35 +0800 Subject: [PATCH 1/3] Pass 'Scope *' for 'SetDeclDefaulted()' and related utlis --- cl

[clang] [clang-format] Fix a bug in annotating StartOfName (PR #99791)

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

[clang] [libcxx] [llvm] Reapply "[Clang] Implement resolution for CWG1835 (#92957)" (PR #98547)

2024-07-21 Thread Nico Weber via cfe-commits
nico wrote: Independent of the other issues, it looks like this also re-introduces #98878 https://github.com/llvm/llvm-project/pull/98547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [llvm] Revert "Add source file name for template instantiations in -ftime-trace" (PR #99534)

2024-07-21 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: Acknowledged. I will use the`skip-precommit-approval` label from now on. https://github.com/llvm/llvm-project/pull/99534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ecaacd1 - Reapply "Add source file name for template instantiations in -ftime-trace" (#99757)

2024-07-21 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2024-07-21T20:55:34+02:00 New Revision: ecaacd14c35996ad6ee53da6af6c9f4cf36d9110 URL: https://github.com/llvm/llvm-project/commit/ecaacd14c35996ad6ee53da6af6c9f4cf36d9110 DIFF: https://github.com/llvm/llvm-project/commit/ecaacd14c35996ad6ee53da6af6c9f4cf36d9110.diff

[clang] [llvm] Reapply "Add source file name for template instantiations in -ftime-trace" (PR #99757)

2024-07-21 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/99757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

2024-07-21 Thread Hana Dusíková via cfe-commits
hanickadot wrote: When this change is building at Compiler Explorer I noticed it spams build output with warnings: ``` In file included from /root/llvm-project/clang/include/clang/AST/Type.h:31, from /root/llvm-project/clang/include/clang/AST/DeclarationName.h:16,

[clang] Diag mismatch 97878 (PR #99824)

2024-07-21 Thread Braden Helmer via cfe-commits
https://github.com/bradenhelmer created https://github.com/llvm/llvm-project/pull/99824 Fixes #97878 >From e4c3701ea6be894b1094f45d0590c61e5aa44897 Mon Sep 17 00:00:00 2001 From: Braden Helmer Date: Sun, 21 Jul 2024 14:10:17 -0400 Subject: [PATCH 1/2] Fix diag mismatch --- clang/lib/Sema/Se

[clang] Diag mismatch 97878 (PR #99824)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Braden Helmer (bradenhelmer) Changes Fixes #97878 --- Full diff: https://github.com/llvm/llvm-project/pull/99824.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaOverload.cpp (+1-1) - (modified) clang/test/SemaCXX/cxx2b-deducing

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

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

[clang] dcebe29 - [clang-format] Fix a bug in annotating StartOfName (#99791)

2024-07-21 Thread via cfe-commits
Author: Owen Pan Date: 2024-07-21T13:14:18-07:00 New Revision: dcebe297367f48a71a5ecea3bcdd54671195da1b URL: https://github.com/llvm/llvm-project/commit/dcebe297367f48a71a5ecea3bcdd54671195da1b DIFF: https://github.com/llvm/llvm-project/commit/dcebe297367f48a71a5ecea3bcdd54671195da1b.diff LOG:

[clang] [clang-format] Fix a bug in annotating StartOfName (PR #99791)

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

[clang] [clang-format] Fix a bug in annotating FunctionAnnotationRParen (PR #99802)

2024-07-21 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/99802 >From a24f1411ba233e9f14ffa87e6abd139616b8cfed Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 21 Jul 2024 00:08:20 -0700 Subject: [PATCH 1/2] [clang-format] Fix a bug in annotating FunctionAnnotationRParen F

[clang] 0387cd0 - [clang-format] Fix a bug in annotating FunctionAnnotationRParen (#99802)

2024-07-21 Thread via cfe-commits
Author: Owen Pan Date: 2024-07-21T14:54:50-07:00 New Revision: 0387cd052b081d6bc9856ef756942a5df1a2a301 URL: https://github.com/llvm/llvm-project/commit/0387cd052b081d6bc9856ef756942a5df1a2a301 DIFF: https://github.com/llvm/llvm-project/commit/0387cd052b081d6bc9856ef756942a5df1a2a301.diff LOG:

[clang] [clang-format] Fix a bug in annotating FunctionAnnotationRParen (PR #99802)

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

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

2024-07-21 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: I see a crash in `drivers/thermal/thermal_core.c` in Linux kernels without commit [daeeb032f42d](https://git.kernel.org/linus/daeeb032f42d066a49e07b7f6effc9f51b7a5479) ("thermal: core: Move threshold out of struct thermal_trip") after this change. `cvise` spits out: ```c

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 commented: LGTM with minor non-blocking nits. However, I'd prefer to wait for @asl 's review before merging the PR. I'm OK with merging whenever @asl is. https://github.com/llvm/llvm-project/pull/99576 ___ cfe-commits maili

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/99576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -71,6 +71,15 @@ void has_ptrauth_vtable_pointer_type_discrimination() {} void no_ptrauth_vtable_pointer_type_discrimination() {} #endif +// This is always enabled when ptrauth_calls is enabled, on new enough clangs. kovdan01 wrote: We already have this tes

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -5877,119 +5882,130 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, CallArgs.freeArgumentMemory(*this); // Extract the return value. - RValue Ret = [&] { -switch (RetAI.getKind()) { -case ABIArgInfo::CoerceAndExpand: { - auto coercionT

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -1036,9 +1155,32 @@ llvm::Constant *ItaniumCXXABI::BuildMemberPointer(const CXXMethodDecl *MD, // least significant bit of adj then makes exactly the same // discrimination as the least significant bit of ptr does for // Itanium. - MemPtr[0] = l

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -1036,9 +1155,32 @@ llvm::Constant *ItaniumCXXABI::BuildMemberPointer(const CXXMethodDecl *MD, // least significant bit of adj then makes exactly the same // discrimination as the least significant bit of ptr does for // Itanium. - MemPtr[0] = l

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -853,6 +877,25 @@ llvm::Value *ItaniumCXXABI::EmitMemberDataPointerAddress( "memptr.offset"); } +// See if it's possible to return a constant signed pointer. +static llvm::Constant *pointerAuthResignConstant( +llvm::Value *Ptr, const C

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -3417,11 +3417,13 @@ uint16_t ASTContext::getPointerAuthTypeDiscriminator(QualType T) const { if (T->isFunctionPointerType() || T->isFunctionReferenceType()) T = T->getPointeeType(); - if (T->isFunctionType()) + if (T->isFunctionType()) { encodeTypeForFunction

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,433 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -o - %s | FileCheck -check-prefixes=CHECK,NODEBUG %s +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsic

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -365,6 +365,40 @@ llvm::Constant *CodeGenModule::getFunctionPointer(GlobalDecl GD, return getFunctionPointer(getRawFunctionPointer(GD, Ty), FuncType); } +CGPointerAuthInfo CodeGenModule::getMemberFunctionPointerAuthInfo(QualType FT) { + assert(FT->getAs() && "MemberPoi

[clang] [clang] Implement type/address discrimination of type_info vtable. (PR #99726)

2024-07-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/99726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement type/address discrimination of type_info vtable. (PR #99726)

2024-07-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/99726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement type/address discrimination of type_info vtable. (PR #99726)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,87 @@ +// RUN: %clang_cc1 -DENABLE_TID=0 -I%S -std=c++11 -triple=arm64e-apple-darwin \ +// RUN: -fptrauth-calls -fptrauth-intrinsics \ +// RUN: -fptrauth-vtable-pointer-type-discrimination \ +// RUN: -fptrauth-vtable-pointer-address-discrimination \ +// RUN: %s

[clang] [clang] Implement type/address discrimination of type_info vtable. (PR #99726)

2024-07-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/99726 ___ 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 new check bugprone-tagged-union-member-count (PR #89925)

2024-07-21 Thread via cfe-commits
=?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= Message-ID: In-Reply-To: isuckatcs wrote: > If we support them, then they should be tested. 100% agreed https://github.com/llvm/llvm-project/pull/89925 _

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/99833 MSDN docs for reference: https://learn.microsoft.com/en-us/cpp/build/reference/zc-referencebinding-enforce-reference-binding-rules?view=msvc-170 The warning referenced in that MSDN article: https://learn.micros

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Max Winkler (MaxEW707) Changes MSDN docs for reference: https://learn.microsoft.com/en-us/cpp/build/reference/zc-referencebinding-enforce-reference-binding-rules?view=msvc-170 The warning referenced in tha

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4321300 - [PowerPC] Support -fpatchable-function-entry (#92997)

2024-07-21 Thread via cfe-commits
Author: Chen Zheng Date: 2024-07-22T08:51:51+08:00 New Revision: 43213002b99e32d618f2afbbaaeb2ff8dfc84e33 URL: https://github.com/llvm/llvm-project/commit/43213002b99e32d618f2afbbaaeb2ff8dfc84e33 DIFF: https://github.com/llvm/llvm-project/commit/43213002b99e32d618f2afbbaaeb2ff8dfc84e33.diff LO

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-07-21 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 closed https://github.com/llvm/llvm-project/pull/92997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Incorrect codegen for constant global init with polymorphic MI (PR #99741)

2024-07-21 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/99741 >From 5822eb8f5b0d420a89d539f8fd2e23c69983967a Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Fri, 19 Jul 2024 22:48:26 -0700 Subject: [PATCH 1/2] [PAC] Incorrect codegen for constant global init with polymorph

[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-21 Thread via cfe-commits
ofAlpaca wrote: @Endilll I have added testcase and release note, please help review. Thanks. https://github.com/llvm/llvm-project/pull/99542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] d15ada2 - [PAC] Incorrect codegen for constant global init with polymorphic MI (#99741)

2024-07-21 Thread via cfe-commits
Author: Oliver Hunt Date: 2024-07-21T18:59:33-07:00 New Revision: d15ada24b1fbbd72776022383a5c557a1a056413 URL: https://github.com/llvm/llvm-project/commit/d15ada24b1fbbd72776022383a5c557a1a056413 DIFF: https://github.com/llvm/llvm-project/commit/d15ada24b1fbbd72776022383a5c557a1a056413.diff L

[clang] [PAC] Incorrect codegen for constant global init with polymorphic MI (PR #99741)

2024-07-21 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl closed https://github.com/llvm/llvm-project/pull/99741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-21 Thread Yi-Chi Lee via cfe-commits
@@ -1721,11 +1721,13 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { Diag(Tok.getLocation(), diag::warn_pp_date_time); // MSVC, ICC, GCC, VisualAge C++ extension. The generated string should be // of the form "Ddd Mmm dd hh::mm::ss ", which is returned b

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-21 Thread Yi-Chi Lee via cfe-commits
https://github.com/yichi170 edited https://github.com/llvm/llvm-project/pull/99075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix generic lambda inside requires-clause of friend function template (PR #99813)

2024-07-21 Thread Younan Zhang via cfe-commits
@@ -1691,10 +1691,7 @@ class ConstraintRefersToContainingTemplateChecker using inherited::TransformTemplateTypeParmType; QualType TransformTemplateTypeParmType(TypeLocBuilder &TLB, TemplateTypeParmTypeLoc TL, bool) { -assert(TL.g

[clang] [Clang] fix generic lambda inside requires-clause of friend function template (PR #99813)

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

  1   2   >