]> granicus.if.org Git - clang/commitdiff
Implemented short-circuited version of Builtin::Info::operator!=.
authorTed Kremenek <kremenek@apple.com>
Wed, 31 Oct 2007 20:55:27 +0000 (20:55 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 31 Oct 2007 20:55:27 +0000 (20:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43574 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Builtins.h

index 8f808306a65728c7f49ea7bc489eb62a3ad72e8c..0648c8debd3c9a9774cae52e1ebc125b55719a1f 100644 (file)
@@ -39,7 +39,12 @@ struct Info {
            !strcmp(Type, RHS.Type) &&
            !strcmp(Attributes, RHS.Attributes);
   }
-  bool operator!=(const Info &RHS) const { return !(*this == RHS); }
+  
+  bool operator!=(const Info &RHS) const { 
+    return strcmp(Name, RHS.Name) ||
+           strcmp(Type, RHS.Type) ||
+           strcmp(Attributes, RHS.Attributes);    
+  }
 };
 
 /// Builtin::Context - This holds information about target-independent and