-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[clang][analyzer] Move checker alpha.unix.StdCLibraryFunctions out of alpha. #66207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -532,6 +532,27 @@ def MismatchedDeallocatorChecker : Checker<"MismatchedDeallocator">, | |
Dependencies<[DynamicMemoryModeling]>, | ||
Documentation<HasDocumentation>; | ||
|
||
def StdCLibraryFunctionsChecker : Checker<"StdCLibraryFunctions">, | ||
HelpText<"Check for invalid arguments of C standard library functions, " | ||
"and apply relations between arguments and return value">, | ||
CheckerOptions<[ | ||
CmdLineOption<Boolean, | ||
"DisplayLoadedSummaries", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you confirm that this option is not advertised in the user facing docs. |
||
"If set to true, the checker displays the found summaries " | ||
"for the given translation unit.", | ||
"false", | ||
Released, | ||
Hide>, | ||
CmdLineOption<Boolean, | ||
"ModelPOSIX", | ||
"If set to true, the checker models additional functions " | ||
"from the POSIX standard.", | ||
"false", | ||
InAlpha> | ||
]>, | ||
WeakDependencies<[CallAndMessageChecker, NonNullParamChecker]>, | ||
Documentation<HasDocumentation>; | ||
|
||
def VforkChecker : Checker<"Vfork">, | ||
HelpText<"Check for proper usage of vfork">, | ||
Documentation<HasDocumentation>; | ||
|
@@ -574,27 +595,6 @@ def BlockInCriticalSectionChecker : Checker<"BlockInCriticalSection">, | |
HelpText<"Check for calls to blocking functions inside a critical section">, | ||
Documentation<HasDocumentation>; | ||
|
||
def StdCLibraryFunctionsChecker : Checker<"StdCLibraryFunctions">, | ||
HelpText<"Check for invalid arguments of C standard library functions, " | ||
"and apply relations between arguments and return value">, | ||
CheckerOptions<[ | ||
CmdLineOption<Boolean, | ||
"DisplayLoadedSummaries", | ||
"If set to true, the checker displays the found summaries " | ||
"for the given translation unit.", | ||
"false", | ||
Released, | ||
Hide>, | ||
CmdLineOption<Boolean, | ||
"ModelPOSIX", | ||
"If set to true, the checker models additional functions " | ||
"from the POSIX standard.", | ||
"false", | ||
InAlpha> | ||
]>, | ||
WeakDependencies<[CallAndMessageChecker, NonNullParamChecker, StreamChecker]>, | ||
Documentation<HasDocumentation>; | ||
|
||
} // end "alpha.unix" | ||
|
||
//===----------------------------------------------------------------------===// | ||
|
@@ -1622,6 +1622,7 @@ def DebugIteratorModeling : Checker<"DebugIteratorModeling">, | |
def StdCLibraryFunctionsTesterChecker : Checker<"StdCLibraryFunctionsTester">, | ||
HelpText<"Add test functions to the summary map, so testing of individual " | ||
"summary constituents becomes possible.">, | ||
WeakDependencies<[StdCLibraryFunctionsChecker]>, | ||
Documentation<NotDocumented>; | ||
|
||
} // end "debug" | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
clang/test/Analysis/std-c-library-functions-POSIX-socket-sockaddr.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we should have an exhaustive list of the modeled functions here, or that wouldn't be useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly the list of functions was already rejected by reviewers (because maintenance problems). Otherwise I think it is good to have an exact list of modeled functions.