From: Chris Lattner Date: Thu, 2 Aug 2007 22:19:39 +0000 (+0000) Subject: mark some methods static, don't consider a vector to be an ocuvector X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=667405a3b00b04a36537d3a35ab7bdc6e2dd8c38;p=clang mark some methods static, don't consider a vector to be an ocuvector git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40762 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index a2308c670b..29830c90a5 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -517,13 +517,13 @@ class OCUVectorType : public VectorType { VectorType(OCUVector, vecType, nElements, canonType) {} friend class ASTContext; // ASTContext creates these. public: - bool isPointAccessor(const char c) const { + static bool isPointAccessor(const char c) { return c == 'x' || c == 'y' || c == 'z' || c == 'w'; } - bool isColorAccessor(const char c) const { + static bool isColorAccessor(const char c) { return c == 'r' || c == 'g' || c == 'b' || c == 'a'; } - bool isTextureAccessor(const char c) const { + static bool isTextureAccessor(const char c) { return c == 's' || c == 't' || c == 'p' || c == 'q'; }; bool isAccessorWithinNumElements(const char c) const { @@ -542,9 +542,6 @@ public: virtual void getAsStringInternal(std::string &InnerString) const; static bool classof(const Type *T) { - return T->getTypeClass() == Vector || T->getTypeClass() == OCUVector; - } - static bool classof(const VectorType *T) { return T->getTypeClass() == OCUVector; } static bool classof(const OCUVectorType *) { return true; }