Fix some type punning errors in SizeOfAlignOf and Typeid AST nodes. This should satisfy compilers and language lawyers alike.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60511 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 948dbc2..e4386ec 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -1314,12 +1314,12 @@
return child_iterator(T);
return child_iterator();
}
- return child_iterator((Stmt**)&Argument);
+ return child_iterator(&Argument.Ex);
}
Stmt::child_iterator SizeOfAlignOfExpr::child_end() {
if (isArgumentType())
return child_iterator();
- return child_iterator((Stmt**)&Argument + 1);
+ return child_iterator(&Argument.Ex + 1);
}
// ArraySubscriptExpr