summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorNicolas Lesser <blitzrakete@gmail.com>2019-05-05 12:15:17 +0000
committerNicolas Lesser <blitzrakete@gmail.com>2019-05-05 12:15:17 +0000
commitee0571734f58c05d2138f7c61d0bbdb928193c58 (patch)
treec5096a2b9aad7c8ffe4273d276a9758183358b38 /clang/lib/Parse/ParseDecl.cpp
parent60211cb8728352fcadbe56b7ab8dea6f07335c16 (diff)
downloadbcm5719-llvm-ee0571734f58c05d2138f7c61d0bbdb928193c58.tar.gz
bcm5719-llvm-ee0571734f58c05d2138f7c61d0bbdb928193c58.zip
[C++] Interpret unknown identifier in parameter clause as unknown type
instead of as parameter name without a type. llvm-svn: 359979
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index f63fd56a898..f883ecc45f1 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -2649,6 +2649,9 @@ bool Parser::ParseImplicitInt(DeclSpec &DS, CXXScopeSpec *SS,
case tok::semi:
// This looks like a variable or function declaration. The type is
// probably missing. We're done parsing decl-specifiers.
+ // But only if we are not in a function prototype scope.
+ if (getCurScope()->isFunctionPrototypeScope())
+ break;
if (SS)
AnnotateScopeToken(*SS, /*IsNewAnnotation*/false);
return false;
OpenPOWER on IntegriCloud