Commit 37023e6
committed
ST6-ST13: parser fixes, constexpr tracking, ArrayList semantics, E0005
Parser fixes:
- Member pointer params: int Widget::* dp, int (Widget::*mp)(int) const
- Ref-to-array params: int (&arr)[10], int (*arr)[10]
- ->* operator as single token
- Template non-type params: int T::* Field, int (T::*Method)(int) const
- &Widget::value as template arg (non-type template arg)
- sizeof in parsePrimary with full expression preservation
- Wide string literals: L"...", u"...", U"...", u8"..."
- Adjacent string literal concatenation
- enum underlying type: enum class Color : int
- enum value initializers: Red = 1, Green = 2
- if constexpr
- for-loop multi-decl init: for (int i=0, j=10; ...)
- for-loop comma update: i++, j--
- volatile qualifier in all contexts
- Variable templates: pi<float>
- template<typename T> using Alias = ... (template aliases)
- static_assert passthrough
- constexpr constructor detection in struct body
- parsePrimary: sizeof renders actual content
CodeGen fixes:
- FunctionDecl.isConstexpr field added to AstDecl
- constexpr functions emitted with constexpr keyword
- constexpr functions hoisted to namespace scope
- new Foo() in value context strips new (emitDeclaratorTail)
- emitForStmt: Block init for multi-decl for-loop
- emitParamList: ref-to-array and member fn ptr param decoding
- decltype(expr) preserved verbatim (not converted to auto)
- using X = ... type aliases deferred after struct definitions
- static_assert emitted as TopLevelStatement (inside namespace)
- enum forward decls emitted before function forward decls
CppBuild fixes:
- constexpr functions hoisted to namespace scope
- auto/std::function variables hoisted to namespace scope
- diamond operator expansion: new ArrayList<>() -> ArrayList<T>()
- E0005: ArrayList.get() value-copy detection with website URL
- getWebsiteBaseUrl() reads from config/cppmode.properties
- expandDiamondOperator() in javaToC
Processing.h fixes:
- #include <climits> for INT_MAX/INT_MIN
- color template constructors for mixed int/float args
- ArrayList<T,true> add(T v) by-value overload
- ArrayList<T,true> get() returns T* (pointer semantics)1 parent e2b5426 commit 37023e6
9 files changed
Lines changed: 2376 additions & 328 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
Binary file not shown.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| |||
109 | 116 | | |
110 | 117 | | |
111 | 118 | | |
| 119 | + | |
112 | 120 | | |
113 | 121 | | |
114 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
| |||
293 | 306 | | |
294 | 307 | | |
295 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
296 | 338 | | |
297 | 339 | | |
298 | 340 | | |
| |||
471 | 513 | | |
472 | 514 | | |
473 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
474 | 522 | | |
475 | | - | |
| 523 | + | |
476 | 524 | | |
477 | 525 | | |
478 | 526 | | |
479 | 527 | | |
480 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
481 | 540 | | |
482 | 541 | | |
483 | 542 | | |
| |||
539 | 598 | | |
540 | 599 | | |
541 | 600 | | |
542 | | - | |
| 601 | + | |
543 | 602 | | |
544 | 603 | | |
545 | 604 | | |
| |||
0 commit comments