Commit d9fa16e
committed
Port to LLVM 22 and shift the support window to clang 12-22.
LLVM 22 reshaped clang's type and lookup machinery enough that
the port needs real wrappers, not one-liners: NestedNameSpecifier
became a uintptr value type, ElaboratedType folded into TagType,
and the ASTContext::get* / TagDecl factories rotated through new
signatures (llvm/llvm-project#147835). Compatibility.h grows the
wrappers; lib/Differentiator call sites move onto them. Older
matrix rows stay NFC -- the wrappers are no-ops there. CHECK
lines in four test files loosen for clang 22's TypePrinter drift
(spellings only, no behaviour). Build-side bits: CMake bounds
to 22.x, PassPlugin.h moved (llvm/Passes -> llvm/Plugins), and
-Wno-macro-redefined silences LLVM's duplicate
_GLIBCXX_USE_CXX11_ABI define on 22+.
Add an LLVM 22 row to CI so the new code path is actually
exercised.
clad's window covers the last 10 majors, so 11 falls off. Bump
the CMake floor to 12.0, drop the runtime11 CI row, and delete
every `#if CLANG_VERSION_MAJOR < 12` branch. Wrappers that
collapsed to one-line passthroughs get inlined at the call site
and removed -- Expr_EvaluateAsConstantExpr, CXXMemberCallExpr_Create,
SwitchStmt_Create, Sema_ActOnStartOfSwitchStmt, and five
CLAD_COMPAT_CLANG{8,12}_* macros. CallExpr_Create,
CUDAKernelCallExpr_Create and IfStmt_Create stay (too many
parameters to inline cleanly, or still version-branching for
clang 14).1 parent b67a241 commit d9fa16e
20 files changed
Lines changed: 614 additions & 404 deletions
File tree
- .github/workflows
- include/clad/Differentiator
- lib/Differentiator
- test
- FirstDerivative
- ForwardMode
- NthDerivative
- tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | 193 | | |
197 | 194 | | |
198 | | - | |
199 | | - | |
200 | 195 | | |
201 | 196 | | |
202 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
328 | 329 | | |
329 | 330 | | |
330 | 331 | | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
335 | 338 | | |
336 | | - | |
337 | 339 | | |
338 | 340 | | |
339 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
190 | 197 | | |
191 | 198 | | |
192 | 199 | | |
| |||
0 commit comments