diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-12 07:31:50 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-12 07:31:50 +0000 |
commit | cc5ee6be70278def952fdbe0a3ec2b4ff79b05e8 (patch) | |
tree | a0f3736db4a18b59e85c3d1e53354622f662869d | |
parent | 75b699a883ed02e9183cb5f4ad7086f4e3c6adf1 (diff) |
Remove unnecessary pointers from PartialDiagnostic
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91211 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/PartialDiagnostic.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Basic/PartialDiagnostic.h b/include/clang/Basic/PartialDiagnostic.h index 9960d5beb5..766aac1526 100644 --- a/include/clang/Basic/PartialDiagnostic.h +++ b/include/clang/Basic/PartialDiagnostic.h @@ -55,7 +55,7 @@ class PartialDiagnostic { /// DiagRanges - The list of ranges added to this diagnostic. It currently /// only support 10 ranges, could easily be extended if needed. - mutable const SourceRange *DiagRanges[10]; + mutable SourceRange DiagRanges[10]; }; /// DiagID - The diagnostic ID. @@ -81,7 +81,7 @@ class PartialDiagnostic { assert(DiagStorage->NumDiagRanges < llvm::array_lengthof(DiagStorage->DiagRanges) && "Too many arguments to diagnostic!"); - DiagStorage->DiagRanges[DiagStorage->NumDiagRanges++] = &R; + DiagStorage->DiagRanges[DiagStorage->NumDiagRanges++] = R; } void operator=(const PartialDiagnostic &); // DO NOT IMPLEMENT @@ -114,7 +114,7 @@ public: // Add all ranges. 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, |