diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-27 05:40:30 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-27 05:40:30 +0000 |
commit | fb65e592e05a83eaa3e9cbd645bace6c68438500 (patch) | |
tree | 612eead4ecf3e89b777c0e6b8456282be228d535 /clang/lib/Sema/SemaChecking.cpp | |
parent | fdafb7f7e6827b95c04b465a6b28ad819c0d0909 (diff) | |
download | bcm5719-llvm-fb65e592e05a83eaa3e9cbd645bace6c68438500.tar.gz bcm5719-llvm-fb65e592e05a83eaa3e9cbd645bace6c68438500.zip |
Add support for C++0x unicode string and character literals, from Craig Topper!
llvm-svn: 136210
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 2e4198b5202..28085ef6eab 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -605,7 +605,7 @@ bool Sema::CheckObjCString(Expr *Arg) { Arg = Arg->IgnoreParenCasts(); StringLiteral *Literal = dyn_cast<StringLiteral>(Arg); - if (!Literal || Literal->isWide()) { + if (!Literal || !Literal->isAscii()) { Diag(Arg->getLocStart(), diag::err_cfstring_literal_not_string_constant) << Arg->getSourceRange(); return true; @@ -1805,7 +1805,7 @@ void Sema::CheckFormatString(const StringLiteral *FExpr, bool isPrintf) { // CHECK: is the format string a wide literal? - if (FExpr->isWide()) { + if (!FExpr->isAscii()) { Diag(FExpr->getLocStart(), diag::warn_format_string_is_wide_literal) << OrigFormatExpr->getSourceRange(); |