[PATCH] Sema: Reorganize and improve semantic tests for dllexport/dllimport

Aaron Ballman aaron at aaronballman.com
Wed Feb 12 16:33:48 PST 2014


On Wed, Feb 12, 2014 at 7:24 PM, Nico Rieck <nico.rieck at gmail.com> wrote:
> This patch reorganizes and improves the tests for the current support of
> dllimport and dllexport. It provides the basis for further patches
> implementing full semantic checking for these attributes.
>
> These tests don't include class members and templates yet to reduce the
> test churn for the first commits. I also only test using __declspec
> (there are one or two tests using __attribute__) as it seems overkill to
> duplicate everything. If it's absolutely required to check both
> spellings, I would do so by duplicating all runlines and using macros.

It's not required to check both spellings unless there are semantic
differences between the two spellings (which I hope there are not!).

As a comment in general for the test cases: you can
dllexport/dllimport declarators according to MSDN (in fact, their
examples show exporting a variable). So are you testing existing
behavior in clang, and then someday we will presumably modify our
behavior? If so, it'd be good to have some FIXME comments around this
sort of test case so it's known that we will be modifying it at some
point.

~Aaron



More information about the cfe-commits mailing list