| 583 | } |
| 584 | |
| 585 | void function_baseClassMethod() { |
| 586 | constexpr char xmldata[] = "<?xml version=\"1.0\"?>\n" |
| 587 | "<def>\n" |
| 588 | " <function name=\"Base::f\">\n" |
| 589 | " <arg nr=\"1\"><not-null/></arg>\n" |
| 590 | " </function>\n" |
| 591 | "</def>"; |
| 592 | |
| 593 | Library library; |
| 594 | ASSERT(LibraryHelper::loadxmldata(library, xmldata, sizeof(xmldata))); |
| 595 | |
| 596 | { |
| 597 | SimpleTokenizer tokenizer(settingsDefault, *this); |
| 598 | const char code[] = "struct X : public Base { void dostuff() { f(0); } };"; |
| 599 | ASSERT(tokenizer.tokenize(code)); |
| 600 | ASSERT(library.isnullargbad(Token::findsimplematch(tokenizer.tokens(), "f"),1)); |
| 601 | } |
| 602 | |
| 603 | { |
| 604 | SimpleTokenizer tokenizer(settingsDefault, *this); |
| 605 | const char code[] = "struct X : public Base { void dostuff() { f(1,2); } };"; |
| 606 | ASSERT(tokenizer.tokenize(code)); |
| 607 | ASSERT(!library.isnullargbad(Token::findsimplematch(tokenizer.tokens(), "f"),1)); |
| 608 | } |
| 609 | } |
| 610 | |
| 611 | void function_warn() const { |
| 612 | constexpr char xmldata[] = "<?xml version=\"1.0\"?>\n" |
nothing calls this directly
no test coverage detected