diff options
author | Ted Kremenek <kremenek@apple.com> | 2014-01-17 06:24:56 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2014-01-17 06:24:56 +0000 |
commit | f5a99a4db7b22c7566333b6ee676c903f963a1d6 (patch) | |
tree | bf822dcdac7f3077a99c8a987abda89c370e46ce /test/PCH | |
parent | a6204a9d60b95bc1f871ba7791e615c5efaca2d7 (diff) | |
download | clang-f5a99a4db7b22c7566333b6ee676c903f963a1d6.tar.gz clang-f5a99a4db7b22c7566333b6ee676c903f963a1d6.tar.bz2 clang-f5a99a4db7b22c7566333b6ee676c903f963a1d6.tar.xz |
Enhance attribute 'nonnull' to be applicable to parameters directly (infix).
This allows the following syntax:
void baz(__attribute__((nonnull)) const char *str);
instead of:
void baz(const char *str) __attribute__((nonnull(1)));
This also extends to Objective-C methods.
The checking logic in Sema is not as clean as I would like. Effectively
now we need to check both the FunctionDecl/ObjCMethodDecl and the parameters,
so the point of truth is spread in two places, but the logic isn't that
cumbersome.
Implements <rdar://problem/14691443>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199467 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/PCH')
0 files changed, 0 insertions, 0 deletions