diff options
| author | Ted Kremenek <kremenek@apple.com> | 2009-07-17 01:20:38 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2009-07-17 01:20:38 +0000 |
| commit | b825c0ddc510d8aa0cce9b4065cb8e5dace6bc39 (patch) | |
| tree | cd576de18eb9d3fe372b2471a676e0a2cc6782e1 /clang/lib/AST/Decl.cpp | |
| parent | 95d401de9dabfe99c54dd484a780f4cddab2c26a (diff) | |
| download | bcm5719-llvm-b825c0ddc510d8aa0cce9b4065cb8e5dace6bc39.tar.gz bcm5719-llvm-b825c0ddc510d8aa0cce9b4065cb8e5dace6bc39.zip | |
Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents.
llvm-svn: 76139
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
| -rw-r--r-- | clang/lib/AST/Decl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 728724f1b3d..a9f258146e5 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -157,7 +157,7 @@ bool FieldDecl::isAnonymousStructOrUnion() const { if (!isImplicit() || getDeclName()) return false; - if (const RecordType *Record = getType()->getAsRecordType()) + if (const RecordType *Record = getType()->getAs<RecordType>()) return Record->getDecl()->isAnonymousStructOrUnion(); return false; @@ -704,24 +704,24 @@ SourceRange TagDecl::getSourceRange() const { } void TagDecl::startDefinition() { - TagType *TagT = const_cast<TagType *>(TypeForDecl->getAsTagType()); + TagType *TagT = const_cast<TagType *>(TypeForDecl->getAs<TagType>()); TagT->decl.setPointer(this); - TagT->getAsTagType()->decl.setInt(1); + TagT->getAs<TagType>()->decl.setInt(1); } void TagDecl::completeDefinition() { assert((!TypeForDecl || - TypeForDecl->getAsTagType()->decl.getPointer() == this) && + TypeForDecl->getAs<TagType>()->decl.getPointer() == this) && "Attempt to redefine a tag definition?"); IsDefinition = true; - TagType *TagT = const_cast<TagType *>(TypeForDecl->getAsTagType()); + TagType *TagT = const_cast<TagType *>(TypeForDecl->getAs<TagType>()); TagT->decl.setPointer(this); TagT->decl.setInt(0); } TagDecl* TagDecl::getDefinition(ASTContext& C) const { QualType T = C.getTypeDeclType(const_cast<TagDecl*>(this)); - TagDecl* D = cast<TagDecl>(T->getAsTagType()->getDecl()); + TagDecl* D = cast<TagDecl>(T->getAs<TagType>()->getDecl()); return D->isDefinition() ? D : 0; } |

