23 lines · plain
1.. title:: clang-tidy - bugprone-throw-keyword-missing2 3bugprone-throw-keyword-missing4==============================5 6Warns about a potentially missing ``throw`` keyword. If a temporary object7is created, but the object's type derives from (or is the same as) a class8that has 'EXCEPTION', 'Exception' or 'exception' in its name, we can assume9that the programmer's intention was to throw that object.10 11Example:12 13.. code-block:: c++14 15 void f(int i) {16 if (i < 0) {17 // Exception is created but is not thrown.18 std::runtime_error("Unexpected argument");19 }20 }21 22 23