bool isRestrictQualified() const {
return (ThePtr & Restrict) ? true : false;
}
+
+ bool isConstant(ASTContext& Ctx) const;
/// addConst/addVolatile/addRestrict - add the specified type qual to this
/// QualType.
//
//===----------------------------------------------------------------------===//
+#include "clang/AST/ASTContext.h"
#include "clang/AST/Type.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include <sstream>
using namespace clang;
+bool QualType::isConstant(ASTContext& Ctx) const {
+ if (isConstQualified())
+ return true;
+
+ if (getTypePtr()->isArrayType())
+ return Ctx.getAsArrayType(*this)->getElementType().isConstant(Ctx);
+
+ return false;
+}
+
void Type::Destroy(ASTContext& C) { delete this; }
void FunctionTypeProto::Destroy(ASTContext& C) {