diff options
| author | Richard Trieu <rtrieu@google.com> | 2016-01-15 01:08:56 +0000 |
|---|---|---|
| committer | Richard Trieu <rtrieu@google.com> | 2016-01-15 01:08:56 +0000 |
| commit | 2c22a86f9495b3a1c7933780dfa183a4554b6ca5 (patch) | |
| tree | 21af73a7fd1940f3a419709be565044da9e0ba08 /clang/test/Misc/diag-template-diffing.cpp | |
| parent | cc4609a26bac86a70591f1e1359117a4e2dc6d1b (diff) | |
| download | bcm5719-llvm-2c22a86f9495b3a1c7933780dfa183a4554b6ca5.tar.gz bcm5719-llvm-2c22a86f9495b3a1c7933780dfa183a4554b6ca5.zip | |
Make template type diffing use the new desguared iterator.
If available, use the canonical template argument to fill in information for
template type diffing instead of attempting to special case and evaluate Expr's
for the value. Since those are the values used in template instantiation,
we don't have to worry about difference between our evaluator and theirs. Also
move the nullptr template arguments from DiffKind::Expression to
DiffKind::Declaration and allow DiffKind::Declaration to set an Expr. The only
effect that should result is that a named nullptr will show up as
'ptr aka nullptr' in diagnostics.
llvm-svn: 257853
Diffstat (limited to 'clang/test/Misc/diag-template-diffing.cpp')
| -rw-r--r-- | clang/test/Misc/diag-template-diffing.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/Misc/diag-template-diffing.cpp b/clang/test/Misc/diag-template-diffing.cpp index de21438b8a0..f106c7d03da 100644 --- a/clang/test/Misc/diag-template-diffing.cpp +++ b/clang/test/Misc/diag-template-diffing.cpp @@ -1118,7 +1118,7 @@ int global, global2; constexpr int * ptr = nullptr; Wrapper<S<ptr>> W = MakeWrapper<S<&global>>(); // Don't print an extra '&' for 'ptr' -// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global>>' to 'Wrapper<S<ptr>>' +// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global>>' to 'Wrapper<S<ptr aka nullptr>>' // Handle parens correctly Wrapper<S<(&global2)>> W2 = MakeWrapper<S<&global>>(); @@ -1148,7 +1148,7 @@ S<&global, nullptr> s2 = S<&global, ptr>(); S<&global, nullptr> s3 = S<&global, &global>(); // CHECK-ELIDE-NOTREE: no viable conversion from 'S<[...], &global>' to 'S<[...], nullptr>' S<&global, ptr> s4 = S<&global, &global>(); -// CHECK-ELIDE-NOTREE: no viable conversion from 'S<[...], &global>' to 'S<[...], ptr> +// CHECK-ELIDE-NOTREE: no viable conversion from 'S<[...], &global>' to 'S<[...], ptr aka nullptr> Wrapper<S<&global, nullptr>> W1 = MakeWrapper<S<&global, ptr>>(); Wrapper<S<&global, static_cast<int*>(0)>> W2 = MakeWrapper<S<&global, ptr>>(); @@ -1156,7 +1156,7 @@ Wrapper<S<&global, static_cast<int*>(0)>> W2 = MakeWrapper<S<&global, ptr>>(); Wrapper<S<&global, nullptr>> W3 = MakeWrapper<S<&global, &global>>(); // CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<[...], &global>>' to 'Wrapper<S<[...], nullptr>>' Wrapper<S<&global, ptr>> W4 = MakeWrapper<S<&global, &global>>(); -// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<[...], &global>>' to 'Wrapper<S<[...], ptr>>' +// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<[...], &global>>' to 'Wrapper<S<[...], ptr aka nullptr>>' Wrapper<S<&global2, ptr>> W5 = MakeWrapper<S<&global, nullptr>>(); // CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global, [...]>>' to 'Wrapper<S<&global2, [...]>>' @@ -1180,7 +1180,7 @@ Wrapper<S<&global2, nullptr>> W12 = Wrapper<S<&global, &global>> W13 = MakeWrapper<S<&global, ptr>>(); // CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<[...], nullptr>>' to 'Wrapper<S<[...], &global>>' Wrapper<S<&global, ptr>> W14 = MakeWrapper<S<&global, &global>>(); -// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<[...], &global>>' to 'Wrapper<S<[...], ptr>>' +// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<[...], &global>>' to 'Wrapper<S<[...], ptr aka nullptr>>' } namespace TemplateTemplateDefault { |

