| 229 | } |
| 230 | |
| 231 | void isVariableChangedTest() { |
| 232 | // #8211 - no lhs for >> , do not crash |
| 233 | (void)isVariableChanged("void f() {\n" |
| 234 | " int b;\n" |
| 235 | " if (b) { (int)((INTOF(8))result >> b); }\n" |
| 236 | "}", "if", "}"); |
| 237 | // #9235 |
| 238 | ASSERT_EQUALS(false, |
| 239 | isVariableChanged("void f() {\n" |
| 240 | " int &a = a;\n" |
| 241 | "}\n", |
| 242 | "= a", |
| 243 | "}")); |
| 244 | |
| 245 | ASSERT_EQUALS(false, isVariableChanged("void f(const A& a) { a.f(); }", "{", "}")); |
| 246 | ASSERT_EQUALS(true, |
| 247 | isVariableChanged("void g(int*);\n" |
| 248 | "void f(int x) { g(&x); }\n", |
| 249 | "{", |
| 250 | "}")); |
| 251 | ASSERT_EQUALS(false, isVariableChanged("const int A[] = { 1, 2, 3 };", "[", "]")); |
| 252 | } |
| 253 | |
| 254 | #define isVariableChangedByFunctionCall(...) isVariableChangedByFunctionCall_( __FILE__, __LINE__, __VA_ARGS__) |
| 255 | template<size_t size> |
nothing calls this directly
no test coverage detected