Skip to content

Commit

Permalink
[clang][Sema][NFC] Make some locals const in getUndefinedButUsed()
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaederr committed Aug 20, 2023
1 parent 6dfe555 commit b1aa7cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/lib/Sema/Sema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ void Sema::getUndefinedButUsed(
continue;
}

if (FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
if (const auto *FD = dyn_cast<FunctionDecl>(ND)) {
if (FD->isDefined())
continue;
if (FD->isExternallyVisible() &&
Expand All @@ -836,7 +836,7 @@ void Sema::getUndefinedButUsed(
if (FD->getBuiltinID())
continue;
} else {
auto *VD = cast<VarDecl>(ND);
const auto *VD = cast<VarDecl>(ND);
if (VD->hasDefinition() != VarDecl::DeclarationOnly)
continue;
if (VD->isExternallyVisible() &&
Expand Down

0 comments on commit b1aa7cd

Please sign in to comment.