Skip to content

Commit 087f982

Browse files
Code review
Use FunctionDecl straight forward.
1 parent 416fbca commit 087f982

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang/lib/AST/ASTImporter.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ class ASTImporter::FunctionReturnTypeDeclCycleDetector {
12931293
public:
12941294
// Do not track cycles on D == nullptr.
12951295
ScopedReturnTypeImport(FunctionReturnTypeDeclCycleDetector &owner,
1296-
const Decl *D)
1296+
const FunctionDecl *D)
12971297
: CycleDetector(owner), D(D) {
12981298
if (D)
12991299
CycleDetector.FunctionReturnTypeDeclCycles.insert(D);
@@ -1307,22 +1307,22 @@ class ASTImporter::FunctionReturnTypeDeclCycleDetector {
13071307

13081308
private:
13091309
FunctionReturnTypeDeclCycleDetector &CycleDetector;
1310-
const Decl *D;
1310+
const FunctionDecl *D;
13111311
};
13121312

1313-
ScopedReturnTypeImport DetectImportCycles(const Decl *D) {
1313+
ScopedReturnTypeImport DetectImportCycles(const FunctionDecl *D) {
13141314
if (!IsCycle(D))
13151315
return ScopedReturnTypeImport(*this, D);
13161316
return ScopedReturnTypeImport(*this, nullptr);
13171317
}
13181318

1319-
bool IsCycle(const Decl *D) const {
1319+
bool IsCycle(const FunctionDecl *D) const {
13201320
return FunctionReturnTypeDeclCycles.find(D) !=
13211321
FunctionReturnTypeDeclCycles.end();
13221322
}
13231323

13241324
private:
1325-
llvm::DenseSet<const Decl *> FunctionReturnTypeDeclCycles;
1325+
llvm::DenseSet<const FunctionDecl *> FunctionReturnTypeDeclCycles;
13261326
};
13271327

13281328
ExpectedType ASTNodeImporter::VisitType(const Type *T) {

0 commit comments

Comments
 (0)