]> granicus.if.org Git - clang/commitdiff
[AST] Pull simple method inline.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 30 Jan 2016 12:16:23 +0000 (12:16 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 30 Jan 2016 12:16:23 +0000 (12:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259304 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/ASTTypeTraits.h
lib/AST/ASTTypeTraits.cpp

index dcaac802c110a903967a23dcfdf601c4b1c99898..ad301b14829e52bde2267ed5e3ef31bf8b242783 100644 (file)
@@ -62,7 +62,9 @@ public:
   /// \}
 
   /// \brief Returns \c true if \c this and \c Other represent the same kind.
-  bool isSame(ASTNodeKind Other) const;
+  bool isSame(ASTNodeKind Other) const {
+    return KindId != NKI_None && KindId == Other.KindId;
+  }
 
   /// \brief Returns \c true only for the default \c ASTNodeKind()
   bool isNone() const { return KindId == NKI_None; }
index ec0671ceb1b5fd969143a4ff5678d22ecc578f22..5019be45b59a761c35e6e0a3af2149a9f7d7a023 100644 (file)
@@ -43,10 +43,6 @@ bool ASTNodeKind::isBaseOf(ASTNodeKind Other, unsigned *Distance) const {
   return isBaseOf(KindId, Other.KindId, Distance);
 }
 
-bool ASTNodeKind::isSame(ASTNodeKind Other) const {
-  return KindId != NKI_None && KindId == Other.KindId;
-}
-
 bool ASTNodeKind::isBaseOf(NodeKindId Base, NodeKindId Derived,
                            unsigned *Distance) {
   if (Base == NKI_None || Derived == NKI_None) return false;