Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/SemanticError.h

    r610354a rb1f2007d  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Dec 14 13:48:07 2023
    13 // Update Count     : 72
     12// Last Modified On : Mon Dec 11 21:54:22 2023
     13// Update Count     : 54
    1414//
    1515
     
    2828__attribute__((noreturn, format(printf, 2, 3))) void SemanticError( CodeLocation location, const char fmt[], ... );
    2929
    30 __attribute__((noreturn)) static inline void SemanticError( CodeLocation location, std::string error ) {
    31         SemanticErrorThrow = true;
    32         throw SemanticErrorException( location, error );
    33 }
     30__attribute__((noreturn)) void SemanticError( CodeLocation location, std::string error );
    3431
    3532__attribute__((noreturn)) static inline void SemanticError( const ast::ParseNode * obj, const std::string & error ) {
     
    7976        CppCopy,
    8077        DeprecTraitSyntax,
    81         NUMBER_OF_WARNINGS, // MUST be last warning
     78        NUMBER_OF_WARNINGS, // MUST be the last warning
    8279};
    8380
     
    8784);
    8885
    89 void SemanticWarning( CodeLocation loc, Warning warn, ... );
     86#define SemanticWarning(loc, id, ...) SemanticWarningImpl(loc, id, WarningFormats[(int)id].message, ##__VA_ARGS__)
    9087
    91 void SemanticWarning_SuppressAll();
    92 void SemanticWarning_EnableAll();
     88void SemanticWarningImpl (CodeLocation loc, Warning warn, const char * const fmt, ...) __attribute__((format(printf, 3, 4)));
     89
     90void SemanticWarning_SuppressAll   ();
     91void SemanticWarning_EnableAll     ();
    9392void SemanticWarning_WarningAsError();
    94 void SemanticWarning_Set(const char * const name, Severity s);
     93void SemanticWarning_Set           (const char * const name, Severity s);
    9594
    9695// SKULLDUGGERY: cfa.cc is built before SemanticError.cc but needs this routine.
Note: See TracChangeset for help on using the changeset viewer.