[flang] address comments
Original-commit: flang-compiler/f18@2bf995562c Reviewed-on: https://github.com/flang-compiler/f18/pull/638
This commit is contained in:
parent
f13f372833
commit
bc4d468d29
|
@ -3429,7 +3429,7 @@ void DeclarationVisitor::Post(
|
|||
|
||||
void DeclarationVisitor::CheckBindings(
|
||||
const parser::TypeBoundProcedureStmt::WithoutInterface &tbps) {
|
||||
CHECK(currScope().kind() == Scope::Kind::DerivedType);
|
||||
CHECK(currScope().IsDerivedType());
|
||||
for (auto &declaration : tbps.declarations) {
|
||||
auto &bindingName{std::get<parser::Name>(declaration.t)};
|
||||
if (Symbol * binding{FindInScope(currScope(), bindingName)}) {
|
||||
|
@ -5511,7 +5511,7 @@ public:
|
|||
const auto &name{std::get<parser::Name>(x.t)};
|
||||
if (Symbol * symbol{name.symbol}) {
|
||||
if (Scope * scope{symbol->scope()}) {
|
||||
if (scope->kind() == Scope::Kind::DerivedType) {
|
||||
if (scope->IsDerivedType()) {
|
||||
resolver_.PushScope(*scope);
|
||||
pushedScope_ = true;
|
||||
}
|
||||
|
|
|
@ -204,13 +204,15 @@ public:
|
|||
void set_interface(const ProcInterface &interface) { interface_ = interface; }
|
||||
inline bool HasExplicitInterface() const;
|
||||
|
||||
// Be advised: !init().has_value() => uninitialized pointer,
|
||||
// while *init() == nullptr => explicit NULL() initialization.
|
||||
std::optional<const Symbol *> init() const { return init_; }
|
||||
void set_init(const Symbol &symbol) { init_ = &symbol; }
|
||||
void set_init(std::nullptr_t) { init_ = nullptr; }
|
||||
|
||||
private:
|
||||
ProcInterface interface_;
|
||||
std::optional<const Symbol *> init_; // if present but null => NULL()
|
||||
std::optional<const Symbol *> init_;
|
||||
friend std::ostream &operator<<(std::ostream &, const ProcEntityDetails &);
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
! Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||||
! Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
!
|
||||
! Licensed under the Apache License, Version 2.0 (the "License");
|
||||
! you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
! Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||||
! Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
!
|
||||
! Licensed under the Apache License, Version 2.0 (the "License");
|
||||
! you may not use this file except in compliance with the License.
|
||||
|
|
Loading…
Reference in a new issue