]> granicus.if.org Git - clang/commitdiff
Address comments from Chris.
authorAnders Carlsson <andersca@mac.com>
Sat, 16 Feb 2008 00:24:09 +0000 (00:24 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 16 Feb 2008 00:24:09 +0000 (00:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47195 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Attr.h
include/clang/AST/Decl.h

index ae2c25b11b8f97bb7c399cd2c7881616bdce918d..c3390a021aa632b72d4a6e3808aa1df4ffd64446 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef LLVM_CLANG_AST_ATTR_H
 #define LLVM_CLANG_AST_ATTR_H
 
-#include <assert.h>
+#include <cassert>
 
 namespace clang {
 
index 0fbf0f92855f6227b8d472189e0ecff710622ed9..bf8a214eb14d880cb2fd3485a17638483ce1315f 100644 (file)
@@ -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;
   }