[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CXX / expr / p10-0x.cpp
blob4fabf7d31d02a6faf40aea027431546675d5b726
1 // RUN: %clang_cc1 -emit-llvm -triple x86_64-pc-linux-gnu %s -o - -std=c++11 | FileCheck %s
3 volatile int g1;
4 struct S {
5 volatile int a;
6 } g2;
8 volatile int& refcall();
10 // CHECK: define{{.*}} void @_Z2f1PViPV1S
11 void f1(volatile int *x, volatile S* s) {
12 // We should perform the load in these cases.
13 // CHECK: load volatile i32, i32*
14 (*x);
15 // CHECK: load volatile i32, i32*
16 __extension__ g1;
17 // CHECK: load volatile i32, i32*
18 s->a;
19 // CHECK: load volatile i32, i32*
20 g2.a;
21 // CHECK: load volatile i32, i32*
22 s->*(&S::a);
23 // CHECK: load volatile i32, i32*
24 // CHECK: load volatile i32, i32*
25 x[0], 1 ? x[0] : *x;
27 // CHECK: load volatile i32, i32*
28 // CHECK: load volatile i32, i32*
29 // CHECK: load volatile i32, i32*
30 *x ?: *x;
32 // CHECK: load volatile i32, i32*
33 ({ *x; });
35 // CHECK-NOT: load volatile
36 // CHECK: ret
39 // CHECK: define{{.*}} void @_Z2f2PVi
40 // CHECK-NOT: load volatile
41 // CHECK: ret
42 void f2(volatile int *x) {
43 // We shouldn't perform the load in these cases.
44 refcall();
45 1 ? refcall() : *x;
48 // CHECK: define{{.*}} void @_Z2f3v()
49 // CHECK-NOT: load
50 // CHECK-NOT: memcpy
52 void f3(void) {
53 volatile char a[10];