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 | 3e0c2a51a0e7acafc37b86ce9838c6e1400054d5 (patch) | |
tree | a65ae471e6f4d4f099d377fb6c1c4a964b0e0396 /lib/Parse/ParseDecl.cpp | |
parent | 7985bcbf1b95421a000b3bd70298dfe7532a59db (diff) | |
download | clang-3e0c2a51a0e7acafc37b86ce9838c6e1400054d5.tar.gz |
[C++] Interpret unknown identifier in parameter clause as unknown type
instead of as parameter name without a type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index f63fd56a89..f883ecc45f 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/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; |