This is an archive of the discontinued LLVM Phabricator instance.

[LLDB][NFC] Suppress spurious static inspection warnings
ClosedPublic

Authored by fixathon on Aug 16 2022, 4:17 PM.

Details

Summary

Suppress coverity false positives.
This diff contains comments only, including the hints for Coverity static code inspection
to suppress the warning originating at the next line after the comment.

Diff Detail

Event Timeline

fixathon created this revision.Aug 16 2022, 4:17 PM
fixathon requested review of this revision.Aug 16 2022, 4:17 PM

Can we use C++ comments instead of C comments?

Can we use C++ comments instead of C comments?

We can, and I'll make the change. Do you think it would be a good idea to keep the coverity annotations only as C-style comments (comments for the machine) to disambiguate it from the regular comments (comments for the humans) ?

Can we use C++ comments instead of C comments?

We can, and I'll make the change. Do you think it would be a good idea to keep the coverity annotations only as C-style comments (comments for the machine) to disambiguate it from the regular comments (comments for the humans) ?

I would prefer c++ comments for coverity just so no one else sees this and says "hey, I can use C comments now in LLDB!".

labath added a subscriber: labath.Aug 17 2022, 1:46 AM

Can we use C++ comments instead of C comments?

We can, and I'll make the change. Do you think it would be a good idea to keep the coverity annotations only as C-style comments (comments for the machine) to disambiguate it from the regular comments (comments for the humans) ?

The llvm comment style is documented here. I don't think we should be making exceptions for coverity comments. (also, I wouldn't want to be having too many of these machine annotations around the codebase).

fixathon updated this revision to Diff 453348.Aug 17 2022, 11:03 AM

Change to C++ style comments

clayborg accepted this revision.Aug 17 2022, 3:55 PM
This revision is now accepted and ready to land.Aug 17 2022, 3:55 PM
This revision was automatically updated to reflect the committed changes.
JDevlieghere added inline comments.Aug 17 2022, 4:34 PM
lldb/tools/lldb-vscode/FifoFiles.cpp
65–69
89–95