Sema: Allow dllimport entities in template args for mingw
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 26 Jun 2014 07:48:46 +0000 (07:48 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 26 Jun 2014 07:48:46 +0000 (07:48 +0000)
commit07910d6ab548e7a57717af7e28d994cd652fd75d
tree354e863e1b4138294aa71838182f83b9ce2e42a4
parenta71617358107489c633c1207fefbb1ed0e514333
Sema: Allow dllimport entities in template args for mingw

Previously dllimport variables inside of template arguments relied on
not using the C++11 codepath when -fms-compatibility was set.

While this allowed us to achieve compatibility with MSVC, it did so at
the expense of MingW.

Instead, try to use the DeclRefExpr we dig out of the template argument.
If it has the dllimport attribute, accept it and skip the C++11
null-pointer check.

llvm-svn: 211766
clang/lib/Sema/SemaTemplate.cpp
clang/test/SemaCXX/PR19955.cpp