This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Move StdCLibraryFunctionArgs to alpha.
ClosedPublic

Authored by NoQ on May 19 2020, 7:15 AM.

Details

Summary

We forgot to address my comment about warning text but i still think it's completely essential in order to be out of alpha.

Diff Detail

Event Timeline

NoQ created this revision.May 19 2020, 7:15 AM
NoQ added a comment.May 19 2020, 7:17 AM

Also we probably shouldn't keep it in apiModeling if it emits warnings (but i don't have better suggestions).

NoQ added a comment.May 19 2020, 7:30 AM

What about warning messages with placeholders? E.g. "Argument constraint of {nth} argument of {fun} is not satisfied. The value is {v}, however it should be in {range}."

Such generic warning message could work, i guess, if it's worded really well. It's also valuable to explain why exactly is this wrong (undefined behavior? is it according to the C standard or to POSIX or some other entity?). "Passing {v} into {foo} as {nth} argument causes undefined behavior. According to POSIX-1.2001 {foo} accepts values from {a} to {b}" (this isn't necessarily worded really well but that's something i'd like to see).

Still, I think the warning message in the summary should be optional, because otherwise it would be really hard to automatically add summaries from other sources (like from cppcheck).

User experience is more important than our desire to automate everything. The warning is written once but it's read many times and the readers aren't necessarily familiar with compiler jargon (or really enjoy talking to robots).

Szelethus accepted this revision.May 19 2020, 7:41 AM
In D80213#2044115, @NoQ wrote:

Also we probably shouldn't keep it in apiModeling if it emits warnings (but i don't have better suggestions).

Very strongly agreed. I even made a comment about this, idk how it slipped by. Your comment aside, this alone should be a good enough reason.

Please wait for @martong before commiting.

This revision is now accepted and ready to land.May 19 2020, 7:41 AM
martong accepted this revision.May 19 2020, 7:51 AM

Yeah, okay, let's move it to alpha until we have better warning messages.

vsavchenko accepted this revision.May 19 2020, 8:18 AM
Charusso accepted this revision.May 19 2020, 9:52 AM
Charusso added inline comments.
clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
325

ApiModeling -> apiModeling, but since this is the first diagnostic-modeling-mashup it could be named immediately as core.api so that alpha.core.api.

NoQ marked an inline comment as done.May 19 2020, 1:06 PM
NoQ added inline comments.
clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
325

ApiModeling -> apiModeling

Fxd!

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2020, 1:12 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript