In this post, we will see how to resolve Default arguments on virtual methods Question: I’m using Clang-Tidy to inspect my code. One of the tool’s messages puzzled me: I get the idea when I actually use a method override. ...

Question: a.cpp: clang-tidy -config=”{Checks: ‘modernize-use-emplace’}” a.cpp clang-tidy –version clang-tidy wiki Best Answer: Short answer: This behavior is due to bug 56721 in clang-tidy. Long answer, based on my comment on that bug: The bug relates to how reference is declared ...

Question: I’m trying to prototype a clang-tidy matcher with clang-query to find using namespace directive with a certain name like using namespace ns1::ns2;. With clang-query I tried these variants but none is matching anything: Is usingDirectiveDecl the right matcher for ...

Question: I want to include a header from an external project, but clang-tidy is quite unhappy about it and produces a huge list of warnings. To workaround this, I am trying to disable all diagnostics coming from this header. I ...