Open
Description
Previous ID | SR-2401 |
Radar | rdar://problem/18706771 |
Original Reporter | @belkadan |
Type | Bug |
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug, ClangImporter, Macros |
Assignee | None |
Priority | Medium |
md5: bf817a076ddc93edd071b2f1d749c10d
relates to:
- SR-2402 Clang importer should import nullary function-like macros
- SR-2530 Import macros containing string concatenation
Issue Description:
#define AVAILABLE_VALUE 0x10000
#define NOT_AVAILABLE_VALUE (AVAILABLE_VALUE | 1)
Swift can see AVAILABLE_VALUE, but not NOT_AVAILABLE_VALUE because it has bitwise operations in it. Ideally the compiler should assume the identifier refers to a previous macro and constant-fold this.