diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2013-05-04 16:58:37 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2013-05-04 16:58:37 +0000 |
| commit | 444eb6e23cce5d76ca03b855ea5138d436fe0460 (patch) | |
| tree | cfa954921a0688228f5642604ba38146d81c293b | |
| parent | d428ff46fe7f6b2ac05436be6abb7d7da43cd8b9 (diff) | |
| download | bcm5719-llvm-444eb6e23cce5d76ca03b855ea5138d436fe0460.tar.gz bcm5719-llvm-444eb6e23cce5d76ca03b855ea5138d436fe0460.zip | |
Properly parsing __declspec(safebuffers), though there is no semantic hookup. For more information about safebuffers, see MSDN: http://msdn.microsoft.com/en-us/library/dd778695(v=vs.110).aspx
llvm-svn: 181123
| -rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 1 | ||||
| -rw-r--r-- | clang/test/Parser/MicrosoftExtensions.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index a4cec8c2575..6a87b78879e 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -374,6 +374,7 @@ bool Parser::IsSimpleMicrosoftDeclSpec(IdentifierInfo *Ident) { .Case("novtable", true) .Case("selectany", true) .Case("thread", true) + .Case("safebuffers", true ) .Default(false); } diff --git a/clang/test/Parser/MicrosoftExtensions.c b/clang/test/Parser/MicrosoftExtensions.c index 4c6f4f891da..35c63d4b552 100644 --- a/clang/test/Parser/MicrosoftExtensions.c +++ b/clang/test/Parser/MicrosoftExtensions.c @@ -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) |

