diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-27 17:35:51 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-27 17:35:51 +0000 |
commit | 1a480c403a3b141ab89c9c59cf7b681102a1bfab (patch) | |
tree | 979051a5a55b5d86e3ea48138a4a3fd2169b175d /lib/Parse/ParseDecl.cpp | |
parent | 06b6c589a5fff8e5476fe2b4cd6a660af71bfddd (diff) |
Suggest "const" and "volatile" code completions after a function
declarator, the very definition of "low-hanging fruit".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 0cc9103c05..c73b6085ea 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -2442,6 +2442,11 @@ void Parser::ParseTypeQualifierListOpt(DeclSpec &DS, bool GNUAttributesAllowed, SourceLocation Loc = Tok.getLocation(); switch (Tok.getKind()) { + case tok::code_completion: + Actions.CodeCompleteTypeQualifiers(DS); + ConsumeCodeCompletionToken(); + break; + case tok::kw_const: isInvalid = DS.SetTypeQual(DeclSpec::TQ_const , Loc, PrevSpec, DiagID, getLang()); |