summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
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
commitf5c5e0773ee722e8489dbaf5d5907414e02c1e7a (patch)
tree9f7b2c12b765a88b1e5d0728e124f300b44cac7d /clang/lib/CodeGen
parenteba55822d7087fc8da9c172ea2e8e4d836e4139d (diff)
downloadbcm5719-llvm-f5c5e0773ee722e8489dbaf5d5907414e02c1e7a.tar.gz
bcm5719-llvm-f5c5e0773ee722e8489dbaf5d5907414e02c1e7a.zip
Add a comment about odd "signed char" incompatibility between C++ and C.
llvm-svn: 116593
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CodeGenTBAA.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenTBAA.cpp b/clang/lib/CodeGen/CodeGenTBAA.cpp
index ed2b13f11cc..f9082fc9170 100644
--- a/clang/lib/CodeGen/CodeGenTBAA.cpp
+++ b/clang/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:
OpenPOWER on IntegriCloud