[cfe-commits] r39837 - /cfe/trunk/AST/ASTContext.cpp

Chris Lattner sabre at nondot.org
Fri Jul 13 15:16:14 PDT 2007


Author: lattner
Date: Fri Jul 13 17:16:13 2007
New Revision: 39837

URL: http://llvm.org/viewvc/llvm-project?rev=39837&view=rev
Log:
Add missing citation.

Modified:
    cfe/trunk/AST/ASTContext.cpp

Modified: cfe/trunk/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/ASTContext.cpp?rev=39837&r1=39836&r2=39837&view=diff

==============================================================================
--- cfe/trunk/AST/ASTContext.cpp (original)
+++ cfe/trunk/AST/ASTContext.cpp Fri Jul 13 17:16:13 2007
@@ -171,7 +171,8 @@
     // FIXME: need to use TargetInfo again
     return sizeof(void *) * 8;
   case Type::Reference:
-    // seems that sizeof(T&) == sizeof(T) -- spec reference?
+    // "When applied to a reference or a reference type, the result is the size
+    // of the referenced type." C++98 5.3.3p2: expr.sizeof
     return getTypeSize(cast<ReferenceType>(T)->getReferenceeType());
   case Type::Complex:
   case Type::Array:





More information about the cfe-commits mailing list