Fix infinite recursion in decltype type
This commit is contained in:
parent
1b57248fc8
commit
d125869df5
1 changed files with 3 additions and 4 deletions
|
|
@ -435,7 +435,7 @@ namespace
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<cpp_type> try_parse_decltype_type(const detail::parse_context& context,
|
std::unique_ptr<cpp_type> try_parse_decltype_type(const detail::parse_context&,
|
||||||
const CXCursor& cur, const CXType& type)
|
const CXCursor& cur, const CXType& type)
|
||||||
{
|
{
|
||||||
if (clang_isExpression(clang_getCursorKind(cur)))
|
if (clang_isExpression(clang_getCursorKind(cur)))
|
||||||
|
|
@ -447,10 +447,9 @@ namespace
|
||||||
DEBUG_ASSERT(!spelling.empty() && spelling.back() == ')', detail::parse_error_handler{},
|
DEBUG_ASSERT(!spelling.empty() && spelling.back() == ')', detail::parse_error_handler{},
|
||||||
type, "unexpected spelling");
|
type, "unexpected spelling");
|
||||||
spelling.pop_back();
|
spelling.pop_back();
|
||||||
|
|
||||||
return cpp_decltype_type::build(
|
return cpp_decltype_type::build(
|
||||||
cpp_unexposed_expression::build(detail::parse_type(context, cur,
|
cpp_unexposed_expression::build(cpp_unexposed_type::build("<decltype>"), spelling));
|
||||||
clang_getCanonicalType(type)),
|
|
||||||
spelling));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue