| 556 | } |
| 557 | |
| 558 | void function_method() { |
| 559 | constexpr char xmldata[] = "<?xml version=\"1.0\"?>\n" |
| 560 | "<def>\n" |
| 561 | " <function name=\"CString::Format\">\n" |
| 562 | " <noreturn>false</noreturn>\n" |
| 563 | " </function>\n" |
| 564 | "</def>"; |
| 565 | |
| 566 | Library library; |
| 567 | ASSERT(LibraryHelper::loadxmldata(library, xmldata, sizeof(xmldata))); |
| 568 | ASSERT_EQUALS(library.functions().size(), 1U); |
| 569 | |
| 570 | { |
| 571 | SimpleTokenizer tokenizer(settingsDefault, *this); |
| 572 | const char code[] = "CString str; str.Format();"; |
| 573 | ASSERT(tokenizer.tokenize(code)); |
| 574 | ASSERT(library.isnotnoreturn(Token::findsimplematch(tokenizer.tokens(), "Format"))); |
| 575 | } |
| 576 | |
| 577 | { |
| 578 | SimpleTokenizer tokenizer(settingsDefault, *this); |
| 579 | const char code[] = "HardDrive hd; hd.Format();"; |
| 580 | ASSERT(tokenizer.tokenize(code)); |
| 581 | ASSERT(!library.isnotnoreturn(Token::findsimplematch(tokenizer.tokens(), "Format"))); |
| 582 | } |
| 583 | } |
| 584 | |
| 585 | void function_baseClassMethod() { |
| 586 | constexpr char xmldata[] = "<?xml version=\"1.0\"?>\n" |
nothing calls this directly
no test coverage detected