This is an archive of the discontinued LLVM Phabricator instance.

[clang-cl] Do not allow using both /Zc:dllexportInlines- and /fallback flag
ClosedPublic

Authored by takuto.ikuta on Nov 12 2018, 6:30 AM.

Diff Detail

Event Timeline

takuto.ikuta created this revision.Nov 12 2018, 6:30 AM
takuto.ikuta retitled this revision from [clang-cl] Do not allow to use both /Zc:dllexportInlines- and /fallback to [clang-cl] Do not allow using both /Zc:dllexportInlines- and /fallback flag.Nov 12 2018, 6:36 AM
takuto.ikuta edited the summary of this revision. (Show Details)
takuto.ikuta added reviewers: hans, thakis.
takuto.ikuta added a subscriber: cfe-commits.
hans added inline comments.Nov 12 2018, 6:41 AM
clang/include/clang/Basic/DiagnosticDriverKinds.td
164

Let's make the name shorter. I think "err_drv_dllexport_inlines_and_fallback" or something is descriptive enough.

clang/lib/Driver/ToolChains/Clang.cpp
5529

We know there must be a OPT__SLASH_Zc_dllexportInlines_ flag at this point (because it's checked in the if above), so I think think you need "&& dllexportInlines" below.

In the previous version, you output the getAsString() of the arg to the diagnostic. Don't you want to do this still?

takuto.ikuta marked 2 inline comments as done.Nov 12 2018, 7:17 AM

Thank you for review!

clang/lib/Driver/ToolChains/Clang.cpp
5529

Ah, I don't need to call getAsString() anymore.

hans accepted this revision.Nov 12 2018, 7:26 AM

lgtm

This revision is now accepted and ready to land.Nov 12 2018, 7:26 AM
takuto.ikuta marked an inline comment as done.

rebase

This revision was automatically updated to reflect the committed changes.