When checking the base object of a member access expression (b.foo,
b->foo), don't look through pointers unless we have an -> operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89480 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 5962466..be9375c 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -2160,10 +2160,10 @@
return ExprError();
}
}
- }
- if (BaseType->isPointerType())
- BaseType = BaseType->getPointeeType();
+ if (BaseType->isPointerType())
+ BaseType = BaseType->getPointeeType();
+ }
// We could end up with various non-record types here, such as extended
// vector types or Objective-C interfaces. Just return early and let