diff options
| author | 2019-01-27 16:42:12 +0000 | |
|---|---|---|
| committer | 2019-01-27 16:42:12 +0000 | |
| commit | b773203fb58f3ef282fb69c832d8710cab5bc82d (patch) | |
| tree | e75913f147570fbd75169647b144df85b88a038c /gnu/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp | |
| parent | tweak errno in previous (diff) | |
| download | wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.tar.xz wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.zip | |
Import LLVM 7.0.1 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gnu/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp b/gnu/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp index 655ce33390c..849b1193c04 100644 --- a/gnu/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp +++ b/gnu/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp @@ -113,8 +113,7 @@ NonLocalizedStringChecker::NonLocalizedStringChecker() { } namespace { -class NonLocalizedStringBRVisitor final - : public BugReporterVisitorImpl<NonLocalizedStringBRVisitor> { +class NonLocalizedStringBRVisitor final : public BugReporterVisitor { const MemRegion *NonLocalizedString; bool Satisfied; @@ -1017,8 +1016,7 @@ NonLocalizedStringBRVisitor::VisitNode(const ExplodedNode *Succ, if (!LiteralExpr) return nullptr; - ProgramStateRef State = Succ->getState(); - SVal LiteralSVal = State->getSVal(LiteralExpr, Succ->getLocationContext()); + SVal LiteralSVal = Succ->getSVal(LiteralExpr); if (LiteralSVal.getAsRegion() != NonLocalizedString) return nullptr; @@ -1108,7 +1106,7 @@ void EmptyLocalizationContextChecker::checkASTDecl( void EmptyLocalizationContextChecker::MethodCrawler::VisitObjCMessageExpr( const ObjCMessageExpr *ME) { - // FIXME: We may be able to use PPCallbacks to check for empy context + // FIXME: We may be able to use PPCallbacks to check for empty context // comments as part of preprocessing and avoid this re-lexing hack. const ObjCInterfaceDecl *OD = ME->getReceiverInterface(); if (!OD) @@ -1389,7 +1387,7 @@ void PluralMisuseChecker::MethodCrawler::reportPluralMisuseError( // Generate the bug report. BR.EmitBasicReport(AC->getDecl(), Checker, "Plural Misuse", "Localizability Issue (Apple)", - "Plural cases are not supported accross all languages. " + "Plural cases are not supported across all languages. " "Use a .stringsdict file instead", PathDiagnosticLocation(S, BR.getSourceManager(), AC)); } |
