[cfe-commits] r118302 - /cfe/trunk/include/clang/Basic/Diagnostic.h

Argyrios Kyrtzidis akyrtzi at gmail.com
Fri Nov 5 15:10:14 PDT 2010


Author: akirtzidis
Date: Fri Nov  5 17:10:14 2010
New Revision: 118302

URL: http://llvm.org/viewvc/llvm-project?rev=118302&view=rev
Log:
Initialize the array with the "C++ way".

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

Modified: cfe/trunk/include/clang/Basic/Diagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic.h?rev=118302&r1=118301&r2=118302&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Diagnostic.h (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.h Fri Nov  5 17:10:14 2010
@@ -215,9 +215,7 @@
     unsigned char Values[diag::DIAG_UPPER_LIMIT/2];
 
   public:
-    DiagMappings() {
-      memset(Values, 0, diag::DIAG_UPPER_LIMIT/2);
-    }
+    DiagMappings() : Values() { }
 
     void setMapping(diag::kind Diag, unsigned Map) {
       size_t Shift = (Diag & 1)*4;





More information about the cfe-commits mailing list