Esempio n. 1
0
    public ClangExplorerNode(
        CKind kind,
        ClangLocation location,
        ClangExplorerNode?parent,
        CXCursor cursor,
        CXType type,
        CXType originalType,
        string?name,
        string?typeName)
    {
        Kind = kind;

        if (string.IsNullOrEmpty(location.FileName))
        {
            if (type.IsPrimitive())
            {
                // Primitives don't have a location
                Location = new ClangLocation
                {
                    FilePath   = string.Empty,
                    FileName   = "Builtin",
                    LineColumn = 0,
                    LineNumber = 0,
                    IsBuiltin  = true
                };
            }
            else
            {
                throw new NotImplementedException();
            }
        }
        else
        {
            Location = location;
        }

        Parent       = parent;
        Cursor       = cursor;
        Type         = type;
        OriginalType = originalType;
        Name         = name;
        TypeName     = typeName;
    }
Esempio n. 2
0
 public MacroObjectAlreadyExistsDiagnostic(string name, ClangLocation loc)
     : base(DiagnosticSeverity.Warning)
 {
     Summary =
         $"The object-like macro '{name}' at {loc.FilePath}:{loc.LineNumber}:{loc.LineColumn} already previously exists.";
 }
Esempio n. 3
0
 public SystemTypedefDiagnostic(string typeName, ClangLocation loc, string underlyingTypeName)
     : base(DiagnosticSeverity.Warning)
 {
     Summary =
         $"The typedef '{typeName}' at {loc.FilePath}:{loc.LineNumber}:{loc.LineColumn} is a system alias to the system type '{underlyingTypeName}'. If you intend to have cross-platform bindings this is a problem; please create an issue on GitHub.";
 }
 public MacroObjectNotTranspiledDiagnostic(string name, ClangLocation loc)
     : base(DiagnosticSeverity.Warning)
 {
     Summary =
         $"The object-like macro '{name}' at {loc.FilePath}:{loc.LineNumber}:{loc.LineColumn} was not transpiled.";
 }