forked from OSchip/llvm-project
[flang] reformatting
Original-commit: flang-compiler/f18@d9bfa6f48e Reviewed-on: https://github.com/flang-compiler/f18/pull/406 Tree-same-pre-rewrite: false
This commit is contained in:
parent
ba2ef03a02
commit
32424cad2d
|
@ -21,8 +21,8 @@
|
|||
#include "scope.h"
|
||||
#include "semantics.h"
|
||||
#include "symbol.h"
|
||||
#include "type.h"
|
||||
#include "tools.h"
|
||||
#include "type.h"
|
||||
#include "../common/Fortran.h"
|
||||
#include "../common/default-kinds.h"
|
||||
#include "../common/indirection.h"
|
||||
|
@ -4606,7 +4606,7 @@ bool ResolveNamesVisitor::Pre(const parser::PointerAssignmentStmt &x) {
|
|||
ResolveDataRef(dataRef);
|
||||
Walk(bounds);
|
||||
// Resolve unrestricted specific intrinsic procedures as in "p => cos".
|
||||
if (const parser::Name *name{GetSimpleName(expr)}) {
|
||||
if (const parser::Name * name{GetSimpleName(expr)}) {
|
||||
if (NameIsKnownOrIntrinsic(*name)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -264,20 +264,6 @@ bool ExprHasTypeCategory(const evaluate::GenericExprWrapper &expr,
|
|||
return dynamicType.has_value() && dynamicType->category == type;
|
||||
}
|
||||
|
||||
void CheckScalarLogicalExpr(
|
||||
const parser::Expr &expr, parser::Messages &messages) {
|
||||
// TODO: should be asserting that typedExpr is not null
|
||||
if (expr.typedExpr == nullptr) {
|
||||
return;
|
||||
}
|
||||
if (expr.typedExpr->v.Rank() > 0) {
|
||||
messages.Say(expr.source, "Expected a scalar LOGICAL expression"_err_en_US);
|
||||
} else if (!ExprHasTypeCategory(
|
||||
*expr.typedExpr, common::TypeCategory::Logical)) {
|
||||
messages.Say(expr.source, "Expected a LOGICAL expression"_err_en_US);
|
||||
}
|
||||
}
|
||||
|
||||
static parser::Name *GetSimpleName(
|
||||
common::Indirection<parser::Designator> *designator) {
|
||||
if (designator) {
|
||||
|
|
|
@ -97,8 +97,6 @@ const Symbol *FindExternallyVisibleObject(
|
|||
|
||||
bool ExprHasTypeCategory(
|
||||
const evaluate::GenericExprWrapper &expr, const common::TypeCategory &type);
|
||||
void CheckScalarLogicalExpr(
|
||||
const parser::Expr &expr, parser::Messages &messages);
|
||||
|
||||
// If this Expr or Variable represents a simple Name, return it.
|
||||
parser::Name *GetSimpleName(parser::Expr &);
|
||||
|
|
Loading…
Reference in New Issue