HomePhabricator

[analyzer][StdLibraryFunctionsChecker] Do not match based on the restrict…

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

Description

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

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.

Differential Revision: https://reviews.llvm.org/D87097