Changeset b6ae4fb


Ignore:
Timestamp:
May 4, 2022, 2:22:13 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
5695645
Parents:
39d9b32
Message:

add SuperfluousElse? warning, allow empty vararg to macro SemanticWarning?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/SemanticError.h

    r39d9b32 rb6ae4fb  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 19 10:09:17 2018
    13 // Update Count     : 31
     12// Last Modified On : Wed May  4 14:08:26 2022
     13// Update Count     : 35
    1414//
    1515
     
    5959        {"aggregate-forward-decl" , Severity::Warn    , "forward declaration of nested aggregate: %s"                },
    6060        {"superfluous-decl"       , Severity::Warn    , "declaration does not allocate storage: %s"                  },
     61        {"superfluous-else"       , Severity::Warn    , "else clause never executed for empty loop conditional"      },
    6162        {"gcc-attributes"         , Severity::Warn    , "invalid attribute: %s"                                      },
    6263        {"c++-like-copy"          , Severity::Warn    , "Constructor from reference is not a valid copy constructor" },
     
    6970        AggrForwardDecl,
    7071        SuperfluousDecl,
     72        SuperfluousElse,
    7173        GccAttributes,
    7274        CppCopy,
     
    7981);
    8082
    81 #define SemanticWarning(loc, id, ...) SemanticWarningImpl(loc, id, WarningFormats[(int)id].message, __VA_ARGS__)
     83#define SemanticWarning(loc, id, ...) SemanticWarningImpl(loc, id, WarningFormats[(int)id].message, ##__VA_ARGS__)
    8284
    8385void SemanticWarningImpl (CodeLocation loc, Warning warn, const char * const fmt, ...) __attribute__((format(printf, 3, 4)));
Note: See TracChangeset for help on using the changeset viewer.