summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-01-27 06:45:10 +0000
committerTed Kremenek <kremenek@apple.com>2010-01-27 06:45:10 +0000
commitd5e27af60ab9caa82d3683d33ccd28e3354fcbb7 (patch)
tree1f5301f73db8a15b6fb4acbe46f631291e427132 /clang/lib/Checker/CFRefCount.cpp
parent85476f304c5c83014ec7c23ac9cf54df54f90b1d (diff)
downloadbcm5719-llvm-d5e27af60ab9caa82d3683d33ccd28e3354fcbb7.tar.gz
bcm5719-llvm-d5e27af60ab9caa82d3683d33ccd28e3354fcbb7.zip
Remove unnecessary ASTContext* argument from isRefType().
llvm-svn: 94665
Diffstat (limited to 'clang/lib/Checker/CFRefCount.cpp')
-rw-r--r--clang/lib/Checker/CFRefCount.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Checker/CFRefCount.cpp b/clang/lib/Checker/CFRefCount.cpp
index 45fc94b4def..cb59b5f93b8 100644
--- a/clang/lib/Checker/CFRefCount.cpp
+++ b/clang/lib/Checker/CFRefCount.cpp
@@ -78,7 +78,7 @@ public:
//===----------------------------------------------------------------------===//
static bool isRefType(QualType RetTy, const char* prefix,
- ASTContext* Ctx = 0, const char* name = 0) {
+ const char* name = 0) {
// Recursively walk the typedef stack, allowing typedefs of reference types.
while (TypedefType* TD = dyn_cast<TypedefType>(RetTy.getTypePtr())) {
@@ -89,12 +89,12 @@ static bool isRefType(QualType RetTy, const char* prefix,
RetTy = TD->getDecl()->getUnderlyingType();
}
- if (!Ctx || !name)
+ if (!name)
return false;
// Is the type void*?
const PointerType* PT = RetTy->getAs<PointerType>();
- if (!(PT->getPointeeType().getUnqualifiedType() == Ctx->VoidTy))
+ if (!(PT->getPointeeType().getUnqualifiedType()->isVoidType()))
return false;
// Does the name start with the prefix?
@@ -1192,7 +1192,7 @@ RetainSummary* RetainSummaryManager::getSummary(FunctionDecl* FD) {
if (RetTy->isPointerType()) {
// For CoreFoundation ('CF') types.
- if (isRefType(RetTy, "CF", &Ctx, FName)) {
+ if (isRefType(RetTy, "CF", FName)) {
if (isRetain(FD, FName))
S = getUnarySummary(FT, cfretain);
else if (strstr(FName, "MakeCollectable"))
@@ -1204,7 +1204,7 @@ RetainSummary* RetainSummaryManager::getSummary(FunctionDecl* FD) {
}
// For CoreGraphics ('CG') types.
- if (isRefType(RetTy, "CG", &Ctx, FName)) {
+ if (isRefType(RetTy, "CG", FName)) {
if (isRetain(FD, FName))
S = getUnarySummary(FT, cfretain);
else
OpenPOWER on IntegriCloud