Skip to content

Make 3C work sensibly on already preprocessed code #535

Open
@mattmccutchen-cci

Description

@mattmccutchen-cci

This issue is to make 3C work "sensibly" on already preprocessed code, whatever we determine that means exactly.

The main part of this that I'm aware of is to make PersistentSourceLoc honor preprocessor-inserted line markers in all cases. This would have the following effects (to my knowledge):

  1. 3C would consider program elements unwritable if they were included from an unwritable file.
  2. 3C would correctly match certain program elements that were included from the same file into multiple translation units. (See the "unless it's preprocessed" section of structs are not global : good or bad (relates to preprocessor, in part) ? #499 for an example.)

And the main use case I'm aware of is making it easier for us to reduce a test case that contains #include directives: we can preprocess the file and then proceed with reducing the included content (either manually or using a tool like C-Vise). The change to 3C proposed in this issue would lower (though perhaps not fully eliminate) the risk that preprocessing the test case changes the decisions made by 3C so that the test case no longer reproduces the original bug. I don't know whether end users of 3C would also find this useful.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions