aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-10-15 17:52:03 +0000
committerDan Gohman <gohman@apple.com>2010-10-15 17:52:03 +0000
commit8562348b3d0de524342c1e36ff3cd83f7490bba2 (patch)
tree0b1c55bba8e8cfd7ae7acca7bddca5ea9311ba7b
parent83889a7f1f338e343ef72aeeef9c27f7b62c0f0f (diff)
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
-rw-r--r--lib/CodeGen/CodeGenTBAA.cpp6
1 files changed, 5 insertions, 1 deletions
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<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: