summaryrefslogtreecommitdiffstats
path: root/clang/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
commitf0aabdadc6eb69c1dc3d9108caa67da7f4e052b1 (patch)
treead71b4d3af0904676b8264595e47e4eb0968e909 /clang/lib/Sema/MultiplexExternalSemaSource.cpp
parent98850bd39a7b194be36b51fd1c073fc47ead4859 (diff)
downloadbcm5719-llvm-f0aabdadc6eb69c1dc3d9108caa67da7f4e052b1.tar.gz
bcm5719-llvm-f0aabdadc6eb69c1dc3d9108caa67da7f4e052b1.zip
Add hooks for typo correction to ExternalSemaSource, courtesy of Luke Zarko.
llvm-svn: 188196
Diffstat (limited to 'clang/lib/Sema/MultiplexExternalSemaSource.cpp')
-rw-r--r--clang/lib/Sema/MultiplexExternalSemaSource.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/lib/Sema/MultiplexExternalSemaSource.cpp b/clang/lib/Sema/MultiplexExternalSemaSource.cpp
index de790e9a2d1..43bafd3482b 100644
--- a/clang/lib/Sema/MultiplexExternalSemaSource.cpp
+++ b/clang/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();
+}
OpenPOWER on IntegriCloud