| 7913 | } |
| 7914 | |
| 7915 | void findFunction21() { // # 8558 |
| 7916 | GET_SYMBOL_DB("struct foo {\n" |
| 7917 | " int GetThing( ) const { return m_thing; }\n" |
| 7918 | " int* GetThing( ) { return &m_thing; }\n" |
| 7919 | "};\n" |
| 7920 | "\n" |
| 7921 | "void f(foo *myFoo) {\n" |
| 7922 | " int* myThing = myFoo->GetThing();\n" |
| 7923 | "}"); |
| 7924 | |
| 7925 | ASSERT(db != nullptr); |
| 7926 | |
| 7927 | const Token *tok1 = Token::findsimplematch(tokenizer.tokens(), "myFoo . GetThing ( ) ;"); |
| 7928 | |
| 7929 | const Function *f = tok1 && tok1->tokAt(2) ? tok1->tokAt(2)->function() : nullptr; |
| 7930 | ASSERT(f != nullptr); |
| 7931 | ASSERT_EQUALS(true, f && !f->isConst()); |
| 7932 | } |
| 7933 | |
| 7934 | void findFunction22() { // # 8558 |
| 7935 | GET_SYMBOL_DB("struct foo {\n" |
nothing calls this directly
no test coverage detected