aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-08-27 03:53:50 +0000
committerAnders Carlsson <andersca@mac.com>2009-08-27 03:53:50 +0000
commitbb60a509f47a95a4ed9366ec1fc65850da654d38 (patch)
tree7f9060335eca2236c191bed25eecdfcbbaecc4ee /include/clang
parent0fb0bc4067d6c9d7c0e655300ef309b05d3adfc9 (diff)
In ActOnCXXTypeConstructExpr, check that the type is complete and non-abstract before creating any expressions. This assures that any templates are instantiated if necessary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/AST/DeclCXX.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h
index d09d054c08..abcb9634ba 100644
--- a/include/clang/AST/DeclCXX.h
+++ b/include/clang/AST/DeclCXX.h
@@ -513,7 +513,10 @@ public:
/// hasUserDeclaredConstructor - Whether this class has any
/// user-declared constructors. When true, a default constructor
/// will not be implicitly declared.
- bool hasUserDeclaredConstructor() const { return UserDeclaredConstructor; }
+ bool hasUserDeclaredConstructor() const {
+ assert(isDefinition() && "Incomplete record decl!");
+ return UserDeclaredConstructor;
+ }
/// hasUserDeclaredCopyConstructor - Whether this class has a
/// user-declared copy constructor. When false, a copy constructor