brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · c3c8326 Raw
41 lines · cpp
1// RUN: %clang_cc1 -verify -fopenmp --std=c++20 -ast-print %s -Wsign-conversion | FileCheck %s2// RUN: %clang_cc1 -fopenmp -x c++ -std=c++20 -emit-pch -o %t %s3// RUN: %clang_cc1 -fopenmp -std=c++20 -include-pch %t -verify %s -ast-print | FileCheck %s4 5// RUN: %clang_cc1 -verify -fopenmp-simd --std=c++20 -ast-print %s -Wsign-conversion | FileCheck %s6// RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++20 -emit-pch -o %t %s7// RUN: %clang_cc1 -fopenmp-simd -std=c++20 -include-pch %t -verify %s -ast-print | FileCheck %s8// expected-no-diagnostics9 10#ifndef HEADER11#define HEADER12 13template <typename T> class iterator {14public:15  T &operator*() const;16  iterator &operator++();17};18template <typename T>19bool operator==(const iterator<T> &, const iterator<T> &);20template <typename T>21unsigned long operator-(const iterator<T> &, const iterator<T> &);22template <typename T>23iterator<T> operator+(const iterator<T> &, unsigned long);24class vector {25public:26  vector();27  iterator<int> begin();28  iterator<int> end();29};30// CHECK: void foo() {31void foo() {32// CHECK-NEXT: vector vec;33  vector vec;34// CHECK-NEXT: #pragma omp for35#pragma omp for36// CHECK-NEXT: for (int i : vec)37  for (int i : vec)38    ;39}40#endif41