Changeset View
Changeset View
Standalone View
Standalone View
flang/include/flang/Semantics/tools.h
Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | inline bool IsAssumedSizeArray(const Symbol &symbol) { | ||||
return details && details->IsAssumedSize(); | return details && details->IsAssumedSize(); | ||||
} | } | ||||
inline bool IsAssumedRankArray(const Symbol &symbol) { | inline bool IsAssumedRankArray(const Symbol &symbol) { | ||||
const auto *details{symbol.detailsIf<ObjectEntityDetails>()}; | const auto *details{symbol.detailsIf<ObjectEntityDetails>()}; | ||||
return details && details->IsAssumedRank(); | return details && details->IsAssumedRank(); | ||||
} | } | ||||
bool IsAssumedLengthCharacter(const Symbol &); | bool IsAssumedLengthCharacter(const Symbol &); | ||||
bool IsExternal(const Symbol &); | bool IsExternal(const Symbol &); | ||||
bool IsModuleProcedure(const Symbol &); | |||||
// Is the symbol modifiable in this scope | // Is the symbol modifiable in this scope | ||||
std::optional<parser::MessageFixedText> WhyNotModifiable( | std::optional<parser::MessageFixedText> WhyNotModifiable( | ||||
const Symbol &, const Scope &); | const Symbol &, const Scope &); | ||||
std::optional<parser::Message> WhyNotModifiable(SourceName, const SomeExpr &, | std::optional<parser::Message> WhyNotModifiable(SourceName, const SomeExpr &, | ||||
const Scope &, bool vectorSubscriptIsOk = false); | const Scope &, bool vectorSubscriptIsOk = false); | ||||
const Symbol *IsExternalInPureContext(const Symbol &, const Scope &); | const Symbol *IsExternalInPureContext(const Symbol &, const Scope &); | ||||
bool HasCoarray(const parser::Expr &); | bool HasCoarray(const parser::Expr &); | ||||
bool IsPolymorphicAllocatable(const Symbol &); | bool IsPolymorphicAllocatable(const Symbol &); | ||||
▲ Show 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | template <typename T> std::optional<std::int64_t> GetIntValue(const T &x) { | ||||
} | } | ||||
} | } | ||||
template <typename T> bool IsZero(const T &expr) { | template <typename T> bool IsZero(const T &expr) { | ||||
auto value{GetIntValue(expr)}; | auto value{GetIntValue(expr)}; | ||||
return value && *value == 0; | return value && *value == 0; | ||||
} | } | ||||
// 15.2.2 | |||||
enum class ProcedureDefinitionClass { | |||||
None, | |||||
Intrinsic, | |||||
External, | |||||
Internal, | |||||
Module, | |||||
Dummy, | |||||
Pointer, | |||||
StatementFunction | |||||
}; | |||||
ProcedureDefinitionClass ClassifyProcedure(const Symbol &); | |||||
// Derived type component iterator that provides a C++ LegacyForwardIterator | // Derived type component iterator that provides a C++ LegacyForwardIterator | ||||
// iterator over the Ordered, Direct, Ultimate or Potential components of a | // iterator over the Ordered, Direct, Ultimate or Potential components of a | ||||
// DerivedTypeSpec. These iterators can be used with STL algorithms | // DerivedTypeSpec. These iterators can be used with STL algorithms | ||||
// accepting LegacyForwardIterator. | // accepting LegacyForwardIterator. | ||||
// The kind of component is a template argument of the iterator factory | // The kind of component is a template argument of the iterator factory | ||||
// ComponentIterator. | // ComponentIterator. | ||||
// | // | ||||
// - Ordered components are the components from the component order defined | // - Ordered components are the components from the component order defined | ||||
▲ Show 20 Lines • Show All 239 Lines • Show Last 20 Lines |