aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorHaojian Wu <hokein.wu@gmail.com>2022-01-14 11:28:04 +0100
committerHaojian Wu <hokein.wu@gmail.com>2022-01-17 11:33:11 +0100
commitab3f100bec03d72ecee947a323c51698d4b95207 (patch)
treebbc9ccf0faeaea37571285861f79d048740465bd /clang/lib/Parse/ParseDecl.cpp
parent2325f363010d3176e96579628cbb96b8fca003a1 (diff)
downloadllvm-ab3f100bec03d72ecee947a323c51698d4b95207.zip
llvm-ab3f100bec03d72ecee947a323c51698d4b95207.tar.gz
llvm-ab3f100bec03d72ecee947a323c51698d4b95207.tar.bz2
Reland (2) "[AST] Add RParen loc for decltype AutoTypeloc.""
The patch was reverted because it caused a crash during PCH build -- we missed to update the RParenLoc in TreeTransform<Derived>::TransformAutoType. This relands 55d96ac and 37ec65e with a test and fix.
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index e1074f7..cff8c76 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -3576,6 +3576,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
}
}
ConsumedEnd = Tok.getLocation();
+ DS.setTypeofParensRange(Tracker.getRange());
// Even if something went wrong above, continue as if we've seen
// `decltype(auto)`.
isInvalid = DS.SetTypeSpecType(TST_decltype_auto, Loc, PrevSpec,