diff options
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/cpp/Issue_3996.cpp')
-rw-r--r-- | debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/cpp/Issue_3996.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/cpp/Issue_3996.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/cpp/Issue_3996.cpp new file mode 100644 index 00000000..d2b4479f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/cpp/Issue_3996.cpp @@ -0,0 +1,25 @@ +#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; +} |