[PATCH] D72982: [Clang] Un-break scan-build after integrated-cc1 change

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 21 12:05:17 PST 2020


NoQ added a comment.

In D72982#1832058 <https://reviews.llvm.org/D72982#1832058>, @xazax.hun wrote:

> In D72982#1832029 <https://reviews.llvm.org/D72982#1832029>, @aganea wrote:
>
> > In D72982#1832000 <https://reviews.llvm.org/D72982#1832000>, @xazax.hun wrote:
> >
> > > Thanks! Alternatively we could try to push the changes to all three versions and revert this patch once all of them are accepted and a new pip package is published.
> >
> >
> > @xazax.hun In that case do you think it'd be possible for scan-build to handle a more structured format like a CDB? (and inherently make clang emit that)
>
>
> In case you refer to compilation database, scan-build-py already does handle that. The cc1 command line is used to avoid duplicating driver logic in scan-build. So sometimes, when scan-build want to peak the cc1 commands it will get it using `-###` instead of trying to infer them from the (driver) command that is available in the compilation database.


I think the point is to provide a machine-readable alternative to `-###` - that would, say, write down one line of compilation database.

The alternative solution would be to teach scan-build to wrap its extra flags with `-Xclang`, which is how it should have behaved to begin with. I'm not sure we're actually removing any `-cc1` flags.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72982/new/

https://reviews.llvm.org/D72982





More information about the cfe-commits mailing list