Skip to content

Commit 71719d3

Browse files
committed
Fix StandaloneDiagnostic implementation
1 parent 3110a19 commit 71719d3

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

clang/include/clang/Frontend/StandaloneDiagnostic.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ struct StandaloneDiagnostic {
4242

4343
unsigned Begin = 0;
4444
unsigned End = 0;
45-
bool IsTokenRange = false;
4645
};
4746

4847
/// Represents a FixItHint within a StandaloneDiagnostic.
@@ -78,9 +77,6 @@ StoredDiagnostic translateStandaloneDiag(FileManager &FileMgr,
7877
SourceManager &SrcMgr,
7978
StandaloneDiagnostic &&StandaloneDiag);
8079

81-
// Simple debug printing of StandaloneDiagnostic.
82-
llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const StoredDiagnostic &);
83-
8480
} // namespace clang
8581

8682
#endif // STANDALONEDIAGNOSTICS

clang/lib/Frontend/StandaloneDiagnostic.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ namespace clang {
1313

1414
StandaloneDiagnostic::SourceOffsetRange::SourceOffsetRange(
1515
CharSourceRange Range, const SourceManager &SrcMgr,
16-
const LangOptions &LangOpts)
17-
: IsTokenRange(Range.isTokenRange()) {
16+
const LangOptions &LangOpts) {
1817
const auto FileRange = Lexer::makeFileCharRange(Range, SrcMgr, LangOpts);
1918
Begin = SrcMgr.getFileOffset(FileRange.getBegin());
2019
End = SrcMgr.getFileOffset(FileRange.getEnd());
@@ -75,7 +74,7 @@ translateStandaloneDiag(FileManager &FileMgr, SourceManager &SrcMgr,
7574
return CharSourceRange(
7675
SourceRange(FileLoc.getLocWithOffset(Range.Begin),
7776
FileLoc.getLocWithOffset(Range.End)),
78-
Range.IsTokenRange);
77+
/*IsTokenRange*/ false);
7978
};
8079

8180
SmallVector<CharSourceRange, 0> TranslatedRanges;

0 commit comments

Comments
 (0)