[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

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

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-08 Thread Nathan Ridge via cfe-commits
@@ -1069,6 +1071,27 @@ void SymbolCollector::addDefinition(const NamedDecl &ND, Symbol S = DeclSym; // FIXME: use the result to filter out symbols. S.Definition = *DefLoc; + + std::string DocComment; + std::string Documentation; + if (!(S.Flags & Symbol::HasDocComment)

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Apologies for the slow response time. I finally had a chance to look at this in a bit more detail, though I still don't think I fully understand this patch. At this point, my main feedback is that it would be good to incl

[clang] [Clang] [Driver] Ensure `-fms-volatile` is set for x86 for `*-windows-msvc` triple on non cl driver modes (PR #107509)

2024-09-08 Thread via cfe-commits
https://github.com/zmodem approved this pull request. https://github.com/llvm/llvm-project/pull/107509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] fix crash on binding to symbolic region with `void *` type (PR #107572)

2024-09-08 Thread Pavel Skripkin via cfe-commits
pskrgag wrote: CC @steakhal @NagyDonat https://github.com/llvm/llvm-project/pull/107572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-08 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From a88a4eda4ce2ad32ee2ec02549b25c9f08aa14e9 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/3] Adding `asuint` implementation to hlsl --- clang/includ

[clang] [Clang] [Driver] Ensure `-fms-volatile` is set for x86 for `*-windows-msvc` triple on non cl driver modes (PR #107509)

2024-09-08 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > I don't have a very strong opinion. I find it surprising in that the clang > driver is supposed to be gcc-compatible, and having to use `clang > -fstrict-aliasing` (but only when targeting Windows) to get the default > behavior looks a bit surprising. > > (I agree it's a bet

[clang] [TBAA] Emit "omnipotent char" for intrinsics with type cast (PR #107793)

2024-09-08 Thread via cfe-commits
huhu233 wrote: > I don't understand this. The code is a strict aliasing violation, so why > should clang work around it? Hi, @arsenm, the violation is due to the compiler emitting different TBAA for `svst1` (long) and other users of `res2` (long long). TBAA is invisible to ACLE users, and the

[clang] [Clang] Don't assert non-empty packs for FunctionParmPackExprs (PR #107561)

2024-09-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/107561 >From 92a30ff72fd922df3c29ac31fc2c7d46df1ff84e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 6 Sep 2024 18:35:45 +0800 Subject: [PATCH 1/3] [Clang] Don't assert non-empty packs for FunctionParmPackExpr

[clang] [RISCV][FMV] Support target_clones (PR #85786)

2024-09-08 Thread Kito Cheng via cfe-commits
https://github.com/kito-cheng approved this pull request. LGTM, and I would prefer wait one more LGTM from Craig or Philip *OR* wait one more week to make sure no further comment :) https://github.com/llvm/llvm-project/pull/85786 ___ cfe-commits maili

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-08 Thread via cfe-commits
@@ -387,6 +387,23 @@ float3 asin(float3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin) float4 asin(float4); +//===--===// +// asuint builtins +//===--

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-08 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From a88a4eda4ce2ad32ee2ec02549b25c9f08aa14e9 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/3] Adding `asuint` implementation to hlsl --- clang/includ

[clang] [llvm] [LLVM][Coroutines] Transform "coro_elide_safe" calls to switch ABI coroutines to the `noalloc` variant (PR #99285)

2024-09-08 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 closed https://github.com/llvm/llvm-project/pull/99285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Coroutines] Transform "coro_elide_safe" calls to switch ABI coroutines to the `noalloc` variant (PR #99285)

2024-09-08 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/99285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Coroutines] Create `.noalloc` variant of switch ABI coroutine ramp functions during CoroSplit (PR #99283)

2024-09-08 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 closed https://github.com/llvm/llvm-project/pull/99283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Coroutines] Create `.noalloc` variant of switch ABI coroutine ramp functions during CoroSplit (PR #99283)

2024-09-08 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/99283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-09-08 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 closed https://github.com/llvm/llvm-project/pull/99282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e17a39b - [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (#99282)

2024-09-08 Thread via cfe-commits
Author: Yuxuan Chen Date: 2024-09-08T23:08:58-07:00 New Revision: e17a39bc314f97231e440c9e68d9f46a9c07af6d URL: https://github.com/llvm/llvm-project/commit/e17a39bc314f97231e440c9e68d9f46a9c07af6d DIFF: https://github.com/llvm/llvm-project/commit/e17a39bc314f97231e440c9e68d9f46a9c07af6d.diff L

[clang] [clang-repl] Simplify the value printing logic to enable out-of-process. (PR #107737)

2024-09-08 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/107737 >From 2aa7527b52656d064c39aec94c9f1001ed10f7d8 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Fri, 6 Sep 2024 09:52:36 + Subject: [PATCH] [clang-repl] Simplify the value printing logic to enable ou

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-09-08 Thread Vlad Serebrennikov via cfe-commits
@@ -206,19 +206,28 @@ namespace cwg1814 { // cwg1814: yes #endif } -namespace cwg1815 { // cwg1815: no +namespace cwg1815 { // cwg1815: 19 Endilll wrote: Seems to be the case, yeah. >From what I see, this effort was started back before 19 has branched, and wa

[clang] [lld] [llvm] [clang][MIPS] Add support for mipsel-windows-* targets (PR #107744)

2024-09-08 Thread via cfe-commits
=?utf-8?q?Herv=C3=A9?= Poussineau , =?utf-8?q?Herv=C3=A9?= Poussineau , =?utf-8?q?Herv=C3=A9?= Poussineau , =?utf-8?q?Herv=C3=A9?= Poussineau , =?utf-8?q?Herv=C3=A9?= Poussineau , =?utf-8?q?Herv=C3=A9?= Poussineau , =?utf-8?q?Herv=C3=A9?= Poussineau , =?utf-8?q?Herv=C3=A9?= Poussineau , =?utf-8?q?H

[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)

2024-09-08 Thread Ryan Saunders via cfe-commits
jediry wrote: @owenca I've opened an issue [here](https://github.com/llvm/llvm-project/issues/107808) https://github.com/llvm/llvm-project/pull/107312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-09-08 Thread via cfe-commits
@@ -206,19 +206,28 @@ namespace cwg1814 { // cwg1814: yes #endif } -namespace cwg1815 { // cwg1815: no +namespace cwg1815 { // cwg1815: 19 h-vetinari wrote: This should be `// cwg1815: 20` I think? https://github.com/llvm/llvm-project/pull/97308

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-09-08 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/99282 >From c47f9218c5672f6cb38492b692114da2976b Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[cla

[clang] [llvm] [TableGen] Change SetTheory set/vec to use const Record * (PR #107692)

2024-09-08 Thread Rahul Joshi via cfe-commits
jurahul wrote: > lgtm assuming the const_cast goes away in a subsequent change Thanks. Yeah as I said above, I think we can make the Record* in DefInit const and then get rid of the const_cast<>. But the mutable for CorrespondingDefInit will stay, with it serving as a cache. https://github.c

[clang] [flang] [flang][driver] Add pre-processing type for Fortran pre-processed files (PR #104664)

2024-09-08 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy closed https://github.com/llvm/llvm-project/pull/104664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b5ee463 - [flang][driver] Add pre-processing type for Fortran pre-processed files (#104664)

2024-09-08 Thread via cfe-commits
Author: Kareem Ergawy Date: 2024-09-09T06:36:48+02:00 New Revision: b5ee4639dee0fd74c1215547e35bd9a10cfc5925 URL: https://github.com/llvm/llvm-project/commit/b5ee4639dee0fd74c1215547e35bd9a10cfc5925 DIFF: https://github.com/llvm/llvm-project/commit/b5ee4639dee0fd74c1215547e35bd9a10cfc5925.diff

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-08 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/89051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [TableGen] Change SetTheory set/vec to use const Record * (PR #107692)

2024-09-08 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. lgtm assuming the const_cast goes away in a subsequent change https://github.com/llvm/llvm-project/pull/107692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [TBAA] Emit "omnipotent char" for intrinsics with type cast (PR #107793)

2024-09-08 Thread Matt Arsenault via cfe-commits
arsenm wrote: I don't understand this. The code is a strict aliasing violation, so why should clang work around it? https://github.com/llvm/llvm-project/pull/107793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [flang] [flang][driver] Add pre-processing type for Fortran pre-processed files (PR #104664)

2024-09-08 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/104664 >From 9e14adcabd84f1f746e60cb2cc4582f0c852a776 Mon Sep 17 00:00:00 2001 From: ergawy Date: Sat, 17 Aug 2024 00:20:11 -0500 Subject: [PATCH] [flang][driver] Add pre-processing type to `.i` files This diff allows

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-08 Thread via cfe-commits
https://github.com/JinjinLi868 updated https://github.com/llvm/llvm-project/pull/89051 >From 6688d7ed8a0ce0c6885b82218e832320da57eef0 Mon Sep 17 00:00:00 2001 From: JinjinLi868 Date: Wed, 4 Sep 2024 16:43:48 +0800 Subject: [PATCH] [clang] Fix half && bfloat16 convert node expr codegen Data typ

[clang] 74ac96a - [C++20] [Modules] Treat constexpr/consteval member function as implicitly inline

2024-09-08 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-09-09T11:24:50+08:00 New Revision: 74ac96ae1a81c7ecc0e27ff6f45309cff1f2df97 URL: https://github.com/llvm/llvm-project/commit/74ac96ae1a81c7ecc0e27ff6f45309cff1f2df97 DIFF: https://github.com/llvm/llvm-project/commit/74ac96ae1a81c7ecc0e27ff6f45309cff1f2df97.diff LO

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-09-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Let's give it a try : ) https://github.com/llvm/llvm-project/pull/99282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-08 Thread via cfe-commits
JinjinLi868 wrote: > > > The vector tests should still be added > > > > > > sorry. if i remove the change of the vector. i have to remove the testcase. > > because, for the current code convert between vector type of half and > > bfloat16, it has a bug. And it will be Assert "Invalid cast!""

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -10204,15 +10205,14 @@ class Sema final : public SemaBase { /// both @c a1 and @c a2. If @p SuppressUserConversions, then don't /// allow user-defined conversions via constructors or conversion /// operators. - void - AddMethodCandidate(CXXMethodDecl *Method, DeclAcc

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -876,6 +876,11 @@ class Sema; /// function pointer or reference (C++ [over.call.object]). FunctionDecl *Function; +/// LambdaName - When the OverloadCandidate is for a +/// lambda's operator(), points to the declaration of +/// the lambda variable. +

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-08 Thread Chuanqi Xu via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw==?=,Kyungwoo Lee ,Dmitry Polukhin Message-ID: In-Reply-To: @@ -764,6 +792,15 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { Record.push_back(D->param_size()); for (auto *P : D->parameters()) Record.AddDeclRef(P

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-08 Thread Chuanqi Xu via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Kyungwoo Lee ,Dmitry Polukhin Message-ID: In-Reply-To: @@ -1155,6 +1155,16 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) { for (unsigned I = 0; I != NumParams; ++I) Params.push_back(readDeclAs()); FD->setPar

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-08 Thread Chuanqi Xu via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Kyungwoo Lee ,Dmitry Polukhin Message-ID: In-Reply-To: @@ -1188,6 +1188,11 @@ class ASTReader /// once recursing loading has been completed. llvm::SmallVector PendingOdrMergeChecks; + /// Lambdas that need to be loaded rig

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-08 Thread Chuanqi Xu via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Kyungwoo Lee ,Dmitry Polukhin Message-ID: In-Reply-To: @@ -764,6 +792,15 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { Record.push_back(D->param_size()); for (auto *P : D->parameters()) Record.AddDeclRef(P)

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -2390,7 +2390,8 @@ static bool LookupQualifiedNameInUsingDirectives(Sema &S, LookupResult &R, } bool Sema::LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, - bool InUnqualifiedLookup) { + bool InUnqual

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -876,6 +876,11 @@ class Sema; /// function pointer or reference (C++ [over.call.object]). FunctionDecl *Function; +/// LambdaName - When the OverloadCandidate is for a +/// lambda's operator(), points to the declaration of +/// the lambda variable. +

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -9147,7 +9147,8 @@ class Sema final : public SemaBase { /// /// \returns true if lookup succeeded, false if it failed. bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, - bool InUnqualifiedLookup = false); +

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -1437,6 +1437,15 @@ TEST(SignatureHelpTest, Overloads) { EXPECT_EQ(0, Results.activeParameter); } +TEST(SignatureHelpTest, ShowLambdaNameInsteadOfOperatorParens) { + auto const Results = signatures(R"cpp( +auto foo = [](int x, int y){}; +int main() { foo(^); } --

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -6292,11 +6298,16 @@ SemaCodeCompletion::ProduceCallSignatureHelp(Expr *Fn, ArrayRef Args, SmallVector ArgExprs(1, NakedFn); ArgExprs.append(ArgsWithoutDependentTypes.begin(), ArgsWithoutDependentTypes.end()); +auto *const Lam

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -6292,11 +6298,16 @@ SemaCodeCompletion::ProduceCallSignatureHelp(Expr *Fn, ArrayRef Args, SmallVector ArgExprs(1, NakedFn); ArgExprs.append(ArgsWithoutDependentTypes.begin(), ArgsWithoutDependentTypes.end()); +auto *const Lam

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-08 Thread Timothy Akintilo via cfe-commits
https://github.com/tilobyte updated https://github.com/llvm/llvm-project/pull/101857 >From c1afe853ccacae1605fecfe552bb9a263c6b8c1d Mon Sep 17 00:00:00 2001 From: Timothy Akintilo Date: Sat, 27 Jul 2024 16:17:46 -0500 Subject: [PATCH 1/7] use lambda name instead of operator() --- clang-tools-

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2024-09-08 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/96417 >From 17608570eb2ba6086203f1f8eb20ebafc621caf2 Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sun, 23 Jun 2024 00:07:19 -0400 Subject: [PATCH] Support --sysroot= for ${arch}-windows-msvc targets I think it is

[clang] [clang-format] Add new option: WrapNamespaceBodyWithNewlines (PR #106145)

2024-09-08 Thread Owen Pan via cfe-commits
https://github.com/owenca requested changes to this pull request. Running `FormatTests` failed: ``` [ RUN ] FormatTest.WrapNamespaceBodyWithEmptyLinesNever Assertion failed: (TheLine->MatchingClosingBlockLineIndex > 0), function tryFitMultipleLinesInOne, file UnwrappedLineFormatter.cpp, lin

[clang] [TBAA] Emit "omnipotent char" for intrinsics with type cast (PR #107793)

2024-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (huhu233) Changes For the case, ``` long long res2[SIZE]; svst1(pa, (long *)&res2[0], v2); /* use res2[i] */ ``` svst1 is emitted with TBAA metadata for "long", but other users of "res2" use "long long", which is a strict aliasi

[clang] [TBAA] Emit "omnipotent char" for intrinsics with type cast (PR #107793)

2024-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (huhu233) Changes For the case, ``` long long res2[SIZE]; svst1(pa, (long *)&res2[0], v2); /* use res2[i] */ ``` svst1 is emitted with TBAA metadata for "long", but other users of "res2" use "long long", which is a stric

[clang] [TBAA] Emit "omnipotent char" for intrinsics with type cast (PR #107793)

2024-09-08 Thread via cfe-commits
https://github.com/huhu233 created https://github.com/llvm/llvm-project/pull/107793 For the case, ``` long long res2[SIZE]; svst1(pa, (long *)&res2[0], v2); /* use res2[i] */ ``` svst1 is emitted with TBAA metadata for "long", but other users of "res2" use "long long", which is a strict a

[clang] [clang][docs] Add clang-tutor to ExternalClangExamples. (PR #107665)

2024-09-08 Thread via cfe-commits
c8ef wrote: Dear reviewers, if you the patch looks good to you, could you please assist me in merging it? @SimplyDanny @shafik https://github.com/llvm/llvm-project/pull/107665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [clang] Improve diagnostics with incompatible VLA types (PR #101261)

2024-09-08 Thread Andrew Sukach via cfe-commits
https://github.com/sookach updated https://github.com/llvm/llvm-project/pull/101261 >From 7c6109ea5133941baf32ec57e48c770ad015b883 Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Tue, 30 Jul 2024 19:31:41 -0400 Subject: [PATCH] [clang] Improve diagnostics with incompatible VLA types --- cl

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #107047 Fixes #49093 --- Full diff: https://github.com/llvm/llvm-project/pull/107786.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+2-1) - (modified) clang/lib/Sema/SemaTemplat

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-08 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/107786 Fixes #107047 Fixes #49093 >From b50e49be3765c31b1c555384c41e1f528d529a88 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 9 Sep 2024 02:30:35 +0300 Subject: [PATCH] [Clang] prevent recovery call expres

[clang] [analyzer] Remove overzealous "No dispatcher registered" assertion (PR #107294)

2024-09-08 Thread via cfe-commits
@@ -48,15 +48,7 @@ bool CheckerManager::hasPathSensitiveCheckers() const { EvalCallCheckers, EndOfTranslationUnitCheckers); } -void CheckerManager::finishedCheckerRegistration() { -#ifndef NDEBUG - // Make sure that for every event that has listeners, there is at least

[clang] [analyzer] Remove overzealous "No dispatcher registered" assertion (PR #107294)

2024-09-08 Thread via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_analyze_cc1 -w -analyzer-checker=nullability \ +// RUN: -analyzer-output=text -verify %s +// +// expected-no-diagnostics +// +// This case previously crashed because of an assert in CheckerManager.cpp, +// checking for registe

[clang] [clang][Frontend] Fix Sema::PerformImplicitConversion for atomic expressions (PR #107773)

2024-09-08 Thread Daniel Petrovic via cfe-commits
https://github.com/daniel-petrovic updated https://github.com/llvm/llvm-project/pull/107773 >From 20f065d70ab4ff8b3f77b53db6ce6cf1033e00aa Mon Sep 17 00:00:00 2001 From: Daniel Petrovic Date: Sun, 8 Sep 2024 21:29:57 +0200 Subject: [PATCH] [clang][Frontend] Fix Sema::PerformImplicitConversion f

[clang] [lld] [llvm] [clang][MIPS] Add support for mipsel-windows-* targets (PR #107744)

2024-09-08 Thread via cfe-commits
=?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Po

[clang] Updated and renamed README.txt to README.md (PR #106198)

2024-09-08 Thread Tarık Çelik via cfe-commits
tarik-celik wrote: Ping https://github.com/llvm/llvm-project/pull/106198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [clang][MIPS] Add support for mipsel-windows-* targets (PR #107744)

2024-09-08 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: Overall, thanks for the PR - this looks very exciting to me! First off, I think it'd be good to set the scope for this. This is one of the historical Windows architectures, supported in early versions of NT and CE. As such, it probably has mostly hobbyist value at this point. H

[clang] [clang][Frontend] Fix Sema::PerformImplicitConversion for atomic expressions (PR #107773)

2024-09-08 Thread Daniel Petrovic via cfe-commits
https://github.com/daniel-petrovic converted_to_draft https://github.com/llvm/llvm-project/pull/107773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [clang][MIPS] Add support for mipsel-windows-* targets (PR #107744)

2024-09-08 Thread via cfe-commits
=?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Po

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

2024-09-08 Thread via cfe-commits
https://github.com/AMS21 updated https://github.com/llvm/llvm-project/pull/91124 >From 84c8e546c0826ddcf9c580b9368541670ed05068 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] [clang][Frontend] Fix Sema::PerformImplicitConversion for atomic expressions (PR #107773)

2024-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Petrovic (daniel-petrovic) Changes Fixes #106576 In `Sema::PerformImplicitConversion` for standard conversion sequence the NonAtomicToAtomic conversion is not reverted back after 3.rd conversion step if not starting from scalar i

[clang] [clang][Frontend] Fix Sema::PerformImplicitConversion for atomic expressions (PR #107773)

2024-09-08 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang][Frontend] Fix Sema::PerformImplicitConversion for atomic expressions (PR #107773)

2024-09-08 Thread Daniel Petrovic via cfe-commits
https://github.com/daniel-petrovic created https://github.com/llvm/llvm-project/pull/107773 Fixes #106576 In `Sema::PerformImplicitConversion` for standard conversion sequence the NonAtomicToAtomic conversion is not reverted back after 3.rd conversion step if not starting from scalar initial

[clang] [llvm] [TableGen] Change SetTheory set/vec to use const Record * (PR #107692)

2024-09-08 Thread Rahul Joshi via cfe-commits
@@ -2808,10 +2806,10 @@ RecordRecTy *Record::getType() { return RecordRecTy::get(TrackedRecords, DirectSCs); } -DefInit *Record::getDefInit() { +DefInit *Record::getDefInit() const { if (!CorrespondingDefInit) { -CorrespondingDefInit = -new (TrackedRecords.get

[clang] [llvm] [TableGen] Change SetTheory set/vec to use const Record * (PR #107692)

2024-09-08 Thread Rahul Joshi via cfe-commits
@@ -2808,10 +2806,10 @@ RecordRecTy *Record::getType() { return RecordRecTy::get(TrackedRecords, DirectSCs); } -DefInit *Record::getDefInit() { +DefInit *Record::getDefInit() const { if (!CorrespondingDefInit) { -CorrespondingDefInit = -new (TrackedRecords.get

[clang] [llvm] [TableGen] Change SetTheory set/vec to use const Record * (PR #107692)

2024-09-08 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul deleted https://github.com/llvm/llvm-project/pull/107692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix a variable scope problem with continue/break jumps (PR #107738)

2024-09-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/107738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6f67c38 - [clang][bytecode] Fix a variable scope problem with continue/break jumps (#107738)

2024-09-08 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-08T19:22:18+02:00 New Revision: 6f67c386845be85cfcbf5c90949edcdaf40a0ef7 URL: https://github.com/llvm/llvm-project/commit/6f67c386845be85cfcbf5c90949edcdaf40a0ef7 DIFF: https://github.com/llvm/llvm-project/commit/6f67c386845be85cfcbf5c90949edcdaf40a0ef7.diff L

[clang] bdb6f1b - [APINotes] Avoid repeated hash lookups (NFC) (#107758)

2024-09-08 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-08T09:50:44-07:00 New Revision: bdb6f1b9d6d6262f1a0f96f410c2702a438a7498 URL: https://github.com/llvm/llvm-project/commit/bdb6f1b9d6d6262f1a0f96f410c2702a438a7498 DIFF: https://github.com/llvm/llvm-project/commit/bdb6f1b9d6d6262f1a0f96f410c2702a438a7498.diff L

[clang] [APINotes] Avoid repeated hash lookups (NFC) (PR #107758)

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

[clang] [Frontend] Use range-based for loops (NFC) (PR #107757)

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

[clang] 668cbd8 - [Frontend] Use range-based for loops (NFC) (#107757)

2024-09-08 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-08T09:50:34-07:00 New Revision: 668cbd84099c82f9c34e220a019db2f5f50f4320 URL: https://github.com/llvm/llvm-project/commit/668cbd84099c82f9c34e220a019db2f5f50f4320 DIFF: https://github.com/llvm/llvm-project/commit/668cbd84099c82f9c34e220a019db2f5f50f4320.diff L

[clang] [APINotes] Avoid repeated hash lookups (NFC) (PR #107758)

2024-09-08 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/107758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Frontend] Use range-based for loops (NFC) (PR #107757)

2024-09-08 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/107757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix access checking about function overloading (PR #107768)

2024-09-08 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght created https://github.com/llvm/llvm-project/pull/107768 fix https://github.com/llvm/llvm-project/issues/107629 TODO: add UT. TODO: test UB mentioned in https://github.com/llvm/llvm-project/issues/107629. >From 65172d8391cef4c0c7e239c9a09b34e061f4963a Mon Sep 17 00

[clang] [FrontEnd] Use SetVector (NFC) (PR #107743)

2024-09-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux` running on `systemz-1` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/42/builds/1006 Here is the relevant piece of the build log f

[clang] [clang][bytecode] Fix a variable scope problem with continue/break jumps (PR #107738)

2024-09-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/107738 >From 17478ebc579cbbaceb9d54ad114b8633112f1f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 8 Sep 2024 07:30:40 +0200 Subject: [PATCH] [clang][bytecode] Fix a variable scope problem w

[clang] [FrontEnd] Use SetVector (NFC) (PR #107743)

2024-09-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vla-2stage` running on `linaro-g3-03` while building `clang` at step 11 "build stage 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/41/builds/1894 Here is the relevant piece of

[clang] [CodeGen] Avoid repeated hash lookups (NFC) (PR #107759)

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

[clang] 08085ed - [CodeGen] Avoid repeated hash lookups (NFC) (#107759)

2024-09-08 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-08T09:04:20-07:00 New Revision: 08085eddfdca51f2bcc23945579109d01b730310 URL: https://github.com/llvm/llvm-project/commit/08085eddfdca51f2bcc23945579109d01b730310 DIFF: https://github.com/llvm/llvm-project/commit/08085eddfdca51f2bcc23945579109d01b730310.diff L

[clang] [clang][analyzer] Fix #embed crash (PR #107764)

2024-09-08 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: PS: Should this be cherry-picked into 19? https://github.com/llvm/llvm-project/pull/107764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Fix #embed crash (PR #107764)

2024-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nicolas van Kempen (nicovank) Changes Fix #107724. --- Full diff: https://github.com/llvm/llvm-project/pull/107764.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Core/ExprEngine.cpp (+1-4) - (added) clang/test/Analysis/

[clang] [clang][analyzer] Fix #embed crash (PR #107764)

2024-09-08 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank created https://github.com/llvm/llvm-project/pull/107764 Fix #107724. >From a43b9b74ac253c0072498007cf56ed57d8255143 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Sun, 8 Sep 2024 11:52:28 -0400 Subject: [PATCH] [clang][analyzer] Fix #embed crash Fix #10

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-08 Thread Зишан Мирза via cfe-commits
@@ -0,0 +1,64 @@ +//===-- Unittests for ctime_r -===// +// +// 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] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-08 Thread Зишан Мирза via cfe-commits
@@ -0,0 +1,26 @@ +//===-- Implementation of ctime function --===// +// +// 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] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-08 Thread Зишан Мирза via cfe-commits
@@ -37,6 +37,7 @@ enum Month : int { }; struct TimeConstants { + static constexpr int MAXIMUM_32_BIT_VALUE = 2147483647; zimirza wrote: I have removed the constant and used this function. https://github.com/llvm/llvm-project/pull/107285

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-08 Thread Зишан Мирза via cfe-commits
@@ -0,0 +1,26 @@ +//===-- Implementation of ctime function --===// +// +// 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] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-08 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/107285 From b982621407a1ab1746a023809aae5c6a2b983679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= <149377404+zimi...@users.noreply.github.com>

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-08 Thread Doug Wyatt via cfe-commits
dougsonos wrote: > I do agree, it seems reasonable for it to be in `-Wall` or similar! That is > absolutely what I'd expect as a user :) I guess my thinking was colored a bit by the way many of our codebases use `-Wall`. I did come around to thinking that without `-Wall`, it's cleaner for the

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-08 Thread Doug Wyatt via cfe-commits
dougsonos wrote: In working with this version of the compiler, I've discovered a pain point with libc++, `std::__libcpp_verbose_abort()`. Many things which one would expect to be nonblocking, e.g. `std::vector::operator[]`, have hardening paths which call `__libcpp_verbose_abort()` on failure.

[clang] [CodeGen] Avoid repeated hash lookups (NFC) (PR #107759)

2024-09-08 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/107759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __builtin_common_type (PR #99473)

2024-09-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/99473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Avoid repeated hash lookups (NFC) (PR #107759)

2024-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/107759.diff 1 Files Affected: - (modified) clang/lib/CodeGen/CoverageMappingGen.cpp (+1-6) ``di

[clang] [APINotes] Avoid repeated hash lookups (NFC) (PR #107758)

2024-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/107758.diff 1 Files Affected: - (modified) clang/lib/APINotes/APINotesWriter.cpp (+2-8) ``diff diff --git a/clang/lib/APINotes/API

  1   2   >