diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-06-13 05:37:23 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-06-13 05:37:23 +0000 |
commit | df9ef1bc8c3780307ab2ed81bf5e31c23310b936 (patch) | |
tree | 9e20cf7f68ca359286d114d7dad9fccebb002253 /lib/Sema/SemaChecking.cpp | |
parent | 3cc509b5ac0e99ef44c1bf8b57cd403b546abc3d (diff) |
PR13099: Teach -Wformat about raw string literals, UTF-8 strings and Unicode escape sequences.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158390 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index e818f5f3e0..06035921d9 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -2633,7 +2633,7 @@ void Sema::CheckFormatString(const StringLiteral *FExpr, bool inFunctionCall) { // CHECK: is the format string a wide literal? - if (!FExpr->isAscii()) { + if (!FExpr->isAscii() && !FExpr->isUTF8()) { CheckFormatHandler::EmitFormatDiagnostic( *this, inFunctionCall, Args[format_idx], PDiag(diag::warn_format_string_is_wide_literal), FExpr->getLocStart(), |