| 7951 | } |
| 7952 | |
| 7953 | void findFunction23() { // # 8558 |
| 7954 | GET_SYMBOL_DB("struct foo {\n" |
| 7955 | " int GetThing( ) const { return m_thing; }\n" |
| 7956 | " int* GetThing( ) { return &m_thing; }\n" |
| 7957 | "};\n" |
| 7958 | "\n" |
| 7959 | "void f(foo *myFoo) {\n" |
| 7960 | " int* myThing = ((const foo *)myFoo)->GetThing();\n" |
| 7961 | "}"); |
| 7962 | |
| 7963 | ASSERT(db != nullptr); |
| 7964 | |
| 7965 | const Token *tok1 = Token::findsimplematch(tokenizer.tokens(), ". GetThing ( ) ;")->next(); |
| 7966 | |
| 7967 | const Function *f = tok1 ? tok1->function() : nullptr; |
| 7968 | ASSERT(f != nullptr); |
| 7969 | ASSERT_EQUALS(true, f && f->isConst()); |
| 7970 | } |
| 7971 | |
| 7972 | void findFunction24() { // smart pointers |
| 7973 | GET_SYMBOL_DB("struct foo {\n" |
nothing calls this directly
no test coverage detected