[Sema/Attribute] Check for noderef attribute
authorLeonard Chan <leonardchan@google.com>
Thu, 6 Dec 2018 01:05:54 +0000 (01:05 +0000)
committerLeonard Chan <leonardchan@google.com>
Thu, 6 Dec 2018 01:05:54 +0000 (01:05 +0000)
commitad7ac964e5cf166ff5bf5042b1393f39a6879b9a
tree0e92d91eacdd0b8ee9ebfb451daec605f3c9bdcc
parente13d0992dcd0649bee760d3d606b9353edfd1ebc
[Sema/Attribute] Check for noderef attribute

This patch adds the noderef attribute in clang and checks for dereferences of
types that have this attribute. This attribute is currently used by sparse and
would like to be ported to clang.

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

llvm-svn: 348442
14 files changed:
clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/AttrDocs.td
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/AST/TypePrinter.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaExprMember.cpp
clang/lib/Sema/SemaInit.cpp
clang/lib/Sema/SemaType.cpp
clang/test/Frontend/noderef.c [new file with mode: 0644]
clang/test/Frontend/noderef.cpp [new file with mode: 0644]
clang/test/Frontend/noderef_on_non_pointers.m [new file with mode: 0644]
clang/test/Frontend/noderef_templates.cpp [new file with mode: 0644]