[clang] [clang][dataflow] Fix crash when analyzing a coroutine (PR #85957)

2024-03-20 Thread Eric Li via cfe-commits
https://github.com/tJener closed https://github.com/llvm/llvm-project/pull/85957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Fix crash when analyzing a coroutine (PR #85957)

2024-03-20 Thread Eric Li via cfe-commits
@@ -4628,6 +4662,21 @@ TEST(TransferTest, DoesNotCrashOnUnionThisExpr) { LangStandard::lang_cxx17, /*ApplyBuiltinTransfer=*/true, "operator="); } +TEST(TransferTest, DoesNotCrashOnNullChildren) { + std::string Code = (CoroutineLibrary + R"cc( +task foo() noexcept {

[clang] [clang][dataflow] Fix crash when analyzing a coroutine (PR #85957)

2024-03-20 Thread Eric Li via cfe-commits
https://github.com/tJener updated https://github.com/llvm/llvm-project/pull/85957 >From 386e7dea15739df65ad9ecb3dd7f7dcd23b6acae Mon Sep 17 00:00:00 2001 From: Eric Li Date: Wed, 20 Mar 2024 12:15:45 -0400 Subject: [PATCH 1/3] [clang][dataflow] Fix crash when analyzing a coroutine A coroutine

[clang] [clang][dataflow] Fix crash when analyzing a coroutine (PR #85957)

2024-03-20 Thread Eric Li via cfe-commits
https://github.com/tJener updated https://github.com/llvm/llvm-project/pull/85957 >From 386e7dea15739df65ad9ecb3dd7f7dcd23b6acae Mon Sep 17 00:00:00 2001 From: Eric Li Date: Wed, 20 Mar 2024 12:15:45 -0400 Subject: [PATCH 1/2] [clang][dataflow] Fix crash when analyzing a coroutine A coroutine

[clang] [clang][dataflow] Fix crash when analyzing a coroutine (PR #85957)

2024-03-20 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/85957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Fix crash when analyzing a coroutine (PR #85957)

2024-03-20 Thread Sam McCall via cfe-commits
@@ -4628,6 +4662,21 @@ TEST(TransferTest, DoesNotCrashOnUnionThisExpr) { LangStandard::lang_cxx17, /*ApplyBuiltinTransfer=*/true, "operator="); } +TEST(TransferTest, DoesNotCrashOnNullChildren) { + std::string Code = (CoroutineLibrary + R"cc( +task foo() noexcept {

[clang] [clang][dataflow] Fix crash when analyzing a coroutine (PR #85957)

2024-03-20 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. https://github.com/llvm/llvm-project/pull/85957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Fix crash when analyzing a coroutine (PR #85957)

2024-03-20 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 a9fe23cde3ee554f4bd6118edcc2e747f3a8d8d5 386e7dea15739df65ad9ecb3dd7f7dcd23b6acae --

[clang] [clang][dataflow] Fix crash when analyzing a coroutine (PR #85957)

2024-03-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eric Li (tJener) Changes A coroutine function body (`CoroutineBodyStmt`) may have null children, which causes `isa` to segfault. --- Full diff: https://github.com/llvm/llvm-project/pull/85957.diff 2 Files Affected: - (modified) clang/l

[clang] [clang][dataflow] Fix crash when analyzing a coroutine (PR #85957)

2024-03-20 Thread Eric Li via cfe-commits
https://github.com/tJener created https://github.com/llvm/llvm-project/pull/85957 A coroutine function body (`CoroutineBodyStmt`) may have null children, which causes `isa` to segfault. >From 386e7dea15739df65ad9ecb3dd7f7dcd23b6acae Mon Sep 17 00:00:00 2001 From: Eric Li Date: Wed, 20 Mar 202