diff options
author | Anders Carlsson <andersca@mac.com> | 2008-02-16 00:24:09 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2008-02-16 00:24:09 +0000 |
commit | baa66fc389ca0a9f11e0c864304bcfd89de39439 (patch) | |
tree | aa879ae4e8e3882b9fb9239067becfaf52720253 | |
parent | adf21bdb3d17acfdb74657fcbc5035a404c6c8f4 (diff) |
Address comments from Chris.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47195 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/Attr.h | 2 | ||||
-rw-r--r-- | include/clang/AST/Decl.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/AST/Attr.h b/include/clang/AST/Attr.h index ae2c25b11b..c3390a021a 100644 --- a/include/clang/AST/Attr.h +++ b/include/clang/AST/Attr.h @@ -14,7 +14,7 @@ #ifndef LLVM_CLANG_AST_ATTR_H #define LLVM_CLANG_AST_ATTR_H -#include <assert.h> +#include <cassert> namespace clang { diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 0fbf0f9285..bf8a214eb1 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -140,8 +140,8 @@ public: template<typename T> T *getAttr() { for (Attr *attr = getAttrs(); attr; attr = attr->getNext()) - if (isa<T>(attr)) - return cast<T>(attr); + if (T *V = dyn_cast<T>(attr)) + return V; return 0; } |