Skip to content

Commit b1aa7cd

Browse files
committed
[clang][Sema][NFC] Make some locals const in getUndefinedButUsed()
1 parent 6dfe555 commit b1aa7cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/Sema/Sema.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ void Sema::getUndefinedButUsed(
825825
continue;
826826
}
827827

828-
if (FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
828+
if (const auto *FD = dyn_cast<FunctionDecl>(ND)) {
829829
if (FD->isDefined())
830830
continue;
831831
if (FD->isExternallyVisible() &&
@@ -836,7 +836,7 @@ void Sema::getUndefinedButUsed(
836836
if (FD->getBuiltinID())
837837
continue;
838838
} else {
839-
auto *VD = cast<VarDecl>(ND);
839+
const auto *VD = cast<VarDecl>(ND);
840840
if (VD->hasDefinition() != VarDecl::DeclarationOnly)
841841
continue;
842842
if (VD->isExternallyVisible() &&

0 commit comments

Comments
 (0)