diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-14 16:27:04 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-14 16:27:04 +0000 |
commit | 4411d2e674b0119f682ac472c3a377f14fa9fa30 (patch) | |
tree | 1d49862cb05f77920ac7503a6c49ff095ff750b0 /test/CodeGenCXX/constructor-convert.cpp | |
parent | ef74f4c6dcd59b3af1de9d8f613c1caf3e6cb63d (diff) |
When rebuilding CXXConstructExprs after a transformation, use
CompleteConstructorCall to perform type-checking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/constructor-convert.cpp')
-rw-r--r-- | test/CodeGenCXX/constructor-convert.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGenCXX/constructor-convert.cpp b/test/CodeGenCXX/constructor-convert.cpp new file mode 100644 index 0000000000..6fa6d556dc --- /dev/null +++ b/test/CodeGenCXX/constructor-convert.cpp @@ -0,0 +1,19 @@ +// RUN: clang -emit-llvm -S -o - %s + +// PR5775 +class Twine { + Twine(const char *Str) { } +}; + +static void error(const Twine &Message); + +template<typename> +struct opt_storage { + void f() { + error("cl::location(x) specified more than once!"); + } +}; + +void f(opt_storage<int> o) { + o.f(); +} |