r280426 - Remove excessive padding from MismatchingNewDeleteDetector

Alexander Shaposhnikov via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 1 16:18:00 PDT 2016


Author: alexshap
Date: Thu Sep  1 18:18:00 2016
New Revision: 280426

URL: http://llvm.org/viewvc/llvm-project?rev=280426&view=rev
Log:
Remove excessive padding from MismatchingNewDeleteDetector

The class MismatchingNewDeleteDetector is in 
lib/Sema/SemaExprCXX.cpp inside the anonymous namespace.
This diff reorders the fields and removes the excessive padding.
Test plan: make -j8 check-clang

Differential revision: https://reviews.llvm.org/D23898

Modified:
    cfe/trunk/lib/Sema/SemaExprCXX.cpp

Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=280426&r1=280425&r2=280426&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Thu Sep  1 18:18:00 2016
@@ -2593,7 +2593,7 @@ public:
   /// translation unit. False, if this is the initial analysis at the point
   /// delete-expression was encountered.
   explicit MismatchingNewDeleteDetector(bool EndOfTU)
-      : IsArrayForm(false), Field(nullptr), EndOfTU(EndOfTU),
+      : Field(nullptr), IsArrayForm(false), EndOfTU(EndOfTU),
         HasUndefinedConstructors(false) {}
 
   /// \brief Checks whether pointee of a delete-expression is initialized with
@@ -2612,11 +2612,11 @@ public:
   /// \param DeleteWasArrayForm Array form-ness of the delete-expression used
   /// for deleting the \p Field.
   MismatchResult analyzeField(FieldDecl *Field, bool DeleteWasArrayForm);
+  FieldDecl *Field;
   /// List of mismatching new-expressions used for initialization of the pointee
   llvm::SmallVector<const CXXNewExpr *, 4> NewExprs;
   /// Indicates whether delete-expression was in array form.
   bool IsArrayForm;
-  FieldDecl *Field;
 
 private:
   const bool EndOfTU;




More information about the cfe-commits mailing list