Remove unnecessary pointers from PartialDiagnostic

llvm-svn: 91211
This commit is contained in:
Douglas Gregor 2009-12-12 07:31:50 +00:00
parent 7ca84af48e
commit 413c6fc86c
1 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ class PartialDiagnostic {
/// DiagRanges - The list of ranges added to this diagnostic. It currently /// DiagRanges - The list of ranges added to this diagnostic. It currently
/// only support 10 ranges, could easily be extended if needed. /// only support 10 ranges, could easily be extended if needed.
mutable const SourceRange *DiagRanges[10]; mutable SourceRange DiagRanges[10];
}; };
/// DiagID - The diagnostic ID. /// DiagID - The diagnostic ID.
@ -81,7 +81,7 @@ class PartialDiagnostic {
assert(DiagStorage->NumDiagRanges < assert(DiagStorage->NumDiagRanges <
llvm::array_lengthof(DiagStorage->DiagRanges) && llvm::array_lengthof(DiagStorage->DiagRanges) &&
"Too many arguments to diagnostic!"); "Too many arguments to diagnostic!");
DiagStorage->DiagRanges[DiagStorage->NumDiagRanges++] = &R; DiagStorage->DiagRanges[DiagStorage->NumDiagRanges++] = R;
} }
void operator=(const PartialDiagnostic &); // DO NOT IMPLEMENT void operator=(const PartialDiagnostic &); // DO NOT IMPLEMENT
@ -114,7 +114,7 @@ public:
// Add all ranges. // Add all ranges.
for (unsigned i = 0, e = DiagStorage->NumDiagRanges; i != e; ++i) for (unsigned i = 0, e = DiagStorage->NumDiagRanges; i != e; ++i)
DB.AddSourceRange(*DiagStorage->DiagRanges[i]); DB.AddSourceRange(DiagStorage->DiagRanges[i]);
} }
friend const PartialDiagnostic &operator<<(const PartialDiagnostic &PD, friend const PartialDiagnostic &operator<<(const PartialDiagnostic &PD,