Skip to content

Commit cc10a13

Browse files
committed
Improve comments and formatting
1 parent f26f6de commit cc10a13

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

clang/include/clang/Frontend/StandaloneDiagnostic.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ namespace clang {
3333
/// that file.
3434
/// To report the diagnostic, it must first be translated back into a
3535
/// StoredDiagnostic with a new associated SourceManager.
36-
///
3736
struct StandaloneDiagnostic {
3837
/// Represents a CharSourceRange within a StandaloneDiagnostic.
3938
struct SourceOffsetRange {

clang/lib/Frontend/StandaloneDiagnostic.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ translateStandaloneDiag(FileManager &FileMgr, SourceManager &SrcMgr,
6969
FileLoc = It->getValue();
7070
}
7171

72-
// Cache miss - compute the location
72+
// Cache miss - compute and cache the location
7373
if (FileLoc.isInvalid()) {
7474
const auto FileID =
7575
SrcMgr.getOrCreateFileID(*FileRef, StandaloneDiag.FileKind);
@@ -79,7 +79,6 @@ translateStandaloneDiag(FileManager &FileMgr, SourceManager &SrcMgr,
7979
return StoredDiagnostic(StandaloneDiag.Level, StandaloneDiag.ID,
8080
StandaloneDiag.Message);
8181

82-
// Store in cache
8382
SrcLocCache[StandaloneDiag.Filename] = FileLoc;
8483
}
8584

0 commit comments

Comments
 (0)