Changeset b03eed6 for src/Common/SemanticError.cc
- Timestamp:
- Apr 19, 2018, 5:54:41 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:
- 8633f060
- Parents:
- e16294d (diff), da9d79b (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.cc
re16294d rb03eed6 68 68 } 69 69 70 void SemanticWarningImpl( CodeLocation location, Warning, const char * const fmt, ... ) { 71 va_list args; 72 va_start(args, fmt); 73 std::string msg = fmtToString( fmt, args ); 74 va_end(args); 75 std::cerr << ErrorHelpers::bold() << location << ErrorHelpers::warning_str() << ErrorHelpers::reset_font() << msg << std::endl; 70 void SemanticWarningImpl( CodeLocation location, Warning warning, const char * const fmt, ... ) { 71 Severity severity = WarningFormats[(int)warning].severity; 72 switch(severity) { 73 case Severity::Suppress : 74 break; 75 case Severity::Warn : 76 { 77 va_list args; 78 va_start(args, fmt); 79 std::string msg = fmtToString( fmt, args ); 80 va_end(args); 81 std::cerr << ErrorHelpers::bold() << location << ErrorHelpers::warning_str() << ErrorHelpers::reset_font() << msg << std::endl; 82 } 83 break; 84 case Severity::Error : 85 { 86 va_list args; 87 va_start(args, fmt); 88 std::string msg = fmtToString( fmt, args ); 89 va_end(args); 90 SemanticError(location, msg); 91 } 92 break; 93 case Severity::Critical : 94 assertf(false, "Critical errors not implemented yet"); 95 break; 96 } 76 97 } 77 98
Note:
See TracChangeset
for help on using the changeset viewer.