diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-22 19:43:45 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-22 19:43:45 +0000 |
commit | aa803409c3bd3930126db630c29f63d42f255153 (patch) | |
tree | 042106605c08352895ba4383ef97eae88b6b31aa /test/SemaCXX/local-classes.cpp | |
parent | 1ce08792766261dcaa25d8215f9d1c2f70d7b7e9 (diff) |
Diffstat (limited to 'test/SemaCXX/local-classes.cpp')
-rw-r--r-- | test/SemaCXX/local-classes.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaCXX/local-classes.cpp b/test/SemaCXX/local-classes.cpp index f4ca79159dc9..eb0b7e43ebe4 100644 --- a/test/SemaCXX/local-classes.cpp +++ b/test/SemaCXX/local-classes.cpp @@ -40,3 +40,15 @@ namespace Templates { }; } } + +namespace PR25627_dont_odr_use_local_consts { + template<int> struct X { X(); X(int); }; + + void foo() { + const int N = 10; + + struct Local { + void f(X<N> = X<N>()) {} // OK + }; + } +} |