[cfe-commits] r94665 - /cfe/trunk/lib/Checker/CFRefCount.cpp
Ted Kremenek
kremenek at apple.com
Tue Jan 26 22:45:10 PST 2010
Author: kremenek
Date: Wed Jan 27 00:45:10 2010
New Revision: 94665
URL: http://llvm.org/viewvc/llvm-project?rev=94665&view=rev
Log:
Remove unnecessary ASTContext* argument from isRefType().
Modified:
cfe/trunk/lib/Checker/CFRefCount.cpp
Modified: cfe/trunk/lib/Checker/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/CFRefCount.cpp?rev=94665&r1=94664&r2=94665&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Checker/CFRefCount.cpp Wed Jan 27 00:45:10 2010
@@ -78,7 +78,7 @@
//===----------------------------------------------------------------------===//
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 @@
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 @@
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 @@
}
// For CoreGraphics ('CG') types.
- if (isRefType(RetTy, "CG", &Ctx, FName)) {
+ if (isRefType(RetTy, "CG", FName)) {
if (isRetain(FD, FName))
S = getUnarySummary(FT, cfretain);
else
More information about the cfe-commits
mailing list