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 | ba4490399b6716cc57297506bdaf3c440d000d0d (patch) | |
tree | 37f43dd6b571d63cf03cdc83d9f15caeef4b9b07 /clang/lib/Sema/SemaCodeComplete.cpp | |
parent | 9bfc2e50a78642e0db04c01584d77f75d8e5f425 (diff) | |
download | bcm5719-llvm-ba4490399b6716cc57297506bdaf3c440d000d0d.tar.gz bcm5719-llvm-ba4490399b6716cc57297506bdaf3c440d000d0d.zip |
Teach code-completion to introduce a ", ..." placeholder for variadic functions
llvm-svn: 82577
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCodeComplete.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index cfec7b23749..b19fda216d5 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/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. |