aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Sema/TypoCorrection.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-08-17 00:46:16 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-08-17 00:46:16 +0000
commit2d67097ad41f4c2fe82ebce3f587e06498f1bd71 (patch)
treedd6cae767852e74d46c2fd18b46e5630c73c96f8 /include/clang/Sema/TypoCorrection.h
parent2845a6746f6320994675a9a413ecbe5252d4dc02 (diff)
Refactor all diagnosing of TypoCorrections through a common function, in
preparation for teaching this function how to diagnose a correction that includes importing a module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188602 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/TypoCorrection.h')
-rw-r--r--include/clang/Sema/TypoCorrection.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/Sema/TypoCorrection.h b/include/clang/Sema/TypoCorrection.h
index 7a4a43ef2b..b4065be743 100644
--- a/include/clang/Sema/TypoCorrection.h
+++ b/include/clang/Sema/TypoCorrection.h
@@ -183,9 +183,9 @@ public:
return CorrectionDecls.size() > 1;
}
- void setCorrectionRange(CXXScopeSpec* SS,
+ void setCorrectionRange(CXXScopeSpec *SS,
const DeclarationNameInfo &TypoName) {
- CorrectionRange.setBegin(ForceSpecifierReplacement && SS
+ CorrectionRange.setBegin(ForceSpecifierReplacement && SS && !SS->isEmpty()
? SS->getBeginLoc()
: TypoName.getLoc());
CorrectionRange.setEnd(TypoName.getLoc());