mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1163029 - Use NamedDecl::getName instead of expensive NamedDecl::getNameAsString. r=ehsan
This commit is contained in:
parent
b2ee671e29
commit
24ee07fb04
@ -421,7 +421,7 @@ bool classHasAddRefRelease(const CXXRecordDecl *D) {
|
||||
bool seenRelease = false;
|
||||
for (CXXRecordDecl::method_iterator method = D->method_begin();
|
||||
method != D->method_end(); ++method) {
|
||||
std::string name = method->getNameAsString();
|
||||
const auto &name = method->getName();
|
||||
if (name == "AddRef") {
|
||||
seenAddRef = true;
|
||||
} else if (name == "Release") {
|
||||
@ -588,7 +588,7 @@ AST_MATCHER(MemberExpr, isAddRefOrRelease) {
|
||||
ValueDecl *Member = Node.getMemberDecl();
|
||||
CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Member);
|
||||
if (Method) {
|
||||
std::string Name = Method->getNameAsString();
|
||||
const auto &Name = Method->getName();
|
||||
return Name == "AddRef" || Name == "Release";
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user