@@ -33,14 +33,14 @@ CXDiagnosticSeverity CXStoredDiagnostic::getSeverity() const {
33
33
case DiagnosticsEngine::Error: return CXDiagnostic_Error;
34
34
case DiagnosticsEngine::Fatal: return CXDiagnostic_Fatal;
35
35
}
36
-
36
+
37
37
llvm_unreachable (" Invalid diagnostic level" );
38
38
}
39
39
40
40
CXSourceLocation CXStoredDiagnostic::getLocation () const {
41
41
if (Diag.getLocation ().isInvalid ())
42
42
return clang_getNullLocation ();
43
-
43
+
44
44
return translateSourceLocation (Diag.getLocation ().getManager (),
45
45
LangOpts, Diag.getLocation ());
46
46
}
@@ -57,7 +57,7 @@ CXString CXStoredDiagnostic::getDiagnosticOption(CXString *Disable) const {
57
57
*Disable = cxstring::createDup ((Twine (" -Wno-" ) + Option).str ());
58
58
return cxstring::createDup ((Twine (" -W" ) + Option).str ());
59
59
}
60
-
60
+
61
61
if (ID == diag::fatal_too_many_errors) {
62
62
if (Disable)
63
63
*Disable = cxstring::createRef (" -ferror-limit=0" );
@@ -79,7 +79,7 @@ CXString CXStoredDiagnostic::getCategoryText() const {
79
79
unsigned CXStoredDiagnostic::getNumRanges () const {
80
80
if (Diag.getLocation ().isInvalid ())
81
81
return 0 ;
82
-
82
+
83
83
return Diag.range_size ();
84
84
}
85
85
@@ -92,12 +92,12 @@ CXSourceRange CXStoredDiagnostic::getRange(unsigned int Range) const {
92
92
93
93
unsigned CXStoredDiagnostic::getNumFixIts () const {
94
94
if (Diag.getLocation ().isInvalid ())
95
- return 0 ;
95
+ return 0 ;
96
96
return Diag.fixit_size ();
97
97
}
98
98
99
99
CXString CXStoredDiagnostic::getFixIt (unsigned FixIt,
100
- CXSourceRange *ReplacementRange) const {
100
+ CXSourceRange *ReplacementRange) const {
101
101
const FixItHint &Hint = Diag.fixit_begin ()[FixIt];
102
102
if (ReplacementRange) {
103
103
// Create a range that covers the entire replacement (or
@@ -108,4 +108,3 @@ CXString CXStoredDiagnostic::getFixIt(unsigned FixIt,
108
108
}
109
109
return cxstring::createDup (Hint.CodeToInsert );
110
110
}
111
-
0 commit comments