diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-10-21 22:00:42 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-10-21 22:00:42 +0000 |
commit | 4b6ad14285f3e1f1e47202c610bbef638d3a948d (patch) | |
tree | c2a4efa94d290019bf062664d5deac438f634608 /test/OpenMP/distribute_simd_aligned_messages.cpp | |
parent | a663b0aee8fef8552996f03415d3e48ee72e838f (diff) |
DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules.
This has two significant effects:
1) Direct relational comparisons between null pointer constants (0 and nullopt)
and pointers are now ill-formed. This was always the case for C, and it
appears that C++ only ever permitted by accident. For instance, cases like
nullptr < &a
are now rejected.
2) Comparisons and conditional operators between differently-cv-qualified
pointer types now work, and produce a composite type that both source
pointer types can convert to (when possible). For instance, comparison
between 'int **' and 'const int **' is now valid, and uses an intermediate
type of 'const int *const *'.
Clang previously supported #2 as an extension.
We do not accept the cases in #1 as an extension. I've tested a fair amount of
code to check that this doesn't break it, but if it turns out that someone is
relying on this, we can easily add it back as an extension.
This is a re-commit of r284800.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/distribute_simd_aligned_messages.cpp')
-rw-r--r-- | test/OpenMP/distribute_simd_aligned_messages.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/OpenMP/distribute_simd_aligned_messages.cpp b/test/OpenMP/distribute_simd_aligned_messages.cpp index 59e5be271d..10beb7198a 100644 --- a/test/OpenMP/distribute_simd_aligned_messages.cpp +++ b/test/OpenMP/distribute_simd_aligned_messages.cpp @@ -166,7 +166,8 @@ template<class I, class C> int foomain(I argc, C **argv) { #pragma omp target #pragma omp teams -#pragma omp distribute simd aligned (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} +// FIXME: Should argc really be a pointer? +#pragma omp distribute simd aligned (*argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (I k = 0; k < argc; ++k) ++k; #pragma omp target |