[PATCH] [LSan] Common leak checking module.
Alexander Potapenko
glider at google.com
Thu May 16 07:09:24 PDT 2013
Looks mostly good.
================
Comment at: lib/lsan/lsan_common_linux.cc:38
@@ +37,3 @@
+ uptr linker_found = GetListOfModules(
+ reinterpret_cast<LoadedModule *>(linker_placeholder), 1, IsLinker);
+ if (!linker_found) {
----------------
What 1 stands here for?
================
Comment at: lib/lsan/lsan_common.h:121
@@ +120,3 @@
+
+ LeakReport *leak_report_;
+};
----------------
Sergey Matveev wrote:
> Alexander Potapenko wrote:
> > Either name it "leak_report" without the trailing underscore, or make it private. Ditto for other callback classes.
> According to the style guide, all class member variables must end with an underscore. http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Variable_Names
This is because data members should typically be private. http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Access_Control#Access_Control
As a rule of thumb I usually use the trailing underscore as a sign of a private member. To avoid arguing about whether a public data member should or should not have the underscore, I suggest to make leak_report_ private.
http://llvm-reviews.chandlerc.com/D787
More information about the llvm-commits
mailing list