Expr *Callee = OrigCallee->IgnoreParenCasts();
bool isPostIncDec = Second && (Op == OO_PlusPlus || Op == OO_MinusMinus);
+ if (First->getObjectKind() == OK_ObjCProperty) {
+ BinaryOperatorKind Opc = BinaryOperator::getOverloadedOpcode(Op);
+ if (BinaryOperator::isAssignmentOp(Opc))
+ return SemaRef.checkPseudoObjectAssignment(/*Scope=*/nullptr, OpLoc, Opc,
+ First, Second);
+ ExprResult Result = SemaRef.CheckPlaceholderExpr(First);
+ if (Result.isInvalid())
+ return ExprError();
+ First = Result.get();
+ }
+
+ if (Second && Second->getObjectKind() == OK_ObjCProperty) {
+ ExprResult Result = SemaRef.CheckPlaceholderExpr(Second);
+ if (Result.isInvalid())
+ return ExprError();
+ Second = Result.get();
+ }
+
// Determine whether this should be a builtin operation.
if (Op == OO_Subscript) {
if (!First->getType()->isOverloadableType() &&
--- /dev/null
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+class C {};
+bool operator == (C c1, C c2);
+
+bool operator == (C c1, int i);
+bool operator == (int i, C c2);
+
+C operator += (C c1, C c2);
+
+enum TextureType { TextureType3D };
+
+@interface Texture
+@property int textureType;
+@property C c;
+@end
+
+template <typename> class Framebuffer {
+public:
+ Texture **color_attachment;
+ Framebuffer();
+};
+
+template <typename T> Framebuffer<T>::Framebuffer() {
+ (void)(color_attachment[0].textureType == TextureType3D);
+ color_attachment[0].textureType += 1;
+ (void)(color_attachment[0].c == color_attachment[0].c);
+ (void)(color_attachment[0].c == 1);
+ (void)(1 == color_attachment[0].c);
+}
+
+void foo() {
+ Framebuffer<int>();
+}