Changeset da7fe39 for src/Common/SemanticError.h
- Timestamp:
- Apr 23, 2018, 12:57:46 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
- Children:
- 57acae0
- Parents:
- ba89e9b7 (diff), c8ad5d9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/SemanticError.h
rba89e9b7 rda7fe39 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Aug 29 22:03:36 201713 // Update Count : 1 712 // Last Modified On : Thu Apr 19 17:52:03 2018 13 // Update Count : 19 14 14 // 15 15 … … 36 36 // Warnings 37 37 38 constexpr const char * const WarningFormats[] = { 39 "self assignment of expression: %s", 40 "rvalue to reference conversion of rvalue: %s", 38 enum class Severity { 39 Suppress, 40 Warn, 41 Error, 42 Critical 43 }; 44 45 struct WarningData { 46 const char * const name; 47 const char * const message; 48 mutable Severity severity; 49 }; 50 51 constexpr const WarningData WarningFormats[] = { 52 {"self-assign" , "self assignment of expression: %s" , Severity::Warn}, 53 {"reference-conversion", "rvalue to reference conversion of rvalue: %s", Severity::Warn}, 54 {"qualifiers-zero_t-one_t", "questionable use of type qualifier %s with %s", Severity::Warn}, 41 55 }; 42 56 … … 44 58 SelfAssignment, 45 59 RvalueToReferenceConversion, 60 BadQualifiersZeroOne, 46 61 NUMBER_OF_WARNINGS, //This MUST be the last warning 47 62 }; … … 52 67 ); 53 68 54 // ## used here to allow empty __VA_ARGS__ 55 #define SemanticWarning(loc, id, ...) SemanticWarningImpl(loc, id, WarningFormats[(int)id], ## __VA_ARGS__) 69 #define SemanticWarning(loc, id, ...) SemanticWarningImpl(loc, id, WarningFormats[(int)id].message, __VA_ARGS__) 56 70 57 71 void SemanticWarningImpl (CodeLocation loc, Warning warn, const char * const fmt, ...) __attribute__((format(printf, 3, 4)));
Note:
See TracChangeset
for help on using the changeset viewer.