[clang] [clang-tools-extra] [clangd] Fix crash with null check for Token at Loc (PR #94528)

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

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: Alternate patch https://github.com/llvm/llvm-project/commit/89ba7e183e6e2c64370ed1b963e54c06352211db has landed. Closing this as obsolete. https://github.com/llvm/llvm-project/pull/80698 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

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

[clang] [clang-tools-extra] Coro destruct temporary ehcleanup (PR #83224)

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

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: This fix is for a wrong refactoring change in https://github.com/llvm/llvm-project/commit/89ba7e183e6e2c64370ed1b963e54c06352211db and I would be inclined towards landing this in a few hours to unblock the build breakage (if there are no review comments). CC: @efriedma-quic htt

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/88670 >From 599283c1845a25afe90163a5f0a7a809c622a521 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Sun, 14 Apr 2024 21:21:21 + Subject: [PATCH 1/2] Use pushFullExprCleanup for deferred destroy --- clang/lib/Co

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: @cor3ntin Added tests for crash. https://github.com/llvm/llvm-project/pull/88670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/88670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix missing dtor in function calls accepting trivial ABI structs (PR #88751)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/88751 Fixes https://github.com/llvm/llvm-project/issues/88478 Promoting the `EHCleanup` to `NormalAndEHCleanup` in `EmitCallArgs` surfaced another bug with deactivation of normal cleanups. Here we missed emitting CPP sc

[clang] Fix missing dtor in function calls accepting trivial ABI structs (PR #88751)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/88751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/88670 >From 599283c1845a25afe90163a5f0a7a809c622a521 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Sun, 14 Apr 2024 21:21:21 + Subject: [PATCH 1/3] Use pushFullExprCleanup for deferred destroy --- clang/lib/Co

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -emit-llvm -fexceptions -o - %s -triple x86_64-linux-gnu | FileCheck -check-prefixes=EH,CHECK %s +// RUN: %clang_cc1 -emit-llvm -o - %s -triple x86_64-linux-gnu | FileCheck -check-prefixes=NOEH,CHECK %s +namespace std { + typedef decltype(si

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -emit-llvm -fexceptions -o - %s -triple x86_64-linux-gnu | FileCheck -check-prefixes=EH,CHECK %s +// RUN: %clang_cc1 -emit-llvm -o - %s -triple x86_64-linux-gnu | FileCheck -check-prefixes=NOEH,CHECK %s +namespace std { + typedef decltype(si

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

2024-04-15 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/88670 >From 599283c1845a25afe90163a5f0a7a809c622a521 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Sun, 14 Apr 2024 21:21:21 + Subject: [PATCH 1/4] Use pushFullExprCleanup for deferred destroy --- clang/lib/Co

[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

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

[clang] Fix missing dtor in function calls accepting trivial ABI structs (PR #88751)

2024-04-16 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/88751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix missing dtor in function calls accepting trivial ABI structs (PR #88751)

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

[clang] Revert "[codegen] Emit missing cleanups for stmt-expr and coro suspensions" and related commits (PR #88884)

2024-04-16 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/4 None >From 97026ca24fe5e6408786d663ce3fda4e0671dad4 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 16 Apr 2024 12:16:24 + Subject: [PATCH 1/3] Revert "Fix missing dtor in function calls accepting tri

[clang] Revert "[codegen] Emit missing cleanups for stmt-expr and coro suspensions" and related commits (PR #88884)

2024-04-16 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/4 >From 97026ca24fe5e6408786d663ce3fda4e0671dad4 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 16 Apr 2024 12:16:24 + Subject: [PATCH 1/3] Revert "Fix missing dtor in function calls accepting trivial A

[clang] Revert "[codegen] Emit missing cleanups for stmt-expr and coro suspensions" and related commits (PR #88884)

2024-04-16 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/4 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[codegen] Emit missing cleanups for stmt-expr and coro suspensions" and related commits (PR #88884)

2024-04-16 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 ready_for_review https://github.com/llvm/llvm-project/pull/4 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[codegen] Emit missing cleanups for stmt-expr and coro suspensions" and related commits (PR #88884)

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

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/89154 None >From f1ab4c2677394bbfc985d9680d5eecd7b2e6a882 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 17 Apr 2024 22:47:36 + Subject: [PATCH 1/2] Reapply "[codegen] Emit missing cleanups for stmt-expr a

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/89154 >From f1ab4c2677394bbfc985d9680d5eecd7b2e6a882 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 17 Apr 2024 22:47:36 + Subject: [PATCH 1/2] Reapply "[codegen] Emit missing cleanups for stmt-expr and cor

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/89154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/89154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 ready_for_review https://github.com/llvm/llvm-project/pull/89154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/89154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/89154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/89154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/89154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/89154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-21 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/89154 >From f1ab4c2677394bbfc985d9680d5eecd7b2e6a882 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 17 Apr 2024 22:47:36 + Subject: [PATCH 1/3] Reapply "[codegen] Emit missing cleanups for stmt-expr and cor

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

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

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

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

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

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

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-21 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: (addressed one more problem with conditional lifetime extension.) > What, if anything, about the scenario you're describing is specific to > "normal" cleanups? We do not see this with `EHCleanup`s because `EmitBranchThroughCleanup` does not consider `EHCleanup`. It branches throu

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

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

[clang] Fix lifetimebound for field access (PR #100197)

2024-07-23 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/100197 Fixes: https://github.com/llvm/llvm-project/issues/81589 >From b76d65484c3195f27e8d01208ccc6e6f8ab55273 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 23 Jul 2024 19:41:44 + Subject: [PATCH] Fix lif

[clang] Fix lifetimebound for field access (PR #100197)

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

[clang] Fix lifetimebound for field access (PR #100197)

2024-07-24 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/100197 >From b76d65484c3195f27e8d01208ccc6e6f8ab55273 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 23 Jul 2024 19:41:44 + Subject: [PATCH 1/4] Fix lifetimebound for field access --- clang/lib/Sema/Check

[clang] Fix lifetimebound for field access (PR #100197)

2024-07-24 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/100197 >From b76d65484c3195f27e8d01208ccc6e6f8ab55273 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 23 Jul 2024 19:41:44 + Subject: [PATCH 1/5] Fix lifetimebound for field access --- clang/lib/Sema/Check

[clang] Fix lifetimebound for field access (PR #100197)

2024-07-24 Thread Utkarsh Saxena via cfe-commits
@@ -47,6 +47,26 @@ namespace usage_ok { q = A(); // expected-warning {{object backing the pointer q will be destroyed at the end of the full-expression}} r = A(1); // expected-warning {{object backing the pointer r will be destroyed at the end of the full-expression}}

[clang] Fix lifetimebound for field access (PR #100197)

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

[clang] Fix lifetimebound for field access (PR #100197)

2024-07-24 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: Makes sense to me. Added cherrypick in https://github.com/llvm/llvm-project/issues/81589 https://github.com/llvm/llvm-project/pull/100197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang] Enable the -Wdangling-assignment-gsl diagnostic by default. (PR #100708)

2024-07-26 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 approved this pull request. Thanks. Looks good since we are past the branch cut. https://github.com/llvm/llvm-project/pull/100708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

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

2024-07-16 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 1/5] Add an option to add source file info to -ftime-trace --- cla

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

2024-07-16 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 1/6] Add an option to add source file info to -ftime-trace --- cla

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

2024-07-16 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 1/6] Add an option to add source file info to -ftime-trace --- cla

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

2024-07-16 Thread Utkarsh Saxena via cfe-commits
@@ -3430,6 +3430,7 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation, llvm::raw_string_ostream OS(Name); Instantiation->getNameForDiagnostic(OS, getPrintingPolicy(), /*Qualified=*/true); +OS << ", file:" << Source

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

2024-07-16 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 1/7] Add an option to add source file info to -ftime-trace --- cla

[clang] [clang] Extend lifetime analysis to support assignments for pointer-like objects. (PR #99032)

2024-07-16 Thread Utkarsh Saxena via cfe-commits
@@ -966,7 +969,8 @@ static bool pathOnlyInitializesGslPointer(IndirectLocalPath &Path) { if (It.Kind == IndirectLocalPathEntry::LifetimeBoundCall) usx95 wrote: nit: merge the first 3 `if` into a single one. I feel it makes it clear that outcome is same fo

[clang] [clang] Extend lifetime analysis to support assignments for pointer-like objects. (PR #99032)

2024-07-16 Thread Utkarsh Saxena via cfe-commits
@@ -966,7 +969,8 @@ static bool pathOnlyInitializesGslPointer(IndirectLocalPath &Path) { if (It.Kind == IndirectLocalPathEntry::LifetimeBoundCall) continue; return It.Kind == IndirectLocalPathEntry::GslPointerInit || - It.Kind == IndirectLocalPathEntry:

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

2024-07-17 Thread Utkarsh Saxena via cfe-commits
@@ -3430,6 +3430,7 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation, llvm::raw_string_ostream OS(Name); usx95 wrote: I think we can do this on a need basis. Most source actions (like Parse*) already have this information (although not structur

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

2024-07-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 1/8] Add an option to add source file info to -ftime-trace --- cla

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

2024-07-17 Thread Utkarsh Saxena via cfe-commits
@@ -3430,6 +3430,7 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation, llvm::raw_string_ostream OS(Name); Instantiation->getNameForDiagnostic(OS, getPrintingPolicy(), /*Qualified=*/true); +OS << ", file:" << Source

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

2024-07-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 1/9] Add an option to add source file info to -ftime-trace --- cla

[clang] [clang] Extend lifetime analysis to support assignments for pointer-like objects. (PR #99032)

2024-07-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/99032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-17 Thread Utkarsh Saxena via cfe-commits
@@ -60,39 +74,65 @@ bool compileFromString(StringRef Code, StringRef Standard, StringRef FileName) { return Compiler.ExecuteAction(Action); } +std::string GetMetadata(json::Object *Event) { + std::string Metadata = ""; + if (json::Object *Args = Event->getObject("args"))

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

2024-07-17 Thread Utkarsh Saxena via cfe-commits
@@ -83,16 +83,27 @@ namespace llvm { class raw_pwrite_stream; +struct TimeTraceMetadata { + std::string Detail; + // Source file information for the event. + std::string Filename; usx95 wrote: Done. https://github.com/llvm/llvm-project/pull/98320 ___

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

2024-07-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 01/10] Add an option to add source file info to -ftime-trace --- c

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

2024-07-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 01/11] Add an option to add source file info to -ftime-trace --- c

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

2024-07-17 Thread Utkarsh Saxena via cfe-commits
@@ -83,16 +83,27 @@ namespace llvm { class raw_pwrite_stream; +struct TimeTraceMetadata { usx95 wrote: Done. https://github.com/llvm/llvm-project/pull/98320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-07-18 Thread Utkarsh Saxena via cfe-commits
@@ -60,39 +74,65 @@ bool compileFromString(StringRef Code, StringRef Standard, StringRef FileName) { return Compiler.ExecuteAction(Action); } +std::string GetMetadata(json::Object *Event) { + std::string Metadata = ""; + if (json::Object *Args = Event->getObject("args"))

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

2024-07-18 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 01/12] Add an option to add source file info to -ftime-trace --- c

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

2024-07-18 Thread Utkarsh Saxena via cfe-commits
@@ -38,14 +42,24 @@ std::string teardownProfiler() { // Returns true if code compiles successfully. // We only parse AST here. This is enough for constexpr evaluation. -bool compileFromString(StringRef Code, StringRef Standard, StringRef FileName) { +bool compileFromString(St

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

2024-07-18 Thread Utkarsh Saxena via cfe-commits
@@ -3426,11 +3426,16 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation, return true; llvm::TimeTraceScope TimeScope("InstantiateClass", [&]() { -std::string Name; -llvm::raw_string_ostream OS(Name); +llvm::TimeTraceMetadata M; +llvm::raw_stri

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

2024-07-18 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 01/14] Add an option to add source file info to -ftime-trace --- c

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

2024-07-18 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 01/15] Add an option to add source file info to -ftime-trace --- c

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

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

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

2024-07-18 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/99534 Reverts llvm/llvm-project#98320 Breaks windows tests: ``` Step 8 (test-build-unified-tree-check-clang-unit) failure: test (failure) TEST 'Clang-Unit :: Support/./ClangSupportTests.exe/1/3' FAI

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

2024-07-18 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed 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] [llvm] Reapply "Add source file name for template instantiations in -ftime-trace" (PR #99545)

2024-07-18 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/99545 Fix the Windows test. >From 1047bd2fad795c33c6d228ed117b75025422ddb9 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 18 Jul 2024 17:52:10 + Subject: [PATCH 1/2] Reapply "Add source file name for templa

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

2024-07-19 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/99545 >From 1047bd2fad795c33c6d228ed117b75025422ddb9 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 18 Jul 2024 17:52:10 + Subject: [PATCH 1/3] Reapply "Add source file name for template instantiations in -

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

2024-07-19 Thread Utkarsh Saxena via cfe-commits
@@ -60,13 +75,29 @@ bool compileFromString(StringRef Code, StringRef Standard, StringRef FileName) { return Compiler.ExecuteAction(Action); } +std::string GetMetadata(json::Object *Event) { + std::string Metadata; + llvm::raw_string_ostream OS(Metadata); + if (json::Obje

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

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

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

2024-07-20 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/99757 Reverts https://github.com/llvm/llvm-project/pull/99731 Remove accidentally added temporary file. Also fix uninitialized read of line number. >From 2c43d8b557192df6999437485cdbdc2e030f4fe5 Mon Sep 17 00:00:00 2001

[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] [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] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/99866 None >From e0d76b97e386421ac2e653c206f49f827b24e65b Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Mon, 22 Jul 2024 12:16:48 + Subject: [PATCH] Record mainfile name in the Frontend time trace --- clang/l

[clang] Record mainfile name in the Frontend time trace (PR #99866)

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

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Utkarsh Saxena via cfe-commits
@@ -152,7 +152,13 @@ void clang::ParseAST(Sema &S, bool PrintStats, bool SkipFunctionBodies) { bool HaveLexer = S.getPreprocessor().getCurrentLexer(); if (HaveLexer) { -llvm::TimeTraceScope TimeScope("Frontend"); +llvm::TimeTraceScope TimeScope("Frontend", [&]() {

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Utkarsh Saxena via cfe-commits
@@ -81,7 +81,6 @@ std::string GetMetadata(json::Object *Event) { if (json::Object *Args = Event->getObject("args")) { if (auto Detail = Args->getString("detail")) OS << Detail; -// Use only filename to not include os-specific path separators. us

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/99866 >From e0d76b97e386421ac2e653c206f49f827b24e65b Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Mon, 22 Jul 2024 12:16:48 + Subject: [PATCH 1/2] Record mainfile name in the Frontend time trace --- clang/lib

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Utkarsh Saxena via cfe-commits
@@ -209,7 +208,7 @@ constexpr int slow_init_list[] = {1, 1, 2, 3, 5, 8, 13, 21}; // 25th line ASSERT_TRUE(compileFromString(Code, "-std=c++20", "test.cc")); std::string Json = teardownProfiler(); ASSERT_EQ(R"( -Frontend +Frontend (, test.cc) usx95 wrote:

[clang] Record mainfile name in the Frontend time trace (PR #99866)

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

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-25 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: @efriedma-quic Ping! https://github.com/llvm/llvm-project/pull/89154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-29 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/89154 >From f1ab4c2677394bbfc985d9680d5eecd7b2e6a882 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 17 Apr 2024 22:47:36 + Subject: [PATCH 1/4] Reapply "[codegen] Emit missing cleanups for stmt-expr and cor

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-29 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/89154 >From f1ab4c2677394bbfc985d9680d5eecd7b2e6a882 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 17 Apr 2024 22:47:36 + Subject: [PATCH 1/4] Reapply "[codegen] Emit missing cleanups for stmt-expr and cor

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-29 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/89154 >From f1ab4c2677394bbfc985d9680d5eecd7b2e6a882 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 17 Apr 2024 22:47:36 + Subject: [PATCH 1/5] Reapply "[codegen] Emit missing cleanups for stmt-expr and cor

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-29 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: I have built a very large corpus with a clang built with these changes and run its tests. No compilation or test failures were reported. The corpus was built with exceptions disabled. I am fairly confident in the correctness of this and will proceed with landing this patch for now

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

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

[clang] [clang] Properly set file and line info for -ftime-trace (PR #106277)

2024-08-27 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/106277 Uniformly use file and line metadata information in `-ftime-trace` profiles. This makes post processing simpler and not fragile. >From b2bb29ec61f4e9a7b3b7f9bcd0f5b7a12c844d14 Mon Sep 17 00:00:00 2001 From: Utkar

[clang] [clang] Properly set file and line info for -ftime-trace (PR #106277)

2024-08-27 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/106277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Properly set file and line info for -ftime-trace (PR #106277)

2024-08-27 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/2] [clang] Properly set file and line info for -ftime-trace ---

[clang] [clang] Properly set file and line info for -ftime-trace (PR #106277)

2024-08-27 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/106277 ___ 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-28 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: What is the reason for changing from `llvm::TimeTraceProfilerEntry*` to `std::shared_ptr`? We are also adding significant devirtualization cost with the added different event types. Can we do something like this: ``` enum class TimeTraceEventType { DurationEvent, InstantEvent }; st

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

2024-08-28 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/106277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-08-29 Thread Utkarsh Saxena via cfe-commits
@@ -1255,8 +1256,12 @@ Parser::DeclGroupPtrTy Parser::ParseDeclarationOrFunctionDefinition( // Add an enclosing time trace scope for a bunch of small scopes with // "EvaluateAsConstExpr". llvm::TimeTraceScope TimeScope("ParseDeclarationOrFunctionDefinition", [&]() { -

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

2024-08-29 Thread Utkarsh Saxena via cfe-commits
@@ -1255,8 +1256,12 @@ Parser::DeclGroupPtrTy Parser::ParseDeclarationOrFunctionDefinition( // Add an enclosing time trace scope for a bunch of small scopes with // "EvaluateAsConstExpr". llvm::TimeTraceScope TimeScope("ParseDeclarationOrFunctionDefinition", [&]() { -

<    1   2   3   4   5   6   7   8   9   10   >