]> granicus.if.org Git - clang/commitdiff
Move/update recent FIXME (wrt UTF-8 checking for ObjC @-strings).
authorSteve Naroff <snaroff@apple.com>
Mon, 13 Apr 2009 20:26:29 +0000 (20:26 +0000)
committerSteve Naroff <snaroff@apple.com>
Mon, 13 Apr 2009 20:26:29 +0000 (20:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68982 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp
lib/Sema/SemaChecking.cpp

index 797c0cef0005858b5939cf5808ce94e8bf8927d9..79bf4de4f7a2ec5e9330f04df9e44dcdea35184a 100644 (file)
@@ -1070,10 +1070,7 @@ GetAddrOfConstantCFString(const StringLiteral *Literal) {
       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
index 1802b6e942541b584d1dd3438da23f9e4f03707a..d2aec65cef20da8efc070a118d44a99eb836601c 100644 (file)
@@ -159,6 +159,11 @@ Sema::CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall) {
 
 /// 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);