diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index b44d5137b..13292adc7 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -875,7 +875,7 @@ void CheckBufferOverrun::checkScope(const Token *tok, const std::vectorprevious(), "& ("))); + Token::simpleMatch(tok3->previous(), "& ("))); // taking address of 1 past end? if (addr && totalIndex == totalElements) diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index abe0a7182..3a482503d 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -3030,7 +3030,7 @@ private: "1: struct evt ; void f ( const evt & event@1 ) ;\n", tokenizeDebugListing(code2)); } - + void varid42() { const std::string code("namespace fruit { struct banana {}; };\n" "class Fred {\n"