diff options
author | bloodstalker <thabogre@gmail.com> | 2020-06-04 14:25:14 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2020-06-04 14:25:14 +0000 |
commit | 2948f61947b9790a29d34fc48d8e5683467919db (patch) | |
tree | ceff93e8c5a38fa9b0056b432672e7205bf5f0d8 /test/callexpr.cpp | |
parent | adding llvm11 to travis (diff) | |
download | cgrep-2948f61947b9790a29d34fc48d8e5683467919db.tar.gz cgrep-2948f61947b9790a29d34fc48d8e5683467919db.zip |
added a new switch:recorddecl. the test script is still WIP.
Diffstat (limited to 'test/callexpr.cpp')
-rw-r--r-- | test/callexpr.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/callexpr.cpp b/test/callexpr.cpp new file mode 100644 index 0000000..db96709 --- /dev/null +++ b/test/callexpr.cpp @@ -0,0 +1,34 @@ + +namespace callexpr_ns{ +int testFunction(int a, int b) { return a + b; } + +class testClass { +public: + testClass() = default; + int testMemberFunction(int a, int b) { return a + b; } + +private: + /* data */ +}; + +struct testStruct { +public: + testStruct() = default; + int a; + int b; + char *c; + int testMemberFunctionn(int a, int b) { return a + b; } +}; +} // namespace + +int __attribute__((weak)) main(int argc, char *argv[]) { + int a = 10; + int b = 10; + callexpr_ns::testFunction(a, b); + callexpr_ns::testClass tc; + tc.testMemberFunction(a, b); + callexpr_ns::testStruct ts; + ts.testMemberFunctionn(a, b); + + return 0; +} |