summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorEdwin Vane <revane@google.com>2024-05-07 15:06:51 -0400
committerGitHub <noreply@github.com>2024-05-07 21:06:51 +0200
commitb1bc1dbea6d0423813bb73d625c6eedc040007ed (patch)
tree87b3fc6a86ada6eaa692a503508ccf6893476e29 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent7115ed0fff027b65fa76fdfae215ed1382ed1473 (diff)
[clang-tidy] Refactor how NamedDecl are renamed (#88735)
The handling of renaming failures and multiple usages related to those failures is currently spread over several functions. Identifying the failure NamedDecl for a given usage is also duplicated, once when creating failures and again when identify usages. There are currently two ways to a failed NamedDecl from a usage: use the canonical decl or use the overridden method. With new methods about to be added, a cleanup was in order. The data flow is simplified as follows: * The visitor always forwards NamedDecls to addUsage(NamedDecl). * addUsage(NamedDecl) determines the failed NamedDecl and determines potential new names based on that failure. Usages are registered using addUsage(NamingCheckId). * addUsage(NamingCheckId) is now protected and its single responsibility is maintaining the integrity of the failure/usage map.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions