diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-05 05:15:43 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-05 05:15:43 +0000 |
commit | 6ec89d49532938c651e44f607d7e45105147a8dd (patch) | |
tree | 93c18df1ace4eed3296ce71dc0a5b8927e81ec03 /clang/test | |
parent | 7fcd8acbf872229d7271364f4d32fda90be901d9 (diff) | |
download | bcm5719-llvm-6ec89d49532938c651e44f607d7e45105147a8dd.tar.gz bcm5719-llvm-6ec89d49532938c651e44f607d7e45105147a8dd.zip |
When adding ADL candidates for overloaded
post-increment/post-decrement operators, be sure to consider both
arguments. Fixes PR6237.
llvm-svn: 95361
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/SemaTemplate/instantiate-expr-1.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-expr-1.cpp b/clang/test/SemaTemplate/instantiate-expr-1.cpp index 34fc6af746d..d1b05f66a58 100644 --- a/clang/test/SemaTemplate/instantiate-expr-1.cpp +++ b/clang/test/SemaTemplate/instantiate-expr-1.cpp @@ -87,6 +87,18 @@ void add(const T &x) { (void)(x + x); } +namespace PR6237 { + template <typename T> + void f(T t) { + t++; + } + + struct B { }; + B operator++(B &, int); + + template void f(B); +} + struct Addable { Addable operator+(const Addable&) const; }; |