summaryrefslogtreecommitdiffstats
path: root/clang/include/clang-c
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2016-07-16 00:35:23 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2016-07-16 00:35:23 +0000
commit29099ded0c1546dac891cf5510fd611a1d1992a5 (patch)
tree599ab477fd7cd169e7633e40a4bc3e3ad776d4b8 /clang/include/clang-c
parent21b3a032af8bcacbe2b3712de96b033b7ff3f208 (diff)
downloadbcm5719-llvm-29099ded0c1546dac891cf5510fd611a1d1992a5.tar.gz
bcm5719-llvm-29099ded0c1546dac891cf5510fd611a1d1992a5.zip
[ObjC] Implement @available in the Parser and AST
This patch adds a new AST node: ObjCAvailabilityCheckExpr, and teaches the Parser and Sema to generate it. This node represents an availability check of the form: @available(macos 10.10, *); Which will eventually compile to a runtime check of the host's OS version. This is the first patch of the feature I proposed here: http://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html Differential Revision: https://reviews.llvm.org/D22171 llvm-svn: 275654
Diffstat (limited to 'clang/include/clang-c')
-rw-r--r--clang/include/clang-c/Index.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index ff3c86ff2e5..13db2085ba6 100644
--- a/clang/include/clang-c/Index.h
+++ b/clang/include/clang-c/Index.h
@@ -2014,7 +2014,11 @@ enum CXCursorKind {
*/
CXCursor_OMPArraySectionExpr = 147,
- CXCursor_LastExpr = CXCursor_OMPArraySectionExpr,
+ /** \brief Represents an @available(...) check.
+ */
+ CXCursor_ObjCAvailabilityCheckExpr = 148,
+
+ CXCursor_LastExpr = CXCursor_ObjCAvailabilityCheckExpr,
/* Statements */
CXCursor_FirstStmt = 200,
OpenPOWER on IntegriCloud