[PATCH] D23387: [Analyzer] Report found fields order in PaddingChecker.

Ben Craig via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 12 06:30:19 PDT 2016

bcraig added a comment.

LGTM.  Thanks for the patch!

Comment at: lib/StaticAnalyzer/Checkers/PaddingChecker.cpp:217
@@ +216,3 @@
+        // then large field indices to small field indices
+        return std::make_tuple(Align, -Size,
+                               Field ? -static_cast<int>(Field->getFieldIndex())
I think std::tie is the more idiomatic way to do this (not that I had it right before either).  You get less copying of values, though that doesn't matter much for the types we are using here.


More information about the cfe-commits mailing list