[llvm-branch-commits] [clang] [clang] Use tighter lifetime bounds for C temporary arguments (PR #170518)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Apr 2 15:49:06 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 87236 tests passed
* 1369 tests skipped
* 5 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang Tools
<details>
<summary>Clang Tools.clang-tidy/checkers/bugprone/shared-ptr-array-mismatch.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/shared-ptr-array-mismatch.cpp bugprone-shared-ptr-array-mismatch /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/shared-ptr-array-mismatch.cpp bugprone-shared-ptr-array-mismatch /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp
# .---command stdout------------
# | Running ['clang-tidy', '--experimental-custom-checks', '/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp', '-fix', '--checks=-*,bugprone-shared-ptr-array-mismatch', '--config={}', '--', '-std=c++11', '-nostdinc++', '-isystem', '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/checkers/Inputs/Headers/std']...
# | ------------------------ clang-tidy output -----------------------
# | 18 warnings generated.
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:9:27: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 9 | std::shared_ptr<int> P2{new int[10]};
# | | ~~~ ^~~~~~~~~~~
# | | []
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:9:22: note: FIX-IT applied suggested code changes
# | 9 | std::shared_ptr<int> P2{new int[10]};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:13:31: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 13 | std::shared_ptr< int > P3{new int[10]};
# | | ~~~ ^~~~~~~~~~~
# | | []
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:13:24: note: FIX-IT applied suggested code changes
# | 13 | std::shared_ptr< int > P3{new int[10]};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:17:27: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 17 | std::shared_ptr<int> P4(new int[10]);
# | | ~~~ ^~~~~~~~~~~
# | | []
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:17:22: note: FIX-IT applied suggested code changes
# | 17 | std::shared_ptr<int> P4(new int[10]);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:20:28: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 20 | new std::shared_ptr<int>(new int[10]);
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:28:25: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 28 | std::shared_ptr<A> P2(new A[10]);
# | | ^~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:35:40: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 35 | std::shared_ptr<int> P1{new int}, P2{new int[10]}, P3{new int[10]};
# | | ~~~ ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:35:57: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 35 | std::shared_ptr<int> P1{new int}, P2{new int[10]}, P3{new int[10]};
# | | ~~~ ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:42:27: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 42 | std::shared_ptr<int> P2{new int[10]};
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:44:40: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 44 | std::shared_ptr<int> P3{new int}, P4{new int[10]};
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:46:12: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 46 | S() : P1{new int[10]} {}
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:53:31: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 53 | f_parm(std::shared_ptr<int>{new int[10]});
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:58:31: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 58 | return std::shared_ptr<int>(new int[10]);
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:64:25: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 64 | std::shared_ptr<T> P1{new T[10]};
# | | ~ ^~~
# | | []
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:64:20: note: FIX-IT applied suggested code changes
# | 64 | std::shared_ptr<T> P1{new T[10]};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:80:20: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 80 | CHAR_PTR_TYPE P1{new char[10]};
# | | ^~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:82:25: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 82 | std::shared_ptr<char> CHAR_PTR_VAR(P2);
# | | ~~~~ ^
# | | []
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:82:23: note: FIX-IT applied suggested code changes
# | 82 | std::shared_ptr<char> CHAR_PTR_VAR(P2);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:75:7: note: expanded from macro 'CHAR_PTR_VAR'
# | 75 | X { new char[10] }
# | | ^~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:85:21: warning: shared pointer to non-array is initialized with array [bugprone-shared-ptr-array-mismatch]
# | 85 | CHAR_PTR_INIT(P3, new char[10]);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:77:29: note: expanded from macro 'CHAR_PTR_INIT'
# | clang-tidy applied 5 of 5 suggested fixes.
# | 77 | std::shared_ptr<char> X { Y }
# | | ~~~~ ^
# |
# | ------------------------------------------------------------------
# | diff -u /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.orig /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp failed:
# | --- /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.orig 2026-04-02 22:29:34.968176586 +0000
# | +++ /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp 2026-04-02 22:29:35.021176543 +0000
# | @@ -6,15 +6,15 @@
# |
# | void f1() {
# | std::shared_ptr<int> P1{new int};
# | - std::shared_ptr<int> P2{new int[10]};
# | + std::shared_ptr<int[]> P2{new int[10]};
# | //
# | //
# | // clang-format off
# | - std::shared_ptr< int > P3{new int[10]};
# | + std::shared_ptr< int[] > P3{new int[10]};
# | //
# | //
# | // clang-format on
# | - std::shared_ptr<int> P4(new int[10]);
# | + std::shared_ptr<int[]> P4(new int[10]);
# | //
# | //
# | new std::shared_ptr<int>(new int[10]);
# | @@ -61,7 +61,7 @@
# |
# | template <class T>
# | void f_tmpl() {
# | - std::shared_ptr<T> P1{new T[10]};
# | + std::shared_ptr<T[]> P1{new T[10]};
# | //
# | //
# | }
# | @@ -79,7 +79,7 @@
# | void f6() {
# | CHAR_PTR_TYPE P1{new char[10]};
# | //
# | - std::shared_ptr<char> CHAR_PTR_VAR(P2);
# | + std::shared_ptr<char[]> CHAR_PTR_VAR(P2);
# | //
# | //
# | CHAR_PTR_INIT(P3, new char[10]);
# |
# | ------------------------------ Fixes -----------------------------
# | --- /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.orig 2026-04-02 22:29:34.968176586 +0000
# | +++ /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp 2026-04-02 22:29:35.021176543 +0000
# | @@ -6,15 +6,15 @@
# |
# | void f1() {
# | std::shared_ptr<int> P1{new int};
# | - std::shared_ptr<int> P2{new int[10]};
# | + std::shared_ptr<int[]> P2{new int[10]};
# | //
# | //
# | // clang-format off
# | - std::shared_ptr< int > P3{new int[10]};
# | + std::shared_ptr< int[] > P3{new int[10]};
# | //
# | //
# | // clang-format on
# | - std::shared_ptr<int> P4(new int[10]);
# | + std::shared_ptr<int[]> P4(new int[10]);
# | //
# | //
# | new std::shared_ptr<int>(new int[10]);
# | @@ -61,7 +61,7 @@
# |
# | template <class T>
# | void f_tmpl() {
# | - std::shared_ptr<T> P1{new T[10]};
# | + std::shared_ptr<T[]> P1{new T[10]};
# | //
# | //
# | }
# | @@ -79,7 +79,7 @@
# | void f6() {
# | CHAR_PTR_TYPE P1{new char[10]};
# | //
# | - std::shared_ptr<char> CHAR_PTR_VAR(P2);
# | + std::shared_ptr<char[]> CHAR_PTR_VAR(P2);
# | //
# | //
# | CHAR_PTR_INIT(P3, new char[10]);
# |
# | ------------------------------------------------------------------
# | FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/shared-ptr-array-mismatch.cpp --check-prefixes=CHECK-FIXES --match-full-lines failed:
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/shared-ptr-array-mismatch.cpp:30:18: error: CHECK-FIXES: expected string not found in input
# | // CHECK-FIXES: std::shared_ptr<A[]> P2(new A[10]);
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:17:41: note: scanning from here
# | std::shared_ptr<int[]> P4(new int[10]);
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp:31:2: note: possible intended match here
# | std::shared_ptr<A[]> P3(new A[10]);
# | ^
# |
# | Input file: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/shared-ptr-array-mismatch.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 12: // clang-format off
# | 13: std::shared_ptr< int[] > P3{new int[10]};
# | 14: //
# | 15: //
# | 16: // clang-format on
# | 17: std::shared_ptr<int[]> P4(new int[10]);
# | check:30'0 X error: no match found
# | 18: //
# | check:30'0 ~~~~
# | 19: //
# | check:30'0 ~~~~
# | 20: new std::shared_ptr<int>(new int[10]);
# | check:30'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 21: //
# | check:30'0 ~~~~
# | 22: std::shared_ptr<int[]> P5(new int[10]);
# | check:30'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 26: void f2() {
# | check:30'0 ~~~~~~~~~~~~
# | 27: std::shared_ptr<A> P1(new A);
# | check:30'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 28: std::shared_ptr<A> P2(new A[10]);
# | check:30'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 29: //
# | check:30'0 ~~~~
# | 30: //
# | check:30'0 ~~~~
# | 31: std::shared_ptr<A[]> P3(new A[10]);
# | check:30'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:30'1 ? possible intended match
# | 32: }
# | check:30'0 ~~
# | 33:
# | check:30'0 ~
# | 34: void f3() {
# | check:30'0 ~~~~~~~~~~~~
# | 35: std::shared_ptr<int> P1{new int}, P2{new int[10]}, P3{new int[10]};
# | check:30'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 36: //
# | check:30'0 ~~~~
# | .
# | .
# | .
# | >>>>>>
# |
# `-----------------------------
# .---command stderr------------
# | Traceback (most recent call last):
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 554, in <module>
# | main()
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 550, in main
# | CheckRunner(args, extra_args).run()
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 432, in run
# | self.check_fixes()
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 327, in check_fixes
# | try_run(
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 64, in try_run
# | process_output = subprocess.check_output(args, stderr=subprocess.STDOUT).decode(
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# | File "/usr/lib/python3.12/subprocess.py", line 466, in check_output
# | return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# | File "/usr/lib/python3.12/subprocess.py", line 571, in run
# | raise CalledProcessError(retcode, process.args,
# | subprocess.CalledProcessError: Command '['FileCheck', '--input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/shared-ptr-array-mismatch.cpp.tmp.cpp', '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/shared-ptr-array-mismatch.cpp', '--check-prefixes=CHECK-FIXES', '--match-full-lines']' returned non-zero exit status 1.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang Tools.clang-tidy/checkers/bugprone/unique-ptr-array-mismatch.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/unique-ptr-array-mismatch.cpp bugprone-unique-ptr-array-mismatch /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/unique-ptr-array-mismatch.cpp bugprone-unique-ptr-array-mismatch /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp
# .---command stdout------------
# | Running ['clang-tidy', '--experimental-custom-checks', '/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp', '-fix', '--checks=-*,bugprone-unique-ptr-array-mismatch', '--config={}', '--', '-std=c++11', '-nostdinc++', '-isystem', '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/checkers/Inputs/Headers/std']...
# | ------------------------ clang-tidy output -----------------------
# | 19 warnings generated.
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:12:27: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 12 | std::unique_ptr<int> P2{new int[10]};
# | | ~~~ ^~~~~~~~~~~
# | | []
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:12:22: note: FIX-IT applied suggested code changes
# | 12 | std::unique_ptr<int> P2{new int[10]};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:16:31: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 16 | std::unique_ptr< int > P3{new int[10]};
# | | ~~~ ^~~~~~~~~~~
# | | []
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:16:24: note: FIX-IT applied suggested code changes
# | 16 | std::unique_ptr< int > P3{new int[10]};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:20:27: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 20 | std::unique_ptr<int> P4(new int[10]);
# | | ~~~ ^~~~~~~~~~~
# | | []
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:20:22: note: FIX-IT applied suggested code changes
# | 20 | std::unique_ptr<int> P4(new int[10]);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:23:28: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 23 | new std::unique_ptr<int>(new int[10]);
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:33:12: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 33 | new PtrT(new A[10]);
# | | ^~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:40:25: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 40 | std::unique_ptr<A> P2(new A[10]);
# | | ^~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:47:40: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 47 | std::unique_ptr<int> P1{new int}, P2{new int[10]}, P3{new int[10]};
# | | ~~~ ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:47:57: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 47 | std::unique_ptr<int> P1{new int}, P2{new int[10]}, P3{new int[10]};
# | | ~~~ ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:54:27: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 54 | std::unique_ptr<int> P2{new int[10]};
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:56:40: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 56 | std::unique_ptr<int> P3{new int}, P4{new int[10]};
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:58:12: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 58 | S() : P1{new int[10]} {}
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:65:31: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 65 | f_parm(std::unique_ptr<int>{new int[10]});
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:70:31: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 70 | return std::unique_ptr<int>(new int[10]);
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:76:25: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 76 | std::unique_ptr<T> P1{new T[10]};
# | | ~ ^~~
# | | []
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:76:20: note: FIX-IT applied suggested code changes
# | 76 | std::unique_ptr<T> P1{new T[10]};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:99:20: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 99 | CHAR_PTR_TYPE P1{new char[10]};
# | | ^~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:101:25: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 101 | std::unique_ptr<char> CHAR_PTR_VAR(P2);
# | | ~~~~ ^
# | | []
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:101:23: note: FIX-IT applied suggested code changes
# | 101 | std::unique_ptr<char> CHAR_PTR_VAR(P2);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:94:7: note: expanded from macro 'CHAR_PTR_VAR'
# | 94 | X { new char[10] }
# | | ^~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:104:21: warning: unique pointer to non-array is initialized with array [bugprone-unique-ptr-array-mismatch]
# | 104 | CHAR_PTR_INIT(P3, new char[10]);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:96:29: note: expanded from macro 'CHAR_PTR_INIT'
# | clang-tidy applied 5 of 5 suggested fixes.
# | 96 | std::unique_ptr<char> X { Y }
# | | ~~~~ ^
# |
# | ------------------------------------------------------------------
# | diff -u /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.orig /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp failed:
# | --- /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.orig 2026-04-02 22:29:32.884178294 +0000
# | +++ /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp 2026-04-02 22:29:32.946178243 +0000
# | @@ -9,15 +9,15 @@
# |
# | void f1() {
# | std::unique_ptr<int> P1{new int};
# | - std::unique_ptr<int> P2{new int[10]};
# | + std::unique_ptr<int[]> P2{new int[10]};
# | //
# | //
# | // clang-format off
# | - std::unique_ptr< int > P3{new int[10]};
# | + std::unique_ptr< int[] > P3{new int[10]};
# | //
# | //
# | // clang-format on
# | - std::unique_ptr<int> P4(new int[10]);
# | + std::unique_ptr<int[]> P4(new int[10]);
# | //
# | //
# | new std::unique_ptr<int>(new int[10]);
# | @@ -73,7 +73,7 @@
# |
# | template <class T>
# | void f_tmpl() {
# | - std::unique_ptr<T> P1{new T[10]};
# | + std::unique_ptr<T[]> P1{new T[10]};
# | //
# | //
# | }
# | @@ -98,7 +98,7 @@
# | void f6() {
# | CHAR_PTR_TYPE P1{new char[10]};
# | //
# | - std::unique_ptr<char> CHAR_PTR_VAR(P2);
# | + std::unique_ptr<char[]> CHAR_PTR_VAR(P2);
# | //
# | //
# | CHAR_PTR_INIT(P3, new char[10]);
# |
# | ------------------------------ Fixes -----------------------------
# | --- /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.orig 2026-04-02 22:29:32.884178294 +0000
# | +++ /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp 2026-04-02 22:29:32.946178243 +0000
# | @@ -9,15 +9,15 @@
# |
# | void f1() {
# | std::unique_ptr<int> P1{new int};
# | - std::unique_ptr<int> P2{new int[10]};
# | + std::unique_ptr<int[]> P2{new int[10]};
# | //
# | //
# | // clang-format off
# | - std::unique_ptr< int > P3{new int[10]};
# | + std::unique_ptr< int[] > P3{new int[10]};
# | //
# | //
# | // clang-format on
# | - std::unique_ptr<int> P4(new int[10]);
# | + std::unique_ptr<int[]> P4(new int[10]);
# | //
# | //
# | new std::unique_ptr<int>(new int[10]);
# | @@ -73,7 +73,7 @@
# |
# | template <class T>
# | void f_tmpl() {
# | - std::unique_ptr<T> P1{new T[10]};
# | + std::unique_ptr<T[]> P1{new T[10]};
# | //
# | //
# | }
# | @@ -98,7 +98,7 @@
# | void f6() {
# | CHAR_PTR_TYPE P1{new char[10]};
# | //
# | - std::unique_ptr<char> CHAR_PTR_VAR(P2);
# | + std::unique_ptr<char[]> CHAR_PTR_VAR(P2);
# | //
# | //
# | CHAR_PTR_INIT(P3, new char[10]);
# |
# | ------------------------------------------------------------------
# | FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/unique-ptr-array-mismatch.cpp --check-prefixes=CHECK-FIXES --match-full-lines failed:
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/unique-ptr-array-mismatch.cpp:42:18: error: CHECK-FIXES: expected string not found in input
# | // CHECK-FIXES: std::unique_ptr<A[]> P2(new A[10]);
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:20:41: note: scanning from here
# | std::unique_ptr<int[]> P4(new int[10]);
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp:43:2: note: possible intended match here
# | std::unique_ptr<A[]> P3(new A[10]);
# | ^
# |
# | Input file: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/unique-ptr-array-mismatch.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 15: // clang-format off
# | 16: std::unique_ptr< int[] > P3{new int[10]};
# | 17: //
# | 18: //
# | 19: // clang-format on
# | 20: std::unique_ptr<int[]> P4(new int[10]);
# | check:42'0 X error: no match found
# | 21: //
# | check:42'0 ~~~~
# | 22: //
# | check:42'0 ~~~~
# | 23: new std::unique_ptr<int>(new int[10]);
# | check:42'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 24: //
# | check:42'0 ~~~~
# | 25: std::unique_ptr<int[]> P5(new int[10]);
# | check:42'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 38: void f2() {
# | check:42'0 ~~~~~~~~~~~~
# | 39: std::unique_ptr<A> P1(new A);
# | check:42'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 40: std::unique_ptr<A> P2(new A[10]);
# | check:42'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 41: //
# | check:42'0 ~~~~
# | 42: //
# | check:42'0 ~~~~
# | 43: std::unique_ptr<A[]> P3(new A[10]);
# | check:42'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:42'1 ? possible intended match
# | 44: }
# | check:42'0 ~~
# | 45:
# | check:42'0 ~
# | 46: void f3() {
# | check:42'0 ~~~~~~~~~~~~
# | 47: std::unique_ptr<int> P1{new int}, P2{new int[10]}, P3{new int[10]};
# | check:42'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 48: //
# | check:42'0 ~~~~
# | .
# | .
# | .
# | >>>>>>
# |
# `-----------------------------
# .---command stderr------------
# | Traceback (most recent call last):
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 554, in <module>
# | main()
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 550, in main
# | CheckRunner(args, extra_args).run()
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 432, in run
# | self.check_fixes()
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 327, in check_fixes
# | try_run(
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 64, in try_run
# | process_output = subprocess.check_output(args, stderr=subprocess.STDOUT).decode(
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# | File "/usr/lib/python3.12/subprocess.py", line 466, in check_output
# | return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# | File "/usr/lib/python3.12/subprocess.py", line 571, in run
# | raise CalledProcessError(retcode, process.args,
# | subprocess.CalledProcessError: Command '['FileCheck', '--input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/bugprone/Output/unique-ptr-array-mismatch.cpp.tmp.cpp', '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/unique-ptr-array-mismatch.cpp', '--check-prefixes=CHECK-FIXES', '--match-full-lines']' returned non-zero exit status 1.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang Tools.clang-tidy/checkers/cppcoreguidelines/owning-memory.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/owning-memory.cpp cppcoreguidelines-owning-memory /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/owning-memory.cpp cppcoreguidelines-owning-memory /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp
# .---command stdout------------
# | Running ['clang-tidy', '--experimental-custom-checks', '/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp', '-fix', '--checks=-*,cppcoreguidelines-owning-memory', '--config={}', '--', '-std=c++11', '-nostdinc++', '-isystem', '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/checkers/Inputs/Headers/std']...
# | ------------------------ clang-tidy output -----------------------
# | 50 warnings generated.
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:38:3: warning: returning a newly created resource of type 'int *' or 'gsl::owner<>' from a function whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 38 | return new int(42);
# | | ^~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:47:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 47 | gsl::owner<int *> owner = new int(42);
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:48:3: warning: returning a newly created resource of type 'int *' or 'gsl::owner<>' from a function whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 48 | return owner;
# | | ^~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:59:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 59 | gsl::owner<int *> o1 = new int(42); // Ok
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:73:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 73 | gsl::owner<int *> owned_int1 = &stack_int1; // BAD
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:77:3: warning: expected assignment source to be of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 77 | owned_int2 = &stack_int2; // BAD since no owner, bad since uninitialized
# | | ^~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:80:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 80 | gsl::owner<int *> owned_int3 = new int(42); // Good
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:99:3: warning: initializing non-owner 'int *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 99 | int *unowned_int3 = returns_owner1(); // Bad
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:106:3: warning: assigning newly created 'gsl::owner<>' to non-owner 'int *' [cppcoreguidelines-owning-memory]
# | 106 | unowned_int4 = returns_owner1(); // Bad
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:109:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 109 | gsl::owner<int *> owned_int11 = returns_no_owner1(); // Bad since no owner
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:113:3: warning: expected assignment source to be of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 113 | owned_int12 = returns_no_owner1(); // Bad since no owner
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:124:3: warning: assigning newly created 'gsl::owner<>' to non-owner 'int *' [cppcoreguidelines-owning-memory]
# | 124 | unowned_int8 = new int(42);
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:131:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 131 | gsl::owner<int *> owned_int1 = new int(42);
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:139:3: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory]
# | 139 | delete unowned_int1; // BAD, since no owner
# | | ^ ~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:137:3: note: variable declared here
# | 137 | int *unowned_int1 = new int(42); // BAD, since new creates and owner
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:143:3: warning: initializing non-owner 'int *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 143 | int *unowned_int2 = new int[42]; // BAD, since new creates and owner
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:145:3: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory]
# | 145 | delete[] unowned_int2; // BAD since no owner
# | | ^ ~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:143:3: note: variable declared here
# | 143 | int *unowned_int2 = new int[42]; // BAD, since new creates and owner
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:156:15: warning: expected argument of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 156 | takes_owner(&stack_int); // BAD
# | | ^~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:158:15: warning: expected argument of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 158 | takes_owner(unowned_int1); // BAD
# | | ^~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:161:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 161 | gsl::owner<int *> owned_int1 = new int(42);
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:164:28: warning: expected argument of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 164 | takes_owner_and_more(42, &stack_int, 42.0f); // BAD
# | | ^~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:166:28: warning: expected argument of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 166 | takes_owner_and_more(42, unowned_int1, 42.0f); // BAD
# | | ^~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:174:25: warning: expected argument of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 174 | takes_templated_owner(unowned_int1); // Bad
# | | ^~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:178:15: warning: expected argument of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 178 | takes_owner(returns_no_owner1()); // BAD
# | | ^~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:185:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 185 | gsl::owner<int *> owned_int1 = new int(42);
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:190:17: warning: initializing non-owner argument of type 'int *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 190 | takes_pointer(new int(42)); // Bad, since new creates and owner
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:193:17: warning: initializing non-owner argument of type 'int *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 193 | takes_pointer(returns_owner1()); // Bad
# | | ^~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:237:43: warning: expected initialization of owner member variable with value of type 'gsl::owner<>'; got 'ArbitraryClass *' [cppcoreguidelines-owning-memory]
# | 237 | ClassWithOwner(ArbitraryClass &other) : owner_var(&other) {}
# | | ^~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:247:5: warning: expected assignment source to be of type 'gsl::owner<>'; got 'ArbitraryClass *' [cppcoreguidelines-owning-memory]
# | 247 | owner_var = bad_data;
# | | ^~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:262:3: warning: member variable of type 'gsl::owner<>' requires the class 'ClassWithOwner' to implement a destructor to release the owned resource [cppcoreguidelines-owning-memory]
# | 262 | gsl::owner<ArbitraryClass *> owner_var;
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:268:3: warning: member variable of type 'gsl::owner<>' requires the class 'DefaultedDestructor' to implement a destructor to release the owned resource [cppcoreguidelines-owning-memory]
# | 268 | gsl::owner<int *> Owner;
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:274:3: warning: member variable of type 'gsl::owner<>' requires the class 'DeletedDestructor' to implement a destructor to release the owned resource [cppcoreguidelines-owning-memory]
# | 274 | gsl::owner<int *> Owner;
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:288:3: warning: expected assignment source to be of type 'gsl::owner<>'; got 'ArbitraryClass *' [cppcoreguidelines-owning-memory]
# | 288 | Owner2 = &A; // BAD, since type deduction resulted in owner<ArbitraryClass *>
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:292:3: warning: expected assignment source to be of type 'gsl::owner<>'; got 'ArbitraryClass *' [cppcoreguidelines-owning-memory]
# | 292 | Owner3 = &A; // Bad, since assignment of non-owner to owner
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:306:50: warning: expected initialization of owner member variable with value of type 'gsl::owner<>'; got 'void' [cppcoreguidelines-owning-memory]
# | 306 | HeapArray(int size, T val, int *problematic) : _data{problematic}, size(size) {} // Bad
# | | ^~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:311:5: warning: expected assignment source to be of type 'gsl::owner<>'; got 'std::nullptr_t' [cppcoreguidelines-owning-memory]
# | 311 | other._data = nullptr; // Ok
# | | ^~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:341:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 341 | gsl::owner<int *> OwningPtr = Array1.data(); // Bad, since it does not return the owner
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:361:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'T' [cppcoreguidelines-owning-memory]
# | 361 | gsl::owner<int *> owner_t = t; // Probably bad, since type deduction still wrong
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:361:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 361 | gsl::owner<int *> owner_t = t; // Probably bad, since type deduction still wrong
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:381:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | 381 | gsl::owner<int *> IntOwner1 = NonOwner1.getVal(); // Bad, since owner initialized with non-owner
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:396:5: warning: returning a newly created resource of type 'A *' or 'gsl::owner<>' from a function whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 396 | return new B;
# | | ^~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:417:7: warning: returning a newly created resource of type 'S *' or 'gsl::owner<>' from a lambda whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 417 | return ::gsl::owner<S*>{new S{}};
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:433:9: warning: returning a newly created resource of type 'S *' or 'gsl::owner<>' from a function whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 433 | return ::gsl::owner<S*>{new S{}};
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:446:5: warning: returning a newly created resource of type 'S *' or 'gsl::owner<>' from a function whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 446 | return ::gsl::owner<S*>{new S(MakeI())};
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:461:5: warning: returning a newly created resource of type 'S *' or 'gsl::owner<>' from a function whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 461 | return ::gsl::owner<S*>{new S(C().test())};
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:475:7: warning: returning a newly created resource of type 'S *' or 'gsl::owner<>' from a lambda whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 475 | return ::gsl::owner<S*>{new S(MakeI())};
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:483:9: warning: returning a newly created resource of type 'S *' or 'gsl::owner<>' from a lambda whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 483 | return ::gsl::owner<S*>{new S(1)};
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:486:7: warning: returning a newly created resource of type 'S *' or 'gsl::owner<>' from a lambda whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 486 | return ::gsl::owner<S*>{new S(2)};
# | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:500:39: warning: returning a newly created resource of type 'S *' or 'gsl::owner<>' from a lambda whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | 500 | const auto MakeS = []() -> S* { return new S(); };
# | | ^~~~~~~~~~~~~~
# | Suppressed 3 warnings (1 NOLINT, 2 with check filters).
# |
# | ------------------------------------------------------------------
# | ------------------------------ Fixes -----------------------------
# |
# | ------------------------------------------------------------------
# | FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp.notes /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/owning-memory.cpp -check-prefixes=CHECK-NOTES -implicit-check-not={{note|warning|error}}: failed:
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/owning-memory.cpp:43:18: error: CHECK-NOTES: expected string not found in input
# | // CHECK-NOTES: [[@LINE-1]]:3: warning: initializing non-owner 'int *' with a newly created 'gsl::owner<>'
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp.notes:2:303: note: scanning from here
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:38:3: warning: returning a newly created resource of type 'int *' or 'gsl::owner<>' from a function whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp.notes:2:303: note: with "@LINE-1" equal to "42"
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:38:3: warning: returning a newly created resource of type 'int *' or 'gsl::owner<>' from a function whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp.notes:23:165: note: possible intended match here
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:99:3: warning: initializing non-owner 'int *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | ^
# |
# | Input file: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp.notes
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/owning-memory.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: 50 warnings generated.
# | 2: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:38:3: warning: returning a newly created resource of type 'int *' or 'gsl::owner<>' from a function whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | check:43'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | check:43'1 with "@LINE-1" equal to "42"
# | 3: 38 | return new int(42);
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 4: | ^~~~~~~~~~~~~~~~~~
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~
# | 5: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:47:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 6: 47 | gsl::owner<int *> owner = new int(42);
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 7: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 18: 77 | owned_int2 = &stack_int2; // BAD since no owner, bad since uninitialized
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 19: | ^~~~~~~~~~~~~~~~~~~~~~~~
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 20: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:80:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 21: 80 | gsl::owner<int *> owned_int3 = new int(42); // Good
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 22: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 23: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:99:3: warning: initializing non-owner 'int *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory]
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:43'2 ? possible intended match
# | 24: 99 | int *unowned_int3 = returns_owner1(); // Bad
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 25: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 26: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp:106:3: warning: assigning newly created 'gsl::owner<>' to non-owner 'int *' [cppcoreguidelines-owning-memory]
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 27: 106 | unowned_int4 = returns_owner1(); // Bad
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 28: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# |
# `-----------------------------
# .---command stderr------------
# | Traceback (most recent call last):
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 554, in <module>
# | main()
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 550, in main
# | CheckRunner(args, extra_args).run()
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 434, in run
# | self.check_notes(main_output)
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 377, in check_notes
# | try_run(
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 64, in try_run
# | process_output = subprocess.check_output(args, stderr=subprocess.STDOUT).decode(
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# | File "/usr/lib/python3.12/subprocess.py", line 466, in check_output
# | return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# | File "/usr/lib/python3.12/subprocess.py", line 571, in run
# | raise CalledProcessError(retcode, process.args,
# | subprocess.CalledProcessError: Command '['FileCheck', '-input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/cppcoreguidelines/Output/owning-memory.cpp.tmp.cpp.notes', '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/owning-memory.cpp', '-check-prefixes=CHECK-NOTES', '-implicit-check-not={{note|warning|error}}:']' returned non-zero exit status 1.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang Tools.clang-tidy/checkers/modernize/make-shared.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/make-shared.cpp modernize-make-shared /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp -- -- -I /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/smart-ptr
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/make-shared.cpp modernize-make-shared /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp -- -- -I /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/smart-ptr
# .---command stdout------------
# | Running ['clang-tidy', '--experimental-custom-checks', '/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp', '-fix', '--checks=-*,modernize-make-shared', '--config={}', '--', '-I', '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/smart-ptr', '-std=c++11', '-nostdinc++', '-isystem', '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/checkers/Inputs/Headers/std']...
# | ------------------------ clang-tidy output -----------------------
# | 44 warnings generated.
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:36:10: warning: use std::make_shared instead [modernize-make-shared]
# | 3 | return std::shared_ptr<Base>(new Base);
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:3:1: note: FIX-IT applied suggested code changes
# | 3 | #include "shared_ptr.h"
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:36:10: note: FIX-IT applied suggested code changes
# | 36 | return std::shared_ptr<Base>(new Base);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:36:32: note: FIX-IT applied suggested code changes
# | 36 | return std::shared_ptr<Base>(new Base);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:42:10: warning: use std::make_shared instead [modernize-make-shared]
# | 42 | return std::shared_ptr<Base>(new Base());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:42:10: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:42:32: note: FIX-IT applied suggested code changes
# | 42 | return std::shared_ptr<Base>(new Base());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:48:29: warning: use std::make_shared instead [modernize-make-shared]
# | 48 | std::shared_ptr<int> P1 = std::shared_ptr<int>(new int());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:48:29: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:48:50: note: FIX-IT applied suggested code changes
# | 48 | std::shared_ptr<int> P1 = std::shared_ptr<int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:53:6: warning: use std::make_shared instead [modernize-make-shared]
# | 53 | P1.reset(new int());
# | | ~^~~~~ ~~~~~~~~~
# | | = std::make_shared<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:53:5: note: FIX-IT applied suggested code changes
# | 53 | P1.reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:53:12: note: FIX-IT applied suggested code changes
# | 53 | P1.reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:58:8: warning: use std::make_shared instead [modernize-make-shared]
# | 58 | P1 = std::shared_ptr<int>(new int());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:58:8: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:58:29: note: FIX-IT applied suggested code changes
# | 58 | P1 = std::shared_ptr<int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:66:6: warning: use std::make_shared instead [modernize-make-shared]
# | 66 | P2.reset(new int());
# | | ~^~~~~ ~~~~~~~~~
# | | = std::make_shared<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:66:5: note: FIX-IT applied suggested code changes
# | 66 | P2.reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:66:12: note: FIX-IT applied suggested code changes
# | 66 | P2.reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:71:8: warning: use std::make_shared instead [modernize-make-shared]
# | 71 | P2 = std::shared_ptr<int>(new int());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:71:8: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:71:29: note: FIX-IT applied suggested code changes
# | 71 | P2 = std::shared_ptr<int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:77:13: warning: use std::make_shared instead [modernize-make-shared]
# | 77 | auto P4 = std::shared_ptr<int>(new int());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:77:13: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:77:34: note: FIX-IT applied suggested code changes
# | 77 | auto P4 = std::shared_ptr<int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:82:29: warning: use std::make_shared instead [modernize-make-shared]
# | 82 | std::shared_ptr<int> P6 = std::shared_ptr<int>((new int()));
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:82:29: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:82:50: note: FIX-IT applied suggested code changes
# | 82 | std::shared_ptr<int> P6 = std::shared_ptr<int>((new int()));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:87:6: warning: use std::make_shared instead [modernize-make-shared]
# | 87 | P4.reset((((new int()))));
# | | ~^~~~~ ~~~~~~~~~~~~~~~
# | | = std::make_shared<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:87:5: note: FIX-IT applied suggested code changes
# | 87 | P4.reset((((new int()))));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:87:12: note: FIX-IT applied suggested code changes
# | 87 | P4.reset((((new int()))));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:92:8: warning: use std::make_shared instead [modernize-make-shared]
# | 92 | P4 = std::shared_ptr<int>(((new int())));
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:92:8: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:92:29: note: FIX-IT applied suggested code changes
# | 92 | P4 = std::shared_ptr<int>(((new int())));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:100:25: warning: use std::make_shared instead [modernize-make-shared]
# | 100 | shared_ptr<int> Q = shared_ptr<int>(new int());
# | | ^~~~~~~~~~ ~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:100:25: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:100:41: note: FIX-IT applied suggested code changes
# | 100 | shared_ptr<int> Q = shared_ptr<int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:105:9: warning: use std::make_shared instead [modernize-make-shared]
# | 105 | Q = shared_ptr<int>(new int());
# | | ^~~~~~~~~~ ~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:105:9: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:105:25: note: FIX-IT applied suggested code changes
# | 105 | Q = shared_ptr<int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:117:13: warning: use std::make_shared instead [modernize-make-shared]
# | 117 | int T = g(std::shared_ptr<int>(new int()));
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:117:13: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:117:34: note: FIX-IT applied suggested code changes
# | 117 | int T = g(std::shared_ptr<int>(new int()));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:128:12: warning: use std::make_shared instead [modernize-make-shared]
# | 128 | Pderived.reset(new Derived());
# | | ~^~~~~ ~~~~~~~~~~~~~
# | | = std::make_shared<Derived>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:128:11: note: FIX-IT applied suggested code changes
# | 128 | Pderived.reset(new Derived());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:128:18: note: FIX-IT applied suggested code changes
# | 128 | Pderived.reset(new Derived());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:131:12: warning: use std::make_shared instead [modernize-make-shared]
# | 131 | Pderived.reset(new Derived);
# | | ~^~~~~ ~~~~~~~~~~~
# | | = std::make_shared<Derived>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:131:11: note: FIX-IT applied suggested code changes
# | 131 | Pderived.reset(new Derived);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:131:18: note: FIX-IT applied suggested code changes
# | 131 | Pderived.reset(new Derived);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:135:14: warning: use std::make_shared instead [modernize-make-shared]
# | 135 | Pderived = std::shared_ptr<Derived>(new Derived());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:135:14: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:135:39: note: FIX-IT applied suggested code changes
# | 135 | Pderived = std::shared_ptr<Derived>(new Derived());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:138:14: warning: use std::make_shared instead [modernize-make-shared]
# | 138 | Pderived = std::shared_ptr<Derived>(new Derived);
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:138:14: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:138:39: note: FIX-IT applied suggested code changes
# | 138 | Pderived = std::shared_ptr<Derived>(new Derived);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:177:24: warning: use std::make_shared instead [modernize-make-shared]
# | 177 | auto callsPublic = std::shared_ptr<Private>(new Private);
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:177:24: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:177:49: note: FIX-IT applied suggested code changes
# | 177 | auto callsPublic = std::shared_ptr<Private>(new Private);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:195:24: warning: use std::make_shared instead [modernize-make-shared]
# | 195 | auto callsPublic = std::shared_ptr<Protected>(new Protected(1, 2));
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ ~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:195:24: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:195:51: note: FIX-IT applied suggested code changes
# | 195 | auto callsPublic = std::shared_ptr<Protected>(new Protected(1, 2));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:195:69: note: FIX-IT applied suggested code changes
# | 195 | auto callsPublic = std::shared_ptr<Protected>(new Protected(1, 2));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:208:34: warning: use std::make_shared instead [modernize-make-shared]
# | 208 | std::shared_ptr<DPair> PDir1 = std::shared_ptr<DPair>(new DPair(1, T));
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~ ~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:208:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:208:57: note: FIX-IT applied suggested code changes
# | 208 | std::shared_ptr<DPair> PDir1 = std::shared_ptr<DPair>(new DPair(1, T));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:208:71: note: FIX-IT applied suggested code changes
# | 208 | std::shared_ptr<DPair> PDir1 = std::shared_ptr<DPair>(new DPair(1, T));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:211:9: warning: use std::make_shared instead [modernize-make-shared]
# | 211 | PDir1.reset(new DPair(1, T));
# | | ~^~~~~ ~~~~~~~~~~ ~
# | | = std::make_shared<DPair>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:211:8: note: FIX-IT applied suggested code changes
# | 211 | PDir1.reset(new DPair(1, T));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:211:15: note: FIX-IT applied suggested code changes
# | 211 | PDir1.reset(new DPair(1, T));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:211:29: note: FIX-IT applied suggested code changes
# | 211 | PDir1.reset(new DPair(1, T));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:216:34: warning: use std::make_shared instead [modernize-make-shared]
# | 216 | std::shared_ptr<DPair> PDir2 = std::shared_ptr<DPair>(new DPair{2, T});
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~ ~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:216:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:216:57: note: FIX-IT applied suggested code changes
# | 216 | std::shared_ptr<DPair> PDir2 = std::shared_ptr<DPair>(new DPair{2, T});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:216:71: note: FIX-IT applied suggested code changes
# | 216 | std::shared_ptr<DPair> PDir2 = std::shared_ptr<DPair>(new DPair{2, T});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:219:9: warning: use std::make_shared instead [modernize-make-shared]
# | 219 | PDir2.reset(new DPair{2, T});
# | | ~^~~~~ ~~~~~~~~~~ ~
# | | = std::make_shared<DPair>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:219:8: note: FIX-IT applied suggested code changes
# | 219 | PDir2.reset(new DPair{2, T});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:219:15: note: FIX-IT applied suggested code changes
# | 219 | PDir2.reset(new DPair{2, T});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:219:29: note: FIX-IT applied suggested code changes
# | 219 | PDir2.reset(new DPair{2, T});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:224:34: warning: use std::make_shared instead [modernize-make-shared]
# | 224 | std::shared_ptr<APair> PAggr = std::shared_ptr<APair>(new APair{T, 1});
# | | ^~~~~~~~~~~~~~~ ~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:224:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:224:57: note: FIX-IT applied suggested code changes
# | 224 | std::shared_ptr<APair> PAggr = std::shared_ptr<APair>(new APair{T, 1});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:227:9: warning: use std::make_shared instead [modernize-make-shared]
# | 227 | PAggr.reset(new APair{T, 1});
# | | ~^~~~~ ~~~
# | | = std::make_shared<APair>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:227:8: note: FIX-IT applied suggested code changes
# | 227 | PAggr.reset(new APair{T, 1});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:227:15: note: FIX-IT applied suggested code changes
# | 227 | PAggr.reset(new APair{T, 1});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:235:34: warning: use std::make_shared instead [modernize-make-shared]
# | 235 | std::shared_ptr<DPair> PDir3 = std::shared_ptr<DPair>{new DPair(3, T)};
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~ ~~
# | | std::make_shared ( )
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:235:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:235:56: note: FIX-IT applied suggested code changes
# | 235 | std::shared_ptr<DPair> PDir3 = std::shared_ptr<DPair>{new DPair(3, T)};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:235:71: note: FIX-IT applied suggested code changes
# | 235 | std::shared_ptr<DPair> PDir3 = std::shared_ptr<DPair>{new DPair(3, T)};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:240:34: warning: use std::make_shared instead [modernize-make-shared]
# | 240 | std::shared_ptr<DPair> PDir4 = std::shared_ptr<DPair>{new DPair{4, T}};
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~ ~~
# | | std::make_shared ( )
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:240:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:240:56: note: FIX-IT applied suggested code changes
# | 240 | std::shared_ptr<DPair> PDir4 = std::shared_ptr<DPair>{new DPair{4, T}};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:240:71: note: FIX-IT applied suggested code changes
# | 240 | std::shared_ptr<DPair> PDir4 = std::shared_ptr<DPair>{new DPair{4, T}};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:245:35: warning: use std::make_shared instead [modernize-make-shared]
# | 245 | std::shared_ptr<APair> PAggr2 = std::shared_ptr<APair>{new APair{T, 2}};
# | | ^~~~~~~~~~~~~~~ ~~~~ ~
# | | std::make_shared ( )
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:245:35: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:245:57: note: FIX-IT applied suggested code changes
# | 245 | std::shared_ptr<APair> PAggr2 = std::shared_ptr<APair>{new APair{T, 2}};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:245:73: note: FIX-IT applied suggested code changes
# | 245 | std::shared_ptr<APair> PAggr2 = std::shared_ptr<APair>{new APair{T, 2}};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:250:34: warning: use std::make_shared instead [modernize-make-shared]
# | 250 | std::shared_ptr<DPair> PDir5 = std::shared_ptr<DPair>(new DPair());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:250:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:250:57: note: FIX-IT applied suggested code changes
# | 250 | std::shared_ptr<DPair> PDir5 = std::shared_ptr<DPair>(new DPair());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:255:34: warning: use std::make_shared instead [modernize-make-shared]
# | 255 | std::shared_ptr<DPair> PDir6 = std::shared_ptr<DPair>(new DPair{});
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:255:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:255:57: note: FIX-IT applied suggested code changes
# | 255 | std::shared_ptr<DPair> PDir6 = std::shared_ptr<DPair>(new DPair{});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:260:35: warning: use std::make_shared instead [modernize-make-shared]
# | 260 | std::shared_ptr<Empty> PEmpty = std::shared_ptr<Empty>(new Empty{});
# | | ^~~~~~~~~~~~~~~ ~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:260:35: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:260:58: note: FIX-IT applied suggested code changes
# | 260 | std::shared_ptr<Empty> PEmpty = std::shared_ptr<Empty>(new Empty{});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:267:20: warning: use std::make_shared instead [modernize-make-shared]
# | 267 | IntPtr Typedef = IntPtr(new int());
# | | ^~~~~~ ~~~~~~~~~
# | | std::make_shared<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:267:20: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:267:27: note: FIX-IT applied suggested code changes
# | 267 | IntPtr Typedef = IntPtr(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:274:22: warning: use std::make_shared instead [modernize-make-shared]
# | 274 | BoolPtr BoolType = BoolPtr(new bool());
# | | ^~~~~~~ ~~~~~~~~~~
# | | std::make_shared<bool>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:274:22: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:274:30: note: FIX-IT applied suggested code changes
# | 274 | BoolPtr BoolType = BoolPtr(new bool());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:281:24: warning: use std::make_shared instead [modernize-make-shared]
# | 281 | BasePtr StructType = BasePtr(new Base);
# | | ^~~~~~~ ~~~~~~~~
# | | std::make_shared<Base>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:281:24: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:281:32: note: FIX-IT applied suggested code changes
# | 281 | BasePtr StructType = BasePtr(new Base);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:286:32: warning: use std::make_shared instead [modernize-make-shared]
# | 286 | std::shared_ptr<int> Macro = std::PTR(new int());
# | | ^~~~~~~~ ~~~~~~~~~
# | | std::make_shared<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:286:32: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:286:41: note: FIX-IT applied suggested code changes
# | 286 | std::shared_ptr<int> Macro = std::PTR(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:292:32: warning: use std::make_shared instead [modernize-make-shared]
# | 292 | std::shared_ptr<int> Using = shared_ptr_<int>(new int());
# | | ^~~~~~~~~~~ ~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:292:32: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:292:49: note: FIX-IT applied suggested code changes
# | 292 | std::shared_ptr<int> Using = shared_ptr_<int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:300:16: warning: use std::make_shared instead [modernize-make-shared]
# | 300 | auto Space = std::shared_ptr <int>(new int());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:300:16: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:300:38: note: FIX-IT applied suggested code changes
# | 300 | auto Space = std::shared_ptr <int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:305:17: warning: use std::make_shared instead [modernize-make-shared]
# | 305 | auto Spaces = std :: shared_ptr <int>(new int());
# | | ^~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:305:17: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:305:46: note: FIX-IT applied suggested code changes
# | 305 | auto Spaces = std :: shared_ptr <int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:313:15: warning: use std::make_shared instead [modernize-make-shared]
# | 313 | auto Nest = std::shared_ptr<std::shared_ptr<int>>(new std::shared_ptr<int>(new int));
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ ~
# | | std::make_shared
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:313:15: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:313:53: note: FIX-IT applied suggested code changes
# | 313 | auto Nest = std::shared_ptr<std::shared_ptr<int>>(new std::shared_ptr<int>(new int));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:313:85: note: FIX-IT applied suggested code changes
# | 313 | auto Nest = std::shared_ptr<std::shared_ptr<int>>(new std::shared_ptr<int>(new int));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:316:8: warning: use std::make_shared instead [modernize-make-shared]
# | 316 | Nest.reset(new std::shared_ptr<int>(new int));
# | | ~^~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ ~
# | | = std::make_shared<std::shared_ptr<int>>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:316:7: note: FIX-IT applied suggested code changes
# | 316 | Nest.reset(new std::shared_ptr<int>(new int));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:316:14: note: FIX-IT applied suggested code changes
# | 316 | Nest.reset(new std::shared_ptr<int>(new int));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:316:46: note: FIX-IT applied suggested code changes
# | 316 | Nest.reset(new std::shared_ptr<int>(new int));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:319:9: warning: use std::make_shared instead [modernize-make-shared]
# | 319 | Nest->reset(new int());
# | | ~~^~~~~ ~~~~~~~~~
# | | * = std::make_shared<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:319:3: note: FIX-IT applied suggested code changes
# | 319 | Nest->reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:319:7: note: FIX-IT applied suggested code changes
# | 319 | Nest->reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:319:15: note: FIX-IT applied suggested code changes
# | 319 | Nest->reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:329:5: warning: use std::make_shared instead [modernize-make-shared]
# | 329 | P.reset(new int());
# | | ~^~~~~ ~~~~~~~~~
# | | = std::make_shared<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:329:4: note: FIX-IT applied suggested code changes
# | 329 | P.reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:329:11: note: FIX-IT applied suggested code changes
# | 329 | P.reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:335:6: warning: use std::make_shared instead [modernize-make-shared]
# | 335 | Q->reset(new int());
# | | ~~^~~~~ ~~~~~~~~~
# | | * = std::make_shared<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:335:3: note: FIX-IT applied suggested code changes
# | 335 | Q->reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:335:4: note: FIX-IT applied suggested code changes
# | 335 | Q->reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:335:12: note: FIX-IT applied suggested code changes
# | clang-tidy applied 101 of 101 suggested fixes.
# | 335 | Q->reset(new int());
# | | ^
# |
# | ------------------------------------------------------------------
# | diff -u /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.orig /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp failed:
# | --- /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.orig 2026-04-02 22:29:31.052179794 +0000
# | +++ /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp 2026-04-02 22:29:31.186179685 +0000
# | @@ -1,5 +1,7 @@
# | // RUN: %check_clang_tidy %s modernize-make-shared %t -- -- -I %S/Inputs/smart-ptr
# |
# | +#include <memory>
# | +
# | #include "shared_ptr.h"
# | //
# |
# | @@ -33,29 +35,29 @@
# | int g(std::shared_ptr<int> P);
# |
# | std::shared_ptr<Base> getPointer() {
# | - return std::shared_ptr<Base>(new Base);
# | + return std::make_shared<Base>();
# | //
# | //
# | }
# |
# | std::shared_ptr<Base> getPointerValue() {
# | - return std::shared_ptr<Base>(new Base());
# | + return std::make_shared<Base>();
# | //
# | //
# | }
# |
# | void basic() {
# | - std::shared_ptr<int> P1 = std::shared_ptr<int>(new int());
# | + std::shared_ptr<int> P1 = std::make_shared<int>();
# | //
# | //
# | std::shared_ptr<int> P2 = std::shared_ptr<int>(new int);
# |
# | - P1.reset(new int());
# | + P1 = std::make_shared<int>();
# | //
# | //
# | P1.reset(new int);
# |
# | - P1 = std::shared_ptr<int>(new int());
# | + P1 = std::make_shared<int>();
# | //
# | //
# | P1 = std::shared_ptr<int>(new int);
# | @@ -63,33 +65,33 @@
# | // Without parenthesis, default initialization.
# | std::shared_ptr<int> P3 = std::shared_ptr<int>(new int);
# |
# | - P2.reset(new int());
# | + P2 = std::make_shared<int>();
# | //
# | //
# | P2.reset(new int);
# |
# | - P2 = std::shared_ptr<int>(new int());
# | + P2 = std::make_shared<int>();
# | //
# | //
# | P2 = std::shared_ptr<int>(new int);
# |
# | // With auto.
# | - auto P4 = std::shared_ptr<int>(new int());
# | + auto P4 = std::make_shared<int>();
# | //
# | //
# | auto P5 = std::shared_ptr<int>(new int);
# |
# | - std::shared_ptr<int> P6 = std::shared_ptr<int>((new int()));
# | + std::shared_ptr<int> P6 = std::make_shared<int>();
# | //
# | //
# | std::shared_ptr<int> P7 = std::shared_ptr<int>((new int));
# |
# | - P4.reset((((new int()))));
# | + P4 = std::make_shared<int>();
# | //
# | //
# | P4.reset((((new int))));
# |
# | - P4 = std::shared_ptr<int>(((new int())));
# | + P4 = std::make_shared<int>();
# | //
# | //
# | P4 = std::shared_ptr<int>(((new int)));
# | @@ -97,12 +99,12 @@
# | {
# | // No std.
# | using namespace std;
# | - shared_ptr<int> Q = shared_ptr<int>(new int());
# | + shared_ptr<int> Q = std::make_shared<int>();
# | //
# | //
# | shared_ptr<int> P = shared_ptr<int>(new int);
# |
# | - Q = shared_ptr<int>(new int());
# | + Q = std::make_shared<int>();
# | //
# | //
# | Q = shared_ptr<int>(new int);
# | @@ -114,7 +116,7 @@
# | std::shared_ptr<int> S(new int);
# |
# | // Create the shared_ptr as a parameter to a function.
# | - int T = g(std::shared_ptr<int>(new int()));
# | + int T = g(std::make_shared<int>());
# | //
# | //
# | T = g(std::shared_ptr<int>(new int));
# | @@ -125,17 +127,17 @@
# | auto PderivedNoparen = std::shared_ptr<Base>(new Derived);
# |
# | // OK to replace for reset and assign
# | - Pderived.reset(new Derived());
# | + Pderived = std::make_shared<Derived>();
# | //
# | //
# | - Pderived.reset(new Derived);
# | + Pderived = std::make_shared<Derived>();
# | //
# | //
# |
# | - Pderived = std::shared_ptr<Derived>(new Derived());
# | + Pderived = std::make_shared<Derived>();
# | //
# | //
# | - Pderived = std::shared_ptr<Derived>(new Derived);
# | + Pderived = std::make_shared<Derived>();
# | //
# | //
# |
# | @@ -174,7 +176,7 @@
# | public:
# | Private() {}
# | void create() {
# | - auto callsPublic = std::shared_ptr<Private>(new Private);
# | + auto callsPublic = std::make_shared<Private>();
# | //
# | //
# | auto ptr = std::shared_ptr<Private>(new Private(42));
# | @@ -192,7 +194,7 @@
# | public:
# | Protected(int, int) {}
# | void create() {
# | - auto callsPublic = std::shared_ptr<Protected>(new Protected(1, 2));
# | + auto callsPublic = std::make_shared<Protected>(1, 2);
# | //
# | //
# | auto ptr = std::shared_ptr<Protected>(new Protected);
# | @@ -205,26 +207,26 @@
# | // Test different kinds of initialization of the pointee.
# |
# | // Direct initialization with parenthesis.
# | - std::shared_ptr<DPair> PDir1 = std::shared_ptr<DPair>(new DPair(1, T));
# | + std::shared_ptr<DPair> PDir1 = std::make_shared<DPair>(1, T);
# | //
# | //
# | - PDir1.reset(new DPair(1, T));
# | + PDir1 = std::make_shared<DPair>(1, T);
# | //
# | //
# |
# | // Direct initialization with braces.
# | - std::shared_ptr<DPair> PDir2 = std::shared_ptr<DPair>(new DPair{2, T});
# | + std::shared_ptr<DPair> PDir2 = std::make_shared<DPair>(2, T);
# | //
# | //
# | - PDir2.reset(new DPair{2, T});
# | + PDir2 = std::make_shared<DPair>(2, T);
# | //
# | //
# |
# | // Aggregate initialization.
# | - std::shared_ptr<APair> PAggr = std::shared_ptr<APair>(new APair{T, 1});
# | + std::shared_ptr<APair> PAggr = std::make_shared<APair>(APair{T, 1});
# | //
# | //
# | - PAggr.reset(new APair{T, 1});
# | + PAggr = std::make_shared<APair>(APair{T, 1});
# | //
# | //
# |
# | @@ -232,64 +234,64 @@
# | // is initialized with braces.
# |
# | // Direct initialization with parenthesis.
# | - std::shared_ptr<DPair> PDir3 = std::shared_ptr<DPair>{new DPair(3, T)};
# | + std::shared_ptr<DPair> PDir3 = std::make_shared<DPair>(3, T);
# | //
# | //
# |
# | // Direct initialization with braces.
# | - std::shared_ptr<DPair> PDir4 = std::shared_ptr<DPair>{new DPair{4, T}};
# | + std::shared_ptr<DPair> PDir4 = std::make_shared<DPair>(4, T);
# | //
# | //
# |
# | // Aggregate initialization.
# | - std::shared_ptr<APair> PAggr2 = std::shared_ptr<APair>{new APair{T, 2}};
# | + std::shared_ptr<APair> PAggr2 = std::make_shared<APair>(APair{T, 2});
# | //
# | //
# |
# | // Direct initialization with parenthesis, without arguments.
# | - std::shared_ptr<DPair> PDir5 = std::shared_ptr<DPair>(new DPair());
# | + std::shared_ptr<DPair> PDir5 = std::make_shared<DPair>();
# | //
# | //
# |
# | // Direct initialization with braces, without arguments.
# | - std::shared_ptr<DPair> PDir6 = std::shared_ptr<DPair>(new DPair{});
# | + std::shared_ptr<DPair> PDir6 = std::make_shared<DPair>();
# | //
# | //
# |
# | // Aggregate initialization without arguments.
# | - std::shared_ptr<Empty> PEmpty = std::shared_ptr<Empty>(new Empty{});
# | + std::shared_ptr<Empty> PEmpty = std::make_shared<Empty>(Empty{});
# | //
# | //
# | }
# |
# | void aliases() {
# | typedef std::shared_ptr<int> IntPtr;
# | - IntPtr Typedef = IntPtr(new int());
# | + IntPtr Typedef = std::make_shared<int>();
# | //
# | //
# | IntPtr Typedef2 = IntPtr(new int);
# |
# | // We use 'bool' instead of '_Bool'.
# | typedef std::shared_ptr<bool> BoolPtr;
# | - BoolPtr BoolType = BoolPtr(new bool());
# | + BoolPtr BoolType = std::make_shared<bool>();
# | //
# | //
# | BoolPtr BoolType2 = BoolPtr(new bool);
# |
# | // We use 'Base' instead of 'struct Base'.
# | typedef std::shared_ptr<Base> BasePtr;
# | - BasePtr StructType = BasePtr(new Base);
# | + BasePtr StructType = std::make_shared<Base>();
# | //
# | //
# |
# | #define PTR shared_ptr<int>
# | - std::shared_ptr<int> Macro = std::PTR(new int());
# | + std::shared_ptr<int> Macro = std::make_shared<int>();
# | //
# | //
# | std::shared_ptr<int> Macro2 = std::PTR(new int);
# | #undef PTR
# |
# | - std::shared_ptr<int> Using = shared_ptr_<int>(new int());
# | + std::shared_ptr<int> Using = std::make_shared<int>();
# | //
# | //
# | std::shared_ptr<int> Using2 = shared_ptr_<int>(new int);
# | @@ -297,12 +299,12 @@
# |
# | void whitespaces() {
# | // clang-format off
# | - auto Space = std::shared_ptr <int>(new int());
# | + auto Space = std::make_shared<int>();
# | //
# | //
# | auto Space2 = std::shared_ptr <int>(new int);
# |
# | - auto Spaces = std :: shared_ptr <int>(new int());
# | + auto Spaces = std::make_shared<int>();
# | //
# | //
# | auto Spaces2 = std :: shared_ptr <int>(new int);
# | @@ -310,13 +312,13 @@
# | }
# |
# | void nesting() {
# | - auto Nest = std::shared_ptr<std::shared_ptr<int>>(new std::shared_ptr<int>(new int));
# | + auto Nest = std::make_shared<std::shared_ptr<int>>(new int);
# | //
# | //
# | - Nest.reset(new std::shared_ptr<int>(new int));
# | + Nest = std::make_shared<std::shared_ptr<int>>(new int);
# | //
# | //
# | - Nest->reset(new int());
# | + *Nest = std::make_shared<int>();
# | //
# | //
# | Nest->reset(new int);
# | @@ -326,13 +328,13 @@
# | std::shared_ptr<int> P;
# | P.reset();
# | P.reset(nullptr);
# | - P.reset(new int());
# | + P = std::make_shared<int>();
# | //
# | //
# | P.reset(new int);
# |
# | auto Q = &P;
# | - Q->reset(new int());
# | + *Q = std::make_shared<int>();
# | //
# | //
# | Q->reset(new int);
# |
# | ------------------------------ Fixes -----------------------------
# | --- /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.orig 2026-04-02 22:29:31.052179794 +0000
# | +++ /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp 2026-04-02 22:29:31.186179685 +0000
# | @@ -1,5 +1,7 @@
# | // RUN: %check_clang_tidy %s modernize-make-shared %t -- -- -I %S/Inputs/smart-ptr
# |
# | +#include <memory>
# | +
# | #include "shared_ptr.h"
# | //
# |
# | @@ -33,29 +35,29 @@
# | int g(std::shared_ptr<int> P);
# |
# | std::shared_ptr<Base> getPointer() {
# | - return std::shared_ptr<Base>(new Base);
# | + return std::make_shared<Base>();
# | //
# | //
# | }
# |
# | std::shared_ptr<Base> getPointerValue() {
# | - return std::shared_ptr<Base>(new Base());
# | + return std::make_shared<Base>();
# | //
# | //
# | }
# |
# | void basic() {
# | - std::shared_ptr<int> P1 = std::shared_ptr<int>(new int());
# | + std::shared_ptr<int> P1 = std::make_shared<int>();
# | //
# | //
# | std::shared_ptr<int> P2 = std::shared_ptr<int>(new int);
# |
# | - P1.reset(new int());
# | + P1 = std::make_shared<int>();
# | //
# | //
# | P1.reset(new int);
# |
# | - P1 = std::shared_ptr<int>(new int());
# | + P1 = std::make_shared<int>();
# | //
# | //
# | P1 = std::shared_ptr<int>(new int);
# | @@ -63,33 +65,33 @@
# | // Without parenthesis, default initialization.
# | std::shared_ptr<int> P3 = std::shared_ptr<int>(new int);
# |
# | - P2.reset(new int());
# | + P2 = std::make_shared<int>();
# | //
# | //
# | P2.reset(new int);
# |
# | - P2 = std::shared_ptr<int>(new int());
# | + P2 = std::make_shared<int>();
# | //
# | //
# | P2 = std::shared_ptr<int>(new int);
# |
# | // With auto.
# | - auto P4 = std::shared_ptr<int>(new int());
# | + auto P4 = std::make_shared<int>();
# | //
# | //
# | auto P5 = std::shared_ptr<int>(new int);
# |
# | - std::shared_ptr<int> P6 = std::shared_ptr<int>((new int()));
# | + std::shared_ptr<int> P6 = std::make_shared<int>();
# | //
# | //
# | std::shared_ptr<int> P7 = std::shared_ptr<int>((new int));
# |
# | - P4.reset((((new int()))));
# | + P4 = std::make_shared<int>();
# | //
# | //
# | P4.reset((((new int))));
# |
# | - P4 = std::shared_ptr<int>(((new int())));
# | + P4 = std::make_shared<int>();
# | //
# | //
# | P4 = std::shared_ptr<int>(((new int)));
# | @@ -97,12 +99,12 @@
# | {
# | // No std.
# | using namespace std;
# | - shared_ptr<int> Q = shared_ptr<int>(new int());
# | + shared_ptr<int> Q = std::make_shared<int>();
# | //
# | //
# | shared_ptr<int> P = shared_ptr<int>(new int);
# |
# | - Q = shared_ptr<int>(new int());
# | + Q = std::make_shared<int>();
# | //
# | //
# | Q = shared_ptr<int>(new int);
# | @@ -114,7 +116,7 @@
# | std::shared_ptr<int> S(new int);
# |
# | // Create the shared_ptr as a parameter to a function.
# | - int T = g(std::shared_ptr<int>(new int()));
# | + int T = g(std::make_shared<int>());
# | //
# | //
# | T = g(std::shared_ptr<int>(new int));
# | @@ -125,17 +127,17 @@
# | auto PderivedNoparen = std::shared_ptr<Base>(new Derived);
# |
# | // OK to replace for reset and assign
# | - Pderived.reset(new Derived());
# | + Pderived = std::make_shared<Derived>();
# | //
# | //
# | - Pderived.reset(new Derived);
# | + Pderived = std::make_shared<Derived>();
# | //
# | //
# |
# | - Pderived = std::shared_ptr<Derived>(new Derived());
# | + Pderived = std::make_shared<Derived>();
# | //
# | //
# | - Pderived = std::shared_ptr<Derived>(new Derived);
# | + Pderived = std::make_shared<Derived>();
# | //
# | //
# |
# | @@ -174,7 +176,7 @@
# | public:
# | Private() {}
# | void create() {
# | - auto callsPublic = std::shared_ptr<Private>(new Private);
# | + auto callsPublic = std::make_shared<Private>();
# | //
# | //
# | auto ptr = std::shared_ptr<Private>(new Private(42));
# | @@ -192,7 +194,7 @@
# | public:
# | Protected(int, int) {}
# | void create() {
# | - auto callsPublic = std::shared_ptr<Protected>(new Protected(1, 2));
# | + auto callsPublic = std::make_shared<Protected>(1, 2);
# | //
# | //
# | auto ptr = std::shared_ptr<Protected>(new Protected);
# | @@ -205,26 +207,26 @@
# | // Test different kinds of initialization of the pointee.
# |
# | // Direct initialization with parenthesis.
# | - std::shared_ptr<DPair> PDir1 = std::shared_ptr<DPair>(new DPair(1, T));
# | + std::shared_ptr<DPair> PDir1 = std::make_shared<DPair>(1, T);
# | //
# | //
# | - PDir1.reset(new DPair(1, T));
# | + PDir1 = std::make_shared<DPair>(1, T);
# | //
# | //
# |
# | // Direct initialization with braces.
# | - std::shared_ptr<DPair> PDir2 = std::shared_ptr<DPair>(new DPair{2, T});
# | + std::shared_ptr<DPair> PDir2 = std::make_shared<DPair>(2, T);
# | //
# | //
# | - PDir2.reset(new DPair{2, T});
# | + PDir2 = std::make_shared<DPair>(2, T);
# | //
# | //
# |
# | // Aggregate initialization.
# | - std::shared_ptr<APair> PAggr = std::shared_ptr<APair>(new APair{T, 1});
# | + std::shared_ptr<APair> PAggr = std::make_shared<APair>(APair{T, 1});
# | //
# | //
# | - PAggr.reset(new APair{T, 1});
# | + PAggr = std::make_shared<APair>(APair{T, 1});
# | //
# | //
# |
# | @@ -232,64 +234,64 @@
# | // is initialized with braces.
# |
# | // Direct initialization with parenthesis.
# | - std::shared_ptr<DPair> PDir3 = std::shared_ptr<DPair>{new DPair(3, T)};
# | + std::shared_ptr<DPair> PDir3 = std::make_shared<DPair>(3, T);
# | //
# | //
# |
# | // Direct initialization with braces.
# | - std::shared_ptr<DPair> PDir4 = std::shared_ptr<DPair>{new DPair{4, T}};
# | + std::shared_ptr<DPair> PDir4 = std::make_shared<DPair>(4, T);
# | //
# | //
# |
# | // Aggregate initialization.
# | - std::shared_ptr<APair> PAggr2 = std::shared_ptr<APair>{new APair{T, 2}};
# | + std::shared_ptr<APair> PAggr2 = std::make_shared<APair>(APair{T, 2});
# | //
# | //
# |
# | // Direct initialization with parenthesis, without arguments.
# | - std::shared_ptr<DPair> PDir5 = std::shared_ptr<DPair>(new DPair());
# | + std::shared_ptr<DPair> PDir5 = std::make_shared<DPair>();
# | //
# | //
# |
# | // Direct initialization with braces, without arguments.
# | - std::shared_ptr<DPair> PDir6 = std::shared_ptr<DPair>(new DPair{});
# | + std::shared_ptr<DPair> PDir6 = std::make_shared<DPair>();
# | //
# | //
# |
# | // Aggregate initialization without arguments.
# | - std::shared_ptr<Empty> PEmpty = std::shared_ptr<Empty>(new Empty{});
# | + std::shared_ptr<Empty> PEmpty = std::make_shared<Empty>(Empty{});
# | //
# | //
# | }
# |
# | void aliases() {
# | typedef std::shared_ptr<int> IntPtr;
# | - IntPtr Typedef = IntPtr(new int());
# | + IntPtr Typedef = std::make_shared<int>();
# | //
# | //
# | IntPtr Typedef2 = IntPtr(new int);
# |
# | // We use 'bool' instead of '_Bool'.
# | typedef std::shared_ptr<bool> BoolPtr;
# | - BoolPtr BoolType = BoolPtr(new bool());
# | + BoolPtr BoolType = std::make_shared<bool>();
# | //
# | //
# | BoolPtr BoolType2 = BoolPtr(new bool);
# |
# | // We use 'Base' instead of 'struct Base'.
# | typedef std::shared_ptr<Base> BasePtr;
# | - BasePtr StructType = BasePtr(new Base);
# | + BasePtr StructType = std::make_shared<Base>();
# | //
# | //
# |
# | #define PTR shared_ptr<int>
# | - std::shared_ptr<int> Macro = std::PTR(new int());
# | + std::shared_ptr<int> Macro = std::make_shared<int>();
# | //
# | //
# | std::shared_ptr<int> Macro2 = std::PTR(new int);
# | #undef PTR
# |
# | - std::shared_ptr<int> Using = shared_ptr_<int>(new int());
# | + std::shared_ptr<int> Using = std::make_shared<int>();
# | //
# | //
# | std::shared_ptr<int> Using2 = shared_ptr_<int>(new int);
# | @@ -297,12 +299,12 @@
# |
# | void whitespaces() {
# | // clang-format off
# | - auto Space = std::shared_ptr <int>(new int());
# | + auto Space = std::make_shared<int>();
# | //
# | //
# | auto Space2 = std::shared_ptr <int>(new int);
# |
# | - auto Spaces = std :: shared_ptr <int>(new int());
# | + auto Spaces = std::make_shared<int>();
# | //
# | //
# | auto Spaces2 = std :: shared_ptr <int>(new int);
# | @@ -310,13 +312,13 @@
# | }
# |
# | void nesting() {
# | - auto Nest = std::shared_ptr<std::shared_ptr<int>>(new std::shared_ptr<int>(new int));
# | + auto Nest = std::make_shared<std::shared_ptr<int>>(new int);
# | //
# | //
# | - Nest.reset(new std::shared_ptr<int>(new int));
# | + Nest = std::make_shared<std::shared_ptr<int>>(new int);
# | //
# | //
# | - Nest->reset(new int());
# | + *Nest = std::make_shared<int>();
# | //
# | //
# | Nest->reset(new int);
# | @@ -326,13 +328,13 @@
# | std::shared_ptr<int> P;
# | P.reset();
# | P.reset(nullptr);
# | - P.reset(new int());
# | + P = std::make_shared<int>();
# | //
# | //
# | P.reset(new int);
# |
# | auto Q = &P;
# | - Q->reset(new int());
# | + *Q = std::make_shared<int>();
# | //
# | //
# | Q->reset(new int);
# |
# | ------------------------------------------------------------------
# | FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/make-shared.cpp --check-prefixes=CHECK-FIXES --match-full-lines failed:
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/make-shared.cpp:113:18: error: CHECK-FIXES: expected string not found in input
# | // CHECK-FIXES: std::shared_ptr<int> R = std::make_shared<int>();
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:107:30: note: scanning from here
# | Q = std::make_shared<int>();
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp:252:2: note: possible intended match here
# | std::shared_ptr<DPair> PDir5 = std::make_shared<DPair>();
# | ^
# |
# | Input file: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/make-shared.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 102: shared_ptr<int> Q = std::make_shared<int>();
# | 103: //
# | 104: //
# | 105: shared_ptr<int> P = shared_ptr<int>(new int);
# | 106:
# | 107: Q = std::make_shared<int>();
# | check:113'0 X error: no match found
# | 108: //
# | check:113'0 ~~~~
# | 109: //
# | check:113'0 ~~~~
# | 110: Q = shared_ptr<int>(new int);
# | check:113'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 111: }
# | check:113'0 ~~~
# | 112:
# | check:113'0 ~
# | .
# | .
# | .
# | 247: std::shared_ptr<APair> PAggr2 = std::make_shared<APair>(APair{T, 2});
# | check:113'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 248: //
# | check:113'0 ~~~~
# | 249: //
# | check:113'0 ~~~~
# | 250:
# | check:113'0 ~
# | 251: // Direct initialization with parenthesis, without arguments.
# | check:113'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 252: std::shared_ptr<DPair> PDir5 = std::make_shared<DPair>();
# | check:113'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:113'1 ? possible intended match
# | 253: //
# | check:113'0 ~~~~
# | 254: //
# | check:113'0 ~~~~
# | 255:
# | check:113'0 ~
# | 256: // Direct initialization with braces, without arguments.
# | check:113'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 257: std::shared_ptr<DPair> PDir6 = std::make_shared<DPair>();
# | check:113'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# |
# `-----------------------------
# .---command stderr------------
# | Traceback (most recent call last):
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 554, in <module>
# | main()
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 550, in main
# | CheckRunner(args, extra_args).run()
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 432, in run
# | self.check_fixes()
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 327, in check_fixes
# | try_run(
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 64, in try_run
# | process_output = subprocess.check_output(args, stderr=subprocess.STDOUT).decode(
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# | File "/usr/lib/python3.12/subprocess.py", line 466, in check_output
# | return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# | File "/usr/lib/python3.12/subprocess.py", line 571, in run
# | raise CalledProcessError(retcode, process.args,
# | subprocess.CalledProcessError: Command '['FileCheck', '--input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-shared.cpp.tmp.cpp', '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/make-shared.cpp', '--check-prefixes=CHECK-FIXES', '--match-full-lines']' returned non-zero exit status 1.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang Tools.clang-tidy/checkers/modernize/make-unique.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py -std=c++14-or-later /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique.cpp modernize-make-unique /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp -- -- -I /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/smart-ptr
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py -std=c++14-or-later /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique.cpp modernize-make-unique /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp -- -- -I /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/smart-ptr
# .---command stdout------------
# | Running ['clang-tidy', '--experimental-custom-checks', '/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp', '-fix', '--checks=-*,modernize-make-unique', '--config={}', '--', '-I', '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/smart-ptr', '-std=c++14', '-nostdinc++', '-isystem', '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/checkers/Inputs/Headers/std']...
# | ------------------------ clang-tidy output -----------------------
# | 91 warnings generated.
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:81:10: warning: use std::make_unique instead [modernize-make-unique]
# | 4 | return std::unique_ptr<Base>(new Base);
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:4:1: note: FIX-IT applied suggested code changes
# | 4 | #include <vector>
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:81:10: note: FIX-IT applied suggested code changes
# | 81 | return std::unique_ptr<Base>(new Base);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:81:32: note: FIX-IT applied suggested code changes
# | 81 | return std::unique_ptr<Base>(new Base);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:87:10: warning: use std::make_unique instead [modernize-make-unique]
# | 87 | return std::unique_ptr<Base>(new Base());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:87:10: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:87:32: note: FIX-IT applied suggested code changes
# | 87 | return std::unique_ptr<Base>(new Base());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:93:29: warning: use std::make_unique instead [modernize-make-unique]
# | 93 | std::unique_ptr<int> P1 = std::unique_ptr<int>(new int());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:93:29: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:93:50: note: FIX-IT applied suggested code changes
# | 93 | std::unique_ptr<int> P1 = std::unique_ptr<int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:98:6: warning: use std::make_unique instead [modernize-make-unique]
# | 98 | P1.reset(new int());
# | | ~^~~~~ ~~~~~~~~~
# | | = std::make_unique<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:98:5: note: FIX-IT applied suggested code changes
# | 98 | P1.reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:98:12: note: FIX-IT applied suggested code changes
# | 98 | P1.reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:103:8: warning: use std::make_unique instead [modernize-make-unique]
# | 103 | P1 = std::unique_ptr<int>(new int());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:103:8: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:103:29: note: FIX-IT applied suggested code changes
# | 103 | P1 = std::unique_ptr<int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:116:13: warning: use std::make_unique instead [modernize-make-unique]
# | 116 | auto P4 = std::unique_ptr<int>(new int());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:116:13: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:116:34: note: FIX-IT applied suggested code changes
# | 116 | auto P4 = std::unique_ptr<int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:121:29: warning: use std::make_unique instead [modernize-make-unique]
# | 121 | std::unique_ptr<int> P6 = std::unique_ptr<int>((new int()));
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:121:29: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:121:50: note: FIX-IT applied suggested code changes
# | 121 | std::unique_ptr<int> P6 = std::unique_ptr<int>((new int()));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:126:6: warning: use std::make_unique instead [modernize-make-unique]
# | 126 | P4.reset((new int()));
# | | ~^~~~~ ~~~~~~~~~~~
# | | = std::make_unique<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:126:5: note: FIX-IT applied suggested code changes
# | 126 | P4.reset((new int()));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:126:12: note: FIX-IT applied suggested code changes
# | 126 | P4.reset((new int()));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:131:29: warning: use std::make_unique instead [modernize-make-unique]
# | 131 | std::unique_ptr<int> P8 = std::unique_ptr<int>((((new int()))));
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:131:29: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:131:50: note: FIX-IT applied suggested code changes
# | 131 | std::unique_ptr<int> P8 = std::unique_ptr<int>((((new int()))));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:136:6: warning: use std::make_unique instead [modernize-make-unique]
# | 136 | P5.reset(((((new int())))));
# | | ~^~~~~ ~~~~~~~~~~~~~~~~~
# | | = std::make_unique<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:136:5: note: FIX-IT applied suggested code changes
# | 136 | P5.reset(((((new int())))));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:136:12: note: FIX-IT applied suggested code changes
# | 136 | P5.reset(((((new int())))));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:144:25: warning: use std::make_unique instead [modernize-make-unique]
# | 144 | unique_ptr<int> Q = unique_ptr<int>(new int());
# | | ^~~~~~~~~~ ~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:144:25: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:144:41: note: FIX-IT applied suggested code changes
# | 144 | unique_ptr<int> Q = unique_ptr<int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:149:9: warning: use std::make_unique instead [modernize-make-unique]
# | 149 | Q = unique_ptr<int>(new int());
# | | ^~~~~~~~~~ ~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:149:9: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:149:25: note: FIX-IT applied suggested code changes
# | 149 | Q = unique_ptr<int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:162:13: warning: use std::make_unique instead [modernize-make-unique]
# | 162 | int T = g(std::unique_ptr<int>(new int()));
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:162:13: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:162:34: note: FIX-IT applied suggested code changes
# | 162 | int T = g(std::unique_ptr<int>(new int()));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:173:12: warning: use std::make_unique instead [modernize-make-unique]
# | 173 | Pderived.reset(new Derived());
# | | ~^~~~~ ~~~~~~~~~~~~~
# | | = std::make_unique<Derived>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:173:11: note: FIX-IT applied suggested code changes
# | 173 | Pderived.reset(new Derived());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:173:18: note: FIX-IT applied suggested code changes
# | 173 | Pderived.reset(new Derived());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:176:19: warning: use std::make_unique instead [modernize-make-unique]
# | 176 | PderivedNoparen.reset(new Derived);
# | | ~^~~~~ ~~~~~~~~~~~
# | | = std::make_unique<Derived>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:176:18: note: FIX-IT applied suggested code changes
# | 176 | PderivedNoparen.reset(new Derived);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:176:25: note: FIX-IT applied suggested code changes
# | 176 | PderivedNoparen.reset(new Derived);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:180:14: warning: use std::make_unique instead [modernize-make-unique]
# | 180 | Pderived = std::unique_ptr<Derived>(new Derived());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:180:14: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:180:39: note: FIX-IT applied suggested code changes
# | 180 | Pderived = std::unique_ptr<Derived>(new Derived());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:183:21: warning: use std::make_unique instead [modernize-make-unique]
# | 183 | PderivedNoparen = std::unique_ptr<Derived>(new Derived);
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:183:21: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:183:46: note: FIX-IT applied suggested code changes
# | 183 | PderivedNoparen = std::unique_ptr<Derived>(new Derived);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:222:24: warning: use std::make_unique instead [modernize-make-unique]
# | 222 | auto callsPublic = std::unique_ptr<Private>(new Private);
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:222:24: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:222:49: note: FIX-IT applied suggested code changes
# | 222 | auto callsPublic = std::unique_ptr<Private>(new Private);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:240:24: warning: use std::make_unique instead [modernize-make-unique]
# | 240 | auto callsPublic = std::unique_ptr<Protected>(new Protected(1, 2));
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ ~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:240:24: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:240:51: note: FIX-IT applied suggested code changes
# | 240 | auto callsPublic = std::unique_ptr<Protected>(new Protected(1, 2));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:240:69: note: FIX-IT applied suggested code changes
# | 240 | auto callsPublic = std::unique_ptr<Protected>(new Protected(1, 2));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:253:34: warning: use std::make_unique instead [modernize-make-unique]
# | 253 | std::unique_ptr<DPair> PDir1 = std::unique_ptr<DPair>(new DPair(1, T));
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~ ~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:253:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:253:57: note: FIX-IT applied suggested code changes
# | 253 | std::unique_ptr<DPair> PDir1 = std::unique_ptr<DPair>(new DPair(1, T));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:253:71: note: FIX-IT applied suggested code changes
# | 253 | std::unique_ptr<DPair> PDir1 = std::unique_ptr<DPair>(new DPair(1, T));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:256:9: warning: use std::make_unique instead [modernize-make-unique]
# | 256 | PDir1.reset(new DPair(1, T));
# | | ~^~~~~ ~~~~~~~~~~ ~
# | | = std::make_unique<DPair>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:256:8: note: FIX-IT applied suggested code changes
# | 256 | PDir1.reset(new DPair(1, T));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:256:15: note: FIX-IT applied suggested code changes
# | 256 | PDir1.reset(new DPair(1, T));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:256:29: note: FIX-IT applied suggested code changes
# | 256 | PDir1.reset(new DPair(1, T));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:261:34: warning: use std::make_unique instead [modernize-make-unique]
# | 261 | std::unique_ptr<DPair> PDir2 = std::unique_ptr<DPair>(new DPair{2, T});
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~ ~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:261:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:261:57: note: FIX-IT applied suggested code changes
# | 261 | std::unique_ptr<DPair> PDir2 = std::unique_ptr<DPair>(new DPair{2, T});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:261:71: note: FIX-IT applied suggested code changes
# | 261 | std::unique_ptr<DPair> PDir2 = std::unique_ptr<DPair>(new DPair{2, T});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:264:9: warning: use std::make_unique instead [modernize-make-unique]
# | 264 | PDir2.reset(new DPair{2, T});
# | | ~^~~~~ ~~~~~~~~~~ ~
# | | = std::make_unique<DPair>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:264:8: note: FIX-IT applied suggested code changes
# | 264 | PDir2.reset(new DPair{2, T});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:264:15: note: FIX-IT applied suggested code changes
# | 264 | PDir2.reset(new DPair{2, T});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:264:29: note: FIX-IT applied suggested code changes
# | 264 | PDir2.reset(new DPair{2, T});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:269:34: warning: use std::make_unique instead [modernize-make-unique]
# | 269 | std::unique_ptr<APair> PAggr = std::unique_ptr<APair>(new APair{T, 1});
# | | ^~~~~~~~~~~~~~~ ~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:269:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:269:57: note: FIX-IT applied suggested code changes
# | 269 | std::unique_ptr<APair> PAggr = std::unique_ptr<APair>(new APair{T, 1});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:272:9: warning: use std::make_unique instead [modernize-make-unique]
# | 272 | PAggr.reset(new APair{T, 1});
# | | ~^~~~~ ~~~
# | | = std::make_unique<APair>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:272:8: note: FIX-IT applied suggested code changes
# | 272 | PAggr.reset(new APair{T, 1});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:272:15: note: FIX-IT applied suggested code changes
# | 272 | PAggr.reset(new APair{T, 1});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:277:38: warning: use std::make_unique instead [modernize-make-unique]
# | 277 | std::unique_ptr<APair> PAggrTemp = std::unique_ptr<APair>(new APair({T, 1}));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:280:13: warning: use std::make_unique instead [modernize-make-unique]
# | 280 | PAggrTemp.reset(new APair({T, 1}));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:288:34: warning: use std::make_unique instead [modernize-make-unique]
# | 288 | std::unique_ptr<DPair> PDir3 = std::unique_ptr<DPair>{new DPair(3, T)};
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~ ~~
# | | std::make_unique ( )
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:288:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:288:56: note: FIX-IT applied suggested code changes
# | 288 | std::unique_ptr<DPair> PDir3 = std::unique_ptr<DPair>{new DPair(3, T)};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:288:71: note: FIX-IT applied suggested code changes
# | 288 | std::unique_ptr<DPair> PDir3 = std::unique_ptr<DPair>{new DPair(3, T)};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:293:34: warning: use std::make_unique instead [modernize-make-unique]
# | 293 | std::unique_ptr<DPair> PDir4 = std::unique_ptr<DPair>{new DPair{4, T}};
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~ ~~
# | | std::make_unique ( )
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:293:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:293:56: note: FIX-IT applied suggested code changes
# | 293 | std::unique_ptr<DPair> PDir4 = std::unique_ptr<DPair>{new DPair{4, T}};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:293:71: note: FIX-IT applied suggested code changes
# | 293 | std::unique_ptr<DPair> PDir4 = std::unique_ptr<DPair>{new DPair{4, T}};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:298:35: warning: use std::make_unique instead [modernize-make-unique]
# | 298 | std::unique_ptr<APair> PAggr2 = std::unique_ptr<APair>{new APair{T, 2}};
# | | ^~~~~~~~~~~~~~~ ~~~~ ~
# | | std::make_unique ( )
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:298:35: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:298:57: note: FIX-IT applied suggested code changes
# | 298 | std::unique_ptr<APair> PAggr2 = std::unique_ptr<APair>{new APair{T, 2}};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:298:73: note: FIX-IT applied suggested code changes
# | 298 | std::unique_ptr<APair> PAggr2 = std::unique_ptr<APair>{new APair{T, 2}};
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:303:34: warning: use std::make_unique instead [modernize-make-unique]
# | 303 | std::unique_ptr<DPair> PDir5 = std::unique_ptr<DPair>(new DPair());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:303:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:303:57: note: FIX-IT applied suggested code changes
# | 303 | std::unique_ptr<DPair> PDir5 = std::unique_ptr<DPair>(new DPair());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:308:34: warning: use std::make_unique instead [modernize-make-unique]
# | 308 | std::unique_ptr<DPair> PDir6 = std::unique_ptr<DPair>(new DPair{});
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:308:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:308:57: note: FIX-IT applied suggested code changes
# | 308 | std::unique_ptr<DPair> PDir6 = std::unique_ptr<DPair>(new DPair{});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:313:35: warning: use std::make_unique instead [modernize-make-unique]
# | 313 | std::unique_ptr<Empty> PEmpty = std::unique_ptr<Empty>(new Empty{});
# | | ^~~~~~~~~~~~~~~ ~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:313:35: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:313:58: note: FIX-IT applied suggested code changes
# | 313 | std::unique_ptr<Empty> PEmpty = std::unique_ptr<Empty>(new Empty{});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:318:28: warning: use std::make_unique instead [modernize-make-unique]
# | 318 | std::unique_ptr<E> PE1 = std::unique_ptr<E>(new E{});
# | | ^~~~~~~~~~~~~~~ ~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:318:28: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:318:47: note: FIX-IT applied suggested code changes
# | 318 | std::unique_ptr<E> PE1 = std::unique_ptr<E>(new E{});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:321:7: warning: use std::make_unique instead [modernize-make-unique]
# | 321 | PE1.reset(new E{});
# | | ~^~~~~ ~~~~~~~
# | | = std::make_unique<E>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:321:6: note: FIX-IT applied suggested code changes
# | 321 | PE1.reset(new E{});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:321:13: note: FIX-IT applied suggested code changes
# | 321 | PE1.reset(new E{});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:334:28: warning: use std::make_unique instead [modernize-make-unique]
# | 334 | std::unique_ptr<E> PE2 = std::unique_ptr<E>(new E{1, 2});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:337:7: warning: use std::make_unique instead [modernize-make-unique]
# | 337 | PE2.reset(new E{1, 2});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:342:28: warning: use std::make_unique instead [modernize-make-unique]
# | 342 | std::unique_ptr<F> PF1 = std::unique_ptr<F>(new F());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:342:28: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:342:47: note: FIX-IT applied suggested code changes
# | 342 | std::unique_ptr<F> PF1 = std::unique_ptr<F>(new F());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:345:7: warning: use std::make_unique instead [modernize-make-unique]
# | 345 | PF1.reset(new F());
# | | ~^~~~~ ~~~~~~~
# | | = std::make_unique<F>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:345:6: note: FIX-IT applied suggested code changes
# | 345 | PF1.reset(new F());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:345:13: note: FIX-IT applied suggested code changes
# | 345 | PF1.reset(new F());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:350:28: warning: use std::make_unique instead [modernize-make-unique]
# | 350 | std::unique_ptr<F> PF2 = std::unique_ptr<F>(new F{});
# | | ^~~~~~~~~~~~~~~ ~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:350:28: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:350:47: note: FIX-IT applied suggested code changes
# | 350 | std::unique_ptr<F> PF2 = std::unique_ptr<F>(new F{});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:353:7: warning: use std::make_unique instead [modernize-make-unique]
# | 353 | PF2.reset(new F());
# | | ~^~~~~ ~~~~~~~
# | | = std::make_unique<F>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:353:6: note: FIX-IT applied suggested code changes
# | 353 | PF2.reset(new F());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:353:13: note: FIX-IT applied suggested code changes
# | 353 | PF2.reset(new F());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:358:28: warning: use std::make_unique instead [modernize-make-unique]
# | 358 | std::unique_ptr<F> PF3 = std::unique_ptr<F>(new F{1});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:361:7: warning: use std::make_unique instead [modernize-make-unique]
# | 361 | PF3.reset(new F{1});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:366:28: warning: use std::make_unique instead [modernize-make-unique]
# | 366 | std::unique_ptr<F> PF4 = std::unique_ptr<F>(new F{1, 2});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:371:28: warning: use std::make_unique instead [modernize-make-unique]
# | 371 | std::unique_ptr<F> PF5 = std::unique_ptr<F>(new F({1, 2}));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:377:28: warning: use std::make_unique instead [modernize-make-unique]
# | 377 | std::unique_ptr<G> PG1 = std::unique_ptr<G>(new G{});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:380:7: warning: use std::make_unique instead [modernize-make-unique]
# | 380 | PG1.reset(new G{});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:385:28: warning: use std::make_unique instead [modernize-make-unique]
# | 385 | std::unique_ptr<G> PG2 = std::unique_ptr<G>(new G{1});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:390:28: warning: use std::make_unique instead [modernize-make-unique]
# | 390 | std::unique_ptr<G> PG3 = std::unique_ptr<G>(new G{1, 2});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:394:28: warning: use std::make_unique instead [modernize-make-unique]
# | 394 | std::unique_ptr<H> PH1 = std::unique_ptr<H>(new H({1, 2, 3}));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:397:7: warning: use std::make_unique instead [modernize-make-unique]
# | 397 | PH1.reset(new H({1, 2, 3}));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:401:28: warning: use std::make_unique instead [modernize-make-unique]
# | 401 | std::unique_ptr<H> PH2 = std::unique_ptr<H>(new H({1, 2, 3}, 1));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:404:7: warning: use std::make_unique instead [modernize-make-unique]
# | 404 | PH2.reset(new H({1, 2, 3}, 1));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:408:28: warning: use std::make_unique instead [modernize-make-unique]
# | 408 | std::unique_ptr<H> PH3 = std::unique_ptr<H>(new H({1, 2, 3}, 1.0));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:411:7: warning: use std::make_unique instead [modernize-make-unique]
# | 411 | PH3.reset(new H({1, 2, 3}, 1.0));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:415:28: warning: use std::make_unique instead [modernize-make-unique]
# | 415 | std::unique_ptr<I> PI1 = std::unique_ptr<I>(new I(G({1, 2, 3})));
# | | ^~~~~~~~~~~~~~~ ~~~~~~ ~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:415:28: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:415:47: note: FIX-IT applied suggested code changes
# | 415 | std::unique_ptr<I> PI1 = std::unique_ptr<I>(new I(G({1, 2, 3})));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:415:65: note: FIX-IT applied suggested code changes
# | 415 | std::unique_ptr<I> PI1 = std::unique_ptr<I>(new I(G({1, 2, 3})));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:418:7: warning: use std::make_unique instead [modernize-make-unique]
# | 418 | PI1.reset(new I(G({1, 2, 3})));
# | | ~^~~~~ ~~~~~~ ~
# | | = std::make_unique<I>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:418:6: note: FIX-IT applied suggested code changes
# | 418 | PI1.reset(new I(G({1, 2, 3})));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:418:13: note: FIX-IT applied suggested code changes
# | 418 | PI1.reset(new I(G({1, 2, 3})));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:418:31: note: FIX-IT applied suggested code changes
# | 418 | PI1.reset(new I(G({1, 2, 3})));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:422:28: warning: use std::make_unique instead [modernize-make-unique]
# | 422 | std::unique_ptr<J> PJ1 = std::unique_ptr<J>(new J({1, 2}, 1));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:425:7: warning: use std::make_unique instead [modernize-make-unique]
# | 425 | PJ1.reset(new J({1, 2}, 1));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:429:28: warning: use std::make_unique instead [modernize-make-unique]
# | 429 | std::unique_ptr<J> PJ2 = std::unique_ptr<J>(new J(E{1, 2}, 1));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:432:7: warning: use std::make_unique instead [modernize-make-unique]
# | 432 | PJ2.reset(new J(E{1, 2}, 1));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:436:28: warning: use std::make_unique instead [modernize-make-unique]
# | 436 | std::unique_ptr<J> PJ3 = std::unique_ptr<J>(new J{ {1, 2}, 1 });
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:439:7: warning: use std::make_unique instead [modernize-make-unique]
# | 439 | PJ3.reset(new J{ {1, 2}, 1 });
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:443:28: warning: use std::make_unique instead [modernize-make-unique]
# | 443 | std::unique_ptr<J> PJ4 = std::unique_ptr<J>(new J{E{1, 2}, 1});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:446:7: warning: use std::make_unique instead [modernize-make-unique]
# | 446 | PJ4.reset(new J{E{1, 2}, 1});
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:450:29: warning: use std::make_unique instead [modernize-make-unique]
# | 450 | std::unique_ptr<Foo> FF = std::unique_ptr<Foo>(new Foo());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:450:29: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:450:50: note: FIX-IT applied suggested code changes
# | 450 | std::unique_ptr<Foo> FF = std::unique_ptr<Foo>(new Foo());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:453:6: warning: use std::make_unique instead [modernize-make-unique]
# | 453 | FF.reset(new Foo());
# | | ~^~~~~ ~~~~~~~~~
# | | = std::make_unique<Foo>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:453:5: note: FIX-IT applied suggested code changes
# | 453 | FF.reset(new Foo());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:453:12: note: FIX-IT applied suggested code changes
# | 453 | FF.reset(new Foo());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:457:34: warning: use std::make_unique instead [modernize-make-unique]
# | 457 | std::unique_ptr<bar::Bar> BB = std::unique_ptr<bar::Bar>(new bar::Bar());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:457:34: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:457:60: note: FIX-IT applied suggested code changes
# | 457 | std::unique_ptr<bar::Bar> BB = std::unique_ptr<bar::Bar>(new bar::Bar());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:460:6: warning: use std::make_unique instead [modernize-make-unique]
# | 460 | BB.reset(new bar::Bar());
# | | ~^~~~~ ~~~~~~~~~~~~~~
# | | = std::make_unique<bar::Bar>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:460:5: note: FIX-IT applied suggested code changes
# | 460 | BB.reset(new bar::Bar());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:460:12: note: FIX-IT applied suggested code changes
# | 460 | BB.reset(new bar::Bar());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:465:7: warning: use std::make_unique instead [modernize-make-unique]
# | 465 | FFs.reset(new Foo[5]);
# | | ~^~~~~ ~~~~~~~~~~
# | | = std::make_unique<Foo[]> 5
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:465:6: note: FIX-IT applied suggested code changes
# | 465 | FFs.reset(new Foo[5]);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:465:13: note: FIX-IT applied suggested code changes
# | 465 | FFs.reset(new Foo[5]);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:468:7: warning: use std::make_unique instead [modernize-make-unique]
# | 468 | FFs.reset(new Foo[5]());
# | | ~^~~~~ ~~~~~~~~~~~~
# | | = std::make_unique<Foo[]> 5
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:468:6: note: FIX-IT applied suggested code changes
# | 468 | FFs.reset(new Foo[5]());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:468:13: note: FIX-IT applied suggested code changes
# | 468 | FFs.reset(new Foo[5]());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:472:7: warning: use std::make_unique instead [modernize-make-unique]
# | 472 | FFs.reset(new Foo[Num]);
# | | ~^~~~~ ~~~~~~~~~~~~
# | | = std::make_unique<Foo[]> Num
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:472:6: note: FIX-IT applied suggested code changes
# | 472 | FFs.reset(new Foo[Num]);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:472:13: note: FIX-IT applied suggested code changes
# | 472 | FFs.reset(new Foo[Num]);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:476:7: warning: use std::make_unique instead [modernize-make-unique]
# | 476 | FFs.reset(new Foo[Num2]);
# | | ~^~~~~ ~~~~~~~~~~~~~
# | | = std::make_unique<Foo[]> Num2
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:476:6: note: FIX-IT applied suggested code changes
# | 476 | FFs.reset(new Foo[Num2]);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:476:13: note: FIX-IT applied suggested code changes
# | 476 | FFs.reset(new Foo[Num2]);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:481:6: warning: use std::make_unique instead [modernize-make-unique]
# | 481 | FI.reset(new int[5]()); // value initialization.
# | | ~^~~~~ ~~~~~~~~~~~~
# | | = std::make_unique<int[]> 5
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:481:5: note: FIX-IT applied suggested code changes
# | 481 | FI.reset(new int[5]()); // value initialization.
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:481:12: note: FIX-IT applied suggested code changes
# | 481 | FI.reset(new int[5]()); // value initialization.
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:494:20: warning: use std::make_unique instead [modernize-make-unique]
# | 494 | IntPtr Typedef = IntPtr(new int());
# | | ^~~~~~ ~~~~~~~~~
# | | std::make_unique<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:494:20: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:494:27: note: FIX-IT applied suggested code changes
# | 494 | IntPtr Typedef = IntPtr(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:501:22: warning: use std::make_unique instead [modernize-make-unique]
# | 501 | BoolPtr BoolType = BoolPtr(new bool());
# | | ^~~~~~~ ~~~~~~~~~~
# | | std::make_unique<bool>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:501:22: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:501:30: note: FIX-IT applied suggested code changes
# | 501 | BoolPtr BoolType = BoolPtr(new bool());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:508:24: warning: use std::make_unique instead [modernize-make-unique]
# | 508 | BasePtr StructType = BasePtr(new Base);
# | | ^~~~~~~ ~~~~~~~~
# | | std::make_unique<Base>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:508:24: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:508:32: note: FIX-IT applied suggested code changes
# | 508 | BasePtr StructType = BasePtr(new Base);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:513:32: warning: use std::make_unique instead [modernize-make-unique]
# | 513 | std::unique_ptr<int> Macro = std::PTR(new int());
# | | ^~~~~~~~ ~~~~~~~~~
# | | std::make_unique<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:513:32: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:513:41: note: FIX-IT applied suggested code changes
# | 513 | std::unique_ptr<int> Macro = std::PTR(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:519:32: warning: use std::make_unique instead [modernize-make-unique]
# | 519 | std::unique_ptr<int> Using = unique_ptr_<int>(new int());
# | | ^~~~~~~~~~~ ~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:519:32: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:519:49: note: FIX-IT applied suggested code changes
# | 519 | std::unique_ptr<int> Using = unique_ptr_<int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:527:16: warning: use std::make_unique instead [modernize-make-unique]
# | 527 | auto Space = std::unique_ptr <int>(new int());
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:527:16: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:527:38: note: FIX-IT applied suggested code changes
# | 527 | auto Space = std::unique_ptr <int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:532:17: warning: use std::make_unique instead [modernize-make-unique]
# | 532 | auto Spaces = std :: unique_ptr <int>(new int());
# | | ^~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:532:17: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:532:46: note: FIX-IT applied suggested code changes
# | 532 | auto Spaces = std :: unique_ptr <int>(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:540:15: warning: use std::make_unique instead [modernize-make-unique]
# | 540 | auto Nest = std::unique_ptr<std::unique_ptr<int>>(new std::unique_ptr<int>(new int));
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ ~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:540:15: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:540:53: note: FIX-IT applied suggested code changes
# | 540 | auto Nest = std::unique_ptr<std::unique_ptr<int>>(new std::unique_ptr<int>(new int));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:540:85: note: FIX-IT applied suggested code changes
# | 540 | auto Nest = std::unique_ptr<std::unique_ptr<int>>(new std::unique_ptr<int>(new int));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:543:8: warning: use std::make_unique instead [modernize-make-unique]
# | 543 | Nest.reset(new std::unique_ptr<int>(new int));
# | | ~^~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ ~
# | | = std::make_unique<std::unique_ptr<int>>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:543:7: note: FIX-IT applied suggested code changes
# | 543 | Nest.reset(new std::unique_ptr<int>(new int));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:543:14: note: FIX-IT applied suggested code changes
# | 543 | Nest.reset(new std::unique_ptr<int>(new int));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:543:46: note: FIX-IT applied suggested code changes
# | 543 | Nest.reset(new std::unique_ptr<int>(new int));
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:546:9: warning: use std::make_unique instead [modernize-make-unique]
# | 546 | Nest->reset(new int());
# | | ~~^~~~~ ~~~~~~~~~
# | | * = std::make_unique<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:546:3: note: FIX-IT applied suggested code changes
# | 546 | Nest->reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:546:7: note: FIX-IT applied suggested code changes
# | 546 | Nest->reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:546:15: note: FIX-IT applied suggested code changes
# | 546 | Nest->reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:555:5: warning: use std::make_unique instead [modernize-make-unique]
# | 555 | P.reset(new int());
# | | ~^~~~~ ~~~~~~~~~
# | | = std::make_unique<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:555:4: note: FIX-IT applied suggested code changes
# | 555 | P.reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:555:11: note: FIX-IT applied suggested code changes
# | 555 | P.reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:561:6: warning: use std::make_unique instead [modernize-make-unique]
# | 561 | Q->reset(new int());
# | | ~~^~~~~ ~~~~~~~~~
# | | * = std::make_unique<int>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:561:3: note: FIX-IT applied suggested code changes
# | 561 | Q->reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:561:4: note: FIX-IT applied suggested code changes
# | 561 | Q->reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:561:12: note: FIX-IT applied suggested code changes
# | 561 | Q->reset(new int());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:582:11: warning: use std::make_unique instead [modernize-make-unique]
# | 582 | this->reset(new Foo);
# | | ~~^~~~~ ~~~~~~~
# | | * = std::make_unique<Foo>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:582:5: note: FIX-IT applied suggested code changes
# | 582 | this->reset(new Foo);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:582:9: note: FIX-IT applied suggested code changes
# | 582 | this->reset(new Foo);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:582:17: note: FIX-IT applied suggested code changes
# | 582 | this->reset(new Foo);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:585:11: warning: use std::make_unique instead [modernize-make-unique]
# | 585 | this->reset(new Foo());
# | | ~~^~~~~ ~~~~~~~~~
# | | * = std::make_unique<Foo>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:585:5: note: FIX-IT applied suggested code changes
# | 585 | this->reset(new Foo());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:585:9: note: FIX-IT applied suggested code changes
# | 585 | this->reset(new Foo());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:585:17: note: FIX-IT applied suggested code changes
# | 585 | this->reset(new Foo());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:588:13: warning: use std::make_unique instead [modernize-make-unique]
# | 588 | (*this).reset(new Foo);
# | | ~^~~~~ ~~~~~~~
# | | = std::make_unique<Foo>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:588:12: note: FIX-IT applied suggested code changes
# | 588 | (*this).reset(new Foo);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:588:19: note: FIX-IT applied suggested code changes
# | 588 | (*this).reset(new Foo);
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:591:13: warning: use std::make_unique instead [modernize-make-unique]
# | 591 | (*this).reset(new Foo());
# | | ~^~~~~ ~~~~~~~~~
# | | = std::make_unique<Foo>
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:591:12: note: FIX-IT applied suggested code changes
# | 591 | (*this).reset(new Foo());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:591:19: note: FIX-IT applied suggested code changes
# | 591 | (*this).reset(new Foo());
# | | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:612:12: warning: use std::make_unique instead [modernize-make-unique]
# | 612 | auto T = std::unique_ptr<Base>(new struct Base);
# | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
# | | std::make_unique
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:612:12: note: FIX-IT applied suggested code changes
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:612:34: note: FIX-IT applied suggested code changes
# | clang-tidy applied 147 of 147 suggested fixes.
# | 612 | auto T = std::unique_ptr<Base>(new struct Base);
# | | ^
# |
# | ------------------------------------------------------------------
# | diff -u /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.orig /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp failed:
# | --- /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.orig 2026-04-02 22:29:33.760177576 +0000
# | +++ /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp 2026-04-02 22:29:34.046177342 +0000
# | @@ -1,6 +1,7 @@
# | // RUN: %check_clang_tidy -std=c++14-or-later %s modernize-make-unique %t -- -- -I %S/Inputs/smart-ptr
# |
# | #include "unique_ptr.h"
# | +#include <memory>
# | #include <vector>
# | //
# |
# | @@ -78,29 +79,29 @@
# | int g(std::unique_ptr<int> P);
# |
# | std::unique_ptr<Base> getPointer() {
# | - return std::unique_ptr<Base>(new Base);
# | + return std::make_unique<Base>();
# | //
# | //
# | }
# |
# | std::unique_ptr<Base> getPointerValue() {
# | - return std::unique_ptr<Base>(new Base());
# | + return std::make_unique<Base>();
# | //
# | //
# | }
# |
# | void basic() {
# | - std::unique_ptr<int> P1 = std::unique_ptr<int>(new int());
# | + std::unique_ptr<int> P1 = std::make_unique<int>();
# | //
# | //
# | std::unique_ptr<int> P2 = std::unique_ptr<int>(new int);
# |
# | - P1.reset(new int());
# | + P1 = std::make_unique<int>();
# | //
# | //
# | P2.reset(new int);
# |
# | - P1 = std::unique_ptr<int>(new int());
# | + P1 = std::make_unique<int>();
# | //
# | //
# | P1 = std::unique_ptr<int>(new int);
# | @@ -113,27 +114,27 @@
# | P2 = std::unique_ptr<int>(new int);
# |
# | // With auto.
# | - auto P4 = std::unique_ptr<int>(new int());
# | + auto P4 = std::make_unique<int>();
# | //
# | //
# | auto P5 = std::unique_ptr<int>(new int);
# |
# | - std::unique_ptr<int> P6 = std::unique_ptr<int>((new int()));
# | + std::unique_ptr<int> P6 = std::make_unique<int>();
# | //
# | //
# | std::unique_ptr<int> P7 = std::unique_ptr<int>((new int));
# |
# | - P4.reset((new int()));
# | + P4 = std::make_unique<int>();
# | //
# | //
# | P5.reset((new int));
# |
# | - std::unique_ptr<int> P8 = std::unique_ptr<int>((((new int()))));
# | + std::unique_ptr<int> P8 = std::make_unique<int>();
# | //
# | //
# | std::unique_ptr<int> P9 = std::unique_ptr<int>((((new int))));
# |
# | - P5.reset(((((new int())))));
# | + P5 = std::make_unique<int>();
# | //
# | //
# | P6.reset(((((new int)))));
# | @@ -141,12 +142,12 @@
# | {
# | // No std.
# | using namespace std;
# | - unique_ptr<int> Q = unique_ptr<int>(new int());
# | + unique_ptr<int> Q = std::make_unique<int>();
# | //
# | //
# | unique_ptr<int> P = unique_ptr<int>(new int);
# |
# | - Q = unique_ptr<int>(new int());
# | + Q = std::make_unique<int>();
# | //
# | //
# |
# | @@ -159,7 +160,7 @@
# | std::unique_ptr<int> S(new int);
# |
# | // Create the unique_ptr as a parameter to a function.
# | - int T = g(std::unique_ptr<int>(new int()));
# | + int T = g(std::make_unique<int>());
# | //
# | //
# | T = g(std::unique_ptr<int>(new int));
# | @@ -170,17 +171,17 @@
# | auto PderivedNoparen = std::unique_ptr<Base>(new Derived);
# |
# | // OK to replace for reset and assign
# | - Pderived.reset(new Derived());
# | + Pderived = std::make_unique<Derived>();
# | //
# | //
# | - PderivedNoparen.reset(new Derived);
# | + PderivedNoparen = std::make_unique<Derived>();
# | //
# | //
# |
# | - Pderived = std::unique_ptr<Derived>(new Derived());
# | + Pderived = std::make_unique<Derived>();
# | //
# | //
# | - PderivedNoparen = std::unique_ptr<Derived>(new Derived);
# | + PderivedNoparen = std::make_unique<Derived>();
# | //
# | //
# |
# | @@ -219,7 +220,7 @@
# | public:
# | Private() {}
# | void create() {
# | - auto callsPublic = std::unique_ptr<Private>(new Private);
# | + auto callsPublic = std::make_unique<Private>();
# | //
# | //
# | auto ptr = std::unique_ptr<Private>(new Private(42));
# | @@ -237,7 +238,7 @@
# | public:
# | Protected(int, int) {}
# | void create() {
# | - auto callsPublic = std::unique_ptr<Protected>(new Protected(1, 2));
# | + auto callsPublic = std::make_unique<Protected>(1, 2);
# | //
# | //
# | auto ptr = std::unique_ptr<Protected>(new Protected);
# | @@ -250,26 +251,26 @@
# | // Test different kinds of initialization of the pointee.
# |
# | // Direct initialization with parenthesis.
# | - std::unique_ptr<DPair> PDir1 = std::unique_ptr<DPair>(new DPair(1, T));
# | + std::unique_ptr<DPair> PDir1 = std::make_unique<DPair>(1, T);
# | //
# | //
# | - PDir1.reset(new DPair(1, T));
# | + PDir1 = std::make_unique<DPair>(1, T);
# | //
# | //
# |
# | // Direct initialization with braces.
# | - std::unique_ptr<DPair> PDir2 = std::unique_ptr<DPair>(new DPair{2, T});
# | + std::unique_ptr<DPair> PDir2 = std::make_unique<DPair>(2, T);
# | //
# | //
# | - PDir2.reset(new DPair{2, T});
# | + PDir2 = std::make_unique<DPair>(2, T);
# | //
# | //
# |
# | // Aggregate initialization.
# | - std::unique_ptr<APair> PAggr = std::unique_ptr<APair>(new APair{T, 1});
# | + std::unique_ptr<APair> PAggr = std::make_unique<APair>(APair{T, 1});
# | //
# | //
# | - PAggr.reset(new APair{T, 1});
# | + PAggr = std::make_unique<APair>(APair{T, 1});
# | //
# | //
# |
# | @@ -285,40 +286,40 @@
# | // is initialized with braces.
# |
# | // Direct initialization with parenthesis.
# | - std::unique_ptr<DPair> PDir3 = std::unique_ptr<DPair>{new DPair(3, T)};
# | + std::unique_ptr<DPair> PDir3 = std::make_unique<DPair>(3, T);
# | //
# | //
# |
# | // Direct initialization with braces.
# | - std::unique_ptr<DPair> PDir4 = std::unique_ptr<DPair>{new DPair{4, T}};
# | + std::unique_ptr<DPair> PDir4 = std::make_unique<DPair>(4, T);
# | //
# | //
# |
# | // Aggregate initialization.
# | - std::unique_ptr<APair> PAggr2 = std::unique_ptr<APair>{new APair{T, 2}};
# | + std::unique_ptr<APair> PAggr2 = std::make_unique<APair>(APair{T, 2});
# | //
# | //
# |
# | // Direct initialization with parenthesis, without arguments.
# | - std::unique_ptr<DPair> PDir5 = std::unique_ptr<DPair>(new DPair());
# | + std::unique_ptr<DPair> PDir5 = std::make_unique<DPair>();
# | //
# | //
# |
# | // Direct initialization with braces, without arguments.
# | - std::unique_ptr<DPair> PDir6 = std::unique_ptr<DPair>(new DPair{});
# | + std::unique_ptr<DPair> PDir6 = std::make_unique<DPair>();
# | //
# | //
# |
# | // Aggregate initialization without arguments.
# | - std::unique_ptr<Empty> PEmpty = std::unique_ptr<Empty>(new Empty{});
# | + std::unique_ptr<Empty> PEmpty = std::make_unique<Empty>(Empty{});
# | //
# | //
# |
# | // Initialization with default constructor.
# | - std::unique_ptr<E> PE1 = std::unique_ptr<E>(new E{});
# | + std::unique_ptr<E> PE1 = std::make_unique<E>();
# | //
# | //
# | - PE1.reset(new E{});
# | + PE1 = std::make_unique<E>();
# | //
# | //
# |
# | @@ -339,18 +340,18 @@
# | //
# |
# | // Initialization with default constructor.
# | - std::unique_ptr<F> PF1 = std::unique_ptr<F>(new F());
# | + std::unique_ptr<F> PF1 = std::make_unique<F>();
# | //
# | //
# | - PF1.reset(new F());
# | + PF1 = std::make_unique<F>();
# | //
# | //
# |
# | // Initialization with default constructor.
# | - std::unique_ptr<F> PF2 = std::unique_ptr<F>(new F{});
# | + std::unique_ptr<F> PF2 = std::make_unique<F>();
# | //
# | //
# | - PF2.reset(new F());
# | + PF2 = std::make_unique<F>();
# | //
# | //
# |
# | @@ -412,10 +413,10 @@
# | //
# | //
# |
# | - std::unique_ptr<I> PI1 = std::unique_ptr<I>(new I(G({1, 2, 3})));
# | + std::unique_ptr<I> PI1 = std::make_unique<I>(G({1, 2, 3}));
# | //
# | //
# | - PI1.reset(new I(G({1, 2, 3})));
# | + PI1 = std::make_unique<I>(G({1, 2, 3}));
# | //
# | //
# |
# | @@ -447,38 +448,38 @@
# | //
# | //
# |
# | - std::unique_ptr<Foo> FF = std::unique_ptr<Foo>(new Foo());
# | + std::unique_ptr<Foo> FF = std::make_unique<Foo>();
# | //
# | //
# | - FF.reset(new Foo());
# | + FF = std::make_unique<Foo>();
# | //
# | //
# |
# | - std::unique_ptr<bar::Bar> BB = std::unique_ptr<bar::Bar>(new bar::Bar());
# | + std::unique_ptr<bar::Bar> BB = std::make_unique<bar::Bar>();
# | //
# | //
# | - BB.reset(new bar::Bar());
# | + BB = std::make_unique<bar::Bar>();
# | //
# | //
# |
# | std::unique_ptr<Foo[]> FFs;
# | - FFs.reset(new Foo[5]);
# | + FFs = std::make_unique<Foo[]>(5);
# | //
# | //
# | - FFs.reset(new Foo[5]());
# | + FFs = std::make_unique<Foo[]>(5);
# | //
# | //
# | const int Num = 1;
# | - FFs.reset(new Foo[Num]);
# | + FFs = std::make_unique<Foo[]>(Num);
# | //
# | //
# | int Num2 = 1;
# | - FFs.reset(new Foo[Num2]);
# | + FFs = std::make_unique<Foo[]>(Num2);
# | //
# | //
# |
# | std::unique_ptr<int[]> FI;
# | - FI.reset(new int[5]()); // value initialization.
# | + FI = std::make_unique<int[]>(5); // value initialization.
# | //
# | //
# |
# | @@ -491,32 +492,32 @@
# |
# | void aliases() {
# | typedef std::unique_ptr<int> IntPtr;
# | - IntPtr Typedef = IntPtr(new int());
# | + IntPtr Typedef = std::make_unique<int>();
# | //
# | //
# | IntPtr Typedef2 = IntPtr(new int);
# |
# | // We use 'bool' instead of '_Bool'.
# | typedef std::unique_ptr<bool> BoolPtr;
# | - BoolPtr BoolType = BoolPtr(new bool());
# | + BoolPtr BoolType = std::make_unique<bool>();
# | //
# | //
# | BoolPtr BoolType2 = BoolPtr(new bool);
# |
# | // We use 'Base' instead of 'struct Base'.
# | typedef std::unique_ptr<Base> BasePtr;
# | - BasePtr StructType = BasePtr(new Base);
# | + BasePtr StructType = std::make_unique<Base>();
# | //
# | //
# |
# | #define PTR unique_ptr<int>
# | - std::unique_ptr<int> Macro = std::PTR(new int());
# | + std::unique_ptr<int> Macro = std::make_unique<int>();
# | //
# | //
# | std::unique_ptr<int> Macro2 = std::PTR(new int);
# | #undef PTR
# |
# | - std::unique_ptr<int> Using = unique_ptr_<int>(new int());
# | + std::unique_ptr<int> Using = std::make_unique<int>();
# | //
# | //
# | std::unique_ptr<int> Using2 = unique_ptr_<int>(new int);
# | @@ -524,12 +525,12 @@
# |
# | void whitespaces() {
# | // clang-format off
# | - auto Space = std::unique_ptr <int>(new int());
# | + auto Space = std::make_unique<int>();
# | //
# | //
# | auto Space2 = std::unique_ptr <int>(new int);
# |
# | - auto Spaces = std :: unique_ptr <int>(new int());
# | + auto Spaces = std::make_unique<int>();
# | //
# | //
# | auto Spaces2 = std :: unique_ptr <int>(new int);
# | @@ -537,13 +538,13 @@
# | }
# |
# | void nesting() {
# | - auto Nest = std::unique_ptr<std::unique_ptr<int>>(new std::unique_ptr<int>(new int));
# | + auto Nest = std::make_unique<std::unique_ptr<int>>(new int);
# | //
# | //
# | - Nest.reset(new std::unique_ptr<int>(new int));
# | + Nest = std::make_unique<std::unique_ptr<int>>(new int);
# | //
# | //
# | - Nest->reset(new int());
# | + *Nest = std::make_unique<int>();
# | //
# | //
# | }
# | @@ -552,13 +553,13 @@
# | std::unique_ptr<int> P;
# | P.reset();
# | P.reset(nullptr);
# | - P.reset(new int());
# | + P = std::make_unique<int>();
# | //
# | //
# | P.reset(new int);
# |
# | auto Q = &P;
# | - Q->reset(new int());
# | + *Q = std::make_unique<int>();
# | //
# | //
# | Q->reset(new int);
# | @@ -579,16 +580,16 @@
# | public:
# | void foo() {
# | reset(new Foo);
# | - this->reset(new Foo);
# | + *this = std::make_unique<Foo>();
# | //
# | //
# | - this->reset(new Foo());
# | + *this = std::make_unique<Foo>();
# | //
# | //
# | - (*this).reset(new Foo);
# | + (*this) = std::make_unique<Foo>();
# | //
# | //
# | - (*this).reset(new Foo());
# | + (*this) = std::make_unique<Foo>();
# | //
# | //
# | }
# | @@ -609,7 +610,7 @@
# | }
# |
# | void fix_for_c_style_struct() {
# | - auto T = std::unique_ptr<Base>(new struct Base);
# | + auto T = std::make_unique<Base>();
# | //
# | //
# | }
# |
# | ------------------------------ Fixes -----------------------------
# | --- /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.orig 2026-04-02 22:29:33.760177576 +0000
# | +++ /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp 2026-04-02 22:29:34.046177342 +0000
# | @@ -1,6 +1,7 @@
# | // RUN: %check_clang_tidy -std=c++14-or-later %s modernize-make-unique %t -- -- -I %S/Inputs/smart-ptr
# |
# | #include "unique_ptr.h"
# | +#include <memory>
# | #include <vector>
# | //
# |
# | @@ -78,29 +79,29 @@
# | int g(std::unique_ptr<int> P);
# |
# | std::unique_ptr<Base> getPointer() {
# | - return std::unique_ptr<Base>(new Base);
# | + return std::make_unique<Base>();
# | //
# | //
# | }
# |
# | std::unique_ptr<Base> getPointerValue() {
# | - return std::unique_ptr<Base>(new Base());
# | + return std::make_unique<Base>();
# | //
# | //
# | }
# |
# | void basic() {
# | - std::unique_ptr<int> P1 = std::unique_ptr<int>(new int());
# | + std::unique_ptr<int> P1 = std::make_unique<int>();
# | //
# | //
# | std::unique_ptr<int> P2 = std::unique_ptr<int>(new int);
# |
# | - P1.reset(new int());
# | + P1 = std::make_unique<int>();
# | //
# | //
# | P2.reset(new int);
# |
# | - P1 = std::unique_ptr<int>(new int());
# | + P1 = std::make_unique<int>();
# | //
# | //
# | P1 = std::unique_ptr<int>(new int);
# | @@ -113,27 +114,27 @@
# | P2 = std::unique_ptr<int>(new int);
# |
# | // With auto.
# | - auto P4 = std::unique_ptr<int>(new int());
# | + auto P4 = std::make_unique<int>();
# | //
# | //
# | auto P5 = std::unique_ptr<int>(new int);
# |
# | - std::unique_ptr<int> P6 = std::unique_ptr<int>((new int()));
# | + std::unique_ptr<int> P6 = std::make_unique<int>();
# | //
# | //
# | std::unique_ptr<int> P7 = std::unique_ptr<int>((new int));
# |
# | - P4.reset((new int()));
# | + P4 = std::make_unique<int>();
# | //
# | //
# | P5.reset((new int));
# |
# | - std::unique_ptr<int> P8 = std::unique_ptr<int>((((new int()))));
# | + std::unique_ptr<int> P8 = std::make_unique<int>();
# | //
# | //
# | std::unique_ptr<int> P9 = std::unique_ptr<int>((((new int))));
# |
# | - P5.reset(((((new int())))));
# | + P5 = std::make_unique<int>();
# | //
# | //
# | P6.reset(((((new int)))));
# | @@ -141,12 +142,12 @@
# | {
# | // No std.
# | using namespace std;
# | - unique_ptr<int> Q = unique_ptr<int>(new int());
# | + unique_ptr<int> Q = std::make_unique<int>();
# | //
# | //
# | unique_ptr<int> P = unique_ptr<int>(new int);
# |
# | - Q = unique_ptr<int>(new int());
# | + Q = std::make_unique<int>();
# | //
# | //
# |
# | @@ -159,7 +160,7 @@
# | std::unique_ptr<int> S(new int);
# |
# | // Create the unique_ptr as a parameter to a function.
# | - int T = g(std::unique_ptr<int>(new int()));
# | + int T = g(std::make_unique<int>());
# | //
# | //
# | T = g(std::unique_ptr<int>(new int));
# | @@ -170,17 +171,17 @@
# | auto PderivedNoparen = std::unique_ptr<Base>(new Derived);
# |
# | // OK to replace for reset and assign
# | - Pderived.reset(new Derived());
# | + Pderived = std::make_unique<Derived>();
# | //
# | //
# | - PderivedNoparen.reset(new Derived);
# | + PderivedNoparen = std::make_unique<Derived>();
# | //
# | //
# |
# | - Pderived = std::unique_ptr<Derived>(new Derived());
# | + Pderived = std::make_unique<Derived>();
# | //
# | //
# | - PderivedNoparen = std::unique_ptr<Derived>(new Derived);
# | + PderivedNoparen = std::make_unique<Derived>();
# | //
# | //
# |
# | @@ -219,7 +220,7 @@
# | public:
# | Private() {}
# | void create() {
# | - auto callsPublic = std::unique_ptr<Private>(new Private);
# | + auto callsPublic = std::make_unique<Private>();
# | //
# | //
# | auto ptr = std::unique_ptr<Private>(new Private(42));
# | @@ -237,7 +238,7 @@
# | public:
# | Protected(int, int) {}
# | void create() {
# | - auto callsPublic = std::unique_ptr<Protected>(new Protected(1, 2));
# | + auto callsPublic = std::make_unique<Protected>(1, 2);
# | //
# | //
# | auto ptr = std::unique_ptr<Protected>(new Protected);
# | @@ -250,26 +251,26 @@
# | // Test different kinds of initialization of the pointee.
# |
# | // Direct initialization with parenthesis.
# | - std::unique_ptr<DPair> PDir1 = std::unique_ptr<DPair>(new DPair(1, T));
# | + std::unique_ptr<DPair> PDir1 = std::make_unique<DPair>(1, T);
# | //
# | //
# | - PDir1.reset(new DPair(1, T));
# | + PDir1 = std::make_unique<DPair>(1, T);
# | //
# | //
# |
# | // Direct initialization with braces.
# | - std::unique_ptr<DPair> PDir2 = std::unique_ptr<DPair>(new DPair{2, T});
# | + std::unique_ptr<DPair> PDir2 = std::make_unique<DPair>(2, T);
# | //
# | //
# | - PDir2.reset(new DPair{2, T});
# | + PDir2 = std::make_unique<DPair>(2, T);
# | //
# | //
# |
# | // Aggregate initialization.
# | - std::unique_ptr<APair> PAggr = std::unique_ptr<APair>(new APair{T, 1});
# | + std::unique_ptr<APair> PAggr = std::make_unique<APair>(APair{T, 1});
# | //
# | //
# | - PAggr.reset(new APair{T, 1});
# | + PAggr = std::make_unique<APair>(APair{T, 1});
# | //
# | //
# |
# | @@ -285,40 +286,40 @@
# | // is initialized with braces.
# |
# | // Direct initialization with parenthesis.
# | - std::unique_ptr<DPair> PDir3 = std::unique_ptr<DPair>{new DPair(3, T)};
# | + std::unique_ptr<DPair> PDir3 = std::make_unique<DPair>(3, T);
# | //
# | //
# |
# | // Direct initialization with braces.
# | - std::unique_ptr<DPair> PDir4 = std::unique_ptr<DPair>{new DPair{4, T}};
# | + std::unique_ptr<DPair> PDir4 = std::make_unique<DPair>(4, T);
# | //
# | //
# |
# | // Aggregate initialization.
# | - std::unique_ptr<APair> PAggr2 = std::unique_ptr<APair>{new APair{T, 2}};
# | + std::unique_ptr<APair> PAggr2 = std::make_unique<APair>(APair{T, 2});
# | //
# | //
# |
# | // Direct initialization with parenthesis, without arguments.
# | - std::unique_ptr<DPair> PDir5 = std::unique_ptr<DPair>(new DPair());
# | + std::unique_ptr<DPair> PDir5 = std::make_unique<DPair>();
# | //
# | //
# |
# | // Direct initialization with braces, without arguments.
# | - std::unique_ptr<DPair> PDir6 = std::unique_ptr<DPair>(new DPair{});
# | + std::unique_ptr<DPair> PDir6 = std::make_unique<DPair>();
# | //
# | //
# |
# | // Aggregate initialization without arguments.
# | - std::unique_ptr<Empty> PEmpty = std::unique_ptr<Empty>(new Empty{});
# | + std::unique_ptr<Empty> PEmpty = std::make_unique<Empty>(Empty{});
# | //
# | //
# |
# | // Initialization with default constructor.
# | - std::unique_ptr<E> PE1 = std::unique_ptr<E>(new E{});
# | + std::unique_ptr<E> PE1 = std::make_unique<E>();
# | //
# | //
# | - PE1.reset(new E{});
# | + PE1 = std::make_unique<E>();
# | //
# | //
# |
# | @@ -339,18 +340,18 @@
# | //
# |
# | // Initialization with default constructor.
# | - std::unique_ptr<F> PF1 = std::unique_ptr<F>(new F());
# | + std::unique_ptr<F> PF1 = std::make_unique<F>();
# | //
# | //
# | - PF1.reset(new F());
# | + PF1 = std::make_unique<F>();
# | //
# | //
# |
# | // Initialization with default constructor.
# | - std::unique_ptr<F> PF2 = std::unique_ptr<F>(new F{});
# | + std::unique_ptr<F> PF2 = std::make_unique<F>();
# | //
# | //
# | - PF2.reset(new F());
# | + PF2 = std::make_unique<F>();
# | //
# | //
# |
# | @@ -412,10 +413,10 @@
# | //
# | //
# |
# | - std::unique_ptr<I> PI1 = std::unique_ptr<I>(new I(G({1, 2, 3})));
# | + std::unique_ptr<I> PI1 = std::make_unique<I>(G({1, 2, 3}));
# | //
# | //
# | - PI1.reset(new I(G({1, 2, 3})));
# | + PI1 = std::make_unique<I>(G({1, 2, 3}));
# | //
# | //
# |
# | @@ -447,38 +448,38 @@
# | //
# | //
# |
# | - std::unique_ptr<Foo> FF = std::unique_ptr<Foo>(new Foo());
# | + std::unique_ptr<Foo> FF = std::make_unique<Foo>();
# | //
# | //
# | - FF.reset(new Foo());
# | + FF = std::make_unique<Foo>();
# | //
# | //
# |
# | - std::unique_ptr<bar::Bar> BB = std::unique_ptr<bar::Bar>(new bar::Bar());
# | + std::unique_ptr<bar::Bar> BB = std::make_unique<bar::Bar>();
# | //
# | //
# | - BB.reset(new bar::Bar());
# | + BB = std::make_unique<bar::Bar>();
# | //
# | //
# |
# | std::unique_ptr<Foo[]> FFs;
# | - FFs.reset(new Foo[5]);
# | + FFs = std::make_unique<Foo[]>(5);
# | //
# | //
# | - FFs.reset(new Foo[5]());
# | + FFs = std::make_unique<Foo[]>(5);
# | //
# | //
# | const int Num = 1;
# | - FFs.reset(new Foo[Num]);
# | + FFs = std::make_unique<Foo[]>(Num);
# | //
# | //
# | int Num2 = 1;
# | - FFs.reset(new Foo[Num2]);
# | + FFs = std::make_unique<Foo[]>(Num2);
# | //
# | //
# |
# | std::unique_ptr<int[]> FI;
# | - FI.reset(new int[5]()); // value initialization.
# | + FI = std::make_unique<int[]>(5); // value initialization.
# | //
# | //
# |
# | @@ -491,32 +492,32 @@
# |
# | void aliases() {
# | typedef std::unique_ptr<int> IntPtr;
# | - IntPtr Typedef = IntPtr(new int());
# | + IntPtr Typedef = std::make_unique<int>();
# | //
# | //
# | IntPtr Typedef2 = IntPtr(new int);
# |
# | // We use 'bool' instead of '_Bool'.
# | typedef std::unique_ptr<bool> BoolPtr;
# | - BoolPtr BoolType = BoolPtr(new bool());
# | + BoolPtr BoolType = std::make_unique<bool>();
# | //
# | //
# | BoolPtr BoolType2 = BoolPtr(new bool);
# |
# | // We use 'Base' instead of 'struct Base'.
# | typedef std::unique_ptr<Base> BasePtr;
# | - BasePtr StructType = BasePtr(new Base);
# | + BasePtr StructType = std::make_unique<Base>();
# | //
# | //
# |
# | #define PTR unique_ptr<int>
# | - std::unique_ptr<int> Macro = std::PTR(new int());
# | + std::unique_ptr<int> Macro = std::make_unique<int>();
# | //
# | //
# | std::unique_ptr<int> Macro2 = std::PTR(new int);
# | #undef PTR
# |
# | - std::unique_ptr<int> Using = unique_ptr_<int>(new int());
# | + std::unique_ptr<int> Using = std::make_unique<int>();
# | //
# | //
# | std::unique_ptr<int> Using2 = unique_ptr_<int>(new int);
# | @@ -524,12 +525,12 @@
# |
# | void whitespaces() {
# | // clang-format off
# | - auto Space = std::unique_ptr <int>(new int());
# | + auto Space = std::make_unique<int>();
# | //
# | //
# | auto Space2 = std::unique_ptr <int>(new int);
# |
# | - auto Spaces = std :: unique_ptr <int>(new int());
# | + auto Spaces = std::make_unique<int>();
# | //
# | //
# | auto Spaces2 = std :: unique_ptr <int>(new int);
# | @@ -537,13 +538,13 @@
# | }
# |
# | void nesting() {
# | - auto Nest = std::unique_ptr<std::unique_ptr<int>>(new std::unique_ptr<int>(new int));
# | + auto Nest = std::make_unique<std::unique_ptr<int>>(new int);
# | //
# | //
# | - Nest.reset(new std::unique_ptr<int>(new int));
# | + Nest = std::make_unique<std::unique_ptr<int>>(new int);
# | //
# | //
# | - Nest->reset(new int());
# | + *Nest = std::make_unique<int>();
# | //
# | //
# | }
# | @@ -552,13 +553,13 @@
# | std::unique_ptr<int> P;
# | P.reset();
# | P.reset(nullptr);
# | - P.reset(new int());
# | + P = std::make_unique<int>();
# | //
# | //
# | P.reset(new int);
# |
# | auto Q = &P;
# | - Q->reset(new int());
# | + *Q = std::make_unique<int>();
# | //
# | //
# | Q->reset(new int);
# | @@ -579,16 +580,16 @@
# | public:
# | void foo() {
# | reset(new Foo);
# | - this->reset(new Foo);
# | + *this = std::make_unique<Foo>();
# | //
# | //
# | - this->reset(new Foo());
# | + *this = std::make_unique<Foo>();
# | //
# | //
# | - (*this).reset(new Foo);
# | + (*this) = std::make_unique<Foo>();
# | //
# | //
# | - (*this).reset(new Foo());
# | + (*this) = std::make_unique<Foo>();
# | //
# | //
# | }
# | @@ -609,7 +610,7 @@
# | }
# |
# | void fix_for_c_style_struct() {
# | - auto T = std::unique_ptr<Base>(new struct Base);
# | + auto T = std::make_unique<Base>();
# | //
# | //
# | }
# |
# | ------------------------------------------------------------------
# | FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique.cpp --check-prefixes=CHECK-FIXES --match-full-lines failed:
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique.cpp:158:18: error: CHECK-FIXES: expected string not found in input
# | // CHECK-FIXES: std::unique_ptr<int> R = std::make_unique<int>();
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:150:30: note: scanning from here
# | Q = std::make_unique<int>();
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp:304:2: note: possible intended match here
# | std::unique_ptr<DPair> PDir5 = std::make_unique<DPair>();
# | ^
# |
# | Input file: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 145: unique_ptr<int> Q = std::make_unique<int>();
# | 146: //
# | 147: //
# | 148: unique_ptr<int> P = unique_ptr<int>(new int);
# | 149:
# | 150: Q = std::make_unique<int>();
# | check:158'0 X error: no match found
# | 151: //
# | check:158'0 ~~~~
# | 152: //
# | check:158'0 ~~~~
# | 153:
# | check:158'0 ~
# | 154: P = unique_ptr<int>(new int);
# | check:158'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 155: }
# | check:158'0 ~~~
# | .
# | .
# | .
# | 299: std::unique_ptr<APair> PAggr2 = std::make_unique<APair>(APair{T, 2});
# | check:158'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 300: //
# | check:158'0 ~~~~
# | 301: //
# | check:158'0 ~~~~
# | 302:
# | check:158'0 ~
# | 303: // Direct initialization with parenthesis, without arguments.
# | check:158'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 304: std::unique_ptr<DPair> PDir5 = std::make_unique<DPair>();
# | check:158'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:158'1 ? possible intended match
# | 305: //
# | check:158'0 ~~~~
# | 306: //
# | check:158'0 ~~~~
# | 307:
# | check:158'0 ~
# | 308: // Direct initialization with braces, without arguments.
# | check:158'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 309: std::unique_ptr<DPair> PDir6 = std::make_unique<DPair>();
# | check:158'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# |
# `-----------------------------
# .---command stderr------------
# | Traceback (most recent call last):
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 554, in <module>
# | main()
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 550, in main
# | CheckRunner(args, extra_args).run()
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 432, in run
# | self.check_fixes()
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 327, in check_fixes
# | try_run(
# | File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 64, in try_run
# | process_output = subprocess.check_output(args, stderr=subprocess.STDOUT).decode(
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# | File "/usr/lib/python3.12/subprocess.py", line 466, in check_output
# | return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# | File "/usr/lib/python3.12/subprocess.py", line 571, in run
# | raise CalledProcessError(retcode, process.args,
# | subprocess.CalledProcessError: Command '['FileCheck', '--input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/make-unique.cpp.tmp.cpp', '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique.cpp', '--check-prefixes=CHECK-FIXES', '--match-full-lines']' returned non-zero exit status 1.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/170518
More information about the llvm-branch-commits
mailing list