From: Dan Gohman Date: Fri, 15 Oct 2010 17:52:03 +0000 (+0000) Subject: Add a comment about odd "signed char" incompatibility between C++ and C. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8562348b3d0de524342c1e36ff3cd83f7490bba2;p=clang Add a comment about odd "signed char" incompatibility between C++ and C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116593 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenTBAA.cpp b/lib/CodeGen/CodeGenTBAA.cpp index ed2b13f11c..f9082fc917 100644 --- a/lib/CodeGen/CodeGenTBAA.cpp +++ b/lib/CodeGen/CodeGenTBAA.cpp @@ -51,7 +51,11 @@ CodeGenTBAA::getTBAAInfo(QualType QTy) { // For now, just emit a very minimal tree. if (const BuiltinType *BTy = dyn_cast(Ty)) { switch (BTy->getKind()) { - // Charactar types are special and can alias anything. + // Character types are special and can alias anything. + // In C++, this technically only includes "char" and "unsigned char", + // and not "signed char". In C, it includes all three. For now, + // the risk of exploting this detail in C++ seems likely to outweigh + // the benefit. case BuiltinType::Char_U: case BuiltinType::Char_S: case BuiltinType::UChar: