diff options
| -rw-r--r-- | clang/include/clang/AST/DeclBase.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h index d05b5a597eb..7f427e3eb3a 100644 --- a/clang/include/clang/AST/DeclBase.h +++ b/clang/include/clang/AST/DeclBase.h @@ -223,6 +223,10 @@ public: return 0; } + template<typename T> bool hasAttr() const { + return getAttr<T>() != 0; + } + /// setInvalidDecl - Indicates the Decl had a semantic error. This /// allows for graceful error recovery. void setInvalidDecl(bool Invalid = true) { InvalidDecl = Invalid; } |

