llvm with tablegen backend for capstone disassembler
Go to file
Akira Hatanaka 3c268af42f Add support for attribute enum_extensibility.
This commit adds support for a new attribute that will be used to
distinguish between extensible and inextensible enums. There are three
main purposes of this attribute:

1. Give better control over when enum-related warnings are issued.
For example, in the code below, clang will not issue a -Wassign-enum
warning if the enum is marked "open":

enum __attribute__((enum_extensibility(closed))) EnumClosed {
  B0 = 1, B1 = 10
};

enum __attribute__((enum_extensibility(open))) EnumOpen {
  C0 = 1, C1 = 10
};

enum EnumClosed ec = 100; // warning issued
enum EnumOpen eo = 100; // no warning

2. Enable code-completion and debugging tools to offer better
suggestions.

3. Make it easier for swift's clang importer to determine which swift
type an enum should be mapped to.

For more details, see the discussion I started on cfe-dev:
http://lists.llvm.org/pipermail/cfe-dev/2017-February/052748.html

rdar://problem/12764379
rdar://problem/23145650

Differential Revision: https://reviews.llvm.org/D30766

llvm-svn: 298332
2017-03-21 02:23:00 +00:00
clang Add support for attribute enum_extensibility. 2017-03-21 02:23:00 +00:00
clang-tools-extra [clang-tidy] readability-container-size-empty fix for (*x).size() 2017-03-20 22:15:27 +00:00
compiler-rt Bypass potential libc's sysconf wrappers for sysconf(_SC_PAGESIZE) call 2017-03-20 21:03:28 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc math: Implement sinh function 2017-02-25 02:46:53 +00:00
libcxx Add two more papers from Kona, and sort them 2017-03-20 18:18:09 +00:00
libcxxabi Fully Reformat fallback_malloc.cpp 2017-03-04 03:23:15 +00:00
libunwind DarwinParser: include limits 2017-03-14 15:17:55 +00:00
lld [COFF] Don't let /def override /out filename 2017-03-21 00:12:51 +00:00
lldb FindTypes should find "struct TypeName" as well as "TypeName". 2017-03-21 02:13:50 +00:00
llgo [llgo] Remove support for LLVM attributes 2016-12-06 19:22:04 +00:00
llvm Revert "[Hexagon] Recognize polynomial-modulo loop idiom again" 2017-03-21 00:59:51 +00:00
openmp Minor improvement of KMP_YIELD_NOW() macro. 2017-03-20 22:11:31 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [DeLICM] Refector out parseSetOrNull. NFC. 2017-03-20 15:37:32 +00:00