[cfe-commits] r54525 - /cfe/trunk/include/clang/AST/DeclCXX.h
Argiris Kirtzidis
akyrtzi at gmail.com
Fri Aug 8 06:26:52 PDT 2008
Author: akirtzidis
Date: Fri Aug 8 08:26:45 2008
New Revision: 54525
URL: http://llvm.org/viewvc/llvm-project?rev=54525&view=rev
Log:
Use static_cast<> instead of cast<> for CXXFieldDecl::getMember().
Modified:
cfe/trunk/include/clang/AST/DeclCXX.h
Modified: cfe/trunk/include/clang/AST/DeclCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=54525&r1=54524&r2=54525&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclCXX.h (original)
+++ cfe/trunk/include/clang/AST/DeclCXX.h Fri Aug 8 08:26:45 2008
@@ -54,10 +54,12 @@
ScopedDecl *PrevDecl);
const CXXFieldDecl *getMember(unsigned i) const {
- return cast<const CXXFieldDecl>(RecordDecl::getMember(i));
+ assert(isa<CXXFieldDecl>(RecordDecl::getMember(i)));
+ return static_cast<const CXXFieldDecl*>(RecordDecl::getMember(i));
}
CXXFieldDecl *getMember(unsigned i) {
- return cast<CXXFieldDecl>(RecordDecl::getMember(i));
+ assert(isa<CXXFieldDecl>(RecordDecl::getMember(i)));
+ return static_cast<CXXFieldDecl*>(RecordDecl::getMember(i));
}
/// getMember - If the member doesn't exist, or there are no members, this
More information about the cfe-commits
mailing list