https://github.com/HighCommander4 closed
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/88645
>From d8236b6a2feb27538fc131c30768d2247b7b86cb Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 14 Apr 2024 02:41:48 -0400
Subject: [PATCH] [clang][Sema] Preserve the initializer of invalid VarDecls
@@ -13435,16 +13435,18 @@ void Sema::checkNonTrivialCUnion(QualType QT,
SourceLocation Loc,
void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
// If there is no declaration, there was an error parsing it. Just ignore
// the initializer.
- if (
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/88645
>From c24e79da57fc69d2f353a5533a3cc26313301a71 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 14 Apr 2024 02:41:48 -0400
Subject: [PATCH] [clang][Sema] Preserve the initializer of invalid VarDecls
https://github.com/HighCommander4 edited
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -13435,16 +13435,18 @@ void Sema::checkNonTrivialCUnion(QualType QT,
SourceLocation Loc,
void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
// If there is no declaration, there was an error parsing it. Just ignore
// the initializer.
- if (
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -13456,6 +13458,15 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr
*Init, bool DirectInit) {
return;
}
+ if (VDecl->isInvalidDecl()) {
+CorrectDelayedTyposInExpr(Init, VDecl);
+ExprResult Recovery =
+CreateRecoveryExpr(Init->getBeginLoc(), In
https://github.com/mizvekov approved this pull request.
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov deleted
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -13456,6 +13458,15 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr
*Init, bool DirectInit) {
return;
}
+ if (VDecl->isInvalidDecl()) {
+CorrectDelayedTyposInExpr(Init, VDecl);
+ExprResult Recovery =
+CreateRecoveryExpr(Init->getBeginLoc(), In
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mizvekov approved this pull request.
LGTM, Thanks!
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -13435,16 +13435,18 @@ void Sema::checkNonTrivialCUnion(QualType QT,
SourceLocation Loc,
void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
// If there is no declaration, there was an error parsing it. Just ignore
// the initializer.
- if (
HighCommander4 wrote:
@mizvekov does the updated patch look reasonable to you?
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/88645
>From b43d8ddf8846db8a77d01c9fb2d246a0d0ba2ab2 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 14 Apr 2024 02:41:48 -0400
Subject: [PATCH] [clang][Sema] Preserve the initializer of invalid VarDecls
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 9617da88ab961145047076c45bb2bb1ac4513634
07424d8ee99fc418d071960bbdd4185564025139 --
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Nathan Ridge (HighCommander4)
Changes
Fixes https://github.com/clangd/clangd/issues/1821
---
Full diff: https://github.com/llvm/llvm-project/pull/88645.diff
3 Files Affected:
- (modified) clang/lib/Sema/JumpDiagnostics.cpp (+2-1)
- (mo
https://github.com/HighCommander4 ready_for_review
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HighCommander4 wrote:
> I added a new test case. However, the patch currently fails two existing test
> cases:
>
> Clang :: Parser/cxx-class.cpp
> Clang :: SemaCXX/cxx1z-init-statement.cpp
>
> I will leave the PR as a Draft while I investigate these failures.
The latest version of the patch f
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/88645
>From 07424d8ee99fc418d071960bbdd4185564025139 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 14 Apr 2024 02:41:48 -0400
Subject: [PATCH] [clang][Sema] Preserve the initializer of invalid VarDecls
HighCommander4 wrote:
> Thanks for the improvement!
>
> Can you also add a test case?
Thanks for the feedback!
I added a new test case. However, the patch currently fails two existing test
cases:
Clang :: Parser/cxx-class.cpp
Clang :: SemaCXX/cxx1z-init-statement.cpp
I will leave the PR
@@ -13456,6 +13455,14 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr
*Init, bool DirectInit) {
return;
}
+ if (VDecl->isInvalidDecl()) {
+CorrectDelayedTyposInExpr(Init, VDecl);
+VDecl->setInit(
+CreateRecoveryExpr(Init->getBeginLoc(), Init->ge
@@ -13435,8 +13435,7 @@ void Sema::checkNonTrivialCUnion(QualType QT,
SourceLocation Loc,
void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
// If there is no declaration, there was an error parsing it. Just ignore
// the initializer.
- if (!R
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/88645
>From 97170ed63643832f305254ba1788b99f90f9330d Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 14 Apr 2024 02:41:48 -0400
Subject: [PATCH] [clang][Sema] Preserve the initializer of invalid VarDecls
https://github.com/mizvekov requested changes to this pull request.
Thanks for the improvement!
Can you also add a test case?
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
@@ -13456,6 +13455,14 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr
*Init, bool DirectInit) {
return;
}
+ if (VDecl->isInvalidDecl()) {
+CorrectDelayedTyposInExpr(Init, VDecl);
+VDecl->setInit(
+CreateRecoveryExpr(Init->getBeginLoc(), Init->ge
@@ -13435,8 +13435,7 @@ void Sema::checkNonTrivialCUnion(QualType QT,
SourceLocation Loc,
void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
// If there is no declaration, there was an error parsing it. Just ignore
// the initializer.
- if (!R
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HighCommander4 created
https://github.com/llvm/llvm-project/pull/88645
Fixes https://github.com/clangd/clangd/issues/1821
>From 42ee794d3de89241fae7314db2202cac32af469b Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 14 Apr 2024 02:41:48 -0400
Subject: [PATCH] [clang]
31 matches
Mail list logo