Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions compiler/src/dmd/errors.d
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ __gshared Diagnostic[] diagnostics = [];
class ErrorSinkCompiler : ErrorSink
{
nothrow:
extern (C++):
override:

void verror(Loc loc, const(char)* format, va_list ap)
Expand Down Expand Up @@ -246,55 +245,6 @@ else
va_end(ap);
}

/**
* Print a warning message, increasing the global warning count.
* Params:
* loc = location of warning
* format = printf-style format specification
* ... = printf-style variadic arguments
*/
static if (__VERSION__ < 2092)
extern (C++) void warning(Loc loc, const(char)* format, ...)
{
va_list ap;
va_start(ap, format);
vreportDiagnostic(loc, format, ap, ErrorKind.warning);
va_end(ap);
}
else
pragma(printf) extern (C++) void warning(Loc loc, const(char)* format, ...)
{
va_list ap;
va_start(ap, format);
vreportDiagnostic(loc, format, ap, ErrorKind.warning);
va_end(ap);
}

/**
* Print additional details about a warning message.
* Doesn't increase the warning count or print an additional warning prefix.
* Params:
* loc = location of warning
* format = printf-style format specification
* ... = printf-style variadic arguments
*/
static if (__VERSION__ < 2092)
extern (C++) void warningSupplemental(Loc loc, const(char)* format, ...)
{
va_list ap;
va_start(ap, format);
vsupplementalDiagnostic(loc, format, ap, ErrorKind.warning);
va_end(ap);
}
else
pragma(printf) extern (C++) void warningSupplemental(Loc loc, const(char)* format, ...)
{
va_list ap;
va_start(ap, format);
vsupplementalDiagnostic(loc, format, ap, ErrorKind.warning);
va_end(ap);
}

/**
* Print a deprecation message, may increase the global warning or error count
* depending on whether deprecations are ignored.
Expand Down
2 changes: 0 additions & 2 deletions compiler/src/dmd/errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ enum class ErrorKind
#endif

// Print a warning, deprecation, or error, accepts printf-like format specifiers.
D_ATTRIBUTE_FORMAT(2, 3) void warning(Loc loc, const char *format, ...);
D_ATTRIBUTE_FORMAT(2, 3) void warningSupplemental(Loc loc, const char *format, ...);
D_ATTRIBUTE_FORMAT(2, 3) void deprecation(Loc loc, const char *format, ...);
D_ATTRIBUTE_FORMAT(2, 3) void deprecationSupplemental(Loc loc, const char *format, ...);
D_ATTRIBUTE_FORMAT(2, 3) void error(Loc loc, const char *format, ...);
Expand Down
4 changes: 0 additions & 4 deletions compiler/src/dmd/errorsink.d
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import dmd.location;
abstract class ErrorSink
{
nothrow:
extern (C++):

void verror(Loc loc, const(char)* format, va_list ap);
void verrorSupplemental(Loc loc, const(char)* format, va_list ap);
Expand Down Expand Up @@ -103,7 +102,6 @@ abstract class ErrorSink
class ErrorSinkNull : ErrorSink
{
nothrow:
extern (C++):
override:

void verror(Loc loc, const(char)* format, va_list ap) { }
Expand All @@ -127,7 +125,6 @@ class ErrorSinkNull : ErrorSink
class ErrorSinkLatch : ErrorSinkNull
{
nothrow:
extern (C++):
override:

bool sawErrors;
Expand All @@ -145,7 +142,6 @@ class ErrorSinkStderr : ErrorSink
import core.stdc.stdarg;

nothrow:
extern (C++):
override:

void verror(Loc loc, const(char)* format, va_list ap)
Expand Down
4 changes: 0 additions & 4 deletions compiler/src/dmd/frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -8256,10 +8256,6 @@ extern void errorBackend(const char* filename, uint32_t linnum, uint32_t charnum

extern void errorSupplemental(Loc loc, const char* format, ...);

extern void warning(Loc loc, const char* format, ...);

extern void warningSupplemental(Loc loc, const char* format, ...);

extern void deprecation(Loc loc, const char* format, ...);

extern void deprecationSupplemental(Loc loc, const char* format, ...);
Expand Down
6 changes: 0 additions & 6 deletions compiler/src/dmd/lexer.d
Original file line number Diff line number Diff line change
Expand Up @@ -3129,11 +3129,6 @@ class Lexer
eSink.deprecation(loc, format, args);
}

void warning(T...)(Loc loc, const(char)* format, T args)
{
eSink.warning(loc, format, args);
}

void deprecation(T...)(const(char)* format, T args)
{
eSink.deprecation(token.loc, format, args);
Expand Down Expand Up @@ -3618,7 +3613,6 @@ unittest
static class ErrorSinkTest : ErrorSinkNull
{
nothrow:
extern (C++):
override:

import core.stdc.stdio;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dmd/link.d
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,7 @@ clang: error: linker command failed with exit code 1 (use -v to see invocation)
class ErrorSinkTest : ErrorSinkNull
{
OutBuffer result;
extern(C++): override:
override:

void verror(Loc loc, const(char)* format, va_list ap)
{
Expand Down
Loading