static bool classof(const NamespaceAliasDecl *D) { return true; }
};
+/// StaticAssertDecl - Represents a C++0x static_assert declaration.
class StaticAssertDecl : public Decl {
Expr *AssertExpr;
StringLiteral *Message;
static bool classof(StaticAssertDecl *D) { return true; }
};
+/// CXXTempVarDecl - Represents an implicit C++ temporary variable declaration.
+class CXXTempVarDecl : public VarDecl {
+protected:
+ CXXTempVarDecl(DeclContext *DC, QualType T)
+ : VarDecl(CXXTempVar, DC, SourceLocation(), 0, T, None) {}
+
+public:
+ static CXXTempVarDecl *Create(ASTContext &C, DeclContext *DC,
+ QualType T);
+};
+
/// Insertion operator for diagnostics. This allows sending AccessSpecifier's
/// into a diagnostic with <<.
const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
DECL(ParmVar, VarDecl)
DECL(OriginalParmVar, ParmVarDecl)
DECL(NonTypeTemplateParm, VarDecl)
+ DECL(CXXTempVar, VarDecl)
DECL(Template, NamedDecl)
DECL(FunctionTemplate, TemplateDecl)
DECL(ClassTemplate, TemplateDecl)
StaticAssertDecl::~StaticAssertDecl() {
}
+CXXTempVarDecl *CXXTempVarDecl::Create(ASTContext &C, DeclContext *DC,
+ QualType T) {
+ assert(isa<CXXRecordDecl>(T->getAsRecordType()->getDecl()) &&
+ "CXXTempVarDecl must have a C++ record type!");
+ return new (C) CXXTempVarDecl(DC, T);
+}
+
static const char *getAccessName(AccessSpecifier AS) {
switch (AS) {
default: