Kaydet (Commit) 8045cef0 authored tarafından Noel Grandin's avatar Noel Grandin

improve unusedfields loplugin readonly analysis

(*) better analysis of init-list-expressions
(*) fix analysis of calls to members, turns out there is no parameter
offset after all
(*) check for passing arrays to functions, need to check
  if the parameter is T* or T const *
(*) check for assigning field to a T& variable

Change-Id: Ie6f07f970310c3854e74619fe4fd02a299bf6879
üst 5a6d6429
...@@ -153,7 +153,23 @@ for d in definitionSet: ...@@ -153,7 +153,23 @@ for d in definitionSet:
parentClazz = d[0]; parentClazz = d[0];
if d in writeToSet: if d in writeToSet:
continue continue
fieldType = definitionToTypeMap[d]
srcLoc = definitionToSourceLocationMap[d]; srcLoc = definitionToSourceLocationMap[d];
if "ModuleClient" in fieldType:
continue
# this is all representations of on-disk data structures
if (srcLoc.startswith("sc/source/filter/inc/scflt.hxx")
or srcLoc.startswith("sw/source/filter/ww8/")
or srcLoc.startswith("vcl/source/filter/sgvmain.hxx")
or srcLoc.startswith("vcl/source/filter/sgfbram.hxx")
or srcLoc.startswith("vcl/inc/unx/XIM.h")
or srcLoc.startswith("vcl/inc/unx/gtk/gloactiongroup.h")
or srcLoc.startswith("include/svl/svdde.hxx")):
continue
# I really don't care about these ancient file formats
if (srcLoc.startswith("hwpfilter/")
or srcLoc.startswith("lotuswordpro/")):
continue
readonlySet.add((d[0] + " " + d[1] + " " + definitionToTypeMap[d], srcLoc)) readonlySet.add((d[0] + " " + d[1] + " " + definitionToTypeMap[d], srcLoc))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment