[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CodeGenCXX / constructor-conversion.cpp
blobbace54fc596dfbad77b8dfd6eb2014d7abf35b76
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
2 // RUN: FileCheck %s
3 // RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
4 // RUN: FileCheck %s
6 extern "C" int printf(...);
8 class X { // ...
9 public:
10 X(int) : iX(2), fX(2.3) , name("HELLO\n") { }
12 X(const char* arg, int ix=0) { iX = ix; fX = 6.0; name = arg+ix; }
13 X(): iX(100), fX(1.2) {}
14 int iX;
15 float fX;
16 const char *name;
17 void pr(void) {
18 printf("iX = %d fX = %f name = %s\n", iX, fX, name);
22 void g(X arg) {
23 arg.pr();
26 void f(X arg) {
27 X a = 1; // a = X(1)
29 a.pr();
31 X b = "Jessie"; // b=X("Jessie",0)
33 b.pr();
36 a = 2; // a = X(2)
38 a.pr();
42 int main() {
43 X x;
44 f(x);
45 g(3); // g(X(3))
48 // CHECK: call void @_ZN1XC1Ei
49 // CHECK: call void @_ZN1XC1EPKci
50 // CHECK: call void @_ZN1XC1Ev