From 6f5431543a701c54293a977c28844e9862f8f491 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 5 Nov 2008 15:29:30 +0000 Subject: Implement C++ copy-initialization for declarations. There is now some duplication in the handling of copy-initialization by constructor, which occurs both for initialization of a declaration and for overloading. The initialization code is due for some refactoring. llvm-svn: 58756 --- clang/lib/Sema/SemaExpr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaExpr.cpp') diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index c0abc9e51ae..80ecf3312a9 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1231,7 +1231,8 @@ ActOnCompoundLiteral(SourceLocation LParenLoc, TypeTy *Ty, literalExpr->getSourceRange().getEnd())); } - if (CheckInitializerTypes(literalExpr, literalType)) + if (CheckInitializerTypes(literalExpr, literalType, LParenLoc, + "temporary")) return true; bool isFileScope = !getCurFunctionDecl() && !getCurMethodDecl(); -- cgit v1.2.3