aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-02-15 20:33:25 +0000
committerDouglas Gregor <dgregor@apple.com>2011-02-15 20:33:25 +0000
commit68e3c2eef52701a178fbcc2bb424f31dd4b36931 (patch)
treeaf42c3543fc822a045812910cbe5c40ab69447ec /lib/Sema/SemaCodeComplete.cpp
parentdb27d82dee4b66d1d3571bb3a308484ba4bb8294 (diff)
When code-completing within a list of declaration specifiers,
separately handle the case of a local declaration-specifier list, including all types in the set of options. Fixes <rdar://problem/8790735> and <rdar://problem/8662831>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125594 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--lib/Sema/SemaCodeComplete.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index cf088007c8..e7a9a8d838 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/lib/Sema/SemaCodeComplete.cpp
@@ -1286,6 +1286,7 @@ static void AddFunctionSpecifiers(Sema::ParserCompletionContext CCC,
case Sema::PCC_RecoveryInFunction:
case Sema::PCC_Type:
case Sema::PCC_ParenthesizedExpression:
+ case Sema::PCC_LocalDeclarationSpecifiers:
break;
}
}
@@ -1325,6 +1326,7 @@ static bool WantTypesInContext(Sema::ParserCompletionContext CCC,
case Sema::PCC_RecoveryInFunction:
case Sema::PCC_Type:
case Sema::PCC_ParenthesizedExpression:
+ case Sema::PCC_LocalDeclarationSpecifiers:
return true;
case Sema::PCC_Expression:
@@ -1768,6 +1770,7 @@ static void AddOrdinaryNameResults(Sema::ParserCompletionContext CCC,
}
case Sema::PCC_Type:
+ case Sema::PCC_LocalDeclarationSpecifiers:
break;
}
@@ -2719,6 +2722,9 @@ static enum CodeCompletionContext::Kind mapCodeCompletionContext(Sema &S,
case Sema::PCC_ParenthesizedExpression:
return CodeCompletionContext::CCC_ParenthesizedExpression;
+
+ case Sema::PCC_LocalDeclarationSpecifiers:
+ return CodeCompletionContext::CCC_Type;
}
return CodeCompletionContext::CCC_Other;
@@ -2818,6 +2824,7 @@ void Sema::CodeCompleteOrdinaryName(Scope *S,
case PCC_Template:
case PCC_MemberTemplate:
case PCC_Type:
+ case PCC_LocalDeclarationSpecifiers:
Results.setFilter(&ResultBuilder::IsOrdinaryNonValueName);
break;
@@ -2873,6 +2880,7 @@ void Sema::CodeCompleteOrdinaryName(Scope *S,
case PCC_ForInit:
case PCC_Condition:
case PCC_Type:
+ case PCC_LocalDeclarationSpecifiers:
break;
}