[cfe-commits] r91211 - /cfe/trunk/include/clang/Basic/PartialDiagnostic.h

Douglas Gregor dgregor at apple.com
Fri Dec 11 23:31:51 PST 2009


Author: dgregor
Date: Sat Dec 12 01:31:50 2009
New Revision: 91211

URL: http://llvm.org/viewvc/llvm-project?rev=91211&view=rev
Log:
Remove unnecessary pointers from PartialDiagnostic

Modified:
    cfe/trunk/include/clang/Basic/PartialDiagnostic.h

Modified: cfe/trunk/include/clang/Basic/PartialDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/PartialDiagnostic.h?rev=91211&r1=91210&r2=91211&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/PartialDiagnostic.h (original)
+++ cfe/trunk/include/clang/Basic/PartialDiagnostic.h Sat Dec 12 01:31:50 2009
@@ -55,7 +55,7 @@
   
     /// 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 @@
     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 @@
     
     // 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,





More information about the cfe-commits mailing list