[ClangAstParser] Updates test results for C and C++ tests 'sizeof'
@@ -28,15 +28,15 @@ int main() {
int a[10];
// empty class
//sizeof e;
- std::cout << "size of empty class: " << sizeof e << '\n';
- std::cout << "size of pointer : " << sizeof &e << '\n';
+ std::cout << "size of empty class: " << sizeof((e)) << '\n';
+ std::cout << "size of pointer : " << sizeof((&e)) << '\n';
// << "size of function: " << sizeof(void()) << '\n' // error
// << "size of incomplete type: " << sizeof(int[]) << '\n' // error
// << "size of bit field: " << sizeof bit.bit << '\n' // error
std::cout << "size of array of 10 int: " << sizeof(int [10]) << '\n';
- std::cout << "size of array of 10 int (2): " << sizeof a << '\n';
- std::cout << "length of array of 10 int: " << ((sizeof a) / (sizeof *a)) << '\n';
- std::cout << "length of array of 10 int (2): " << ((sizeof a) / (sizeof a[0])) << '\n';
- std::cout << "size of the Derived: " << sizeof d << '\n';
- std::cout << "size of the Derived through Base: " << sizeof b << '\n';
+ std::cout << "size of array of 10 int (2): " << sizeof((a)) << '\n';
+ std::cout << "length of array of 10 int: " << ((sizeof((a))) / (sizeof((*a)))) << '\n';
+ std::cout << "length of array of 10 int (2): " << ((sizeof((a))) / (sizeof((a[0])))) << '\n';
+ std::cout << "size of the Derived: " << sizeof((d)) << '\n';
+ std::cout << "size of the Derived through Base: " << sizeof((b)) << '\n';
}
