Use the real end of the decltype expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146138 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index f2bdb9f..58e16bf 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -782,8 +782,7 @@
// Fake up a Declarator to use with ActOnTypeName.
DeclSpec DS(AttrFactory);
- ParseDecltypeSpecifier(DS);
- EndLocation = DS.getSourceRange().getEnd();
+ EndLocation = ParseDecltypeSpecifier(DS);
Declarator DeclaratorInfo(DS, Declarator::TypeNameContext);
return Actions.ActOnTypeName(getCurScope(), DeclaratorInfo);