Open Bug 1671881 Opened 4 years ago Updated 2 years ago

[meta] Ensure consistent separation of ParamTraits from other code

Categories

(Core :: IPC, task)

task

Tracking

()

People

(Reporter: sg, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: clang-analyzer, meta)

Bug 1660470 reduced the include dependencies on header files containing ParamTraits and IPDLParamTraits specializations to some degree, because these are expensive to parse, they pull in a large number of other include dependencies, and generally are a concern that can and should be relatively easily separated. However, this measure was not complete, and it is not ensured it doesn't regress. To do this, we should implement the following steps:

  • Add a static analysis rule that checks (with an initial list of exception header files to allow incremental adaptation to this rule)
    • ParamTraits and IPDLParamTraits may only be contained in header files following some naming pattern, e.g. *ParamTraits.h (today, various naming patterns including *IPCUtils.h and *MessageUtils.h are used, which are rather ambiguous)
    • include directives for header files matching this naming pattern may only be contained in *.cpp files (i.e. not in header files)
  • For each header on the exception list, apply the necessary steps to remove them from the exception list without breaking the build, i.e. rename the existing header file to follow the pattern resp. move the template specialializations to a separate file following the pattern, and remove any existing includes from header files (including those generated from IPDL files)

This bug is missing a valid summary.

Flags: needinfo?(sgiesecke)

Oops. I added a summary now.

Flags: needinfo?(sgiesecke)
Summary: [meta] → [meta] Ensure consistent separation of ParamTraits from other code
You need to log in before you can comment on or make changes to this bug.