diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2013-05-22 23:25:32 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2013-05-22 23:25:32 +0000 |
commit | 317a77f1c7ab25443cc1cf50d457b9a394ec2fc1 (patch) | |
tree | 3e7daebf80d6d22bdcd6f29f4a158070c83ae961 /clang/lib/Parse/ParseDecl.cpp | |
parent | 81f43ae23ac5f9b901fd99106f265d13164af39e (diff) | |
download | bcm5719-llvm-317a77f1c7ab25443cc1cf50d457b9a394ec2fc1.tar.gz bcm5719-llvm-317a77f1c7ab25443cc1cf50d457b9a394ec2fc1.zip |
Adding in parsing and the start of semantic support for __sptr and __uptr pointer type qualifiers. This patch also fixes the correlated __ptr32 and __ptr64 pointer qualifiers so that they are truly type attributes instead of declaration attributes.
For more information about __sptr and __uptr, see MSDN: http://msdn.microsoft.com/en-us/library/aa983399.aspx
Patch reviewed by Richard Smith.
llvm-svn: 182535
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 8ad028155ab..cb0dc374ae1 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -601,7 +601,8 @@ void Parser::ParseMicrosoftTypeAttributes(ParsedAttributes &attrs) { while (Tok.is(tok::kw___fastcall) || Tok.is(tok::kw___stdcall) || Tok.is(tok::kw___thiscall) || Tok.is(tok::kw___cdecl) || Tok.is(tok::kw___ptr64) || Tok.is(tok::kw___w64) || - Tok.is(tok::kw___ptr32) || Tok.is(tok::kw___unaligned)) { + Tok.is(tok::kw___ptr32) || Tok.is(tok::kw___unaligned) || + Tok.is(tok::kw___sptr) || Tok.is(tok::kw___uptr)) { IdentifierInfo *AttrName = Tok.getIdentifierInfo(); SourceLocation AttrNameLoc = ConsumeToken(); attrs.addNew(AttrName, AttrNameLoc, 0, AttrNameLoc, 0, @@ -2711,6 +2712,8 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, break; } + case tok::kw___sptr: + case tok::kw___uptr: case tok::kw___ptr64: case tok::kw___ptr32: case tok::kw___w64: @@ -4145,6 +4148,8 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) { case tok::kw___fastcall: case tok::kw___thiscall: case tok::kw___w64: + case tok::kw___sptr: + case tok::kw___uptr: case tok::kw___ptr64: case tok::kw___ptr32: case tok::kw___forceinline: @@ -4321,6 +4326,8 @@ void Parser::ParseTypeQualifierListOpt(DeclSpec &DS, ParseOpenCLQualifiers(DS); break; + case tok::kw___sptr: + case tok::kw___uptr: case tok::kw___w64: case tok::kw___ptr64: case tok::kw___ptr32: |