@@ -97,13 +97,13 @@ class TestType : public TestFixture {
9797 {
9898 const std::string types[] = {" unsigned char" , /* [unsigned]*/ " char" , " bool" , " unsigned short" , " unsigned int" , " unsigned long" };
9999 for (const std::string& type : types) {
100- check (( type + " f(" + type +" x) { return x << 31; }" ). c_str () , settings);
100+ check (type + " f(" + type +" x) { return x << 31; }" , settings);
101101 ASSERT_EQUALS (" " , errout_str ());
102- check (( type + " f(" + type +" x) { return x << 33; }" ). c_str () , settings);
102+ check (type + " f(" + type +" x) { return x << 33; }" , settings);
103103 ASSERT_EQUALS (" [test.cpp:1]: (error) Shifting 32-bit value by 33 bits is undefined behaviour\n " , errout_str ());
104- check (( type + " f(int x) { return (x = (" + type + " )x << 32); }" ). c_str () , settings);
104+ check (type + " f(int x) { return (x = (" + type + " )x << 32); }" , settings);
105105 ASSERT_EQUALS (" [test.cpp:1]: (error) Shifting 32-bit value by 32 bits is undefined behaviour\n " , errout_str ());
106- check (( type + " foo(" + type + " x) { return x << 31; }" ). c_str () , settings);
106+ check (type + " foo(" + type + " x) { return x << 31; }" , settings);
107107 ASSERT_EQUALS (" " , errout_str ());
108108 }
109109 }
@@ -113,19 +113,19 @@ class TestType : public TestFixture {
113113 const std::string types[] = {" signed char" , " signed short" , /* [signed]*/ " short" , " wchar_t" , /* [signed]*/ " int" , " signed int" , /* [signed]*/ " long" , " signed long" };
114114 for (const std::string& type : types) {
115115 // c++11
116- check (( type + " f(" + type +" x) { return x << 33; }" ). c_str () , settings);
116+ check (type + " f(" + type +" x) { return x << 33; }" , settings);
117117 ASSERT_EQUALS (" [test.cpp:1]: (error) Shifting 32-bit value by 33 bits is undefined behaviour\n " , errout_str ());
118- check (( type + " f(int x) { return (x = (" + type + " )x << 32); }" ). c_str () , settings);
118+ check (type + " f(int x) { return (x = (" + type + " )x << 32); }" , settings);
119119 ASSERT_EQUALS (" [test.cpp:1]: (error) Shifting 32-bit value by 32 bits is undefined behaviour\n " , errout_str ());
120- check (( type + " foo(" + type + " x) { return x << 31; }" ). c_str () , settings);
120+ check (type + " foo(" + type + " x) { return x << 31; }" , settings);
121121 ASSERT_EQUALS (" [test.cpp:1]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour\n " , errout_str ());
122- check (( type + " foo(" + type + " x) { return x << 30; }" ). c_str () , settings);
122+ check (type + " foo(" + type + " x) { return x << 30; }" , settings);
123123 ASSERT_EQUALS (" " , errout_str ());
124124
125125 // c++14
126- check (( type + " foo(" + type + " x) { return x << 31; }" ). c_str () , settings, true , Standards::cppstd_t ::CPP14);
126+ check (type + " foo(" + type + " x) { return x << 31; }" , settings, true , Standards::cppstd_t ::CPP14);
127127 ASSERT_EQUALS (" [test.cpp:1]: (portability) Shifting signed 32-bit value by 31 bits is implementation-defined behaviour\n " , errout_str ());
128- check (( type + " f(int x) { return (x = (" + type + " )x << 32); }" ). c_str () , settings, true , Standards::cppstd_t ::CPP14);
128+ check (type + " f(int x) { return (x = (" + type + " )x << 32); }" , settings, true , Standards::cppstd_t ::CPP14);
129129 ASSERT_EQUALS (" [test.cpp:1]: (error) Shifting 32-bit value by 32 bits is undefined behaviour\n " , errout_str ());
130130 }
131131 }
0 commit comments