Previously for some reason I thought that MSVC only allowed this behavior for anonymous enums. But now I realize that the enum doesn't have to be anonymous. So the following code should be legal too with '-fms-compatibility':
Tue, Nov 17
Thank you very much for the review @rsmith!
Addressing some of rsmith's comments:
- Add a test case where an enum variable is declared in the same scope as the enum definition
- Fix a style issue with parentheses
- Simplify the if condition for the C case
- The C++ case should only apply for TUK_Reference
Thu, Nov 12
Use getFileLoc instead of getExpansionLoc to get the location of error.
Tue, Nov 10
Note that this regression seems to be there ever since Clang 3.4.1
Mon, Nov 9
Oct 6 2020
Address Hans' comments
- Prepend %s with "--" for clang-cl
- Remove a redundant test case
Oct 5 2020
Address Reid's comments:
- Use hasFlag instead of hasArg
- Add test cases
Oct 2 2020
Also, I wanted to mention that clang-cl.exe actually crashes deterministically when running precompiles for 2 of our headers when using '-fpch-instantiate-templates' with the following signature:
Oct 1 2020
Can you get at least some testcase, even if not small?
I think the flag was originally intended to be an internal -cc1 flag not exposed to users. You should be able to work around your problem with -Xclang -fno-pch-instantiate-templates, btw.
@zequanwu, can you patch this in locally and take over this patch? Please address the hasFlag comment above, add a test to clang/test/Driver, and make sure the flag works with --driver-mode=gcc and --driver-mode=cl. Follow the examples of the other tests, run clang with -###, and make sure this flag does or does not appear on the -cc1 line.
Note that I do not have commit access and this change will have to be committed by someone else on my behalf. Please use the following commit author details:
"Shivan Goyal <email@example.com>"
Sep 3 2020
Note that I do not have commit access and this change will have to be committed by someone else on my behalf. Thanks!
- Remove the bool IsDependencyFileArg in the implementation of getClangStripDependencyFileAdjuster() to make it simpler.
- Add an extra argument after -MT in the test case to ensure we do not strip arguments after -MT when using the cl driver mode.
Sep 2 2020
- Simplified the implementation of getDriverMode and got rid of the Optional return type.
- When using the cl driver mode, we do not want to skip the next argument for -MF, -MT, -MQ.