diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-09 02:06:17 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-09 02:06:17 +0000 |
commit | 8d267c57afb3af418ed5281b7a9bb4555d701a82 (patch) | |
tree | d38cfe3af21da70e2686d0bc251f6b0925ca0960 /lib/Parse/ParseTentative.cpp | |
parent | f81e5a9e3f3ff80c56e4afb4fe6311a8735f36e8 (diff) |
Modules: introduce the __module_private__ declaration specifier, which
indicates that a declaration is only visible within the module it is
declared in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139348 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseTentative.cpp')
-rw-r--r-- | lib/Parse/ParseTentative.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp index f0f4c2c729..9b2ea90ba1 100644 --- a/lib/Parse/ParseTentative.cpp +++ b/lib/Parse/ParseTentative.cpp @@ -553,7 +553,7 @@ Parser::TPResult Parser::TryParseDeclarator(bool mayBeAbstract, Tok.is(tok::kw___stdcall) || Tok.is(tok::kw___fastcall) || Tok.is(tok::kw___thiscall) || - Tok.is(tok::kw___unaligned))
+ Tok.is(tok::kw___unaligned)) return TPResult::True(); // attributes indicate declaration TPResult TPR = TryParseDeclarator(mayBeAbstract, mayHaveIdentifier); if (TPR != TPResult::Ambiguous()) @@ -712,7 +712,7 @@ Parser::isExpressionOrTypeSpecifierSimple(tok::TokenKind Kind) { case tok::kw___stdcall: case tok::kw___fastcall: case tok::kw___thiscall: - case tok::kw___unaligned:
+ case tok::kw___unaligned: case tok::kw___vector: case tok::kw___pixel: return TPResult::False(); @@ -871,6 +871,9 @@ Parser::TPResult Parser::isCXXDeclarationSpecifier() { case tok::kw_virtual: case tok::kw_explicit: + // Modules + case tok::kw___module_private__: + // type-specifier: // simple-type-specifier // class-specifier @@ -906,7 +909,7 @@ Parser::TPResult Parser::isCXXDeclarationSpecifier() { case tok::kw___ptr64: case tok::kw___ptr32: case tok::kw___forceinline: - case tok::kw___unaligned:
+ case tok::kw___unaligned: return TPResult::True(); // Borland |