]> granicus.if.org Git - clang/commitdiff
Silence a couple more operator precedence warnings; this shouldn't
authorEli Friedman <eli.friedman@gmail.com>
Tue, 16 Dec 2008 20:15:50 +0000 (20:15 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Tue, 16 Dec 2008 20:15:50 +0000 (20:15 +0000)
change the semantics.  Please correct this if the precedence was
actually supposed to be something different.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61099 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclObjC.cpp
lib/Sema/SemaExprObjC.cpp

index 7b6059415a063f65162da2283144fb48f5567f33..25d1334ab56aa8a71a588a9bfb1d37e28722051b 100644 (file)
@@ -1052,8 +1052,8 @@ void Sema::ActOnAtEnd(SourceLocation AtEndLoc, DeclTy *classDecl,
       const ObjCMethodDecl *&PrevMethod = InsMap[Method->getSelector()];
       bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod) 
                               : false;
-      if (isInterfaceDeclKind && PrevMethod && !match 
-          || checkIdenticalMethods && match) {
+      if ((isInterfaceDeclKind && PrevMethod && !match) 
+          || (checkIdenticalMethods && match)) {
           Diag(Method->getLocation(), diag::err_duplicate_method_decl)
             << Method->getDeclName();
           Diag(PrevMethod->getLocation(), diag::note_previous_declaration);
@@ -1069,8 +1069,8 @@ void Sema::ActOnAtEnd(SourceLocation AtEndLoc, DeclTy *classDecl,
       const ObjCMethodDecl *&PrevMethod = ClsMap[Method->getSelector()];
       bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod) 
                               : false;
-      if (isInterfaceDeclKind && PrevMethod && !match 
-          || checkIdenticalMethods && match) {
+      if ((isInterfaceDeclKind && PrevMethod && !match) 
+          || (checkIdenticalMethods && match)) {
         Diag(Method->getLocation(), diag::err_duplicate_method_decl)
           << Method->getDeclName();
         Diag(PrevMethod->getLocation(), diag::note_previous_declaration);
index 4dadb65637f10ce37234a8ce484906c3bf84aa7c..e2825056c5755d64f4a91b7b47ac0857155afb7c 100644 (file)
@@ -538,7 +538,7 @@ bool Sema::ObjCQualifiedIdTypesAreCompatible(QualType lhs, QualType rhs,
       for (; RHSProtoI != RHSProtoE; ++RHSProtoI) {
         ObjCProtocolDecl *rhsProto = *RHSProtoI;
         if (ProtocolCompatibleWithProtocol(lhsProto, rhsProto) ||
-            compare && ProtocolCompatibleWithProtocol(rhsProto, lhsProto)) {
+            (compare && ProtocolCompatibleWithProtocol(rhsProto, lhsProto))) {
           match = true;
           break;
         }
@@ -583,7 +583,7 @@ bool Sema::ObjCQualifiedIdTypesAreCompatible(QualType lhs, QualType rhs,
       for (unsigned j = 0; j < rhsQID->getNumProtocols(); j++) {
         ObjCProtocolDecl *rhsProto = rhsQID->getProtocols(j);
         if (ProtocolCompatibleWithProtocol(lhsProto, rhsProto) ||
-            compare && ProtocolCompatibleWithProtocol(rhsProto, lhsProto)) {
+            (compare && ProtocolCompatibleWithProtocol(rhsProto, lhsProto))) {
           match = true;
           break;
         }