@@ -5349,13 +5349,13 @@ struct CallbackClassifier {
5349
5349
}
5350
5350
};
5351
5351
5352
- // / Name of a decl if it has one, an empty \c Identifier otherwise.
5353
- static Identifier getDeclName (const Decl *D) {
5352
+ // / Base name of a decl if it has one, an empty \c DeclBaseName otherwise.
5353
+ static DeclBaseName getDeclName (const Decl *D) {
5354
5354
if (auto *VD = dyn_cast<ValueDecl>(D)) {
5355
5355
if (VD->hasName ())
5356
- return VD->getBaseIdentifier ();
5356
+ return VD->getBaseName ();
5357
5357
}
5358
- return Identifier ();
5358
+ return DeclBaseName ();
5359
5359
}
5360
5360
5361
5361
class DeclCollector : private SourceEntityWalker {
@@ -5630,7 +5630,7 @@ class AsyncConverter : private SourceEntityWalker {
5630
5630
llvm::DenseMap<const Decl *, Identifier> Names;
5631
5631
// Names of decls in each scope, where the first element is the initial scope
5632
5632
// and the last is the current scope.
5633
- llvm::SmallVector<llvm::DenseSet<Identifier >, 4 > ScopedNames;
5633
+ llvm::SmallVector<llvm::DenseSet<DeclBaseName >, 4 > ScopedNames;
5634
5634
// Mapping of \c BraceStmt -> declarations referenced in that statement
5635
5635
// without first being declared. These are used to fill the \c ScopeNames
5636
5636
// map on entering that scope.
@@ -6705,7 +6705,7 @@ class AsyncConverter : private SourceEntityWalker {
6705
6705
Identifier assignUniqueName (const Decl *D, StringRef BoundName) {
6706
6706
Identifier Ident;
6707
6707
if (BoundName.empty ()) {
6708
- BoundName = getDeclName (D).str ();
6708
+ BoundName = getDeclName (D).userFacingName ();
6709
6709
if (BoundName.empty ())
6710
6710
return Ident;
6711
6711
}
0 commit comments