[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

[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

[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
@@ -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 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] 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] 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-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

[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] 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

[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] 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.

[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 , 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
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
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] [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] [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-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] 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 #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

[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-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

[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] 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'

[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] 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 ---

[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 ---

[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; +

[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

[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 ---

[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-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-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 ---

[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 ---

[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
@@ -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] [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
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 ---

[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:" <<

[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 ---

[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

[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 ) { if (It.Kind == IndirectLocalPathEntry::LifetimeBoundCall) continue; return It.Kind == IndirectLocalPathEntry::GslPointerInit || - It.Kind ==

[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 ) { 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 for

[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 ---

[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:" <<

[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 ---

[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 ---

[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 ---

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

2024-07-10 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/4] Add an option to add source file info to -ftime-trace ---

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

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited 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] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 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/3] Add an option to add source file info to -ftime-trace ---

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

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 ready_for_review 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] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited 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] Add an option to add source file info to -ftime-trace (PR #98320)

2024-07-10 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/2] Add an option to add source file info to -ftime-trace ---

[clang] Add an option to add source file info to -ftime-trace (PR #98320)

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

[clang] [clang] Don't emit the warn_dangling_lifetime_pointer diagnostic for the assignment case. (PR #97408)

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

[clang] [clang] Don't emit the warn_dangling_lifetime_pointer diagnostic for the assignment case. (PR #97408)

2024-07-02 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,15 @@ + +// RUN: %clang_cc1 -std=c++20 -verify -Wno-dangling-assignment %s usx95 wrote: I would suggest dropping `-Wno-dangling-assignment` and ensuring that we get "only" the dangling assignment and not GSL ones. This would also not need a new file.

[clang] [clang] Don't emit the warn_dangling_lifetime_pointer diagnostic for the assignment case. (PR #97408)

2024-07-02 Thread Utkarsh Saxena via cfe-commits
@@ -1023,7 +1023,7 @@ static void checkExprLifetimeImpl(Sema , return false; } - if (IsGslPtrInitWithGslTempOwner && DiagLoc.isValid()) { + if (InitEntity && IsGslPtrInitWithGslTempOwner && DiagLoc.isValid()) { usx95 wrote: I think it

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

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

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Utkarsh Saxena via cfe-commits
@@ -1028,6 +1045,7 @@ void checkExprLifetime(Sema , const InitializedEntity , switch (shouldLifetimeExtendThroughPath(Path)) { case PathLifetimeKind::Extend: +assert(InitEntity && "Expect only on initializing the entity"); usx95 wrote:

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

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

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-28 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 commented: You can also add "Fixes: https://github.com/llvm/llvm-project/issues/54492; to description to close this bug as this only asks for pointer type support Please also add release notes. https://github.com/llvm/llvm-project/pull/96475

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-27 Thread Utkarsh Saxena via cfe-commits
@@ -964,11 +966,26 @@ static bool pathOnlyInitializesGslPointer(IndirectLocalPath ) { return false; } -void checkExprLifetime(Sema , const InitializedEntity , +void checkExprLifetime(Sema , const CheckingEntity , Expr *Init) { - LifetimeResult LR =

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-27 Thread Utkarsh Saxena via cfe-commits
@@ -1053,16 +1072,23 @@ void checkExprLifetime(Sema , const InitializedEntity , if (pathContainsInit(Path)) return false; -SemaRef.Diag(DiagLoc, diag::warn_dangling_variable) -<< RK << !Entity.getParent() -<<

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-27 Thread Utkarsh Saxena via cfe-commits
@@ -40,6 +40,12 @@ namespace usage_ok { int *p = A().class_member(); // expected-warning {{temporary whose address is used as value of local variable 'p' will be destroyed at the end of the full-expression}} int *q = A(); // expected-warning {{temporary whose address is

[clang] [SourceManager] Expose max usage of source location space as a Statistic (PR #96292)

2024-06-24 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: This is a simple enough patch, so I agree we can deal with concerns post-commit as well. Let's go ahead with landing this then. https://github.com/llvm/llvm-project/pull/96292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [SourceManager] Expose max usage of source location space as a Statistic (PR #96292)

2024-06-24 Thread Utkarsh Saxena via cfe-commits
@@ -46,6 +47,12 @@ using namespace clang; using namespace SrcMgr; using llvm::MemoryBuffer; +#define DEBUG_TYPE "source-manager" + +STATISTIC( +MaxUsedSLocBytes, +"Maximum number of bytes used by source locations (both loaded and local)"); usx95

[clang] [SourceManager] Expose max usage of source location space as a Statistic (PR #96292)

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

[clang] [SourceManager] Expose max usage of source location space as a Statistic (PR #96292)

2024-06-24 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 approved this pull request. LGTM. Please wait a couple of days before landing to give a chance to other folks for reviewing. https://github.com/llvm/llvm-project/pull/96292 ___ cfe-commits mailing list

[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] [clangd] Fix crash with null check for Token at Loc (PR #94528)

2024-06-07 Thread Utkarsh Saxena via cfe-commits
@@ -447,7 +447,7 @@ class HighlightingsBuilder { if (!RLoc.isValid()) return; -const auto *RTok = TB.spelledTokenAt(RLoc); +const auto *RTok = TB.spelledTokenContaining(RLoc); usx95 wrote: Done.

[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 updated https://github.com/llvm/llvm-project/pull/94528 >From b13a663ae347649a3bcf9d6e381a5fbbfdc9ea4b Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 5 Jun 2024 19:48:48 + Subject: [PATCH 1/6] [clangd] Fix crash with null check for Token at Loc ---

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

2024-06-06 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/94528 >From b13a663ae347649a3bcf9d6e381a5fbbfdc9ea4b Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 5 Jun 2024 19:48:48 + Subject: [PATCH 1/5] [clangd] Fix crash with null check for Token at Loc ---

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

2024-06-06 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/94528 >From b13a663ae347649a3bcf9d6e381a5fbbfdc9ea4b Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 5 Jun 2024 19:48:48 + Subject: [PATCH 1/4] [clangd] Fix crash with null check for Token at Loc ---

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

2024-06-06 Thread Utkarsh Saxena via cfe-commits
@@ -1354,6 +1354,8 @@ maybeFindIncludeReferences(ParsedAST , Position Pos, ReferencesResult::Reference Result; const auto *Token = AST.getTokens().spelledTokenAt(Loc); +if (!Token) usx95 wrote: Done. > also, what's the conclusion of

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

2024-06-06 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited 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] [clangd] Fix crash with null check for Token at Loc (PR #94528)

2024-06-06 Thread Utkarsh Saxena via cfe-commits
@@ -1354,6 +1354,8 @@ maybeFindIncludeReferences(ParsedAST , Position Pos, ReferencesResult::Reference Result; const auto *Token = AST.getTokens().spelledTokenAt(Loc); +if (!Token) usx95 wrote: Modified `spelledTokenAt`.

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

2024-06-06 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/94528 >From b13a663ae347649a3bcf9d6e381a5fbbfdc9ea4b Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 5 Jun 2024 19:48:48 + Subject: [PATCH 1/3] [clangd] Fix crash with null check for Token at Loc ---

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

2024-06-05 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/94528 >From b13a663ae347649a3bcf9d6e381a5fbbfdc9ea4b Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 5 Jun 2024 19:48:48 + Subject: [PATCH 1/2] [clangd] Fix crash with null check for Token at Loc ---

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

2024-06-05 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/94528 None >From b13a663ae347649a3bcf9d6e381a5fbbfdc9ea4b Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 5 Jun 2024 19:48:48 + Subject: [PATCH] [clangd] Fix crash with null check for Token at Loc ---

[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] 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

[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

[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

[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

[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-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

[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
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

[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-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

  1   2   3   4   5   6   >