Author: PeterChou1 Date: 2024-06-25T09:40:58-07:00 New Revision: dbd5c7805bae510c79b51c2c7700a590f2df446d
URL: https://github.com/llvm/llvm-project/commit/dbd5c7805bae510c79b51c2c7700a590f2df446d DIFF: https://github.com/llvm/llvm-project/commit/dbd5c7805bae510c79b51c2c7700a590f2df446d.diff LOG: [clang-doc] Remove stdexecpt from clang-doc test (#96552) 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 Added: Modified: clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Calculator.cpp clang-tools-extra/test/clang-doc/basic-project.test Removed: ################################################################################ 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> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits