@@ -1289,34 +1289,34 @@ using namespace clang;
12891289
12901290class ASTImporter ::FunctionReturnTypeDeclCycleDetector {
12911291public:
1292- class ScopedReturnTypeImport {
1292+ class DeclCycleMapInserter {
12931293 public:
12941294 // Do not track cycles on D == nullptr.
1295- ScopedReturnTypeImport (FunctionReturnTypeDeclCycleDetector &owner,
1296- const FunctionDecl *D)
1295+ DeclCycleMapInserter (FunctionReturnTypeDeclCycleDetector &owner,
1296+ const FunctionDecl *D)
12971297 : CycleDetector(owner), D(D) {
12981298 if (D)
12991299 CycleDetector.FunctionReturnTypeDeclCycles .insert (D);
13001300 }
1301- ~ScopedReturnTypeImport () {
1301+ ~DeclCycleMapInserter () {
13021302 if (D)
13031303 CycleDetector.FunctionReturnTypeDeclCycles .erase (D);
13041304 }
1305- ScopedReturnTypeImport (const ScopedReturnTypeImport &) = delete ;
1306- ScopedReturnTypeImport &operator =(const ScopedReturnTypeImport &) = delete ;
1305+ DeclCycleMapInserter (const DeclCycleMapInserter &) = delete ;
1306+ DeclCycleMapInserter &operator =(const DeclCycleMapInserter &) = delete ;
13071307
13081308 private:
13091309 FunctionReturnTypeDeclCycleDetector &CycleDetector;
13101310 const FunctionDecl *D;
13111311 };
13121312
1313- ScopedReturnTypeImport DetectImportCycles (const FunctionDecl *D) {
1314- if (!IsCycle (D))
1315- return ScopedReturnTypeImport (*this , D);
1316- return ScopedReturnTypeImport (*this , nullptr );
1313+ DeclCycleMapInserter detectImportCycle (const FunctionDecl *D) {
1314+ if (!isCycle (D))
1315+ return DeclCycleMapInserter (*this , D);
1316+ return DeclCycleMapInserter (*this , nullptr );
13171317 }
13181318
1319- bool IsCycle (const FunctionDecl *D) const {
1319+ bool isCycle (const FunctionDecl *D) const {
13201320 return FunctionReturnTypeDeclCycles.find (D) !=
13211321 FunctionReturnTypeDeclCycles.end ();
13221322 }
@@ -4076,7 +4076,7 @@ ExpectedDecl ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) {
40764076 // Reuse this approach for auto return types declared as typenames from
40774077 // template pamams, tracked in FunctionReturnTypeCycleDetector.
40784078 if (hasReturnTypeDeclaredInside (D) ||
4079- Importer.FunctionReturnTypeCycleDetector ->IsCycle (D)) {
4079+ Importer.FunctionReturnTypeCycleDetector ->isCycle (D)) {
40804080 FromReturnTy = Importer.getFromContext ().VoidTy ;
40814081 UsedDifferentProtoType = true ;
40824082 }
@@ -4100,7 +4100,7 @@ ExpectedDecl ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) {
41004100
41014101 Error Err = Error::success ();
41024102 auto ScopedReturnTypeDeclCycleDetector =
4103- Importer.FunctionReturnTypeCycleDetector ->DetectImportCycles (D);
4103+ Importer.FunctionReturnTypeCycleDetector ->detectImportCycle (D);
41044104 auto T = importChecked (Err, FromTy);
41054105 auto TInfo = importChecked (Err, FromTSI);
41064106 auto ToInnerLocStart = importChecked (Err, D->getInnerLocStart ());
0 commit comments