[flang] Rename PushLocation() to SetLocation().

Original-commit: flang-compiler/f18@1b5593c12b
Reviewed-on: https://github.com/flang-compiler/f18/pull/215
This commit is contained in:
Tim Keith 2018-10-23 14:35:13 -07:00
parent 30dd289247
commit d3e063e648
3 changed files with 4 additions and 4 deletions

View File

@ -296,7 +296,7 @@ ContextualMessages::SavedState::SavedState(
}
ContextualMessages::SavedState::~SavedState() { msgs_.at_ = at_; }
ContextualMessages::SavedState ContextualMessages::PushLocation(
ContextualMessages::SavedState ContextualMessages::SetLocation(
const CharBlock &at) {
return SavedState(*this, at);
}

View File

@ -256,7 +256,7 @@ public:
Messages *messages() const { return messages_; }
// Set CharBlock for messages; restore when the returned value is deleted
SavedState PushLocation(const CharBlock &);
SavedState SetLocation(const CharBlock &);
template<typename... A> void Say(A &&... args) {
if (messages_ != nullptr) {

View File

@ -260,7 +260,7 @@ MaybeExpr AnalyzeHelper(ExprAnalyzer &ea, const parser::Designator &d) {
// Analyze something with source provenance
template<typename A> MaybeExpr AnalyzeSourced(ExprAnalyzer &ea, const A &x) {
if (!x.source.empty()) {
auto save{ea.context.foldingContext().messages.PushLocation(x.source)};
auto save{ea.context.foldingContext().messages.SetLocation(x.source)};
return AnalyzeHelper(ea, x);
} else {
return AnalyzeHelper(ea, x);
@ -367,7 +367,7 @@ struct RealTypeVisitor {
MaybeExpr ExprAnalyzer::Analyze(const parser::RealLiteralConstant &x) {
// Use a local message context around the real literal for better
// provenance on any messages.
auto save{context.foldingContext().messages.PushLocation(x.real.source)};
auto save{context.foldingContext().messages.SetLocation(x.real.source)};
// If a kind parameter appears, it defines the kind of the literal and any
// letter used in an exponent part (e.g., the 'E' in "6.02214E+23")
// should agree. In the absence of an explicit kind parameter, any exponent