llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-tools-extra Author: None (PeterChou1) <details> <summary>Changes</summary> Removes stdexecpt from clang-doc test introduced in https://github.com/llvm/llvm-project/pull/93928 since it violates the rule that test must be freestanding --- Full diff: https://github.com/llvm/llvm-project/pull/96552.diff 2 Files Affected: - (modified) clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Calculator.cpp (-4) - (modified) clang-tools-extra/test/clang-doc/basic-project.test (+4-4) ``````````diff diff --git a/clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Calculator.cpp b/clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Calculator.cpp index df1778c3b9d55..64f31dbf13d87 100644 --- a/clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Calculator.cpp +++ b/clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Calculator.cpp @@ -1,5 +1,4 @@ #include "Calculator.h" -#include <stdexcept> int Calculator::add(int a, int b) { return a + b; @@ -14,8 +13,5 @@ int Calculator::multiply(int a, int b) { } double Calculator::divide(int a, int b) { - if (b == 0) { - throw std::invalid_argument("Division by zero"); - } return static_cast<double>(a) / b; } diff --git a/clang-tools-extra/test/clang-doc/basic-project.test b/clang-tools-extra/test/clang-doc/basic-project.test index 0898acaea3a33..c973638837613 100644 --- a/clang-tools-extra/test/clang-doc/basic-project.test +++ b/clang-tools-extra/test/clang-doc/basic-project.test @@ -139,25 +139,25 @@ // HTML-CALC-NEXT: <div> // HTML-CALC-NEXT: <h3 id="{{([0-9A-F]{40})}}">add</h3> // HTML-CALC-NEXT: <p>public int add(int a, int b)</p> -// HTML-CALC-NEXT: <p>Defined at line 4 of file {{.*}}Calculator.cpp</p> +// HTML-CALC-NEXT: <p>Defined at line 3 of file {{.*}}Calculator.cpp</p> // HTML-CALC-NEXT: <div> // HTML-CALC-NEXT: <div></div> // HTML-CALC-NEXT: </div> // HTML-CALC-NEXT: <h3 id="{{([0-9A-F]{40})}}">subtract</h3> // HTML-CALC-NEXT: <p>public int subtract(int a, int b)</p> -// HTML-CALC-NEXT: <p>Defined at line 8 of file {{.*}}Calculator.cpp</p> +// HTML-CALC-NEXT: <p>Defined at line 7 of file {{.*}}Calculator.cpp</p> // HTML-CALC-NEXT: <div> // HTML-CALC-NEXT: <div></div> // HTML-CALC-NEXT: </div> // HTML-CALC-NEXT: <h3 id="{{([0-9A-F]{40})}}">multiply</h3> // HTML-CALC-NEXT: <p>public int multiply(int a, int b)</p> -// HTML-CALC-NEXT: <p>Defined at line 12 of file {{.*}}Calculator.cpp</p> +// HTML-CALC-NEXT: <p>Defined at line 11 of file {{.*}}Calculator.cpp</p> // HTML-CALC-NEXT: <div> // HTML-CALC-NEXT: <div></div> // HTML-CALC-NEXT: </div> // HTML-CALC-NEXT: <h3 id="{{([0-9A-F]{40})}}">divide</h3> // HTML-CALC-NEXT: <p>public double divide(int a, int b)</p> -// HTML-CALC-NEXT: <p>Defined at line 16 of file {{.*}}Calculator.cpp</p> +// HTML-CALC-NEXT: <p>Defined at line 15 of file {{.*}}Calculator.cpp</p> // HTML-CALC-NEXT: <div> // HTML-CALC-NEXT: <div></div> // HTML-CALC-NEXT: </div> `````````` </details> https://github.com/llvm/llvm-project/pull/96552 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits