Skip to content

Commit 9b3d261

Browse files
committed
Rmove unnecessary 'bad_type'; add FIXME comment.
1 parent 3e53e25 commit 9b3d261

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lldb/source/ValueObject/DILParser.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,6 @@ std::string DILParser::ParseUnqualifiedId() {
467467
CompilerType
468468
DILParser::ResolveTypeDeclarators(CompilerType type,
469469
const std::vector<Token> &ptr_operators) {
470-
CompilerType bad_type;
471470
// Resolve pointers/references.
472471
for (Token tk : ptr_operators) {
473472
uint32_t loc = tk.GetLocation();
@@ -478,17 +477,18 @@ DILParser::ResolveTypeDeclarators(CompilerType type,
478477
"reference of type {0}",
479478
type.TypeDescription()),
480479
loc, CurToken().GetSpelling().length());
481-
return bad_type;
480+
return {};
482481
}
483482
// Get pointer type for the base type: e.g. int* -> int**.
484483
type = type.GetPointerType();
485484

486485
} else if (tk.GetKind() == Token::amp) {
487486
// References to references are forbidden.
487+
// FIXME: In future we may want to allow rvalue references (i.e. &&).
488488
if (type.IsReferenceType()) {
489489
BailOut("type name declared as a reference to a reference", loc,
490490
CurToken().GetSpelling().length());
491-
return bad_type;
491+
return {};
492492
}
493493
// Get reference type for the base type: e.g. int -> int&.
494494
type = type.GetLValueReferenceType();

0 commit comments

Comments
 (0)