Author: raja
Date: 2006-04-03 06:32:02 -0400 (Mon, 03 Apr 2006)
New Revision: 58930
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/report.cs
trunk/mcs/mcs/ChangeLog
trunk/mcs/mcs/report.cs
Log:
In mcs:
2006-04-03 Zoltan Varga <[EMAIL PROTECTED]>
* report.cs (Warning, Error): Add 0-, 1-, and 2- argument
specializations.
From #77961.
In gmcs:
2006-04-03 Zoltan Varga <[EMAIL PROTECTED]>
* report.cs (Warning, Error): Add 0-, 1-, and 2- argument
specializations.
From #77961.
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2006-04-03 10:31:36 UTC (rev 58929)
+++ trunk/mcs/gmcs/ChangeLog 2006-04-03 10:32:02 UTC (rev 58930)
@@ -1,3 +1,8 @@
+2006-04-03 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * report.cs (Warning, Error): Add 0-, 1-, and 2- argument
specializations.
+ From #77961.
+
2006-04-01 Marek Safar <[EMAIL PROTECTED]>
* assign.cs (Assign.DoResolve): Assignment to same variable can occur
Modified: trunk/mcs/gmcs/report.cs
===================================================================
--- trunk/mcs/gmcs/report.cs 2006-04-03 10:31:36 UTC (rev 58929)
+++ trunk/mcs/gmcs/report.cs 2006-04-03 10:32:02 UTC (rev 58930)
@@ -73,21 +73,21 @@
// IF YOU ADD A NEW WARNING YOU HAVE TO ADD ITS ID HERE
//
public static readonly int[] AllWarnings = new int[] {
-
28, 67, 78,
-
105, 108, 109, 114, 162, 164,
168, 169, 183, 184, 197,
-
219, 251, 252, 253, 282,
-
419, 420, 429, 436, 440, 465,
-
612, 618, 626, 628, 642, 649,
652, 658, 659, 660, 661, 665, 672,
-
1030, 1058,
-
1522, 1570, 1571, 1572, 1573,
1574, 1580, 1581, 1584, 1587, 1589, 1590, 1591, 1592,
-
1616, 1633, 1634, 1635, 1691,
1692,
-
1717, 1718,
-
1901,
-
2002, 2023,
-
3005, 3012, 3019, 3021, 3022,
3023, 3026, 3027,
-
// gmcs warnings start here
-
414, 1700
-
};
+ 28, 67, 78,
+ 105, 108, 109, 114, 162, 164, 168, 169, 183, 184, 197,
+ 219, 251, 252, 253, 282,
+ 419, 420, 429, 436, 440, 465,
+ 612, 618, 626, 628, 642, 649, 652, 658, 659, 660, 661,
665, 672,
+ 1030, 1058,
+ 1522, 1570, 1571, 1572, 1573, 1574, 1580, 1581, 1584,
1587, 1589, 1590, 1591, 1592,
+ 1616, 1633, 1634, 1635, 1691, 1692,
+ 1717, 1718,
+ 1901,
+ 2002, 2023,
+ 3005, 3012, 3019, 3021, 3022, 3023, 3026, 3027,
+ // gmcs warnings start here
+ 414, 1700
+ };
static Report ()
{
@@ -147,11 +147,7 @@
public virtual void Print (int code, Location location,
string text)
{
- if (location.IsNull) {
- Print (code, "", text);
- return;
- }
- Print (code, location.ToString (), text);
+ Print (code, location.IsNull ? "" :
location.ToString (), text);
}
}
@@ -378,32 +374,90 @@
return regions;
}
+ static public void Warning (int code, int level, Location loc,
string message)
+ {
+ WarningMessage w = new WarningMessage (level);
+ w.Print (code, loc, message);
+ }
+
+ static public void Warning (int code, int level, Location loc,
string format, string arg)
+ {
+ WarningMessage w = new WarningMessage (level);
+ w.Print (code, loc, String.Format (format, arg));
+ }
+
+ static public void Warning (int code, int level, Location loc,
string format, string arg1, string arg2)
+ {
+ WarningMessage w = new WarningMessage (level);
+ w.Print (code, loc, String.Format (format, arg1, arg2));
+ }
+
static public void Warning (int code, int level, Location loc,
string format, params string[] args)
{
WarningMessage w = new WarningMessage (level);
w.Print (code, loc, String.Format (format, args));
}
+ static public void Warning (int code, int level, string message)
+ {
+ Warning (code, level, Location.Null, message);
+ }
+
+ static public void Warning (int code, int level, string format,
string arg)
+ {
+ Warning (code, level, Location.Null, format, arg);
+ }
+
+ static public void Warning (int code, int level, string format,
string arg1, string arg2)
+ {
+ Warning (code, level, Location.Null, format, arg1,
arg2);
+ }
+
static public void Warning (int code, int level, string format,
params string[] args)
{
Warning (code, level, Location.Null, String.Format
(format, args));
}
- static public void Error (int code, string format, params
string[] args)
+ static public void Error (int code, Location loc, string error)
{
- Error (code, Location.Null, String.Format (format,
args));
+ new ErrorMessage ().Print (code, loc, error);
}
+ static public void Error (int code, Location loc, string
format, string arg)
+ {
+ new ErrorMessage ().Print (code, loc, String.Format
(format, arg));
+ }
+
+ static public void Error (int code, Location loc, string
format, string arg1, string arg2)
+ {
+ new ErrorMessage ().Print (code, loc, String.Format
(format, arg1, arg2));
+ }
+
static public void Error (int code, Location loc, string
format, params string[] args)
{
Error (code, loc, String.Format (format, args));
}
- static void Error (int code, Location loc, string error)
+ static public void Error (int code, string error)
{
- new ErrorMessage ().Print (code, loc, error);
+ Error (code, Location.Null, error);
}
+ static public void Error (int code, string format, string arg)
+ {
+ Error (code, Location.Null, format, arg);
+ }
+
+ static public void Error (int code, string format, string arg1,
string arg2)
+ {
+ Error (code, Location.Null, format, arg1, arg2);
+ }
+
+ static public void Error (int code, string format, params
string[] args)
+ {
+ Error (code, Location.Null, String.Format (format,
args));
+ }
+
static public void SetIgnoreWarning (int code)
{
if (warning_ignore_table == null)
Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog 2006-04-03 10:31:36 UTC (rev 58929)
+++ trunk/mcs/mcs/ChangeLog 2006-04-03 10:32:02 UTC (rev 58930)
@@ -1,3 +1,8 @@
+2006-04-03 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * report.cs (Warning, Error): Add 0-, 1-, and 2- argument
specializations.
+ From #77961.
+
2006-04-01 Marek Safar <[EMAIL PROTECTED]>
* assign.cs (Assign.DoResolve): Assignment to same variable can occur
Modified: trunk/mcs/mcs/report.cs
===================================================================
--- trunk/mcs/mcs/report.cs 2006-04-03 10:31:36 UTC (rev 58929)
+++ trunk/mcs/mcs/report.cs 2006-04-03 10:32:02 UTC (rev 58930)
@@ -73,19 +73,19 @@
// IF YOU ADD A NEW WARNING YOU HAVE TO ADD ITS ID HERE
//
public static readonly int[] AllWarnings = new int[] {
-
28, 67, 78,
-
105, 108, 109, 114, 162, 164,
168, 169, 183, 184, 197,
-
219, 251, 252, 253, 282,
-
419, 420, 429, 436, 440, 465,
-
612, 618, 626, 628, 642, 649,
652, 658, 659, 660, 661, 665, 672,
-
1030, 1058,
-
1522, 1570, 1571, 1572, 1573,
1574, 1580, 1581, 1584, 1587, 1589, 1590, 1591, 1592,
-
1616, 1633, 1634, 1635, 1691,
1692,
-
1717, 1718,
-
1901,
-
2002, 2023,
-
3005, 3012, 3019, 3021, 3022,
3023, 3026, 3027
-
};
+ 28, 67, 78,
+ 105, 108, 109, 114, 162, 164, 168, 169, 183, 184, 197,
+ 219, 251, 252, 253, 282,
+ 419, 420, 429, 436, 440, 465,
+ 612, 618, 626, 628, 642, 649, 652, 658, 659, 660, 661,
665, 672,
+ 1030, 1058,
+ 1522, 1570, 1571, 1572, 1573, 1574, 1580, 1581, 1584,
1587, 1589, 1590, 1591, 1592,
+ 1616, 1633, 1634, 1635, 1691, 1692,
+ 1717, 1718,
+ 1901,
+ 2002, 2023,
+ 3005, 3012, 3019, 3021, 3022, 3023, 3026, 3027
+ };
static Report ()
{
@@ -145,11 +145,7 @@
public virtual void Print (int code, Location location,
string text)
{
- if (location.IsNull) {
- Print (code, "", text);
- return;
- }
- Print (code, location.ToString (), text);
+ Print (code, location.IsNull ? "" :
location.ToString (), text);
}
}
@@ -363,32 +359,90 @@
return regions;
}
+ static public void Warning (int code, int level, Location loc,
string message)
+ {
+ WarningMessage w = new WarningMessage (level);
+ w.Print (code, loc, message);
+ }
+
+ static public void Warning (int code, int level, Location loc,
string format, string arg)
+ {
+ WarningMessage w = new WarningMessage (level);
+ w.Print (code, loc, String.Format (format, arg));
+ }
+
+ static public void Warning (int code, int level, Location loc,
string format, string arg1, string arg2)
+ {
+ WarningMessage w = new WarningMessage (level);
+ w.Print (code, loc, String.Format (format, arg1, arg2));
+ }
+
static public void Warning (int code, int level, Location loc,
string format, params string[] args)
{
WarningMessage w = new WarningMessage (level);
w.Print (code, loc, String.Format (format, args));
}
+ static public void Warning (int code, int level, string message)
+ {
+ Warning (code, level, Location.Null, message);
+ }
+
+ static public void Warning (int code, int level, string format,
string arg)
+ {
+ Warning (code, level, Location.Null, format, arg);
+ }
+
+ static public void Warning (int code, int level, string format,
string arg1, string arg2)
+ {
+ Warning (code, level, Location.Null, format, arg1,
arg2);
+ }
+
static public void Warning (int code, int level, string format,
params string[] args)
{
Warning (code, level, Location.Null, String.Format
(format, args));
}
- static public void Error (int code, string format, params
string[] args)
+ static public void Error (int code, Location loc, string error)
{
- Error (code, Location.Null, String.Format (format,
args));
+ new ErrorMessage ().Print (code, loc, error);
}
+ static public void Error (int code, Location loc, string
format, string arg)
+ {
+ new ErrorMessage ().Print (code, loc, String.Format
(format, arg));
+ }
+
+ static public void Error (int code, Location loc, string
format, string arg1, string arg2)
+ {
+ new ErrorMessage ().Print (code, loc, String.Format
(format, arg1, arg2));
+ }
+
static public void Error (int code, Location loc, string
format, params string[] args)
{
Error (code, loc, String.Format (format, args));
}
- static void Error (int code, Location loc, string error)
+ static public void Error (int code, string error)
{
- new ErrorMessage ().Print (code, loc, error);
+ Error (code, Location.Null, error);
}
+ static public void Error (int code, string format, string arg)
+ {
+ Error (code, Location.Null, format, arg);
+ }
+
+ static public void Error (int code, string format, string arg1,
string arg2)
+ {
+ Error (code, Location.Null, format, arg1, arg2);
+ }
+
+ static public void Error (int code, string format, params
string[] args)
+ {
+ Error (code, Location.Null, String.Format (format,
args));
+ }
+
static public void SetIgnoreWarning (int code)
{
if (warning_ignore_table == null)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches