diff options
author | Kaelyn Uhrain <rikka@google.com> | 2013-08-12 19:54:38 +0000 |
---|---|---|
committer | Kaelyn Uhrain <rikka@google.com> | 2013-08-12 19:54:38 +0000 |
commit | f0aabdadc6eb69c1dc3d9108caa67da7f4e052b1 (patch) | |
tree | ad71b4d3af0904676b8264595e47e4eb0968e909 /clang/lib/Sema/MultiplexExternalSemaSource.cpp | |
parent | 98850bd39a7b194be36b51fd1c073fc47ead4859 (diff) | |
download | bcm5719-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.cpp | 16 |
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(); +} |