Lines Matching full:message
1 //===-- lib/Parser/message.cpp --------------------------------------------===//
9 #include "flang/Parser/message.h"
142 bool Message::SortBefore(const Message &that) const {
163 bool Message::IsFatal() const {
167 Severity Message::severity() const {
177 Message &Message::set_severity(Severity severity) {
188 std::optional<common::LanguageFeature> Message::languageFeature() const {
192 Message &Message::set_languageFeature(common::LanguageFeature feature) {
197 std::optional<common::UsageWarning> Message::usageWarning() const {
201 Message &Message::set_usageWarning(common::UsageWarning warning) {
206 std::string Message::ToString() const {
218 void Message::ResolveProvenances(const AllCookedSources &allCooked) {
225 if (Message * attachment{attachment_.get()}) {
230 std::optional<ProvenanceRange> Message::GetProvenanceRange(
275 void Message::Emit(llvm::raw_ostream &o, const AllCookedSources &allCooked,
282 for (const Message *attachment{attachment_.get()}; attachment;
293 bool Message::operator==(const Message &that) const {
299 const Message *thatAttachment{that.attachment_.get()};
300 for (const Message *attachment{attachment_.get()}; attachment;
312 bool Message::Merge(const Message &that) {
326 Message &Message::Attach(Message *m) {
332 attachment_ = new Message{*attachment_};
339 Message &Message::Attach(std::unique_ptr<Message> &&m) {
343 bool Message::AtSameLocation(const Message &that) const {
357 bool Messages::Merge(const Message &msg) {
386 for (const Message &m : that.messages_) {
387 Message copy{m};
393 for (Message &m : messages_) {
400 std::vector<const Message *> sorted;
405 [](const Message *x, const Message *y) { return x->SortBefore(*y); });
406 const Message *lastMsg{nullptr};
407 for (const Message *msg : sorted) {
417 void Messages::AttachTo(Message &msg, std::optional<Severity> severity) {
418 for (Message &m : messages_) {
419 Message m2{std::move(m)};