summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/DeclCXX.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index a5d133c643f..34d746433e1 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -375,6 +375,13 @@ void StaticAssertDecl::Destroy(ASTContext& C) {
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:
OpenPOWER on IntegriCloud