Lines Matching full:message

1 //===-- include/flang/Parser/message.h --------------------------*- C++ -*-===//
35 // and severity of a message or attachment.
40 Because, // for AttachTo(), explanatory attachment to support another message
188 class Message : public common::ReferenceCounted<Message> {
190 using Reference = common::CountedReference<Message>;
192 Message(const Message &) = default;
193 Message(Message &&) = default;
194 Message &operator=(const Message &) = default;
195 Message &operator=(Message &&) = default;
197 Message(ProvenanceRange pr, const MessageFixedText &t)
199 Message(ProvenanceRange pr, const MessageFormattedText &s)
201 Message(ProvenanceRange pr, MessageFormattedText &&s)
203 Message(ProvenanceRange pr, const MessageExpectedText &t)
206 Message(common::LanguageFeature feature, ProvenanceRange pr,
209 Message(common::LanguageFeature feature, ProvenanceRange pr,
212 Message(common::LanguageFeature feature, ProvenanceRange pr,
216 Message(common::UsageWarning warning, ProvenanceRange pr,
219 Message(common::UsageWarning warning, ProvenanceRange pr,
222 Message(common::UsageWarning warning, ProvenanceRange pr,
226 Message(CharBlock csr, const MessageFixedText &t)
228 Message(CharBlock csr, const MessageFormattedText &s)
230 Message(CharBlock csr, MessageFormattedText &&s)
232 Message(CharBlock csr, const MessageExpectedText &t)
235 Message(
238 Message(common::LanguageFeature feature, CharBlock csr,
241 Message(
245 Message(
248 Message(common::UsageWarning warning, CharBlock csr,
251 Message(common::UsageWarning warning, CharBlock csr, MessageFormattedText &&s)
255 Message(RANGE r, const MessageFixedText &t, A &&x, As &&...xs)
259 Message(common::LanguageFeature feature, RANGE r, const MessageFixedText &t,
265 Message(common::UsageWarning warning, RANGE r, const MessageFixedText &t,
273 void SetContext(Message *c) {
277 Message &Attach(Message *);
278 Message &Attach(std::unique_ptr<Message> &&);
279 template <typename... A> Message &Attach(A &&...args) {
280 return Attach(new Message{std::forward<A>(args)...}); // reference-counted
283 bool SortBefore(const Message &that) const;
286 Message &set_severity(Severity);
288 Message &set_languageFeature(common::LanguageFeature);
290 Message &set_usageWarning(common::UsageWarning);
297 // If this Message or any of its attachments locates itself via a CharBlock,
304 bool Merge(const Message &);
305 bool operator==(const Message &that) const;
306 bool operator!=(const Message &that) const { return !(*this == that); }
309 bool AtSameLocation(const Message &) const;
328 std::list<Message> &messages() { return messages_; }
332 template <typename... A> Message &Say(A &&...args) {
337 Message &Say(common::LanguageFeature feature, A &&...args) {
342 Message &Say(common::UsageWarning warning, A &&...args) {
350 bool Merge(const Message &);
356 void AttachTo(Message &, std::optional<Severity> = std::nullopt);
360 std::list<Message> messages_;
373 Message::Reference contextMessage() const { return contextMessage_; }
384 common::Restorer<Message::Reference> SetContext(Message *m) {
401 template <typename... A> Message *Say(A &&...args) {
405 template <typename... A> Message *Say(CharBlock at, A &&...args) {
418 Message *Say(std::optional<CharBlock> at, A &&...args) {
423 Message *Say(common::LanguageFeature feature, A &&...args) {
424 Message *msg{Say(std::forward<A>(args)...)};
432 Message *Say(common::UsageWarning warning, A &&...args) {
433 Message *msg{Say(std::forward<A>(args)...)};
440 Message *Say(Message &&msg) {
454 Message::Reference contextMessage_;