diff options
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/cpp/30151-Issue_3996.cpp')
-rw-r--r-- | debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/cpp/30151-Issue_3996.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/cpp/30151-Issue_3996.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/cpp/30151-Issue_3996.cpp new file mode 100644 index 00000000..b8680b9e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/cpp/30151-Issue_3996.cpp @@ -0,0 +1,28 @@ +#include <iostream> + +class OtherClass +{ +public: +int i; +OtherClass() : i(5) { +} +OtherClass* self() { + return this; +} +}; + +class MyClass +{ +public: +OtherClass x; +int getI(); +}; + +int MyClass::getI() { + return this->x.self()->i; +} + +int main() { + MyClass c; + std::cout << c.getI() << std::endl; +} |