diff options
Diffstat (limited to 'include/clang/AST/Decl.h')
-rw-r--r-- | include/clang/AST/Decl.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 3b04c25ce5..7e9e9bfb3a 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -1968,6 +1968,27 @@ public: /// definition of a member function. virtual bool isOutOfLine() const; + /// \brief Enumeration used to identify memory setting or copying functions + /// identified by getMemoryFunctionKind(). + enum MemoryFunctionKind { + MFK_Memset, + MFK_Memcpy, + MFK_Memmove, + MFK_Memcmp, + MFK_Strncpy, + MFK_Strncmp, + MFK_Strncasecmp, + MFK_Strncat, + MFK_Strndup, + MFK_Strlcpy, + MFK_Strlcat, + MFK_Invalid + }; + + /// \brief If the given function is a memory copy or setting function, return + /// it's kind. If the function is not a memory function, returns MFK_Invalid. + MemoryFunctionKind getMemoryFunctionKind(); + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const FunctionDecl *D) { return true; } |