aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-10-05 00:06:24 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-10-05 00:06:24 +0000
commit5404a156be26de1c63ca9916187f970848bb4dbb (patch)
treee972deed236a34ebe1e526b4a5430a96a60a1101 /lib/Parse/ParseStmt.cpp
parentd3f779019c1c944e940567ff0f6585eff5534337 (diff)
Resolve ambiguous C++ statements (C++ 6.8p1).
'ParseTentative.cpp' implements the functionality needed to resolve ambiguous C++ statements, to either a declaration or an expression, by "tentatively parsing" them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57084 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseStmt.cpp')
-rw-r--r--lib/Parse/ParseStmt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp
index 4082c6c1b4..1f6eae1fc0 100644
--- a/lib/Parse/ParseStmt.cpp
+++ b/lib/Parse/ParseStmt.cpp
@@ -94,7 +94,7 @@ Parser::StmtResult Parser::ParseStatementOrDeclaration(bool OnlyStatement) {
// PASS THROUGH.
default:
- if ((getLang().CPlusPlus || !OnlyStatement) && isDeclarationSpecifier()) {
+ if ((getLang().CPlusPlus || !OnlyStatement) && isDeclarationStatement()) {
SourceLocation DeclStart = Tok.getLocation();
DeclTy *Res = ParseDeclaration(Declarator::BlockContext);
// FIXME: Pass in the right location for the end of the declstmt.
@@ -368,7 +368,7 @@ Parser::StmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr) {
Diags.setWarnOnExtensions(false);
// If this is the start of a declaration, parse it as such.
- if (isDeclarationSpecifier()) {
+ if (isDeclarationStatement()) {
// FIXME: Save the __extension__ on the decl as a node somehow.
SourceLocation DeclStart = Tok.getLocation();
DeclTy *Res = ParseDeclaration(Declarator::BlockContext);