[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-16 Thread via cfe-commits
github-actions[bot] wrote: @alirezamoshtaghi Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-16 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/83369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-15 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/83369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-15 Thread via cfe-commits
https://github.com/alirezamoshtaghi updated https://github.com/llvm/llvm-project/pull/83369 >From 3d6afe011221ac239bb668b375ed3f6c356fc47d Mon Sep 17 00:00:00 2001 From: alirezamoshtaghi Date: Wed, 28 Feb 2024 13:55:11 -0800 Subject: [PATCH 1/5] [CLANGD] Do not crash on designator initializatio

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

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

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-15 Thread Nathan Ridge via cfe-commits
@@ -72,6 +72,22 @@ TEST_F(ExtractVariableTest, Test) { )cpp"; EXPECT_UNAVAILABLE(NoCrashCasesC); + ExtraArgs = {"-xc"}; + const char *NoCrashDesignator = R"cpp( +struct A { + struct { +int x; + }; +}; +struct B { + int y; +}; +

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-15 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/83369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-13 Thread via cfe-commits
https://github.com/alirezamoshtaghi deleted https://github.com/llvm/llvm-project/pull/83369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-13 Thread via cfe-commits
@@ -4601,8 +4601,15 @@ SourceRange DesignatedInitExpr::getDesignatorsSourceRange() const { SourceLocation DesignatedInitExpr::getBeginLoc() const { auto *DIE = const_cast(this); Designator &First = *DIE->getDesignator(0); - if (First.isFieldDesignator()) -return GNUSy

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-13 Thread via cfe-commits
https://github.com/alirezamoshtaghi updated https://github.com/llvm/llvm-project/pull/83369 >From 3d6afe011221ac239bb668b375ed3f6c356fc47d Mon Sep 17 00:00:00 2001 From: alirezamoshtaghi Date: Wed, 28 Feb 2024 13:55:11 -0800 Subject: [PATCH 1/4] [CLANGD] Do not crash on designator initializatio

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-12 Thread Nathan Ridge via cfe-commits
@@ -4601,8 +4601,15 @@ SourceRange DesignatedInitExpr::getDesignatorsSourceRange() const { SourceLocation DesignatedInitExpr::getBeginLoc() const { auto *DIE = const_cast(this); Designator &First = *DIE->getDesignator(0); - if (First.isFieldDesignator()) -return GNUSy

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Thanks for the patch! I wrote some notes in the issue (https://github.com/llvm/llvm-project/issues/83185) to help me understand the problem the patch is fixing. The fix looks good to me. Regarding the test: * Usually

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

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

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-05 Thread via cfe-commits
https://github.com/alirezamoshtaghi updated https://github.com/llvm/llvm-project/pull/83369 >From 3d6afe011221ac239bb668b375ed3f6c356fc47d Mon Sep 17 00:00:00 2001 From: alirezamoshtaghi Date: Wed, 28 Feb 2024 13:55:11 -0800 Subject: [PATCH 1/3] [CLANGD] Do not crash on designator initializatio

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-04 Thread via cfe-commits
https://github.com/alirezamoshtaghi updated https://github.com/llvm/llvm-project/pull/83369 >From 3d6afe011221ac239bb668b375ed3f6c356fc47d Mon Sep 17 00:00:00 2001 From: alirezamoshtaghi Date: Wed, 28 Feb 2024 13:55:11 -0800 Subject: [PATCH 1/2] [CLANGD] Do not crash on designator initializatio

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-04 Thread via cfe-commits
https://github.com/alirezamoshtaghi updated https://github.com/llvm/llvm-project/pull/83369 >From 3d6afe011221ac239bb668b375ed3f6c356fc47d Mon Sep 17 00:00:00 2001 From: alirezamoshtaghi Date: Wed, 28 Feb 2024 13:55:11 -0800 Subject: [PATCH] [CLANGD] Do not crash on designator initialization of

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-02-28 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 267beb10f2812107734a1cd2172b46e928af76b7 3d6afe011221ac239bb668b375ed3f6c356fc47d --

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clangd @llvm/pr-subscribers-clang Author: None (alirezamoshtaghi) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/83369.diff 2 Files Affected: - (added) clang-tools-extra/clangd/test/designator

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

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

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-02-28 Thread via cfe-commits
https://github.com/alirezamoshtaghi created https://github.com/llvm/llvm-project/pull/83369 None >From 3d6afe011221ac239bb668b375ed3f6c356fc47d Mon Sep 17 00:00:00 2001 From: alirezamoshtaghi Date: Wed, 28 Feb 2024 13:55:11 -0800 Subject: [PATCH] [CLANGD] Do not crash on designator initializat