summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/undefined-inline.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-03-25 22:29:27 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-03-25 22:29:27 +0000
commit0e32c5283ae8307179da18ddeef112435bbcbf6b (patch)
tree0b3ba1688728b75a42328e3e7463f18c49a45e10 /clang/test/SemaCXX/undefined-inline.cpp
parent27fa77e102ae716869f0daa0c96c5f3c71772f7b (diff)
downloadbcm5719-llvm-0e32c5283ae8307179da18ddeef112435bbcbf6b.tar.gz
bcm5719-llvm-0e32c5283ae8307179da18ddeef112435bbcbf6b.zip
Don't warn on "use" of undefined inline function that isn't actually an ODR
use. In order for this to fire, the function needed to be a templated function marked 'constexpr' and declared but not defined. This weird pattern appears in libstdc++'s alloc_traits.h. llvm-svn: 264471
Diffstat (limited to 'clang/test/SemaCXX/undefined-inline.cpp')
-rw-r--r--clang/test/SemaCXX/undefined-inline.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/undefined-inline.cpp b/clang/test/SemaCXX/undefined-inline.cpp
index 18973ef8b79..feb12f4552c 100644
--- a/clang/test/SemaCXX/undefined-inline.cpp
+++ b/clang/test/SemaCXX/undefined-inline.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -triple i686-pc-win32 -verify %s
+// RUN: %clang_cc1 -fsyntax-only -triple i686-pc-win32 -verify -std=c++11 %s
// PR14993
namespace test1 {
@@ -61,3 +61,8 @@ namespace test11 {
inline void bar() __attribute__((dllimport));
void test() { foo(); bar(); }
}
+
+namespace test12 {
+ template<typename> constexpr int _S_chk(int *);
+ decltype(_S_chk<int>(nullptr)) n;
+}
OpenPOWER on IntegriCloud