================
@@ -211,18 +211,20 @@ const ParmVarDecl *ParamVarRegion::getDecl() const {
if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
assert(Index < FD->param_size());
return FD->parameters()[Index];
- } else if (const auto *BD = dyn_cast<BlockDecl>(D)) {
+ }
+ if (const auto *BD = dyn_cast<BlockDecl>(D)) {
assert(Index < BD->param_size());
return BD->parameters()[Index];
- } else if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {
+ }
+ if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {
assert(Index < MD->param_size());
return MD->parameters()[Index];
- } else if (const auto *CD = dyn_cast<CXXConstructorDecl>(D)) {
+ }
+ if (const auto *CD = dyn_cast<CXXConstructorDecl>(D)) {
assert(Index < CD->param_size());
return CD->parameters()[Index];
- } else {
- llvm_unreachable("Unexpected Decl kind!");
}
+ llvm_unreachable("Unexpected Decl kind!");
----------------
NagyDonat wrote:
The changes in this file improve code quality, but they are completely
unrelated to the goals of this commit.
https://github.com/llvm/llvm-project/pull/218264
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits