Don't allow dllimport/export on classes with internal linkage (PR21399)
authorHans Wennborg <hans@hanshq.net>
Mon, 3 Nov 2014 16:09:16 +0000 (16:09 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 3 Nov 2014 16:09:16 +0000 (16:09 +0000)
commit8313c768369c29051c6e5b9bfe25af3744fe4043
treedad489f2fa755b691f70e22ebf436d149957606e
parentc98e413498a98ec8c10d50f5d52aee105a0a29a0
Don't allow dllimport/export on classes with internal linkage (PR21399)

Trying to import or export such classes doesn't make sense, and Clang
would assert trying to export vtables for them.

This is consistent with how we treat functions with internal linkage,
but it is stricter than MSVC so we may have to back down if it breaks
real code.

llvm-svn: 221160
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/SemaCXX/dllexport.cpp
clang/test/SemaCXX/dllimport.cpp