================
Comment at: clang-tidy/readability/RemoveVoidArg.cpp:42
@@ +41,3 @@
+ if (const auto PT = QT->getAs<PointerType>()) {
+ if (const auto FP = PT->getPointeeType()->getAs<FunctionProtoType>()) {
+ return FP->getNumParams() == 0;
----------------
Remove the duplicate logic.
Could be something like:
```
if (const auto PT = QT->getAs<PointerType>()) {
QT = PT->getPointeeType();
}
if (const auto *MPT = QT->getAs<MemberPointerType>()) {
QT = MPT->getPointeeType();
}
if (const auto FP = QT->getAs<FunctionProtoType>()) {
return FP->getNumParams() == 0;
}
```
http://reviews.llvm.org/D7639
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits