This is an archive of the discontinued LLVM Phabricator instance.

[analyzer][StdLibraryFunctionsChecker] Do not match based on the restrict qualifier in C++
ClosedPublic

Authored by martong on Sep 3 2020, 10:13 AM.

Details

Summary

The "restrict" keyword is illegal in C++, however, many libc
implementations use the "restrict" compiler intrinsic in functions
prototypes. The "
restrict" keyword qualifies a type as a restricted type
even in C++.
In case of any non-C99 languages, we don't want to match based on the
restrict qualifier because we cannot know if the given libc implementation
qualifies the paramter type or not.

Diff Detail

Event Timeline

martong created this revision.Sep 3 2020, 10:13 AM
martong requested review of this revision.Sep 3 2020, 10:13 AM
balazske accepted this revision.Sep 4 2020, 1:55 AM

LGTM.

This revision is now accepted and ready to land.Sep 4 2020, 1:55 AM
This revision was landed with ongoing or failed builds.Sep 4 2020, 2:48 AM
This revision was automatically updated to reflect the committed changes.