From: Ted Kremenek Date: Wed, 31 Oct 2007 20:55:27 +0000 (+0000) Subject: Implemented short-circuited version of Builtin::Info::operator!=. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b181b3eec13686ac05fb2c57c3f4baf2d4074a9;p=clang Implemented short-circuited version of Builtin::Info::operator!=. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43574 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Builtins.h b/include/clang/AST/Builtins.h index 8f808306a6..0648c8debd 100644 --- a/include/clang/AST/Builtins.h +++ b/include/clang/AST/Builtins.h @@ -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