[clang] b1aa7cd - [clang][Sema][NFC] Make some locals const in getUndefinedButUsed()
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 20 04:55:45 PDT 2023
Author: Timm Bäder
Date: 2023-08-20T13:55:25+02:00
New Revision: b1aa7cd8a9f3793a04e15af813082b996519be44
URL: https://github.com/llvm/llvm-project/commit/b1aa7cd8a9f3793a04e15af813082b996519be44
DIFF: https://github.com/llvm/llvm-project/commit/b1aa7cd8a9f3793a04e15af813082b996519be44.diff
LOG: [clang][Sema][NFC] Make some locals const in getUndefinedButUsed()
Added:
Modified:
clang/lib/Sema/Sema.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index ccf9b820183b0c..faf375fb8fab3e 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -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() &&
@@ -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() &&
More information about the cfe-commits
mailing list