forked from OSchip/llvm-project
[flang] Add explicit nullptr check in initialisation of inDoConstruct.
This explicit check is needed as we are using braced initialisation here so implicit narrowing conversions (such as pointer to bool) are not allowed. Original-commit: flang-compiler/f18@ff8dad10bf Reviewed-on: https://github.com/flang-compiler/f18/pull/1083
This commit is contained in:
parent
63fb36c494
commit
cc77f818f2
|
@ -912,7 +912,7 @@ void DoForallChecker::CheckForBadLeave(
|
|||
static bool StmtMatchesConstruct(const parser::Name *stmtName,
|
||||
StmtType stmtType, const parser::Name *constructName,
|
||||
const ConstructNode &construct) {
|
||||
bool inDoConstruct{MaybeGetDoConstruct(construct)};
|
||||
bool inDoConstruct{MaybeGetDoConstruct(construct) != nullptr};
|
||||
if (!stmtName) {
|
||||
return inDoConstruct; // Unlabeled statements match all DO constructs
|
||||
} else if (constructName && constructName->source == stmtName->source) {
|
||||
|
|
Loading…
Reference in New Issue