aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--lib/Sema/SemaCodeComplete.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index 2394629be5..76452a4516 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/lib/Sema/SemaCodeComplete.cpp
@@ -1918,10 +1918,7 @@ static std::string FormatFunctionParameter(ASTContext &Context,
// then we're done.
if (BlockPointerTypeLoc *BlockPtr
= dyn_cast<BlockPointerTypeLoc>(&TL)) {
- TL = BlockPtr->getPointeeLoc();
- // Skip any paren typeloc.
- while (ParenTypeLoc *ParenPtr = dyn_cast<ParenTypeLoc>(&TL))
- TL = ParenPtr->getInnerLoc();
+ TL = BlockPtr->getPointeeLoc().IgnoreParens();
Block = dyn_cast<FunctionProtoTypeLoc>(&TL);
}
break;