]> granicus.if.org Git - clang/commitdiff
John called for a less surprising cast
authorGabor Greif <ggreif@gmail.com>
Fri, 18 Jun 2010 10:11:35 +0000 (10:11 +0000)
committerGabor Greif <ggreif@gmail.com>
Fri, 18 Jun 2010 10:11:35 +0000 (10:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106277 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/TypeLoc.h

index 08b2829f1464a261822da19c121daf28859ccd14..ef2b0542e7ba5ae3d170d7973a2a5e92ffbd0d94 100644 (file)
@@ -142,7 +142,7 @@ private:
 
 /// \brief Return the TypeLoc for a type source info.
 inline TypeLoc TypeSourceInfo::getTypeLoc() const {
-  return TypeLoc(Ty, const_cast<TypeSourceInfo*>(this + 1));
+  return TypeLoc(Ty, const_cast<void*>(static_cast<const void*>(this + 1)));
 }
 
 /// \brief Wrapper of type source information for a type with