@@ -5341,13 +5341,13 @@ struct CallbackClassifier {
5341
5341
}
5342
5342
};
5343
5343
5344
- // / Name of a decl if it has one, an empty \c Identifier otherwise.
5345
- static Identifier getDeclName (const Decl *D) {
5344
+ // / Base name of a decl if it has one, an empty \c DeclBaseName otherwise.
5345
+ static DeclBaseName getDeclName (const Decl *D) {
5346
5346
if (auto *VD = dyn_cast<ValueDecl>(D)) {
5347
5347
if (VD->hasName ())
5348
- return VD->getBaseIdentifier ();
5348
+ return VD->getBaseName ();
5349
5349
}
5350
- return Identifier ();
5350
+ return DeclBaseName ();
5351
5351
}
5352
5352
5353
5353
class DeclCollector : private SourceEntityWalker {
@@ -5622,7 +5622,7 @@ class AsyncConverter : private SourceEntityWalker {
5622
5622
llvm::DenseMap<const Decl *, Identifier> Names;
5623
5623
// Names of decls in each scope, where the first element is the initial scope
5624
5624
// and the last is the current scope.
5625
- llvm::SmallVector<llvm::DenseSet<Identifier >, 4 > ScopedNames;
5625
+ llvm::SmallVector<llvm::DenseSet<DeclBaseName >, 4 > ScopedNames;
5626
5626
// Mapping of \c BraceStmt -> declarations referenced in that statement
5627
5627
// without first being declared. These are used to fill the \c ScopeNames
5628
5628
// map on entering that scope.
@@ -6697,7 +6697,7 @@ class AsyncConverter : private SourceEntityWalker {
6697
6697
Identifier assignUniqueName (const Decl *D, StringRef BoundName) {
6698
6698
Identifier Ident;
6699
6699
if (BoundName.empty ()) {
6700
- BoundName = getDeclName (D).str ();
6700
+ BoundName = getDeclName (D).userFacingName ();
6701
6701
if (BoundName.empty ())
6702
6702
return Ident;
6703
6703
}
0 commit comments