diff options
author | Richard Trieu <rtrieu@google.com> | 2013-03-23 01:38:36 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2013-03-23 01:38:36 +0000 |
commit | 3cee413b4a6ec7caf4b04c077da0894ce8b44f91 (patch) | |
tree | 0c6142f5285d1660d812f98029889c78caaedc0f /clang/test/Misc/diag-template-diffing-cxx98.cpp | |
parent | 4a10357fb3ab098de297df5dec4cc329a45fea86 (diff) | |
download | bcm5719-llvm-3cee413b4a6ec7caf4b04c077da0894ce8b44f91.tar.gz bcm5719-llvm-3cee413b4a6ec7caf4b04c077da0894ce8b44f91.zip |
Strip off local qualifiers when converting from RecordType to
TemplateSpecializationType during template type diffing. This allows the
correct printing of diffing qualifiers on templates.
llvm-svn: 177809
Diffstat (limited to 'clang/test/Misc/diag-template-diffing-cxx98.cpp')
-rw-r--r-- | clang/test/Misc/diag-template-diffing-cxx98.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Misc/diag-template-diffing-cxx98.cpp b/clang/test/Misc/diag-template-diffing-cxx98.cpp index 9d0439c2828..a21e4cf060d 100644 --- a/clang/test/Misc/diag-template-diffing-cxx98.cpp +++ b/clang/test/Misc/diag-template-diffing-cxx98.cpp @@ -31,3 +31,19 @@ namespace default_args { } } + +namespace qualifiers { + template <class T> + void foo(void (func(T*)), T*) {} + + template <class T> + class vector{}; + + void bar(const vector<int>*) {} + + void test(volatile vector<int>* V) { + foo(bar, V); + } + + // CHECK: candidate template ignored: deduced conflicting types for parameter 'T' ('const vector<[...]>' vs. 'volatile vector<[...]>') +} |