Handle possible TypoExprs in member initializers.
Includes a new test case since none of the existing tests were hitting
this code path.
llvm-svn: 223705
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 583357e..a6ff02c 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -2813,6 +2813,11 @@
SourceLocation IdLoc,
Expr *Init,
SourceLocation EllipsisLoc) {
+ ExprResult Res = CorrectDelayedTyposInExpr(Init);
+ if (!Res.isUsable())
+ return true;
+ Init = Res.get();
+
if (!ConstructorD)
return true;