diff options
author | Nicolas Lesser <blitzrakete@gmail.com> | 2019-05-05 12:15:17 +0000 |
---|---|---|
committer | Nicolas Lesser <blitzrakete@gmail.com> | 2019-05-05 12:15:17 +0000 |
commit | ee0571734f58c05d2138f7c61d0bbdb928193c58 (patch) | |
tree | c5096a2b9aad7c8ffe4273d276a9758183358b38 /clang/lib/Parse/ParseDecl.cpp | |
parent | 60211cb8728352fcadbe56b7ab8dea6f07335c16 (diff) | |
download | bcm5719-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.cpp | 3 |
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; |