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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58756 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index c0abc9e..80ecf33 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -1231,7 +1231,8 @@
literalExpr->getSourceRange().getEnd()));
}
- if (CheckInitializerTypes(literalExpr, literalType))
+ if (CheckInitializerTypes(literalExpr, literalType, LParenLoc,
+ "temporary"))
return true;
bool isFileScope = !getCurFunctionDecl() && !getCurMethodDecl();