If a class has a non-trivial constructor that doesn't take any arguments, we will now make an implicit CXXTemporaryObjectExpr. So
struct S {
S();
};
void f() {
S s;
}
's' here will implicitly be declared as.
S s = S();
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69326 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index fd70851..ef20a6a 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -1418,6 +1418,13 @@
SourceLocation *CommaLocs,
SourceLocation RParenLoc);
+ /// InitializeVarWithConstructor - Creates an implicit
+ /// CXXTemporaryObjectExpr and sets it as the passed in VarDecl initializer.
+ void InitializeVarWithConstructor(VarDecl *VD,
+ CXXConstructorDecl *Constructor,
+ QualType DeclInitType,
+ Expr **Exprs, unsigned NumExprs);
+
/// InitializationKind - Represents which kind of C++ initialization
/// [dcl.init] a routine is to perform.
enum InitializationKind {