@@ -239,7 +239,10 @@ StmtResult
Parser::ParseStatementOrDeclarationAfterAttributes(
auto IsStmtAttr = [](ParsedAttr &Attr) { return Attr.isStmtAttr(); };
bool AllAttrsAreStmtAttrs = llvm::all_of(CXX11Attrs, IsStmtAttr) &&
llvm::all_of(GN
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/92908
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -239,7 +239,10 @@ StmtResult
Parser::ParseStatementOrDeclarationAfterAttributes(
auto IsStmtAttr = [](ParsedAttr &Attr) { return Attr.isStmtAttr(); };
bool AllAttrsAreStmtAttrs = llvm::all_of(CXX11Attrs, IsStmtAttr) &&
llvm::all_of(GN
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/92908
>From 219dae02c3235c17bc4568496a7df9763d798e2a Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Mon, 20 May 2024 13:40:28 -0400
Subject: [PATCH 1/5] [C] Fix declaration parsing
8bd06d5b65845e5e01dd899a2de
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/92908
>From 219dae02c3235c17bc4568496a7df9763d798e2a Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Mon, 20 May 2024 13:40:28 -0400
Subject: [PATCH 1/4] [C] Fix declaration parsing
8bd06d5b65845e5e01dd899a2de
@@ -467,15 +467,18 @@ class Parser : public CodeCompletionHandler {
/// Flags describing a context in which we're parsing a statement.
enum class ParsedStmtContext {
+/// This context permits declarations in language modes where declarations
+/// are not statements
@@ -239,7 +239,10 @@ StmtResult
Parser::ParseStatementOrDeclarationAfterAttributes(
auto IsStmtAttr = [](ParsedAttr &Attr) { return Attr.isStmtAttr(); };
bool AllAttrsAreStmtAttrs = llvm::all_of(CXX11Attrs, IsStmtAttr) &&
llvm::all_of(GN
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/92908
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin approved this pull request.
LGTM modulo comment
https://github.com/llvm/llvm-project/pull/92908
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AaronBallman wrote:
It gets set a few lines down for `Compound`:
`Compound = AllowDeclarationsInC | AllowStandaloneOpenMPDirectives`
https://github.com/llvm/llvm-project/pull/92908
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.
@@ -467,15 +467,18 @@ class Parser : public CodeCompletionHandler {
/// Flags describing a context in which we're parsing a statement.
enum class ParsedStmtContext {
+/// This context permits declarations in language modes where declarations
+/// are not statements
AaronBallman wrote:
I'm less certain, but CC @jdoerfert @mikerice1969 for more opinions.
The original changes actually fixed a bug in OpenMP related to standalone
directives.
> Note, this seems to have fixed an issue with some OpenMP stand-alone
directives not being properly diagnosed as per:
https://github.com/erichkeane commented:
The original patch changed some of the ParsedStmtContext's in ParseOMP that
might need to be changed back? Looking back, I think the intent there was in
part to not specify OMP standalone directives, so that part should be reverted
as well perhaps?
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Aaron Ballman (AaronBallman)
Changes
This fixes a regression introduced in 8bd06d5b65845e5e01dd899a2deb773580460b89
where Clang began to accept a declaration where a statement is required. e.g.,
```
if (1)
int x; // Previously accepted,
https://github.com/AaronBallman created
https://github.com/llvm/llvm-project/pull/92908
This fixes a regression introduced in 8bd06d5b65845e5e01dd899a2deb773580460b89
where Clang began to accept a declaration where a statement is required. e.g.,
```
if (1)
int x; // Previously accepted, now p
15 matches
Mail list logo