libnonius / nonius

A C++ micro-benchmarking framework
https://nonius.io
Creative Commons Zero v1.0 Universal
358 stars 47 forks source link

Invalid comment regex in single_header.py #79

Open TheCatPlusPlus opened 7 years ago

TheCatPlusPlus commented 7 years ago

commentParser2 regex matches line *this = impl_->clone(); which breaks the built header by outputting

    void writable_() {
        if (impl_.use_count() > 1) {
        }
    }

Invalid output noticed by Cicada.

TheCatPlusPlus commented 7 years ago

Actually that's in Catch too as '^ \*' so maybe it was actually meant to catch the comment continuation lines? Not sure. Definitely shouldn't match indentation freely.

melak47 commented 7 years ago

Is removing two comment blocks (one in <nonius/param.h++>, one in <nonius/detail/cpptemp.h>) really worth trying to parse them with regex patterns, while over 650 lines of // comments are preserved?