[cfe-commits] r68982 - in /cfe/trunk/lib: CodeGen/CodeGenModule.cpp Sema/SemaChecking.cpp
Steve Naroff
snaroff at apple.com
Mon Apr 13 13:26:29 PDT 2009
Author: snaroff
Date: Mon Apr 13 15:26:29 2009
New Revision: 68982
URL: http://llvm.org/viewvc/llvm-project?rev=68982&view=rev
Log:
Move/update recent FIXME (wrt UTF-8 checking for ObjC @-strings).
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
cfe/trunk/lib/Sema/SemaChecking.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=68982&r1=68981&r2=68982&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon Apr 13 15:26:29 2009
@@ -1070,10 +1070,7 @@
str.assign((char *)&ToBuf[0], StringLength*2);// Twice as many UTF8 chars.
isUTF16 = true;
} else if (Result == sourceIllegal) {
- // FIXME: GCC currently emits the following warning (in the backend):
- // "warning: input conversion stopped due to an input byte that does not
- // belong to the input codeset UTF-8"
- // The clang backend doesn't currently emit any warnings.
+ // FIXME: Have Sema::CheckObjCString() validate the UTF-8 string.
str.assign(Literal->getStrData(), Literal->getByteLength());
StringLength = str.length();
} else
Modified: cfe/trunk/lib/Sema/SemaChecking.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=68982&r1=68981&r2=68982&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaChecking.cpp (original)
+++ cfe/trunk/lib/Sema/SemaChecking.cpp Mon Apr 13 15:26:29 2009
@@ -159,6 +159,11 @@
/// CheckObjCString - Checks that the argument to the builtin
/// CFString constructor is correct
+/// FIXME: GCC currently emits the following warning:
+/// "warning: input conversion stopped due to an input byte that does not
+/// belong to the input codeset UTF-8"
+/// Note: It might also make sense to do the UTF-16 conversion here (would
+/// simplify the backend).
bool Sema::CheckObjCString(Expr *Arg) {
Arg = Arg->IgnoreParenCasts();
StringLiteral *Literal = dyn_cast<StringLiteral>(Arg);
More information about the cfe-commits
mailing list