eranpeer / FakeIt

C++ mocking made easy. A simple yet very expressive, headers only library for c++ mocking.
MIT License
1.25k stars 175 forks source link

clang support #3

Closed jpedrick closed 10 years ago

jpedrick commented 10 years ago

FakeIt currently only supports GCC and MSVC. What's required to support clang?

eranpeer commented 10 years ago

Fakit hack/replace the virtual table of the object. The structure of the virtual table is different on every compiler. I have never tried to learn/understand the structure of the clang vtable. My guess is that it resembles the vtable of gcc. Take a look at gcc/vtable.hpp and msc/vtable.hpp files and then try to add a clang/vtable.hpp. You need a solid understanding of the clang vtable structure to do that.

eranpeer commented 10 years ago

Fakeit supports clang now!