CKDiagnostic Reference

File
ClangKit/Classes/CKDiagnostic.h
Author
Jean-David Gadina - www.xs-labs.com
Copyright
© (c) 2010-2014 - Jean-David Gadina - www.xs-labs.com
Date
Wednesday, June 25, 2014
Includes
None

Overview

ClangKit diagnostic class

Class CKDiagnostic

Attributes

Superclass
NSObject

+ diagnosticsForTranslationUnit:

Gets diagnostics objects for a translation unit

+ ( NSArray * )diagnosticsForTranslationUnit: ( CKTranslationUnit * )translationUnit;

Parameters
  • translationUnit
    The translation unit from which to get the diagnostics
Return value

An array with instances of 'CKFixIt'

+ diagnosticWithTranslationUnit:index:

Gets a specific diagnostic from a translation unit

+ ( id )diagnosticWithTranslationUnit: ( CKTranslationUnit * )translationUnit index: ( NSUInteger )index;

Discussion

The returned object is autoreleased.

Parameters
  • translationUnit
    The translation unit from which to get the diagnostic
  • index
    The index of the diagnostic in the translation unit
Return value

The diagnostic object

- initWithTranslationUnit:

Initializes a specific diagnostic with a translation unit

- ( id )initWithTranslationUnit: ( CKTranslationUnit * )translationUnit index: ( NSUInteger )index;

Parameters
  • translationUnit
    The translation unit from which to get the diagnostic
  • index
    The index of the diagnostic in the translation unit
Return value

The diagnostic object

- initWithTranslationUnit:index:

Initializes a specific diagnostic with a translation unit

- ( id )initWithTranslationUnit: ( CKTranslationUnit * )translationUnit index: ( NSUInteger )index;

Parameters
  • translationUnit
    The translation unit from which to get the diagnostic
  • index
    The index of the diagnostic in the translation unit

column

Column number for the diagnostic

@property( atomic, readonly ) NSUInteger column;

cxDiagnostic

Internal libclang diagnostic object

@property( atomic, readonly ) CXDiagnostic cxDiagnostic;

fixIts

An array containing instances of 'CKFixIt'

@property( atomic, readonly ) NSArray * fixIts;

line

Line number for the diagnostic

@property( atomic, readonly ) NSUInteger line;

range

Range of the diagnostic, based on the source code

@property( atomic, readonly ) NSRange range;

severity

Diagnostic's severity

@property( atomic, readonly ) CKDiagnosticSeverity severity;

spelling

Diagnostic's spelling

@property( atomic, readonly ) NSString * spelling;

Types

CKDiagnosticSeverity

Diagnostic severity

typedef NSInteger CKDiagnosticSeverity;

Globals

CKDiagnosticSeverityError

Diagnostic severity - Error

FOUNDATION_EXPORT CKDiagnosticSeverity CKDiagnosticSeverityError;

CKDiagnosticSeverityFatal

Diagnostic severity - Fatal error

FOUNDATION_EXPORT CKDiagnosticSeverity CKDiagnosticSeverityFatal;

CKDiagnosticSeverityIgnored

Diagnostic severity - Ignored

FOUNDATION_EXPORT CKDiagnosticSeverity CKDiagnosticSeverityIgnored;

CKDiagnosticSeverityNote

Diagnostic severity - Notice

FOUNDATION_EXPORT CKDiagnosticSeverity CKDiagnosticSeverityNote;

CKDiagnosticSeverityWarning

Diagnostic severity - Warning

FOUNDATION_EXPORT CKDiagnosticSeverity CKDiagnosticSeverityWarning;