| 7932 | } |
| 7933 | |
| 7934 | void findFunction22() { // # 8558 |
| 7935 | GET_SYMBOL_DB("struct foo {\n" |
| 7936 | " int GetThing( ) const { return m_thing; }\n" |
| 7937 | " int* GetThing( ) { return &m_thing; }\n" |
| 7938 | "};\n" |
| 7939 | "\n" |
| 7940 | "void f(const foo *myFoo) {\n" |
| 7941 | " int* myThing = myFoo->GetThing();\n" |
| 7942 | "}"); |
| 7943 | |
| 7944 | ASSERT(db != nullptr); |
| 7945 | |
| 7946 | const Token *tok1 = Token::findsimplematch(tokenizer.tokens(), ". GetThing ( ) ;")->next(); |
| 7947 | |
| 7948 | const Function *f = tok1 ? tok1->function() : nullptr; |
| 7949 | ASSERT(f != nullptr); |
| 7950 | ASSERT_EQUALS(true, f && f->isConst()); |
| 7951 | } |
| 7952 | |
| 7953 | void findFunction23() { // # 8558 |
| 7954 | GET_SYMBOL_DB("struct foo {\n" |
nothing calls this directly
no test coverage detected