From baa66fc389ca0a9f11e0c864304bcfd89de39439 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sat, 16 Feb 2008 00:24:09 +0000 Subject: [PATCH] Address comments from Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47195 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/Attr.h | 2 +- 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 +#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; } -- 2.50.1