]> granicus.if.org Git - clang/commit
[analyzer] Use lazily created buffer in EmptyLocalizationContextChecker
authorDevin Coughlin <dcoughlin@apple.com>
Tue, 30 Aug 2016 23:07:14 +0000 (23:07 +0000)
committerDevin Coughlin <dcoughlin@apple.com>
Tue, 30 Aug 2016 23:07:14 +0000 (23:07 +0000)
commitcf632c9ffd8c80344aac9876748db66ddd9b516d
treeb3c004f864c112f17b31e7e60d0f2147dffa1102
parentca4cf144597b8c5d89bb919de84686f1a06071de
[analyzer] Use lazily created buffer in EmptyLocalizationContextChecker

Fix a crash when relexing the underlying memory buffer to find incorrect
arguments to NSLocalizedString(). With precompiled headers, the raw
buffer may be NULL. Instead, use the source manager to get the buffer,
which will lazily create the buffer for precompiled headers.

rdar://problem/27429091

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280174 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
test/Analysis/Inputs/localization-pch.h [new file with mode: 0644]
test/Analysis/localization-aggressive.m