[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Here is a reduced testcase for the OpenMP test failure: ```c++ #pragma omp declare target static long double ld_return1e() { return 0; } void external() { void *p1 = reinterpret_cast(_return1e); } #pragma omp end declare target ``` When built with the following

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-24 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (OpenMP failure still remains to be fixed.) https://github.com/llvm/llvm-project/pull/81662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-24 Thread Nathan Ridge via cfe-commits
@@ -3453,6 +3453,10 @@ ExprResult Sema::BuildDeclarationNameExpr(const CXXScopeSpec , NeedsADL, R.isOverloadedResult(), R.begin(), R.end()); + if (ULE && R.isSingleResult() &&

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/81662 >From 480cabcfeb42542746026bba753b4170e08bb8ae Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 13 Feb 2024 12:26:17 -0500 Subject: [PATCH] [clang][Sema] Improve error recovery for id-expressions

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/81662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-15 Thread Matheus Izvekov via cfe-commits
@@ -3453,6 +3453,10 @@ ExprResult Sema::BuildDeclarationNameExpr(const CXXScopeSpec , NeedsADL, R.isOverloadedResult(), R.begin(), R.end()); + if (ULE && R.isSingleResult() &&

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/81662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. Minor nit, otherwise LGTM. https://github.com/llvm/llvm-project/pull/81662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-14 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > The failures are related to new diagnostics that are issued as a side effect > of running additional checks in BuildDeclarationNameExpr(). A closer investigation has revealed that this diagnosis wasn't quite accurate. The three `SemaCXX` failures were not in fact

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-13 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/81662 >From 120bade6c7077eb37222e125952befe53a9fb8cc Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 13 Feb 2024 12:26:17 -0500 Subject: [PATCH] [clang][Sema] Improve error recovery for id-expressions

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-02-21 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Changing to Draft status as CI is showing some test failures that I will need > to investigate: > > ``` > Failed Tests (4): > Clang :: OpenMP/nvptx_unsupported_type_messages.cpp > Clang :: SemaCXX/constant-expression-cxx11.cpp > Clang ::

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-02-13 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Changing to Draft status as CI is showing some test failures that I will need to investigate: ``` Failed Tests (4): Clang :: OpenMP/nvptx_unsupported_type_messages.cpp Clang :: SemaCXX/constant-expression-cxx11.cpp Clang :: SemaCXX/cxx2b-consteval-if.cpp Clang ::

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-02-13 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 converted_to_draft https://github.com/llvm/llvm-project/pull/81662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nathan Ridge (HighCommander4) Changes Passing AcceptInvalidDecl=true to BuildDeclarationNameExpr() allows the RecoveryExpr that's constructed to retain a DeclRefExpr pointing to the invalid decl as a child, preserving information about

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-02-13 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/81662 Passing AcceptInvalidDecl=true to BuildDeclarationNameExpr() allows the RecoveryExpr that's constructed to retain a DeclRefExpr pointing to the invalid decl as a child, preserving information about the