summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/FormatString.cpp
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-09-30 00:38:45 +0000
committerJustin Lebar <jlebar@google.com>2016-09-30 00:38:45 +0000
commit9091055efa871d15cc53cd8ad91689ea8cb90ddb (patch)
treedfb1d97a777083db456f1373c93825cb7581c960 /clang/lib/Analysis/FormatString.cpp
parent951c6b1955326eab68dfb77b874edb3d5f3bbbf0 (diff)
downloadbcm5719-llvm-9091055efa871d15cc53cd8ad91689ea8cb90ddb.tar.gz
bcm5719-llvm-9091055efa871d15cc53cd8ad91689ea8cb90ddb.zip
Move UTF functions into namespace llvm.
Summary: This lets people link against LLVM and their own version of the UTF library. I determined this only affects llvm, clang, lld, and lldb by running $ git grep -wl 'UTF[0-9]\+\|\bConvertUTF\bisLegalUTF\|getNumBytesFor' | cut -f 1 -d '/' | sort | uniq clang lld lldb llvm Tested with ninja lldb ninja check-clang check-llvm check-lld (ninja check-lldb doesn't complete for me with or without this patch.) Reviewers: rnk Subscribers: klimek, beanz, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D24996 llvm-svn: 282822
Diffstat (limited to 'clang/lib/Analysis/FormatString.cpp')
-rw-r--r--clang/lib/Analysis/FormatString.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Analysis/FormatString.cpp b/clang/lib/Analysis/FormatString.cpp
index 0872e788c60..2a518cac394 100644
--- a/clang/lib/Analysis/FormatString.cpp
+++ b/clang/lib/Analysis/FormatString.cpp
@@ -266,14 +266,15 @@ bool clang::analyze_format_string::ParseUTF8InvalidSpecifier(
if (SpecifierBegin + 1 >= FmtStrEnd)
return false;
- const UTF8 *SB = reinterpret_cast<const UTF8 *>(SpecifierBegin + 1);
- const UTF8 *SE = reinterpret_cast<const UTF8 *>(FmtStrEnd);
+ const llvm::UTF8 *SB =
+ reinterpret_cast<const llvm::UTF8 *>(SpecifierBegin + 1);
+ const llvm::UTF8 *SE = reinterpret_cast<const llvm::UTF8 *>(FmtStrEnd);
const char FirstByte = *SB;
// If the invalid specifier is a multibyte UTF-8 string, return the
// total length accordingly so that the conversion specifier can be
// properly updated to reflect a complete UTF-8 specifier.
- unsigned NumBytes = getNumBytesForUTF8(FirstByte);
+ unsigned NumBytes = llvm::getNumBytesForUTF8(FirstByte);
if (NumBytes == 1)
return false;
if (SB + NumBytes > SE)
OpenPOWER on IntegriCloud