Basic support for member exprs where the base expr type is dependent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71907 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 0d38dd2..9a86003 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -417,6 +417,11 @@
 /// warning.
 bool Expr::isUnusedResultAWarning(SourceLocation &Loc, SourceRange &R1,
                                   SourceRange &R2) const {
+  // Don't warn if the expr is type dependent. The type could end up
+  // instantiating to void.
+  if (isTypeDependent())
+    return false;
+  
   switch (getStmtClass()) {
   default:
     Loc = getExprLoc();