]> granicus.if.org Git - clang/commitdiff
Reverted unnecessary inlining of operator!=, since negating operator== is
authorTed Kremenek <kremenek@apple.com>
Thu, 1 Nov 2007 16:35:25 +0000 (16:35 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 1 Nov 2007 16:35:25 +0000 (16:35 +0000)
just as efficient and much more succinct.

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

include/clang/AST/Builtins.h

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