summaryrefslogtreecommitdiffstats
path: root/lib/Sema/MultiplexExternalSemaSource.cpp
diff options
context:
space:
mode:
authorKaelyn Uhrain <rikka@google.com>2013-08-12 19:54:38 +0000
committerKaelyn Uhrain <rikka@google.com>2013-08-12 19:54:38 +0000
commit70571f43ab9ae399cd005eaee02f4ca1ecbc3a81 (patch)
tree10e8007f3791207dd1f87d46387787dd1044aa9c /lib/Sema/MultiplexExternalSemaSource.cpp
parentf86c13921f6e2f586f4613ab3cb4a84c8693541f (diff)
Add hooks for typo correction to ExternalSemaSource, courtesy of Luke Zarko.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188196 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/MultiplexExternalSemaSource.cpp')
-rw-r--r--lib/Sema/MultiplexExternalSemaSource.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Sema/MultiplexExternalSemaSource.cpp b/lib/Sema/MultiplexExternalSemaSource.cpp
index de790e9a2d..43bafd3482 100644
--- a/lib/Sema/MultiplexExternalSemaSource.cpp
+++ b/lib/Sema/MultiplexExternalSemaSource.cpp
@@ -273,3 +273,19 @@ void MultiplexExternalSemaSource::ReadLateParsedTemplates(
for (size_t i = 0; i < Sources.size(); ++i)
Sources[i]->ReadLateParsedTemplates(LPTMap);
}
+
+TypoCorrection MultiplexExternalSemaSource::CorrectTypo(
+ const DeclarationNameInfo &Typo,
+ int LookupKind, Scope *S, CXXScopeSpec *SS,
+ CorrectionCandidateCallback &CCC,
+ DeclContext *MemberContext,
+ bool EnteringContext,
+ const ObjCObjectPointerType *OPT) {
+ for (size_t I = 0, E = Sources.size(); I < E; ++I) {
+ if (TypoCorrection C = Sources[I]->CorrectTypo(Typo, LookupKind, S, SS, CCC,
+ MemberContext,
+ EnteringContext, OPT))
+ return C;
+ }
+ return TypoCorrection();
+}