]> granicus.if.org Git - clang/commit
Sema: Add support for __declspec(restrict)
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 4 Feb 2015 07:23:21 +0000 (07:23 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 4 Feb 2015 07:23:21 +0000 (07:23 +0000)
commita0cdc21a4388c6da290fcf88db023fbfa971270f
tree380371dd98b9ac0287c8a522898b23052d9e1351
parent02e88c076bc8781552c97e4da251d03f320cb0c8
Sema: Add support for __declspec(restrict)

__declspec(restrict) and __attribute(malloc) are both handled
identically by clang: they are allowed to the noalias LLVM attribute.

Seeing as how noalias models the C99 notion of 'restrict', rename the
internal clang attribute to Restrict from Malloc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228120 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/Attr.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/CodeGen/CGCall.cpp
lib/Sema/SemaDeclAttr.cpp
lib/Sema/SemaExprCXX.cpp
test/Parser/MicrosoftExtensions.c
test/Sema/attr-malloc.c
test/SemaObjC/attr-malloc.m