This is an archive of the discontinued LLVM Phabricator instance.

[flang] Warn about useless explicit typing of intrinsics
ClosedPublic

Authored by klausler on Feb 17 2021, 10:27 AM.

Details

Summary

Fortran 2018 explicitly permits an ignored type declaration
for the result of a generic intrinsic function. See the comment
added to Semantics/expression.cpp for an explanation of why this
is somewhat dangerous and worthy of a warning.

Depended on https://reviews.llvm.org/D96878

Diff Detail

Event Timeline

klausler created this revision.Feb 17 2021, 10:27 AM
klausler requested review of this revision.Feb 17 2021, 10:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2021, 10:27 AM
klausler retitled this revision from [flang] Warn about a useless explicit typing of intrinsics to [flang] Warn about useless explicit typing of intrinsics.Feb 17 2021, 10:28 AM
tskeith added inline comments.Feb 17 2021, 11:14 AM
flang/lib/Semantics/resolve-names.cpp
5983

Where is AcquireIntrinsicProcedureFlags defined?

klausler updated this revision to Diff 324369.Feb 17 2021, 11:37 AM
klausler edited the summary of this revision. (Show Details)

Rebase to latest llvm-project/main to resolve dependency on another patch.

tskeith accepted this revision.Feb 17 2021, 12:35 PM
This revision is now accepted and ready to land.Feb 17 2021, 12:35 PM
This revision was automatically updated to reflect the committed changes.