| 1780 | } |
| 1781 | |
| 1782 | void memberVar1() { |
| 1783 | GET_SYMBOL_DB("struct Foo {\n" |
| 1784 | " int x;\n" |
| 1785 | "};\n" |
| 1786 | "struct Bar : public Foo {};\n" |
| 1787 | "void f() {\n" |
| 1788 | " struct Bar bar;\n" |
| 1789 | " bar.x = 123;\n" // <- x should get a variable() pointer |
| 1790 | "}"); |
| 1791 | |
| 1792 | ASSERT(db != nullptr); |
| 1793 | const Token *tok = Token::findsimplematch(tokenizer.tokens(), "x ="); |
| 1794 | ASSERT(tok->variable()); |
| 1795 | ASSERT(Token::simpleMatch(tok->variable()->typeStartToken(), "int x ;")); |
| 1796 | } |
| 1797 | |
| 1798 | void arrayMemberVar1() { |
| 1799 | GET_SYMBOL_DB("struct Foo {\n" |
nothing calls this directly
no test coverage detected