| Issue |
183429
|
| Summary |
Pragma Parser uses to sets of uniqe_ptr to handle the same pointer
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
shafik
|
Static analysis flagged one of these lines:
https://github.com/llvm/llvm-project/blob/564f433083d1f723ee8157afffa1f1313fb596b4/clang/lib/Parse/ParsePragma.cpp#L423
saying that create an `unique_ptr` to manage a pointer:
https://github.com/llvm/llvm-project/blob/564f433083d1f723ee8157afffa1f1313fb596b4/clang/lib/Parse/ParsePragma.cpp#L422
and then `PP.AddPragmaHandler` will also take the raw pointer it gets and create a new `unique_ptr` to manage it. For example here:
https://github.com/llvm/llvm-project/blob/564f433083d1f723ee8157afffa1f1313fb596b4/clang/lib/Lex/Pragma.cpp#L935
Now it looks like these `unique_ptr` are just manually reset later on, so I think this just works but it does indeed look odd.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs