[PATCH] D13322: Add -f[no-]declspec to control recognition of __declspec as a keyword
Warren Ristow via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 2 10:21:59 PDT 2015
wristow 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.
+
----------------
But in the '-fno-declspec -fdeclspec' case, the 'if' clause "wins", and we never even reach the test of the 'else if' clause. As I said at the end of my previous comment, if -fno-declspec isn't the last one, we don't get to that line. That said, given the interaction with "implicit enabling" of declspec (via Microsoft, Borland, CUDA), it's a bit different than vanilla switch-handling. So I've updated the tests to explicitly have some checks for '-fno-declspec -fdeclspec' case (and the reverse, and for with and without -fms-extensions interacting).
http://reviews.llvm.org/D13322
More information about the cfe-commits
mailing list