blob: 878c9942cbb2f19e9707190e892f071fe6a292de [file] [log] [blame]
Chris Lattner22eb9722006-06-18 05:43:121//===----------------------------------------------------------------------===//
2// C Language Family Front-end
3//===----------------------------------------------------------------------===//
4
5I. Introduction:
6
7 clang: noun
8 1. A loud, resonant, metallic sound.
9 2. The strident call of a crane or goose.
10 3. C-language front-end toolkit.
11
12 Why?
13 Supports Objective-C.
14
15
16II. Current advantages over GCC:
17
18 * Full column number support in diagnostics.
19 * Caret diagnostics.
20 * Full diagnostic customization by client (can format diagnostics however they
21 like, e.g. in an IDE or refactoring tool).
22 * Built as a framework, can be reused by multiple tools.
23 * All languages supported linked into same library (no cc1,cc1obj, ...).
24 * mmap's code in read-only, does not dirty the pages like GCC (mem footprint).
25 * BSD License, can be linked into non-GPL projects.
26
27Future Features:
28 * Full diagnostic control, per diagnostic (use enums).
29 * Fine grained control within the source (#pragma enable/disable warning)
30 * Faster than GCC, preprocessing, parsing, IR generation.
31 * Better token tracking within macros? (Token came from this line, which is
32 a macro argument instantiated here, recursively instantiated here).
33 * Fast #import!!
34
35
36III. Critical Missing Functionality
37
38Lexer:
39 * Source character mapping. GCC supports ASCII and UTF-8.
40 See GCC options: -ftarget-charset and -ftarget-wide-charset.
41 * Universal character support. Experimental in GCC, enabled with
42 -fextended-identifiers.
43 * Poisoned identifiers.
44 * -fpreprocessed mode.
45
46Preprocessor:
47 * #line / #file directives
48 * Detection of "atomic" headers (#ifndef/#define), #pragma once support.
49 * Function-style #define & macro expansion
50 * -E & -C & -P output.
51
52Traditional Preprocessor:
53 * All.
54
55Parser Callbacks:
56 * All.
57
58Parser Actions:
59 * All.
60