summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-06-26 07:48:46 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-06-26 07:48:46 +0000
commita7e2b09e84da88716b148b4042164e7b321aa13d (patch)
tree2056c8d18b73953f55c356fa9076129c63314174 /test
parentbbd68e1f187894ba4562dcf4aaf9acd65f3cf5d0 (diff)
downloadclang-a7e2b09e84da88716b148b4042164e7b321aa13d.tar.gz
clang-a7e2b09e84da88716b148b4042164e7b321aa13d.tar.bz2
clang-a7e2b09e84da88716b148b4042164e7b321aa13d.tar.xz
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
Diffstat (limited to 'test')
-rw-r--r--test/SemaCXX/PR19955.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/SemaCXX/PR19955.cpp b/test/SemaCXX/PR19955.cpp
index fb1d74631b..cbbe2fe9af 100644
--- a/test/SemaCXX/PR19955.cpp
+++ b/test/SemaCXX/PR19955.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -triple i686-win32 -fms-compatibility -verify -std=c++11 %s
+// RUN: %clang_cc1 -triple i686-win32 -verify -std=c++11 %s
+// RUN: %clang_cc1 -triple i686-mingw32 -verify -std=c++11 %s
extern int __attribute__((dllimport)) var;
constexpr int *varp = &var; // expected-error {{must be initialized by a constant expression}}