diff options
| author | Douglas Gregor <dgregor@apple.com> | 2011-04-30 17:07:52 +0000 | 
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2011-04-30 17:07:52 +0000 | 
| commit | 85894a8f8537fb94ec41516fd8b1dc901c2064e2 (patch) | |
| tree | a482ae9b1ad5129027f0d31776371889dc3b3c09 /clang/test | |
| parent | bde52bca694964ac0031c649b8ddb096523e81d8 (diff) | |
| download | bcm5719-llvm-85894a8f8537fb94ec41516fd8b1dc901c2064e2.tar.gz bcm5719-llvm-85894a8f8537fb94ec41516fd8b1dc901c2064e2.zip | |
When comparing parameters of reference-to-qualified type during
partial ordering of function templates, use a simple superset
relationship rather than the convertibility-implying
isMoreQualifiedThan/compatibilyIncludes relationship. Fixes partial
ordering between references and address-space-qualified references.
llvm-svn: 130612
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaTemplate/address-spaces.cpp | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/clang/test/SemaTemplate/address-spaces.cpp b/clang/test/SemaTemplate/address-spaces.cpp index df262e1dc66..eda03dbac2b 100644 --- a/clang/test/SemaTemplate/address-spaces.cpp +++ b/clang/test/SemaTemplate/address-spaces.cpp @@ -73,3 +73,14 @@ void test_arg_in_address_space_1() {    identity<int> ii = accept_arg_in_address_space_1(int_1);    identity<int __attribute__((address_space(1)))> ii2 = accept_any_arg(int_1);  } + +// Partial ordering +template<typename T> int &order1(__attribute__((address_space(1))) T&); +template<typename T> float &order1(T&); + +void test_order1() { +  static __attribute__((address_space(1))) int i1; +  int i; +  int &ir = order1(i1); +  float &fr = order1(i); +} | 

