diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-10-12 18:23:32 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-10-12 18:23:32 +0000 |
| commit | 758cb67fcfc602b40e1e4448be5802c70f4cff04 (patch) | |
| tree | 22e52b64567bb67d7b11670d1e119ac976a4368a /clang/test/CXX/class/class.mem/p1.cpp | |
| parent | eb7b91d41742989bf9e74becf050c4cdf6056a50 (diff) | |
| download | bcm5719-llvm-758cb67fcfc602b40e1e4448be5802c70f4cff04.tar.gz bcm5719-llvm-758cb67fcfc602b40e1e4448be5802c70f4cff04.zip | |
If we end up instantiating a function parameter whose default argument
has not yet been parsed, note that the default argument hasn't been
parsed and keep track of all of the instantiations of that function
parameter. When its default argument does get parsed, imbue the
instantiations with that default argument. Fixes PR8245.
llvm-svn: 116324
Diffstat (limited to 'clang/test/CXX/class/class.mem/p1.cpp')
| -rw-r--r-- | clang/test/CXX/class/class.mem/p1.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/clang/test/CXX/class/class.mem/p1.cpp b/clang/test/CXX/class/class.mem/p1.cpp index 55507d4e961..a41f1dbb75e 100644 --- a/clang/test/CXX/class/class.mem/p1.cpp +++ b/clang/test/CXX/class/class.mem/p1.cpp @@ -62,3 +62,30 @@ struct S5 }; + +namespace PR8245 { + class X { + public: + template<class C> + class Inner { + public: + void foo(bool bar = true); + int bam; + }; + + Inner<int> _foo; + }; + + void f() { + X::Inner<int> c2i; + X::Inner<float> c2f; + c2i.foo(); + c2f.foo(); + } + + class Y { + class Inner { + void foo(int = sizeof(Y)); + }; + }; +} |

