Changes in src/Common/SemanticError.h [be00a2d:b1f2007d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/SemanticError.h
rbe00a2d rb1f2007d 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Feb 25 12:01:31202313 // Update Count : 3712 // Last Modified On : Mon Dec 11 21:54:22 2023 13 // Update Count : 54 14 14 // 15 15 … … 18 18 #include "ErrorObjects.h" 19 19 #include "AST/Node.hpp" 20 #include "AST/ParseNode.hpp" 20 21 #include <cstring> 21 22 … … 25 26 extern bool SemanticErrorThrow; 26 27 28 __attribute__((noreturn, format(printf, 2, 3))) void SemanticError( CodeLocation location, const char fmt[], ... ); 29 27 30 __attribute__((noreturn)) void SemanticError( CodeLocation location, std::string error ); 28 31 29 template< typename T > 30 __attribute__((noreturn)) static inline void SemanticError( const T * obj, const std::string & error ) { 32 __attribute__((noreturn)) static inline void SemanticError( const ast::ParseNode * obj, const std::string & error ) { 31 33 SemanticError( obj->location, toString( error, obj ) ); 32 34 } 33 35 34 template< typename T > 35 __attribute__((noreturn)) static inline void SemanticError( CodeLocation location, const T * obj, const std::string & error ) { 36 __attribute__((noreturn)) static inline void SemanticError( CodeLocation location, const ast::Node * obj, const std::string & error ) { 36 37 SemanticError( location, toString( error, obj ) ); 37 38 } … … 54 55 55 56 constexpr WarningData WarningFormats[] = { 56 {"self-assign" , Severity::Warn 57 {"reference-conversion" , Severity::Warn 58 {"qualifiers-zero_t-one_t" , Severity::Warn 59 {"aggregate-forward-decl" , Severity::Warn 60 {"superfluous-decl" , Severity::Warn 61 {"superfluous-else" , Severity::Warn 62 {"gcc-attributes" , Severity::Warn 63 {"c++-like-copy" , Severity::Warn 64 {"depreciated-trait-syntax" , Severity::Warn 57 {"self-assign" , Severity::Warn, "self assignment of expression: %s" }, 58 {"reference-conversion" , Severity::Warn, "rvalue to reference conversion of rvalue: %s" }, 59 {"qualifiers-zero_t-one_t" , Severity::Warn, "questionable use of type qualifier(s) with %s" }, 60 {"aggregate-forward-decl" , Severity::Warn, "forward declaration of nested aggregate: %s" }, 61 {"superfluous-decl" , Severity::Warn, "declaration does not allocate storage: %s" }, 62 {"superfluous-else" , Severity::Warn, "else clause never executed for empty loop conditional" }, 63 {"gcc-attributes" , Severity::Warn, "invalid attribute: %s" }, 64 {"c++-like-copy" , Severity::Warn, "Constructor from reference is not a valid copy constructor" }, 65 {"depreciated-trait-syntax" , Severity::Warn, "trait type-parameters are now specified using the forall clause" }, 65 66 }; 66 67 … … 75 76 CppCopy, 76 77 DeprecTraitSyntax, 77 NUMBER_OF_WARNINGS, // ThisMUST be the last warning78 NUMBER_OF_WARNINGS, // MUST be the last warning 78 79 }; 79 80
Note:
See TracChangeset
for help on using the changeset viewer.