]> granicus.if.org Git - clang/commitdiff
Add a comment about odd "signed char" incompatibility between C++ and C.
authorDan Gohman <gohman@apple.com>
Fri, 15 Oct 2010 17:52:03 +0000 (17:52 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 15 Oct 2010 17:52:03 +0000 (17:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116593 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenTBAA.cpp

index ed2b13f11ccaedd46a145d9c78869479b426de37..f9082fc9170fb034f49e6fc24d6214595eef522b 100644 (file)
@@ -51,7 +51,11 @@ CodeGenTBAA::getTBAAInfo(QualType QTy) {
   // For now, just emit a very minimal tree.
   if (const BuiltinType *BTy = dyn_cast<BuiltinType>(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: