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.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index 0e30a2b0ba..2394629be5 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/lib/Sema/SemaCodeComplete.cpp
@@ -1919,6 +1919,9 @@ static std::string FormatFunctionParameter(ASTContext &Context,
if (BlockPointerTypeLoc *BlockPtr
= dyn_cast<BlockPointerTypeLoc>(&TL)) {
TL = BlockPtr->getPointeeLoc();
+ // Skip any paren typeloc.
+ while (ParenTypeLoc *ParenPtr = dyn_cast<ParenTypeLoc>(&TL))
+ TL = ParenPtr->getInnerLoc();
Block = dyn_cast<FunctionProtoTypeLoc>(&TL);
}
break;