aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-22 21:42:17 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-22 21:42:17 +0000
commitb3d4525c65cf456d3f1f4338afdcac83afc7be02 (patch)
treeaaf39d37bc7f2f031a07383d748424dfe2c2db61 /lib/Sema/SemaCodeComplete.cpp
parented5d651b0d4b99d0b68bb8d4633e49b98c95bd8f (diff)
Teach code-completion to introduce a ", ..." placeholder for variadic functions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82577 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--lib/Sema/SemaCodeComplete.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index cfec7b2374..b19fda216d 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/lib/Sema/SemaCodeComplete.cpp
@@ -657,6 +657,11 @@ static void AddFunctionParameterChunks(ASTContext &Context,
// Add the placeholder string.
CCStr->AddPlaceholderChunk(PlaceholderStr.c_str());
}
+
+ if (const FunctionProtoType *Proto
+ = Function->getType()->getAs<FunctionProtoType>())
+ if (Proto->isVariadic())
+ CCStr->AddPlaceholderChunk(", ...");
}
/// \brief Add template parameter chunks to the given code completion string.