From: Anders Carlsson Date: Sat, 16 Feb 2008 00:24:09 +0000 (+0000) Subject: Address comments from Chris. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=baa66fc389ca0a9f11e0c864304bcfd89de39439;p=clang Address comments from Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47195 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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 +#include 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 T *getAttr() { for (Attr *attr = getAttrs(); attr; attr = attr->getNext()) - if (isa(attr)) - return cast(attr); + if (T *V = dyn_cast(attr)) + return V; return 0; }