diff options
author | John McCall <rjmccall@apple.com> | 2010-08-23 23:25:46 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-23 23:25:46 +0000 |
commit | 9ae2f076ca5ab1feb3ba95629099ec2319833701 (patch) | |
tree | 1ca906b560daa2bee38b38a5043ddd50e31420bf /lib/Sema/SemaType.cpp | |
parent | 58ddb60f409125eda5436c4a1f070f7fa4744295 (diff) |
Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111863 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 81441dec93..05c87acb57 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -750,11 +750,8 @@ QualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, /// \brief Build an ext-vector type. /// /// Run the required checks for the extended vector type. -QualType Sema::BuildExtVectorType(QualType T, ExprArg ArraySize, +QualType Sema::BuildExtVectorType(QualType T, Expr *ArraySize, SourceLocation AttrLoc) { - - Expr *Arg = (Expr *)ArraySize.get(); - // unlike gcc's vector_size attribute, we do not allow vectors to be defined // in conjunction with complex types (pointers, arrays, functions, etc.). if (!T->isDependentType() && @@ -763,11 +760,11 @@ QualType Sema::BuildExtVectorType(QualType T, ExprArg ArraySize, return QualType(); } - if (!Arg->isTypeDependent() && !Arg->isValueDependent()) { + if (!ArraySize->isTypeDependent() && !ArraySize->isValueDependent()) { llvm::APSInt vecSize(32); - if (!Arg->isIntegerConstantExpr(vecSize, Context)) { + if (!ArraySize->isIntegerConstantExpr(vecSize, Context)) { Diag(AttrLoc, diag::err_attribute_argument_not_int) - << "ext_vector_type" << Arg->getSourceRange(); + << "ext_vector_type" << ArraySize->getSourceRange(); return QualType(); } @@ -777,7 +774,7 @@ QualType Sema::BuildExtVectorType(QualType T, ExprArg ArraySize, if (vectorSize == 0) { Diag(AttrLoc, diag::err_attribute_zero_size) - << Arg->getSourceRange(); + << ArraySize->getSourceRange(); return QualType(); } @@ -785,8 +782,7 @@ QualType Sema::BuildExtVectorType(QualType T, ExprArg ArraySize, return Context.getExtVectorType(T, vectorSize); } - return Context.getDependentSizedExtVectorType(T, ArraySize.takeAs<Expr>(), - AttrLoc); + return Context.getDependentSizedExtVectorType(T, ArraySize, AttrLoc); } /// \brief Build a function type. |