diff options
author | Corentin Jabot <corentinjabot@gmail.com> | 2023-05-16 13:55:40 +0200 |
---|---|---|
committer | Corentin Jabot <corentinjabot@gmail.com> | 2023-05-16 13:56:33 +0200 |
commit | d4a6e4c1eec0f2634febd15725d921d4a25d47e7 (patch) | |
tree | 862f0576ff846ca6f5ddb743a856f0a69c8d1f26 /clang/lib/Parse/ParseDecl.cpp | |
parent | 65abcf6c0ce1315fa0404f5cd0f6b093c038794e (diff) | |
download | llvm-d4a6e4c1eec0f2634febd15725d921d4a25d47e7.zip llvm-d4a6e4c1eec0f2634febd15725d921d4a25d47e7.tar.gz llvm-d4a6e4c1eec0f2634febd15725d921d4a25d47e7.tar.bz2 |
Revert "[Clang] Fix parsing of `(auto(x))`."
This reverts commit ef47318ec3615e83c328b07341046dfb9d869414.
This patch breaks valid code https://reviews.llvm.org/D149276#4345620
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 15a38e6..92fa7d8 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -6494,9 +6494,8 @@ void Parser::ParseDirectDeclarator(Declarator &D) { // that it's an initializer instead. if (D.mayOmitIdentifier() && D.mayBeFollowedByCXXDirectInit()) { RevertingTentativeParsingAction PA(*this); - if (TryParseDeclarator(true, D.mayHaveIdentifier(), true, - D.getDeclSpec().getTypeSpecType() == TST_auto) == - TPResult::False) { + if (TryParseDeclarator(true, D.mayHaveIdentifier(), true) == + TPResult::False) { D.SetIdentifier(nullptr, Tok.getLocation()); goto PastIdentifier; } |