summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/taskloop_simd_aligned_messages.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-10-21 22:00:42 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-10-21 22:00:42 +0000
commit5e9746f520e6bbeafc36b8a23585b2e6117e1a7a (patch)
tree19d45b99d8cfaddc7598d6986cdd522463951cad /clang/test/OpenMP/taskloop_simd_aligned_messages.cpp
parent00c03c5de7fd930da8fe1f9561037c4bc3987685 (diff)
downloadbcm5719-llvm-5e9746f520e6bbeafc36b8a23585b2e6117e1a7a.tar.gz
bcm5719-llvm-5e9746f520e6bbeafc36b8a23585b2e6117e1a7a.zip
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. llvm-svn: 284890
Diffstat (limited to 'clang/test/OpenMP/taskloop_simd_aligned_messages.cpp')
-rw-r--r--clang/test/OpenMP/taskloop_simd_aligned_messages.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/OpenMP/taskloop_simd_aligned_messages.cpp b/clang/test/OpenMP/taskloop_simd_aligned_messages.cpp
index b45f44fe1cf..6085660b705 100644
--- a/clang/test/OpenMP/taskloop_simd_aligned_messages.cpp
+++ b/clang/test/OpenMP/taskloop_simd_aligned_messages.cpp
@@ -121,7 +121,8 @@ template<class I, class C> int foomain(I argc, C **argv) {
for (I k = 0; k < argc; ++k) ++k;
#pragma omp taskloop simd aligned (argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (I k = 0; k < argc; ++k) ++k;
- #pragma omp taskloop simd aligned (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+// FIXME: Should argc really be a pointer?
+ #pragma omp taskloop simd aligned (*argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
for (I k = 0; k < argc; ++k) ++k;
#pragma omp taskloop simd aligned (argc : 5) // expected-warning {{aligned clause will be ignored because the requested alignment is not a power of 2}}
for (I k = 0; k < argc; ++k) ++k;
OpenPOWER on IntegriCloud