[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:
peter klausler 2019-04-15 09:44:54 -07:00
parent ba2ef03a02
commit 32424cad2d
3 changed files with 2 additions and 18 deletions

View File

@ -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;
}

View File

@ -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) {

View File

@ -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 &);