diff options
| author | Mike Stump <mrs@apple.com> | 2009-07-22 18:58:19 +0000 |
|---|---|---|
| committer | Mike Stump <mrs@apple.com> | 2009-07-22 18:58:19 +0000 |
| commit | 212005c1b45eb3f21de5b1520bb6181f16c649f6 (patch) | |
| tree | 75a5e01a8a2e1596518dd78a86e6b495d7a0da0c /clang/lib | |
| parent | 06cceef54526918725668a8cf0c9ae3969f7e5ba (diff) | |
| download | bcm5719-llvm-212005c1b45eb3f21de5b1520bb6181f16c649f6.tar.gz bcm5719-llvm-212005c1b45eb3f21de5b1520bb6181f16c649f6.zip | |
Use isa instead of dyn_cast for conditionals.
llvm-svn: 76771
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 4 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 705939be728..d489d4e73fa 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -2527,7 +2527,7 @@ void ASTContext::getObjCEncodingForPropertyDecl(const ObjCPropertyDecl *PD, /// 'i' or 'I' instead if encoding a struct field, or a pointer! /// void ASTContext::getLegacyIntegralTypeEncoding (QualType &PointeeTy) const { - if (dyn_cast<TypedefType>(PointeeTy.getTypePtr())) { + if (isa<TypedefType>(PointeeTy.getTypePtr())) { if (const BuiltinType *BT = PointeeTy->getAsBuiltinType()) { if (BT->getKind() == BuiltinType::ULong && ((const_cast<ASTContext *>(this))->getIntWidth(PointeeTy) == 32)) @@ -2617,7 +2617,7 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S, // pointee gets emitted _before_ the '^'. The read-only qualifier of // the pointer itself gets ignored, _unless_ we are looking at a typedef! // Also, do not emit the 'r' for anything but the outermost type! - if (dyn_cast<TypedefType>(T.getTypePtr())) { + if (isa<TypedefType>(T.getTypePtr())) { if (OutermostType && T.isConstQualified()) { isReadOnly = true; S += 'r'; diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 6ad2040b9d1..8c780296a7d 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1495,7 +1495,7 @@ bool Sema::CheckAlignOfExpr(Expr *E, SourceLocation OpLoc, // Alignment of a field access is always okay, so long as it isn't a // bit-field. if (MemberExpr *ME = dyn_cast<MemberExpr>(E)) - if (dyn_cast<FieldDecl>(ME->getMemberDecl())) + if (isa<FieldDecl>(ME->getMemberDecl())) return false; return CheckSizeOfAlignOfOperand(E->getType(), OpLoc, ExprRange, false); |

