projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05f0145
)
[flang] FindContainingSubprogram returns a pointer, not a reference.
author
Steve Scalpone
<sscalpone@nvidia.com>
Mon, 15 Apr 2019 17:09:40 +0000
(10:09 -0700)
committer
Steve Scalpone
<sscalpone@nvidia.com>
Mon, 15 Apr 2019 17:59:12 +0000
(10:59 -0700)
Original-commit: flang-compiler/f18@
7d221b09bd9b77800d85e9bc2a0084a95237be65
flang/lib/semantics/check-return.cc
patch
|
blob
|
history
diff --git
a/flang/lib/semantics/check-return.cc
b/flang/lib/semantics/check-return.cc
index 19d4994e50d929770e9e9183cebd4280b9494147..d41d55274fe953d7d4e7497d8049acae2860155d 100644
(file)
--- a/
flang/lib/semantics/check-return.cc
+++ b/
flang/lib/semantics/check-return.cc
@@
-39,7
+39,7
@@
void ReturnStmtChecker::Leave(const parser::ReturnStmt &returnStmt) {
// C1575 The scalar-int-expr is allowed only in the inclusive scope of a
// subroutine subprogram.
const auto &scope{context_.FindScope(*context_.location())};
- const auto
&
subprogramScope{FindContainingSubprogram(scope)};
+ const auto
*
subprogramScope{FindContainingSubprogram(scope)};
if (subprogramScope == nullptr) {
context_.Say(
"RETURN must in the inclusive scope of a SUBPROGRAM"_err_en_US);