Skip to content

Commit 4f1fa55

Browse files
author
Daniil Dudkin
committed
[flang][NFC] Small refactor for IsProcedurePointer
Instead of manually checking for procedure-like details in Symbol, defer it to IsProcedure function. Differential Revision: https://reviews.llvm.org/D127967
1 parent 60f3b07 commit 4f1fa55

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

flang/lib/Evaluate/tools.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,8 +1296,7 @@ const Symbol *FindCommonBlockContaining(const Symbol &original) {
12961296

12971297
bool IsProcedurePointer(const Symbol &original) {
12981298
const Symbol &symbol{GetAssociationRoot(original)};
1299-
return IsPointer(symbol) &&
1300-
(symbol.has<ProcEntityDetails>() || symbol.has<SubprogramDetails>());
1299+
return IsPointer(symbol) && IsProcedure(symbol);
13011300
}
13021301

13031302
// 3.11 automatic data object

0 commit comments

Comments
 (0)