]> granicus.if.org Git - clang/commit
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)
commita7e2b09e84da88716b148b4042164e7b321aa13d
tree2056c8d18b73953f55c356fa9076129c63314174
parentbbd68e1f187894ba4562dcf4aaf9acd65f3cf5d0
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211766 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaTemplate.cpp
test/SemaCXX/PR19955.cpp