From d59ebd5548bf259008c7c89d6074dd02bfd59932 Mon Sep 17 00:00:00 2001
From: Joao Matos <joao@tritao.eu>
Date: Fri, 16 Sep 2016 16:39:57 +0100
Subject: [PATCH] Improved diagnostic output in CheckIgnoredDecls.

---
 src/Generator/Passes/CheckIgnoredDecls.cs | 68 +++++++++++------------
 1 file changed, 34 insertions(+), 34 deletions(-)

diff --git a/src/Generator/Passes/CheckIgnoredDecls.cs b/src/Generator/Passes/CheckIgnoredDecls.cs
index 38ed5fac..959e5578 100644
--- a/src/Generator/Passes/CheckIgnoredDecls.cs
+++ b/src/Generator/Passes/CheckIgnoredDecls.cs
@@ -56,8 +56,8 @@ namespace CppSharp.Passes
 
             if (!CheckDeclarationAccess(decl))
             {
-                Diagnostics.Debug("Decl '{0}' was ignored due to invalid access",
-                    decl.Name);
+                Diagnostics.Debug("'{0}' was ignored due to invalid access",
+                    decl.QualifiedName);
                 decl.GenerationKind = decl is Field ? GenerationKind.Internal : GenerationKind.None;
                 return true;
             }
@@ -65,8 +65,8 @@ namespace CppSharp.Passes
             if (decl.IsDependent)
             {
                 decl.GenerationKind = decl is Field ? GenerationKind.Internal : GenerationKind.None;
-                Diagnostics.Debug("Decl '{0}' was ignored due to dependent context",
-                    decl.Name);
+                Diagnostics.Debug("'{0}' was ignored due to dependent context",
+                    decl.QualifiedName);
                 return true;
             }
 
@@ -95,8 +95,8 @@ namespace CppSharp.Passes
             var cppTypePrinter = new CppTypePrinter();
             var typeName = field.Type.Visit(cppTypePrinter);
 
-            Diagnostics.Debug("Field '{0}::{1}' was ignored due to {2} type '{3}'",
-                @class.Name, field.Name, msg, typeName);
+            Diagnostics.Debug("'{0}' was ignored due to {1} type '{2}'",
+                field.QualifiedName, msg, typeName);
 
             return true;
         }
@@ -112,8 +112,8 @@ namespace CppSharp.Passes
             if (HasInvalidType(ret.Type, function.TranslationUnit.Module, out msg))
             {
                 function.ExplicitlyIgnore();
-                Diagnostics.Debug("Function '{0}' was ignored due to {1} return decl",
-                    function.Name, msg);
+                Diagnostics.Debug("'{0}' was ignored due to {1} return decl",
+                    function.QualifiedName, msg);
                 return false;
             }
 
@@ -122,16 +122,16 @@ namespace CppSharp.Passes
                 if (HasInvalidDecl(param, out msg))
                 {
                     function.ExplicitlyIgnore();
-                    Diagnostics.Debug("Function '{0}' was ignored due to {1} param",
-                        function.Name, msg);
+                    Diagnostics.Debug("'{0}' was ignored due to {1} param",
+                        function.QualifiedName, msg);
                     return false;
                 }
 
                 if (HasInvalidType(param.Type, function.TranslationUnit.Module, out msg))
                 {
                     function.ExplicitlyIgnore();
-                    Diagnostics.Debug("Function '{0}' was ignored due to {1} param",
-                        function.Name, msg);
+                    Diagnostics.Debug("'{0}' was ignored due to {1} param",
+                        function.QualifiedName, msg);
                     return false;
                 }
 
@@ -139,8 +139,8 @@ namespace CppSharp.Passes
                 if (decayedType != null)
                 {
                     function.ExplicitlyIgnore();
-                    Diagnostics.Debug("Function '{0}' was ignored due to unsupported decayed type param",
-                        function.Name);
+                    Diagnostics.Debug("'{0}' was ignored due to unsupported decayed type param",
+                        function.QualifiedName);
                     return false;
                 }
 
@@ -152,8 +152,8 @@ namespace CppSharp.Passes
                     {
                         function.ExplicitlyIgnore();
                         Diagnostics.Debug(
-                            "Function '{0}' was ignored due to an indirect return param not of a tag type",
-                            function.Name);
+                            "'{0}' was ignored due to an indirect return param not of a tag type",
+                            function.QualifiedName);
                         return false;
                     }
                 }
@@ -180,8 +180,8 @@ namespace CppSharp.Passes
                 if (HasIgnoredBaseClass(method, @class, out ignoredBase))
                 {
                     Diagnostics.Debug(
-                        "Virtual method '{0}' was ignored due to ignored base '{1}'",
-                        method.QualifiedOriginalName, ignoredBase.Name);
+                        "'{0}' was ignored due to ignored base '{1}'",
+                        method.QualifiedName, ignoredBase.Name);
 
                     method.ExplicitlyIgnore();
                     return false;
@@ -226,8 +226,8 @@ namespace CppSharp.Passes
             if (HasInvalidType(typedef.Type, typedef.TranslationUnit.Module, out msg))
             {
                 typedef.ExplicitlyIgnore();
-                Diagnostics.Debug("Typedef '{0}' was ignored due to {1} type",
-                    typedef.Name, msg);
+                Diagnostics.Debug("'{0}' was ignored due to {1} type",
+                    typedef.QualifiedName, msg);
                 return false;
             }
 
@@ -243,16 +243,16 @@ namespace CppSharp.Passes
             if (HasInvalidDecl(property, out msg))
             {
                 property.ExplicitlyIgnore();
-                Diagnostics.Debug("Property '{0}' was ignored due to {1} decl",
-                    property.Name, msg);
+                Diagnostics.Debug("'{0}' was ignored due to {1} decl",
+                    property.QualifiedName, msg);
                 return false;
             }
 
             if (HasInvalidType(property.Type, property.TranslationUnit.Module, out msg))
             {
                 property.ExplicitlyIgnore();
-                Diagnostics.Debug("Property '{0}' was ignored due to {1} type",
-                    property.Name, msg);
+                Diagnostics.Debug("'{0}' was ignored due to {1} type",
+                    property.QualifiedName, msg);
                 return false;
             }
 
@@ -268,16 +268,16 @@ namespace CppSharp.Passes
             if (HasInvalidDecl(variable, out msg))
             {
                 variable.ExplicitlyIgnore();
-                Diagnostics.Debug("Variable '{0}' was ignored due to {1} decl",
-                    variable.Name, msg);
+                Diagnostics.Debug("'{0}' was ignored due to {1} decl",
+                    variable.QualifiedName, msg);
                 return false;
             }
 
             if (HasInvalidType(variable.Type, variable.TranslationUnit.Module, out msg))
             {
                 variable.ExplicitlyIgnore();
-                Diagnostics.Debug("Variable '{0}' was ignored due to {1} type",
-                    variable.Name, msg);
+                Diagnostics.Debug("'{0}' was ignored due to {1} type",
+                    variable.QualifiedName, msg);
                 return false;
             }
 
@@ -293,8 +293,8 @@ namespace CppSharp.Passes
             if (HasInvalidDecl(@event, out msg))
             {
                 @event.ExplicitlyIgnore();
-                Diagnostics.Debug("Event '{0}' was ignored due to {1} decl",
-                    @event.Name, msg);
+                Diagnostics.Debug("'{0}' was ignored due to {1} decl",
+                    @event.QualifiedName, msg);
                 return false;
             }
 
@@ -303,16 +303,16 @@ namespace CppSharp.Passes
                 if (HasInvalidDecl(param, out msg))
                 {
                     @event.ExplicitlyIgnore();
-                    Diagnostics.Debug("Event '{0}' was ignored due to {1} param",
-                        @event.Name, msg);
+                    Diagnostics.Debug("'{0}' was ignored due to {1} param",
+                        @event.QualifiedName, msg);
                     return false;
                 }
 
                 if (HasInvalidType(param.Type, @event.TranslationUnit.Module, out msg))
                 {
                     @event.ExplicitlyIgnore();
-                    Diagnostics.Debug("Event '{0}' was ignored due to {1} param",
-                        @event.Name, msg);
+                    Diagnostics.Debug("'{0}' was ignored due to {1} param",
+                        @event.QualifiedName, msg);
                     return false;
                 }
             }