[cfe-commits] r116593 - /cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp
Dan Gohman
gohman at apple.com
Fri Oct 15 10:52:03 PDT 2010
Author: djg
Date: Fri Oct 15 12:52:03 2010
New Revision: 116593
URL: http://llvm.org/viewvc/llvm-project?rev=116593&view=rev
Log:
Add a comment about odd "signed char" incompatibility between C++ and C.
Modified:
cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp?rev=116593&r1=116592&r2=116593&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp Fri Oct 15 12:52:03 2010
@@ -51,7 +51,11 @@
// 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:
More information about the cfe-commits
mailing list