Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Web Feed] In a recent article on clang-tidy I referenced the fact that we're doing a hu...

3 views
Skip to first unread message

Feed Supplier

unread,
May 12, 2021, 12:52:29 PM5/12/21
to
..ge refactoring regarding char pointers, lifetime, ownership and



In a
raymii.org/s/snippets/Run_one_specific_clang-tidy_check_on_your_codebase.html: recent article on clang-tidy I referenced the fact that we're doing a huge refactoring regarding


char


pointers, lifetime, ownership and


std::strings


Todays post is another one related to that change, where even though everything compiled correctly, it didn't


work


For a compiled language, that is not something you expect. Next to unit tests, a compiler error is your number one sign that you've made a mistake somewhere. In this case however, the code all compiled fine. The issue here was an older part of the code not using


override


combined with automated refactoring in CLion missing some parts of the code during a change. So, the issue in this case is entirely our own fault, it was spotted in the manual testing, but I'd rather had it not happen at all. In this post I'll describe the problem including some example code that illustrates what happened. My key point is that even though the code compiles, you should always test it, preferably automated with unit and integrations tests, otherwise manually with a runbook.




Link 1


It compiles does not always mean that it works, a tale of virtual overridden fun in C++ - Raymii.org: https://raymii.org/s/articles/It_compiles_does_not_always_means_that_it_works.html

Kristjan Robam

unread,
Dec 20, 2022, 1:47:50 PM12/20/22
to
Nothing remarkably interesting...

0 new messages