[clang] [clang] Output location info in separate fields for -ftime-trace (PR #106277)

2024-08-29 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/106277 >From b2bb29ec61f4e9a7b3b7f9bcd0f5b7a12c844d14 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 27 Aug 2024 19:44:34 + Subject: [PATCH 1/4] [clang] Properly set file and line info for -ftime-trace ---

[clang] [clang] Output location info in separate fields for -ftime-trace (PR #106277)

2024-08-29 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 35dfe8013c2e100ffa159ca183430422a370d3a4 fd9f5218e72d0d9b4d4b248383179f6dea01a5c6 --e

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-08-29 Thread Janek van Oirschot via cfe-commits
@@ -0,0 +1,225 @@ +//===- AMDGPUMCResourceInfo.cpp --- MC Resource Info --===// +// +// 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] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-29 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Now that we are not intending to backport that, LGTM https://github.com/llvm/llvm-project/pull/106335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [llvm] Added instant events and marking defered templated instantiation. (PR #103039)

2024-08-29 Thread Utkarsh Saxena via cfe-commits
@@ -114,27 +132,46 @@ struct llvm::TimeTraceProfiler { llvm::get_thread_name(ThreadName); } - TimeTraceProfilerEntry *begin(std::string Name, -llvm::function_ref Detail, -bool AsyncEvent = false) { -Sta

[clang] [llvm] Added instant events and marking defered templated instantiation. (PR #103039)

2024-08-29 Thread Utkarsh Saxena via cfe-commits
@@ -18046,6 +18048,19 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func, std::make_pair(Func, PointOfInstantiation)); // Notify the consumer that a function was implicitly instantiated. Consumer.HandleCXXImplici

[clang] [llvm] Added instant events and marking defered templated instantiation. (PR #103039)

2024-08-29 Thread Utkarsh Saxena via cfe-commits
@@ -18046,6 +18048,19 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func, std::make_pair(Func, PointOfInstantiation)); // Notify the consumer that a function was implicitly instantiated. Consumer.HandleCXXImplici

[clang] [llvm] Added instant events and marking defered templated instantiation. (PR #103039)

2024-08-29 Thread Utkarsh Saxena via cfe-commits
@@ -104,6 +105,23 @@ struct llvm::TimeTraceProfilerEntry { } }; +struct InProgressEntry { + std::unique_ptr Event; + std::vector InstantEvents; usx95 wrote: Can you add documentation about InstantEvents and that they are associated with a parent duration

[clang] [llvm] Added instant events and marking defered templated instantiation. (PR #103039)

2024-08-29 Thread Utkarsh Saxena via cfe-commits
@@ -152,6 +154,11 @@ timeTraceProfilerBegin(StringRef Name, TimeTraceProfilerEntry *timeTraceAsyncProfilerBegin(StringRef Name, StringRef Detail); +// Mark an instant event. +void timeTraceProfilerInsert(StringRef Name, +

[clang] [llvm] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-08-29 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > @yxsamliu Do you know what the next steps for merging this would be? I'd like > to get it into the Clang 20 release if possible. The only thing this loses > currently is managed variables being registered in RDC mode, but I'm going to > assume that's hardly seen in practice s

[clang] [clang][HLSL] Add sign intrinsic part 3 (PR #101989)

2024-08-29 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,209 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ +// RUN: --check-prefixes=CHECK,DXIL_CHECK,DXIL_NATIVE_HALF,NATIVE_

[clang] [llvm] Added instant events and marking defered templated instantiation. (PR #103039)

2024-08-29 Thread via cfe-commits
https://github.com/ivanaivanovska ready_for_review https://github.com/llvm/llvm-project/pull/103039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Added instant events and marking defered templated instantiation. (PR #103039)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-support @llvm/pr-subscribers-clang Author: None (ivanaivanovska) Changes Added an instant event type and issuing such events each time a template instantiation is deferred. --- Full diff: https://github.com/llvm/llvm-project/pull/103039.diff 5 F

[clang] [clang][bytecode] Add InitLinkScope for temporary variables (PR #106552)

2024-08-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/106552 None >From 5d313ed583f9ca8209fbdc04ecb0fd8174e74239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 29 Aug 2024 13:46:18 +0200 Subject: [PATCH] [clang][bytecode] Add InitLinkScope for t

[clang] [clang][bytecode] Add InitLinkScope for temporary variables (PR #106552)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/106552.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+1-3) - (modified) clang/test/AST/ByteCode/records.cpp (+6) ```

[clang] [compiler-rt] [libcxx] [lldb] [llvm] Rename Sanitizer Coverage => Coverage Sanitizer (PR #106505)

2024-08-29 Thread Louis Dionne via cfe-commits
@@ -257,7 +257,7 @@ General purpose options A semicolon list of arguments to pass when running the libc++ benchmarks using the ``check-cxx-benchmarks`` rule. By default we run the benchmarks for a very short amount of time, - since the primary use of ``check-cxx-benchma

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/105727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] df11ee2 - [clang][bytecode] Diagnose member calls on deleted blocks (#106529)

2024-08-29 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-29T15:22:59+02:00 New Revision: df11ee213e43ae373d1357939cf14ea37d547110 URL: https://github.com/llvm/llvm-project/commit/df11ee213e43ae373d1357939cf14ea37d547110 DIFF: https://github.com/llvm/llvm-project/commit/df11ee213e43ae373d1357939cf14ea37d547110.diff L

[clang] [clang][bytecode] Diagnose member calls on deleted blocks (PR #106529)

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

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-08-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/91007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-08-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. My concerns have been addressed, but there's still a small open question on the driver flag behavior though, so please give @MaskRay a chance to respond before landing. Otherwise, LGTM! https://github.com/llvm/llvm-project/pull/91007

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-08-29 Thread Aaron Ballman via cfe-commits
@@ -2900,7 +2900,7 @@ defm clangir : BoolFOption<"clangir", PosFlag, NegFlag LLVM pipeline to compile">, BothFlags<[], [ClangOption, CC1Option], "">>; -def emit_cir : Flag<["-"], "emit-cir">, Visibility<[CC1Option]>, +def emit_cir : Flag<["-"], "emit-cir">, Visibility<[C

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-29 Thread via cfe-commits
@@ -1144,6 +1164,46 @@ bool Sema::CheckInstantiatedFunctionTemplateConstraints( PointOfInstantiation, Satisfaction); } +bool Sema::CheckFunctionConstraintsWithoutInstantiation( cor3ntin wrote: This is very similar to `Chec

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-29 Thread via cfe-commits
@@ -3876,6 +3864,41 @@ TemplateDeductionResult Sema::FinishTemplateArgumentDeduction( FD = const_cast(FDFriend); Owner = FD->getLexicalDeclContext(); } + + // C++20 [temp.deduct.general]p5: [DR2369] + // If the function template has associated constraints, those co

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-29 Thread via cfe-commits
@@ -1841,9 +1872,71 @@ Decl *TemplateInstantiator::TransformDecl(SourceLocation Loc, Decl *D) { // template parameter. } + if (auto *PVD = dyn_cast(D); + PVD && PVD->getDeclContext() == FunctionDCForParameterDeclInstantiation && + !ParameterInstantiationScop

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-29 Thread via cfe-commits
@@ -5585,11 +5585,12 @@ bool Sema::CheckTemplateArgumentList( ContextRAII Context(*this, NewContext); CXXThisScopeRAII(*this, RD, ThisQuals, RD != nullptr); -MultiLevelTemplateArgumentList MLTAL = getTemplateInstantiationArgs( -Template, NewContext, /*Final

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-29 Thread via cfe-commits
@@ -3876,6 +3864,41 @@ TemplateDeductionResult Sema::FinishTemplateArgumentDeduction( FD = const_cast(FDFriend); Owner = FD->getLexicalDeclContext(); } + + // C++20 [temp.deduct.general]p5: [DR2369] cor3ntin wrote: ```suggestion // C++20 [temp.de

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-29 Thread via cfe-commits
@@ -3876,6 +3864,41 @@ TemplateDeductionResult Sema::FinishTemplateArgumentDeduction( FD = const_cast(FDFriend); Owner = FD->getLexicalDeclContext(); } + + // C++20 [temp.deduct.general]p5: [DR2369] + // If the function template has associated constraints, those co

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-29 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/102857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-29 Thread via cfe-commits
@@ -13051,11 +13051,14 @@ class Sema final : public SemaBase { /// instantiation arguments. /// /// \param DC In the event we don't HAVE a declaration yet, we instead provide - /// the decl context where it will be created. In this case, the `Innermost` - /// shoul

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-29 Thread via cfe-commits
@@ -1397,12 +1415,25 @@ namespace { ArrayRef Unexpanded, bool &ShouldExpand, bool &RetainExpansion, std::optional &NumExpansions) { - return getSema().CheckParameterPacksForE

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-29 Thread via cfe-commits
@@ -13051,11 +13051,14 @@ class Sema final : public SemaBase { /// instantiation arguments. /// /// \param DC In the event we don't HAVE a declaration yet, we instead provide - /// the decl context where it will be created. In this case, the `Innermost` - /// shoul

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-29 Thread via cfe-commits
https://github.com/cor3ntin commented: Thanks! I did a first pass on the review, I have a few questions https://github.com/llvm/llvm-project/pull/102857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[libunwind] [libunwind][X86-64] Handle Linux sigreturn trampoline when DWARF info is missing (PR #103473)

2024-08-29 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 101acff2e5df21378b5764660afc0ec84ce6a1a6 f3e4787973daf1cd278a9615960bbb4b31d3c0c0 --e

[clang] [llvm] [mlir] [Support] Validate number of arguments passed to formatv() (PR #105745)

2024-08-29 Thread Mehdi Amini via cfe-commits
joker-eph wrote: LG! https://github.com/llvm/llvm-project/pull/105745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix the handling of address of a vector (PR #106558)

2024-08-29 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/106558 The PR https://github.com/llvm/llvm-project/pull/105996 broke taking the address of a vector: compound-literal.c ```C typedef int v4i32 __attribute((vector_size(16))); v4i32 *y = &(v4i32){1,2,3,4}; ``` That bec

[clang] [clang][bytecode] Fix the handling of address of a vector (PR #106558)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes The PR https://github.com/llvm/llvm-project/pull/105996 broke taking the address of a vector: compound-literal.c ```C typedef int v4i32 __attribute((vector_size(16))); v4i32 *y = &(v4i32){1,2,3,4}; ``` That because

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-08-29 Thread Phoebe Wang via cfe-commits
phoebewang wrote: Should we add folding in X86InstrFMA3Info.cpp? https://github.com/llvm/llvm-project/pull/101603 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Split FeatureLS64 to LS64_ACCDATA and LS64_V. (PR #101712)

2024-08-29 Thread Alexandros Lamprineas via cfe-commits
@@ -3682,6 +3682,8 @@ static const struct Extension { {"sve2-bitperm", {AArch64::FeatureSVE2BitPerm}}, {"sve2p1", {AArch64::FeatureSVE2p1}}, {"ls64", {AArch64::FeatureLS64}}, +{"ls64_v", {AArch64::FeatureLS64_V}}, +{"ls64_accdata", {AArch64::FeatureLS64_ACCD

[clang] [clang][bytecode] Fix the handling of address of a vector (PR #106558)

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

[clang] [clang] Catch missing format attributes (PR #105479)

2024-08-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Can you explain what changes were made to address the various issues which caused the earlier revert? I've tried diffing the PRs to see what the changes are, but my git-fu is insufficient to the task. :-D https://github.com/llvm/llvm-project/pull/105479

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-08-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I did think about it more, and I think it would be more consistent to support > the attribute on any sort of specializable entity, including functions - > regardless of STL needs @AaronBallman @ldionne Agreed; if we're adding a custom attribute, we might as well support i

[clang] [llvm] [mlir] [Support] Validate number of arguments passed to formatv() (PR #105745)

2024-08-29 Thread Jacques Pienaar via cfe-commits
https://github.com/jpienaar approved this pull request. Nice! https://github.com/llvm/llvm-project/pull/105745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [Support] Validate number of arguments passed to formatv() (PR #105745)

2024-08-29 Thread Jacques Pienaar via cfe-commits
https://github.com/jpienaar edited https://github.com/llvm/llvm-project/pull/105745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [Support] Validate number of arguments passed to formatv() (PR #105745)

2024-08-29 Thread Jacques Pienaar via cfe-commits
@@ -1654,12 +1654,12 @@ void OperationFormat::genElementParser(FormatElement *element, MethodBody &body, dir->shouldBeQualified() ? qualifiedTypeParserCode : typeParserCode; TypeSwitch(dir->getArg()) .Case([&](auto operand) { -body << form

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-08-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > I did think about it more, and I think it would be more consistent to > > support the attribute on any sort of specializable entity, including > > functions - regardless of STL needs @AaronBallman @ldionne > > Agreed; if we're adding a custom attribute, we might as well s

[clang] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-08-29 Thread Donát Nagy via cfe-commits
@@ -3648,35 +3648,38 @@ PathDiagnosticPieceRef MallocBugVisitor::VisitNode(const ExplodedNode *N, return nullptr; } - // See if we're releasing memory while inlining a destructor - // (or one of its callees). This turns on various common - //

[clang] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-08-29 Thread Donát Nagy via cfe-commits
@@ -3648,35 +3648,38 @@ PathDiagnosticPieceRef MallocBugVisitor::VisitNode(const ExplodedNode *N, return nullptr; } - // See if we're releasing memory while inlining a destructor - // (or one of its callees). This turns on various common - //

[clang] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-08-29 Thread Donát Nagy via cfe-commits
@@ -3558,8 +3558,8 @@ PathDiagnosticPieceRef MallocBugVisitor::VisitNode(const ExplodedNode *N, // original reference count is positive, we should not report use-after-frees NagyDonat wrote: Update the comment lines above this to be a bit more general. (Lines

[clang] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-08-29 Thread Donát Nagy via cfe-commits
@@ -3648,35 +3648,38 @@ PathDiagnosticPieceRef MallocBugVisitor::VisitNode(const ExplodedNode *N, return nullptr; } - // See if we're releasing memory while inlining a destructor - // (or one of its callees). This turns on various common - //

[clang] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-08-29 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/104599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-08-29 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,80 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.Malloc -verify %s +// + +typedef unsigned long size_t; + +typedef enum memory_order { + memory_order_relaxed = __ATOMIC_RELAXED, +} memory_order; + +void *calloc(size_t, size_t); +void free(void *); + +struc

[clang] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-08-29 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: I like the overall idea of this commit, but I noticed that it may be a step backwards in some situation where there is a destructor on the stack and the old code would've suppressed the result, but the new code doesn't suppress it. (See inline comments f

[clang] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-08-29 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/104599 ___ 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 user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-08-29 Thread via cfe-commits
https://github.com/EugeneZelenko edited https://github.com/llvm/llvm-project/pull/106350 ___ 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 user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-08-29 Thread via cfe-commits
https://github.com/EugeneZelenko commented: Please mention changes in Release Notes. https://github.com/llvm/llvm-project/pull/106350 ___ 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 user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-08-29 Thread via cfe-commits
@@ -74,6 +77,40 @@ Both macros have to be defined to suggest replacement functions from *Annex K.* ``__STDC_WANT_LIB_EXT1__`` must be defined to ``1`` by the user **before** including any system headers. +Custom functions + + +The options `CustomNormalFunction

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-08-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > I did think about it more, and I think it would be more consistent to > > > support the attribute on any sort of specializable entity, including > > > functions - regardless of STL needs @AaronBallman @ldionne > > > > > > Agreed; if we're adding a custom attribute, w

[clang] Add wasm-opt warning (PR #100321)

2024-08-29 Thread Quentin Michaud via cfe-commits
https://github.com/mh4ck-Thales updated https://github.com/llvm/llvm-project/pull/100321 >From b812b9c2a7b92edf5dab739eadff0295c2a1f631 Mon Sep 17 00:00:00 2001 From: Quentin Michaud Date: Wed, 24 Jul 2024 09:54:53 +0200 Subject: [PATCH 1/2] First draft of wasm-opt warning --- clang/lib/Drive

[clang] Add wasm-opt warning (PR #100321)

2024-08-29 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 73ef397fcba35b7b4239c00bf3e0b4e689ca0add a798b1fd7a7a6c7b782584021e5c32e52c3abffc --e

[clang] [analyzer] Refactor MallocChecker to use `BindExpr` in `evalCall` (PR #106081)

2024-08-29 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/106081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refactor MallocChecker to use `BindExpr` in `evalCall` (PR #106081)

2024-08-29 Thread Donát Nagy via cfe-commits
@@ -58,14 +60,14 @@ void testFreeOpNew() { void *p = operator new(0); free(p); // mismatch-warning@-1{{Memory allocated by 'operator new' should be deallocated by 'delete', not 'free()'}} -} // leak-warning{{Potential leak of memory pointed to by 'p'}} +} ---

[clang] [analyzer] Refactor MallocChecker to use `BindExpr` in `evalCall` (PR #106081)

2024-08-29 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Thanks for the updates! I'm mostly satisfied with this change, but I also added some other reviewers to give them a chance to react. https://github.com/llvm/llvm-project/pull/106081 ___ cfe-commits mailing list

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-29 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH 1/2] [Clang] prevent assertion failure when converting vectors

[clang] [clang][test] add TestLanguage.def to specify all tested language versions (PR #94243)

2024-08-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/94243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test] add TestLanguage.def to specify all tested language versions (PR #94243)

2024-08-29 Thread Aaron Ballman via cfe-commits
@@ -1224,7 +1224,7 @@ TEST_P(ASTMatchersTest, CastExpression_MatchesImplicitCasts) { } TEST_P(ASTMatchersTest, CastExpr_DoesNotMatchNonCasts) { - if (GetParam().Language == Lang_C89 || GetParam().Language == Lang_C99) { + if (GetParam().isC()) { AaronBallma

[clang] [clang][test] add TestLanguage.def to specify all tested language versions (PR #94243)

2024-08-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: modulo things brought up by @Sirraide, this is looking good! https://github.com/llvm/llvm-project/pull/94243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-29 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: could someone merge this if there are no concerns? thanks. https://github.com/llvm/llvm-project/pull/105727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test] add TestLanguage.def to specify all tested language versions (PR #94243)

2024-08-29 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/94243 >From 1ef1bc0bfebca8ca114a57ea2d5016418e36446d Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 1 Jun 2024 17:38:37 +0200 Subject: [PATCH 1/4] [clang][test] add TestLanguage.def to specify all tested la

[clang] [llvm] [mlir] [Support] Validate number of arguments passed to formatv() (PR #105745)

2024-08-29 Thread Rahul Joshi via cfe-commits
@@ -1654,12 +1654,12 @@ void OperationFormat::genElementParser(FormatElement *element, MethodBody &body, dir->shouldBeQualified() ? qualifiedTypeParserCode : typeParserCode; TypeSwitch(dir->getArg()) .Case([&](auto operand) { -body << form

[clang] [clang][test] add TestLanguage.def to specify all tested language versions (PR #94243)

2024-08-29 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/94243 >From 1ef1bc0bfebca8ca114a57ea2d5016418e36446d Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 1 Jun 2024 17:38:37 +0200 Subject: [PATCH 1/5] [clang][test] add TestLanguage.def to specify all tested la

[clang] Add wasm-opt warning (PR #100321)

2024-08-29 Thread Quentin Michaud via cfe-commits
mh4ck-Thales wrote: I implemented a proposition on how to proceed for correctly informing users of wasm-opt problems: - a warning for when no flags are passed (the default being wasm-opt enabled for wasip1) and wasm-opt is not found - an error for when --wasm-opt is explicitly passed but wasm-o

[clang] Fix clang-format-test.el past 625841c (PR #106398)

2024-08-29 Thread Danial Klimkin via cfe-commits
dklimkin wrote: Race condition! Will update the other PR. https://github.com/llvm/llvm-project/pull/106398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add wasm-opt warning (PR #100321)

2024-08-29 Thread Quentin Michaud via cfe-commits
https://github.com/mh4ck-Thales ready_for_review https://github.com/llvm/llvm-project/pull/100321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix clang-format-buffer--buffer-encoding test (PR #106305)

2024-08-29 Thread Danial Klimkin via cfe-commits
dklimkin wrote: Hi darkfeline, Sorry I didn't see your PR and merged #106398 earlier. Please consider closing this one. https://github.com/llvm/llvm-project/pull/106305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] Add wasm-opt warning (PR #100321)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Quentin Michaud (mh4ck-Thales) Changes Add a warning when `wasm-opt` is requested with a flag (#95208) but is not found in the path. I'm using #77148 as reference on how to add a new warning but please tell me if you can help in i

[clang] [llvm] [mlir] [Support] Validate number of arguments passed to formatv() (PR #105745)

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

[clang] fc11020 - [Support] Validate number of arguments passed to formatv() (#105745)

2024-08-29 Thread via cfe-commits
Author: Rahul Joshi Date: 2024-08-29T08:00:25-07:00 New Revision: fc110202dffa06950716e0cc4535b07aaa2c439c URL: https://github.com/llvm/llvm-project/commit/fc110202dffa06950716e0cc4535b07aaa2c439c DIFF: https://github.com/llvm/llvm-project/commit/fc110202dffa06950716e0cc4535b07aaa2c439c.diff L

[clang] [llvm] [mlir] [Support] Validate number of arguments passed to formatv() (PR #105745)

2024-08-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-win-fast` running on `as-builder-3` while building `clang,llvm,mlir` at step 7 "test-build-unified-tree-check-llvm-unit". Full details are available at: https://lab.llvm.org/buildbot/#/builders/2/builds/5504

[clang] [flang] [flang][Driver] Add support for -mllvm -print-pipeline-passes (PR #106141)

2024-08-29 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/106141 >From 9b83df995dc5c1d95db63a6ad32ba612b8a52290 Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Mon, 26 Aug 2024 14:51:29 -0600 Subject: [PATCH 1/3] [flang][Driver] Add support for -mllvm -print-pipeline-p

[clang] [llvm] [mlir] [Support] Validate number of arguments passed to formatv() (PR #105745)

2024-08-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ve-ninja` running on `hpce-ve-main` while building `clang,llvm,mlir` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/12/builds/4733 Here is the relevant piece of the build

[clang] [clang][test] add TestLanguage.def to specify all tested language versions (PR #94243)

2024-08-29 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/94243 >From 1ef1bc0bfebca8ca114a57ea2d5016418e36446d Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 1 Jun 2024 17:38:37 +0200 Subject: [PATCH 1/7] [clang][test] add TestLanguage.def to specify all tested la

[clang] [flang] [flang][Driver] Add support for -mllvm -print-pipeline-passes (PR #106141)

2024-08-29 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: > > To unblock you, I propose the following: > > 1. Keep this as is, but add a comment saying that this should be a proper > compiler option instead of a secret handshake like this. Similar comment > should be added in Clang. I will happily approve that. > I have adde

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-29 Thread Oleksandr T. via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { a-tarasyuk wrote: @Sirraide @AaronBallman In the context of avoiding hardcoded

[clang] [analyzer] Fix nullptr dereference for symbols from pointer invalidation (PR #106568)

2024-08-29 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto created https://github.com/llvm/llvm-project/pull/106568 As reported in https://github.com/llvm/llvm-project/pull/105648#issuecomment-2317144635 commit 08ad8dc7154bf3ab79f750e6d5fb7df597c7601a introduced a nullptr dereference in the case when store contains a binding t

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-29 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix nullptr dereference for symbols from pointer invalidation (PR #106568)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Arseniy Zaostrovnykh (necto) Changes As reported in https://github.com/llvm/llvm-project/pull/105648#issuecomment-2317144635 commit 08ad8dc7154bf3ab79f750e6d5fb7df597c7601a introduced a nullptr

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals 3/3 (PR #105648)

2024-08-29 Thread Arseniy Zaostrovnykh via cfe-commits
necto wrote: > Hello, > > The following starts crashing with this patch: > > ``` > clang -cc1 -analyze -analyzer-checker=core bbi-98571.c > ``` > > Result: > > ``` > (...) > ``` Thank you for the report! Here is the fix: https://github.com/llvm/llvm-project/pull/106568 https://github.com/ll

[clang] [analyzer] Fix nullptr dereference for symbols from pointer invalidation (PR #106568)

2024-08-29 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 8ae877a089d9c2ca5315d3b2e0144c4d9f82cf5c 71aae8d0cc96d389da95c2231b1145b7ffeb2132 --e

[clang] [analyzer] Fix nullptr dereference for symbols from pointer invalidation (PR #106568)

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

[clang] [analyzer] Fix nullptr dereference for symbols from pointer invalidation (PR #106568)

2024-08-29 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/106568 >From 71aae8d0cc96d389da95c2231b1145b7ffeb2132 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Thu, 29 Aug 2024 16:39:12 +0200 Subject: [PATCH 1/2] [analyzer] Fix nullptr dereference for symbols from po

[clang] [CodeGen] Apply 'readonly' to 'this' pointer argument. (PR #106499)

2024-08-29 Thread Zhijin Zeng via cfe-commits
zengdage wrote: @nikic @ChuanqiXu9 I am sorry to bother you again. Do you think the attribute 'nofree' should be added to 'this' pointer argument in c++ instance method ? I think the 'this' pointer pointed to current object and it's life time is guaranteed to be longer than the instance meth

[clang] [CodeGen] Apply 'readonly' to 'this' pointer argument. (PR #106499)

2024-08-29 Thread Zhijin Zeng via cfe-commits
https://github.com/zengdage reopened https://github.com/llvm/llvm-project/pull/106499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix nullptr dereference for symbols from pointer invalidation (PR #106568)

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

[clang] [analyzer] Fix nullptr dereference for symbols from pointer invalidation (PR #106568)

2024-08-29 Thread Balazs Benics via cfe-commits
@@ -126,3 +126,22 @@ void caller_for_nested_leaking() { int *ptr = 0; caller_mid_for_nested_leaking(&ptr); } + +// This used to crash StackAddrEscapeChecker because +// it features a symbol conj_$1{struct c *, LC1, S763, #1} +// that has no origin region. +// bbi-98571 +str

[clang] [analyzer] Fix nullptr dereference for symbols from pointer invalidation (PR #106568)

2024-08-29 Thread Balazs Benics via cfe-commits
@@ -126,3 +126,22 @@ void caller_for_nested_leaking() { int *ptr = 0; caller_mid_for_nested_leaking(&ptr); } + +// This used to crash StackAddrEscapeChecker because +// it features a symbol conj_$1{struct c *, LC1, S763, #1} +// that has no origin region. +// bbi-98571 +str

[clang] [analyzer] Fix nullptr dereference for symbols from pointer invalidation (PR #106568)

2024-08-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. https://github.com/llvm/llvm-project/pull/106568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix nullptr dereference for symbols from pointer invalidation (PR #106568)

2024-08-29 Thread Balazs Benics via cfe-commits
@@ -126,3 +126,22 @@ void caller_for_nested_leaking() { int *ptr = 0; caller_mid_for_nested_leaking(&ptr); } + +// This used to crash StackAddrEscapeChecker because +// it features a symbol conj_$1{struct c *, LC1, S763, #1} +// that has no origin region. +// bbi-98571 +str

[clang] [analyzer] Fix nullptr dereference for symbols from pointer invalidation (PR #106568)

2024-08-29 Thread Balazs Benics via cfe-commits
@@ -126,3 +126,22 @@ void caller_for_nested_leaking() { int *ptr = 0; caller_mid_for_nested_leaking(&ptr); } + +// This used to crash StackAddrEscapeChecker because +// it features a symbol conj_$1{struct c *, LC1, S763, #1} +// that has no origin region. +// bbi-98571

[clang] [CodeGen] Apply 'nofree' to 'this' pointer argument. (PR #106499)

2024-08-29 Thread Zhijin Zeng via cfe-commits
https://github.com/zengdage edited https://github.com/llvm/llvm-project/pull/106499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >