This simple patch ignores -fsemantic-interposition/-fno-semantic-interposition that may be used by some gcc users, by copy/pasting what was done for other similar -f flags.
MaskRay on Aug 1 2019, 4:00 PM.Authored by
-fsemantic-interposition was added in GCC 5.1. I don't think lots of projects in the wild are using it. The important D20217 has been merged, I think we should actually implement this option instead of ignoring it (I'd be very happy to help this).
Can you just name the user groups? :) When they write -fsemantic-interposition, do they know that current clang doesn't match the GCC behavior?
The only group I know which uses -fsemantic-interposition is the company I work for: Amadeus. Since for now the flag doesn't exist on clang, no we don't know that the future clang implementation doesn't match the gcc one ;) But then we have to wonder if clang wants to reuse the same name if that doesn't do the same thing if really the differences are big. What are the differences between the gcc and the LLVM implementation (when -fsemantic-interposition will be wired up in clang) ?
For now we are not using clang/llvm tools for anything else than static analysis and the useful tools from clang-extra-tools. In other words, we don't care about code gen of LLVM, yet (that may come eventually). My immediate concern right now is that when you use clang-tidy and friends with a compilation database generated for gcc, then you we end-up with warnings for each of the non-usual flags we use in Amadeus, like for example -fsemantic-interposition, that "pollutes" the output of these tools for each translation unit and thus it brings a user unfriendly experience.
I am fine with wiring up a new flag -fsemantic-interposition in clang, however I have no idea what should be done for that, I have absolutely 0 knowledge in the LLVM source code, yet.