forked from OSchip/llvm-project
Don't check initializers when there are dependent types or type-dependent expressions involved
llvm-svn: 61212
This commit is contained in:
parent
998fd29ce1
commit
b04675d112
|
@ -787,6 +787,9 @@ StringLiteral *Sema::IsStringLiteralInit(Expr *Init, QualType DeclType) {
|
|||
bool Sema::CheckInitializerTypes(Expr *&Init, QualType &DeclType,
|
||||
SourceLocation InitLoc,
|
||||
DeclarationName InitEntity) {
|
||||
if (DeclType->isDependentType() || Init->isTypeDependent())
|
||||
return false;
|
||||
|
||||
// C++ [dcl.init.ref]p1:
|
||||
// A variable declared to be a T&, that is "reference to type T"
|
||||
// (8.3.2), shall be initialized by an object, or function, of
|
||||
|
|
Loading…
Reference in New Issue