aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDonĂ¡t Nagy <donat.nagy@ericsson.com>2025-03-12 14:49:00 +0100
committerGitHub <noreply@github.com>2025-03-12 14:49:00 +0100
commit72ee9b82151f17d6bd37abc501124d46c1cb63c3 (patch)
tree80d4ffd25be821366a29a06762d1a43406c8fc2d /clang/lib/CodeGen/CodeGenModule.cpp
parentb76e396990ef63fa6deb97ae88a6e1c076fc6717 (diff)
downloadllvm-72ee9b82151f17d6bd37abc501124d46c1cb63c3.zip
llvm-72ee9b82151f17d6bd37abc501124d46c1cb63c3.tar.gz
llvm-72ee9b82151f17d6bd37abc501124d46c1cb63c3.tar.bz2
[NFC][analyzer] Rename `CheckerBase::getCheckerName` to `getName` (#130953)
The method name `getCheckerName` would imply "get the name of the checker associated with `this`", so it's suitable for e.g. `BugType::getCheckerName` -- but a method that just "gets the name of `this`" should be simply called `getName`. This change eliminates the redundant and ugly pattern `Checker->getCheckerName()` and helps to visually distinguish this method from `BugType::getCheckerName`. In the constructor of `BugType` the call of this method was completely removed (instead of just changing the name) because that call was dead code (when the data member `Checker` is non-null, the string stored in `CheckerName` is irrelevant) and was often querying the name of the checker before it was properly initialized. Moreover, in `ReturnValueChecker.cpp` the static helper function `getName` (which gets a function name from a `CallEvent`) was renamed to the more specific `getFunctionName` to avoid the name collision. This change is yet another cleanup commit before my planned changes that would add support for multi-part checkers to this method.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions