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/AST/Expr.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/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 9d7a93a429..d3f6a521f1 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -679,7 +679,8 @@ void StringLiteral::setString(ASTContext &C, StringRef Str, SourceLocation StringLiteral:: getLocationOfByte(unsigned ByteNo, const SourceManager &SM, const LangOptions &Features, const TargetInfo &Target) const { - assert(Kind == StringLiteral::Ascii && "This only works for ASCII strings"); + assert((Kind == StringLiteral::Ascii || Kind == StringLiteral::UTF8) && + "Only narrow string literals are currently supported"); // Loop over all of the tokens in this string until we find the one that // contains the byte we're looking for. |