danmar / simplecpp

C++ preprocessor
BSD Zero Clause License
209 stars 83 forks source link

Multiline comment not handled properly #337

Open chrchr-github opened 9 months ago

chrchr-github commented 9 months ago

https://trac.cppcheck.net/ticket/12379

#include <string>
#include <vector>
#include <iostream>

void f()
{
        std::size_t i;
        const std::vector<std::string> v{"4", "2"};
        // Some comment\
        for(i = 0U; i < v.size(); ++i)
        {
                std::cout << v[i];
        }
}