aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-03 18:04:46 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-03 18:04:46 +0000
commit5948ae1021122164b22f74353bb7fe325a64f616 (patch)
treeb10150c1440f0bd3dd2e91cb551228dd191ed587 /include/clang/Basic
parent674949fe3fdd796fc643f0e7660cb973da1dd383 (diff)
Introduce a non-uglified syntax for module imports in Objective-C:
@import identifier [. identifier]* ; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147452 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/DiagnosticParseKinds.td2
-rw-r--r--include/clang/Basic/IdentifierTable.h3
-rw-r--r--include/clang/Basic/TokenKinds.def1
3 files changed, 4 insertions, 2 deletions
diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td
index c609cc4457..90d4721603 100644
--- a/include/clang/Basic/DiagnosticParseKinds.td
+++ b/include/clang/Basic/DiagnosticParseKinds.td
@@ -689,7 +689,7 @@ def err_seh___finally_block : Error<
let CategoryName = "Modules Issue" in {
def err_module_expected_ident : Error<
- "expected a module name after '__import_module__'">;
+ "expected a module name after module import">;
def err_module_expected_semi : Error<
"expected a semicolon name after module name">;
}
diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h
index d7d0ded020..a5eea3281f 100644
--- a/include/clang/Basic/IdentifierTable.h
+++ b/include/clang/Basic/IdentifierTable.h
@@ -295,7 +295,8 @@ private:
NeedsHandleIdentifier =
(isPoisoned() | hasMacroDefinition() | isCPlusPlusOperatorKeyword() |
isExtensionToken() | isCXX11CompatKeyword() || isOutOfDate() ||
- (getTokenID() == tok::kw___import_module__));
+ (getTokenID() == tok::kw___import_module__) ||
+ (getObjCKeywordID() == tok::objc_import));
}
};
diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def
index bb905a4ae8..103e0c93d3 100644
--- a/include/clang/Basic/TokenKinds.def
+++ b/include/clang/Basic/TokenKinds.def
@@ -548,6 +548,7 @@ OBJC2_AT_KEYWORD(required)
OBJC2_AT_KEYWORD(optional)
OBJC2_AT_KEYWORD(synthesize)
OBJC2_AT_KEYWORD(dynamic)
+OBJC2_AT_KEYWORD(import)
// TODO: What to do about context-sensitive keywords like:
// bycopy/byref/in/inout/oneway/out?