diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-22 21:42:17 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-22 21:42:17 +0000 |
commit | b3d4525c65cf456d3f1f4338afdcac83afc7be02 (patch) | |
tree | aaf39d37bc7f2f031a07383d748424dfe2c2db61 /lib/Sema/SemaCodeComplete.cpp | |
parent | ed5d651b0d4b99d0b68bb8d4633e49b98c95bd8f (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.cpp | 5 |
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. |