]> granicus.if.org Git - clang/commitdiff
Properly parsing __declspec(safebuffers), though there is no semantic hookup. For...
authorAaron Ballman <aaron@aaronballman.com>
Sat, 4 May 2013 16:58:37 +0000 (16:58 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Sat, 4 May 2013 16:58:37 +0000 (16:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181123 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseDecl.cpp
test/Parser/MicrosoftExtensions.c

index a4cec8c2575c172c27f21a42e55db1d5d7c946f6..6a87b78879e860933a3a62519e9ff8427678b6cd 100644 (file)
@@ -374,6 +374,7 @@ bool Parser::IsSimpleMicrosoftDeclSpec(IdentifierInfo *Ident) {
     .Case("novtable", true)
     .Case("selectany", true)
     .Case("thread", true)
+    .Case("safebuffers", true )
     .Default(false);
 }
 
index 4c6f4f891da8737211c5e9a028a5188abf9a9a0e..35c63d4b552af9f8009f32f0b9e4e23e46b33719 100644 (file)
@@ -6,7 +6,7 @@ void (*__fastcall fastpfunc)();
 struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) __declspec(novtable) IUnknown {}; /* expected-warning{{__declspec attribute 'novtable' is not supported}} */
 extern __declspec(dllimport) void __stdcall VarR4FromDec();
 __declspec(deprecated) __declspec(deprecated) char * __cdecl ltoa( long _Val, char * _DstBuf, int _Radix);
-__declspec(noalias) __declspec(restrict) void * __cdecl xxx( void * _Memory ); /* expected-warning{{__declspec attribute 'noalias' is not supported}} expected-warning{{__declspec attribute 'restrict' is not supported}} */
+__declspec(safebuffers) __declspec(noalias) __declspec(restrict) void * __cdecl xxx( void * _Memory ); /* expected-warning{{__declspec attribute 'safebuffers' is not supported}} expected-warning{{__declspec attribute 'noalias' is not supported}} expected-warning{{__declspec attribute 'restrict' is not supported}} */
 typedef __w64 unsigned long ULONG_PTR, *PULONG_PTR;
 
 void * __ptr64 PtrToPtr64(const void *p)