LGTM
================
Comment at: lib/AST/Decl.cpp:2512-2514
@@ -2511,5 +2511,5 @@
const FunctionType *FT = getType()->castAs<FunctionType>();
- if (isa<FunctionNoProtoType>(FT))
+ if (FT->getAs<FunctionNoProtoType>())
return 0;
- return cast<FunctionProtoType>(FT)->getNumArgs();
+ return FT->castAs<FunctionProtoType>()->getNumArgs();
----------------
The pre-existing `isa<...>` check here looks correct to me; what's this change
for?
If anything, we should rewrite this as
const FunctionProtoType *FPT = getType()->getAs<FunctionProtoType>();
return FPT ? FPT->getNumArgs() : 0;
http://llvm-reviews.chandlerc.com/D2332
BRANCH
fix-memptr-cc
ARCANIST PROJECT
clang
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits