[PATCH] D13322: Add -f[no-]declspec to control recognition of __declspec as a keyword
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 1 18:56:26 PDT 2015
compnerd added inline comments.
================
Comment at: lib/Driver/Tools.cpp:4663
@@ +4662,3 @@
+ else if (Args.hasArg(options::OPT_fno_declspec))
+ CmdArgs.push_back("-fno-declspec"); // Explicitly disabling __declspec.
+
----------------
@rsmith, so they are. I misread something and was thinking they were under CC1Options.td.
================
Comment at: lib/Driver/Tools.cpp:4663
@@ +4662,3 @@
+ else if (Args.hasArg(options::OPT_fno_declspec))
+ CmdArgs.push_back("-fno-declspec"); // Explicitly disabling __declspec.
+
----------------
compnerd wrote:
> @rsmith, so they are. I misread something and was thinking they were under CC1Options.td.
Sure, but you are still giving -fno-declspec precedence over -fdeclspec. Consider -fno-declspec -fdeclspec. I think what you want is Args.getLastArg, not Args.hasArg.
http://reviews.llvm.org/D13322
More information about the cfe-commits
mailing list