Skip to content

doxdrift: four declaration shapes parsed as the argument list (69 findings on PCL, 4 real of 28 checked) #6

Description

@darkdi

Run: doxdrift.py fingerprint 77d0a1e9, 2026-08-06, over PointCloudLibrary/pcl at master (sparse checkout of */include). Reported 69 hard, 0 soft across 1107 headers and 4215 \param blocks. Counters say function pointers read: 0.

I read 28 of the 69 by hand. Four of them are real; the rest fail on four shapes of declaration, each of which the tool parses as something other than the argument list. All four reproduce on this repo.

1. Member-function-pointer parameter — the T::* form

io/include/pcl/io/openni_camera/openni_device.h:293 (also :321, :348)

template<typename T> CallbackHandle
registerImageCallback (void (T::*callback)(Image::Ptr, void* cookie), T& instance, void* cookie = nullptr) noexcept;

Tool says: documented callback, declaration has cookie, instance, cookie. The name is callback, and it sits in the first pair of parentheses exactly like the plain function-pointer case the tool already knows about — but function pointers read: 0, so the T::* spelling is not matched by that path. Cost here: 3 false findings.

2. Constructor with a member-initializer list — declaration read as empty

io/include/pcl/compression/octree_pointcloud_compression.h:86

OctreePointCloudCompression (compression_Profiles_e compressionProfile_arg = MED_RES_ONLINE_COMPRESSION_WITH_COLOR,
                       bool showStatistics_arg = false,
                       ...
                       const unsigned char colorBitResolution_arg = 6) :
  OctreePointCloud<PointT, LeafT, BranchT, OctreeT> (octreeResolution_arg),
  output_ (PointCloudPtr ()),
  ...

Tool says in the declaration: (empty) for all eight documented names. All eight are present in the signature. Cost: 8 false findings from one docblock — the largest single cluster in the run.

3. Return type or template prefix read as the argument list

io/include/pcl/io/ply_io.h:280 and :287

template <typename ScalarType> std::function<void (ScalarType)>
scalarPropertyDefinitionCallback (const std::string& element_name, const std::string& property_name);

Tool says: documented element_name, declaration has ScalarType. It took the template parameter list (or the parenthesis inside the return type) as the arguments. Same shape at registration/include/pcl/registration/registration.h:96 (declaration reported as PointSource, Indices, PointTarget, Indices) and features/include/pcl/features/don.h:125 (PointCloudOut).

io/include/pcl/io/ply_io.h:270 is the same породы with the opposite symptom — the return type std::tuple<std::function<void ()>, std::function<void ()> > gives (empty), while elementDefinitionCallback (const std::string& element_name, std::size_t count) documents both names correctly.

4. Unnamed parameter — arguably out of scope, but it reports as a mismatch

keypoints/include/pcl/keypoints/harris_2d.h:115 (also harris_3d.h:122, harris_6d.h:102)

/** \param[in] nonmax default is false */
void setNonMaxSupression (bool = false);

The parameter has no name in the declaration, so the tool reports in the declaration: bool. There is a real problem here, but the fix is to name the parameter, which is a code change — not something a docstring pass should send. Might be worth a separate soft class rather than a hard finding.

What survived

Four real ones, for the record: io/include/pcl/io/openni2_grabber.h:234 (rgb_focal_ulength_yrgb_focal_length_y), geometry/include/pcl/geometry/mesh_elements.h:166 (inner_half_edge_idxidx_inner_half_edge), registration/include/pcl/registration/correspondence_estimation.h:307 (docblock copied from the non-reciprocal setter above it), recognition/include/pcl/recognition/crh_alignment.h:65 (transformation is prose, the argument is transform).

Note that shapes 1–3 are all "the parentheses the tool measured are not the argument list". PCL puts the return type on its own line above the name, which seems to be what makes them so frequent here — 24 of the 28 I checked.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions