| 2830 | } |
| 2831 | |
| 2832 | void functionArgs8() { // #7653 |
| 2833 | GET_SYMBOL_DB("struct A { int i; };\n" |
| 2834 | "struct B { double d; };\n" |
| 2835 | "int foo(struct A a);\n" |
| 2836 | "double foo(struct B b);\n" |
| 2837 | "void bar() {\n" |
| 2838 | " struct B b;\n" |
| 2839 | " foo(b);\n" |
| 2840 | "}"); |
| 2841 | ASSERT_EQUALS(true, db != nullptr); |
| 2842 | const Token *f = Token::findsimplematch(tokenizer.tokens(), "foo ( b"); |
| 2843 | ASSERT_EQUALS(true, f && f->function()); |
| 2844 | const Function *func = f->function(); |
| 2845 | ASSERT_EQUALS(true, func->tokenDef->linenr() == 4 && func->argumentList.size() == 1 && func->argumentList.front().type()); |
| 2846 | const Type * type = func->argumentList.front().type(); |
| 2847 | ASSERT_EQUALS(true, type->isStructType()); |
| 2848 | } |
| 2849 | |
| 2850 | void functionArgs9() { // #7657 |
| 2851 | GET_SYMBOL_DB("struct A {\n" |
nothing calls this directly
no test coverage detected