LLVM/project e31da6allvm/utils/gn/secondary/llvm/lib/Support BUILD.gn

[gn build] Port fce3facdfe49 (#224872)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn
+1-01 files

LLVM/project 0ada78bllvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc BUILD.gn

[gn build] Port f43368b4d45e (#224871)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/BUILD.gn
+1-01 files

LLVM/project e3adc74llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn build] Port 551af79c9031 (#224870)
DeltaFile
+1-0llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+1-01 files

LLVM/project 5261c03libc/test/src/math/exhaustive cos.wc sin.wc, llvm/test/CodeGen/AMDGPU bf16.ll amdgcn.bitcast.960bit.ll

Merge cascade
DeltaFile
+1,091,085-0libc/test/src/math/exhaustive/sin.wc
+1,090,178-0libc/test/src/math/exhaustive/cos.wc
+65,634-64,263llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+11,404-11,457llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+5,656-7,977llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+6,369-6,125llvm/test/CodeGen/AMDGPU/bf16.ll
+2,270,326-89,8227,669 files not shown
+2,682,654-293,5607,675 files

LLVM/project 9c3bc81llvm/lib/Target/AMDGPU AMDGPU.td, llvm/lib/TargetParser AMDGPUTargetParser.cpp

[AMDGPU] Add LDS encoding granularity to TargetParser

Model LDS encoding granularity with dedicated features and expose the
byte-valued getLDSEncodingGranule query for GPUKind and subarch. Keep
encoding independent of the hardware allocation granularity used for
occupancy; GFX10.3, GFX11 and GFX12.0 encode in 512-byte units while
allocating 1024-byte blocks.

Migrate program resource register and PAL metadata encoding to the new
query and remove getLdsDwGranularity from AMDGPUBaseInfo. gfx9-4-generic
uses gfx950's 1280-byte encoding granule independently of LDS capacity.

Test encoding queries, feature membership, generic-target validation and
encoded LDS sizes, including the GFX10.3 allocation/encoding distinction.

Change-Id: I9d3c2c041605e9a45fa8fbda09fc3460a74953ea
DeltaFile
+57-31llvm/unittests/TargetParser/TargetParserTest.cpp
+37-5llvm/test/TableGen/AMDGPUTargetDefLDSAllocGranularity.td
+34-1llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+34-0llvm/test/CodeGen/AMDGPU/lds-size-gfx9-4-generic.ll
+26-0llvm/test/CodeGen/AMDGPU/lds-size-gfx1030.ll
+20-0llvm/lib/Target/AMDGPU/AMDGPU.td
+208-377 files not shown
+235-5913 files

LLVM/project 1843845llvm/lib/Target/AMDGPU AMDGPUFeatures.td AMDGPU.td, llvm/lib/TargetParser AMDGPUTargetParser.cpp

[AMDGPU] Add `getLDSAllocGranule` to TargetParser (#220051)
DeltaFile
+95-0llvm/unittests/TargetParser/TargetParserTest.cpp
+30-22llvm/test/CodeGen/AMDGPU/occupancy-levels.ll
+42-0llvm/test/TableGen/AMDGPUTargetDefLDSAllocGranularity.td
+34-1llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+29-5llvm/lib/Target/AMDGPU/AMDGPU.td
+14-0llvm/lib/Target/AMDGPU/AMDGPUFeatures.td
+244-283 files not shown
+256-329 files

LLVM/project b03138autils/bazel/llvm-project-overlay/libc BUILD.bazel, utils/bazel/llvm-project-overlay/libc/test/src/math BUILD.bazel

[bazel] Fix the build after 8c8740bd92197171d5873f77a66bb68217926fb2/2747501774ba93685fc460abafb395e585a86b13 (#224868)
DeltaFile
+117-14utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+22-3utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+22-3utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
+161-203 files

LLVM/project fd2f25dclang/lib/StaticAnalyzer/Checkers/WebKit RawPtrRefLocalVarsChecker.cpp

[WebKit Checkers][NFC] Thread the sink type through the local vars checker (#224862)

So an upcoming borrow checker can track assignment through indirection.

For example, in `out = &vec`, where `out`'s declared type is
`Vector<char>*&`, the relevant sink type is `Vector<char>*`.

Assisted-by: Claude
DeltaFile
+11-10clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLocalVarsChecker.cpp
+11-101 files

LLVM/project c89ca1bllvm/test/Transforms/SLPVectorizer/X86 extracted-subfields.ll

[SLP][NFC]Add a test with a missed vectorization, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/224865
DeltaFile
+384-0llvm/test/Transforms/SLPVectorizer/X86/extracted-subfields.ll
+384-01 files

LLVM/project acd9cdallvm/utils/release github-upload-release.py

github-upload-release: Create draft releases (#209876)

https://discourse.llvm.org/t/rfc-enabling-immutable-releases-v2/91180
DeltaFile
+3-1llvm/utils/release/github-upload-release.py
+3-11 files

LLVM/project 4b19252llvm/lib/Target/PowerPC PPCISelLowering.cpp, llvm/test/CodeGen/PowerPC ppc32-f128-abi.ll

Fix `fp128` reaching `llvm_unreachable` on 32-bit PowerPC (#216613)

`fp128` is a legal type that is passed in vector registers when `vsx` is
enabled on 32-bit PowerPC: the switch statement didn't account for that,
causing an LLVM assertion.

Fixes #213355

cc @folkertdev

(cherry picked from commit 8d1b38f87103eb339224d1e6d397aad191f919e6)
DeltaFile
+9-0llvm/test/CodeGen/PowerPC/ppc32-f128-abi.ll
+1-4llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+10-42 files

LLVM/project 4a9562c.github/workflows release-binaries.yml

workflows/release-binaries: Fix zstd compression (#219587)

23.1.0 was the first e2e release with zstd archives. I noticed that once
it shipped they didn't have a meaningful size improvement over the
pre-existing archives. Turns out this is because by default zstd
compresses over a 128MB window which wasn't large enough to get
meaningful savings. We now use 1GB for this which uses more memory but
should take the archive from the 1.8GB that the xz release is, to ~1gb.
I played around with a few options and this was the best time vs
compress vs memory usage ratio.

Assisted-By: codex
(cherry picked from commit 9f51fa4e9ead0da931c1f7b5d2aa3fdbc62c845e)
DeltaFile
+5-1.github/workflows/release-binaries.yml
+5-11 files

LLVM/project 577cd04llvm/cmake/modules FindLibXml2.cmake

[cmake] FindLibXml2: keep user-provided LIBXML2_DEFINITIONS (#221294)

LLVM's `FindLibXml2.cmake` (added in #166867) unconditionally does
`set(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})` and puts
`PC_LIBXML_CFLAGS_OTHER` on the imported targets. CMake's own
`FindLibXml2` module only takes pkg-config's flags when the library it
found is the one pkg-config describes; otherwise it keeps whatever
`LIBXML2_DEFINITIONS` the user passed and exposes it through
`INTERFACE_COMPILE_OPTIONS`.

This matters when cross-compiling against a static libxml2 on Windows.
Passing `-DLIBXML2_DEFINITIONS=-DLIBXML_STATIC
-DLIBXML2_LIBRARIES=.../libxml2s.lib` worked with LLVM 22 (CMake's
module): the define reached both the `xmlReadMemory` configure check and
the consumers of `LibXml2::LibXml2`. With LLVM 23 it is silently
dropped, `xmlexports.h` declares the API `__declspec(dllimport)`, the
check fails to link against the static library and
`LLVM_ENABLE_LIBXML2=FORCE_ON` aborts with `Failed to configure
libxml2`. (pkg-config on the Linux host finds the host's libxml2, so

    [23 lines not shown]
DeltaFile
+12-3llvm/cmake/modules/FindLibXml2.cmake
+12-31 files

LLVM/project 123c5db.github/workflows libclang-abi-tests.yml

workflows/libclang-abi-tests: Cache baseline results (#213503)

This way we don't need to recompute them on every run.
DeltaFile
+20-0.github/workflows/libclang-abi-tests.yml
+20-01 files

LLVM/project 809faafllvm/include/llvm/Support File.h, llvm/lib/Support/Unix Path.inc

format and fix windows

Created using spr 1.3.7
DeltaFile
+5-4llvm/include/llvm/Support/File.h
+4-4llvm/lib/Support/Unix/Path.inc
+9-82 files

LLVM/project 38d1cf7llvm/include/llvm/Support MemoryBuffer.h FileSystem.h, llvm/lib/Support VirtualFileSystem.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+57-0llvm/include/llvm/Support/File.h
+14-11llvm/lib/Support/Unix/Path.inc
+5-15llvm/include/llvm/Support/FileSystem.h
+1-11llvm/include/llvm/Support/MemoryBuffer.h
+9-3llvm/unittests/Support/MemoryBufferTest.cpp
+5-6llvm/lib/Support/VirtualFileSystem.cpp
+91-464 files not shown
+96-5210 files

LLVM/project 3ec709dlibc/test/src/math/exhaustive cos.wc sin.wc, llvm/test/CodeGen/AMDGPU bf16.ll amdgcn.bitcast.960bit.ll

Merge cascade
DeltaFile
+1,091,085-0libc/test/src/math/exhaustive/sin.wc
+1,090,178-0libc/test/src/math/exhaustive/cos.wc
+65,634-64,263llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+11,404-11,457llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+5,656-7,977llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+6,369-6,125llvm/test/CodeGen/AMDGPU/bf16.ll
+2,270,326-89,8227,669 files not shown
+2,682,656-293,5627,675 files

LLVM/project 0e2786dlibc/src/grp CMakeLists.txt getgrgid_r.cpp, libc/test/src/grp CMakeLists.txt getgrgid_r_test.cpp

[libc] Add getgrnam_r and getgrgid_r entrypoints (#224722)

Add the reentrant group database lookup entrypoints getgrnam_r and
getgrgid_r along with grp::find_by_name and grp::find_by_gid in
grp_utils.

Each lookup opens a ScopedFlatFileDatabase<struct group> stream so that
reentrant lookups do not disturb an in-progress getgrent iteration.
Track group_file_path alongside the iteration database so scoped streams
opened by reentrant lookups honour test path overrides.

* Add getgrnam_r and getgrgid_r entrypoints
* Add find_by_name and find_by_gid lookup helpers in grp_utils
* Define getgrnam_r and getgrgid_r in include/grp.yaml
* Add hermetic unit tests for getgrnam_r and getgrgid_r

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+187-0libc/test/src/grp/getgrnam_r_test.cpp
+168-0libc/test/src/grp/getgrgid_r_test.cpp
+46-0libc/test/src/grp/CMakeLists.txt
+44-0libc/src/grp/getgrnam_r.cpp
+42-0libc/src/grp/getgrgid_r.cpp
+35-0libc/src/grp/CMakeLists.txt
+522-010 files not shown
+647-316 files

LLVM/project f4149f6llvm/test/CodeGen/ARM vlldm-vlstm-uops.mir

ARM: Fix mixed dead and not-dead LR operands in vlldm-vlstm-uops.mir (#224825)

This operand list had LR listed twice, once from its implicit-defs on
the instruction definition, and another in the variadic argument list.
One had a dead flag, and the other didn't which should be a verifier
error in the future, so remove the redundant operand.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+1-1llvm/test/CodeGen/ARM/vlldm-vlstm-uops.mir
+1-11 files

LLVM/project 0a0e6fclibc/test/src/mathvec expf_test.cpp exp2f_test.cpp, libc/test/src/mathvec/exhaustive expf_test.cpp exp2f_test.cpp

[libc][mathvec]  Explicitly test against scalar double precision versions for exp*f. (#224854)

This fixes mathvec tests failures on amdgpu for
https://github.com/llvm/llvm-project/pull/224735.
DeltaFile
+3-4libc/test/src/mathvec/expf_test.cpp
+3-4libc/test/src/mathvec/exp2f_test.cpp
+3-4libc/test/src/mathvec/exp10f_test.cpp
+3-4libc/test/src/mathvec/exhaustive/expf_test.cpp
+3-4libc/test/src/mathvec/exhaustive/exp2f_test.cpp
+3-4libc/test/src/mathvec/exhaustive/exp10f_test.cpp
+18-242 files not shown
+24-308 files

LLVM/project 8c8740blibc/src/__support frac256.h, libc/src/__support/math pow_fast.h pow_accurate_128.h

[libc][math] Make pow function correctly rounded for all rounding modes. (#222827)

Fix overflow issues reported by Paul Zimmermann.
  
Algorithm overview:
Evaluate mainly as:
```
x^y = 2^(y * log2(x))
```

- Fast path:
  - Compute `log2(x) = e_x + log2(m_x)` in double-double precision.
- Scale `y * log2(x)` and evaluate `2^(y * log2(x)) = 2^hi * 2^mid *
2^lo`
    using a 64-entry lookup table for `2^mid` and a degree-5 polynomial
    evaluated with Estrin's scheme for `2^lo`.
  - Perform Ziv's rounding test.
  
- 128-bit accurate path (pow_accurate_128.h):

    [24 lines not shown]
DeltaFile
+818-0libc/src/__support/math/pow_accurate_256.h
+378-421libc/src/__support/math/pow.h
+661-0libc/src/__support/math/pow_utils.h
+375-0libc/src/__support/math/pow_accurate_128.h
+304-0libc/src/__support/math/pow_fast.h
+90-0libc/src/__support/frac256.h
+2,626-42114 files not shown
+2,893-48920 files

LLVM/project 3e07839utils/bazel/llvm-project-overlay/libc BUILD.bazel, utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper BUILD.bazel

[Bazel] Fixes 82b9a76 (#224841)

This fixes 82b9a76acb072b5ee6dc5dd123d30b883fcc4222 (#223800).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=82b9a76acb072b5ee6dc5dd123d30b883fcc4222

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+17-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+1-0utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
+18-02 files

LLVM/project 47a076dllvm/lib/Target/AMDGPU AMDGPU.td, llvm/lib/TargetParser AMDGPUTargetParser.cpp

[AMDGPU] Add LDS encoding granularity to TargetParser

Model LDS encoding granularity with dedicated features and expose the
byte-valued getLDSEncodingGranule query for GPUKind and subarch. Keep
encoding independent of the hardware allocation granularity used for
occupancy; GFX10.3, GFX11 and GFX12.0 encode in 512-byte units while
allocating 1024-byte blocks.

Migrate program resource register and PAL metadata encoding to the new
query and remove getLdsDwGranularity from AMDGPUBaseInfo. gfx9-4-generic
uses gfx950's 1280-byte encoding granule independently of LDS capacity.

Test encoding queries, feature membership, generic-target validation and
encoded LDS sizes, including the GFX10.3 allocation/encoding distinction.

Change-Id: I9d3c2c041605e9a45fa8fbda09fc3460a74953ea
DeltaFile
+57-31llvm/unittests/TargetParser/TargetParserTest.cpp
+37-5llvm/test/TableGen/AMDGPUTargetDefLDSAllocGranularity.td
+34-1llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+34-0llvm/test/CodeGen/AMDGPU/lds-size-gfx9-4-generic.ll
+26-0llvm/test/CodeGen/AMDGPU/lds-size-gfx1030.ll
+20-0llvm/lib/Target/AMDGPU/AMDGPU.td
+208-377 files not shown
+235-5913 files

LLVM/project 7dc19c6llvm/lib/Target/AMDGPU AMDGPUFeatures.td AMDGPU.td, llvm/lib/TargetParser AMDGPUTargetParser.cpp

[AMDGPU] Add getLDSAllocGranule to TargetParser

Model hardware LDS allocation granularity with dedicated features and
expose byte-valued queries for GPUKind and subarch. Use the allocation
query for occupancy while retaining the existing LDS encoding helper.

GFX10.3, GFX11 and GFX12.0 allocate in 1024-byte blocks, even though LDS
size is encoded in 512-byte units. Correct their allocation values and
occupancy expectations as discussed in #219495. gfx9-4-generic uses
gfx950's 1280-byte allocation granule independently of its 64 KiB capacity.

Test allocation feature membership, per-GPU assignments, query overloads,
fallbacks, generic-target validation and occupancy.

Change-Id: Ic0c9345e7657ec3c6978a646628598cb7608b390
DeltaFile
+95-0llvm/unittests/TargetParser/TargetParserTest.cpp
+30-22llvm/test/CodeGen/AMDGPU/occupancy-levels.ll
+42-0llvm/test/TableGen/AMDGPUTargetDefLDSAllocGranularity.td
+34-1llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+29-5llvm/lib/Target/AMDGPU/AMDGPU.td
+14-0llvm/lib/Target/AMDGPU/AMDGPUFeatures.td
+244-283 files not shown
+256-329 files

LLVM/project 2747501libc/src/__support/math exp2f.h exp2f_double_eval.h, libc/test/src/math exp2f_test.cpp exp10f_test.cpp

[libc][math] Add code size optimized float-only options for exp*f funtions. (#224735)

- Add float-only implementations for expf, exp2f, and exp10f optimized
for code-size.
- Reorganize function selections:
  - `src/__support/math/func.h` - select implementation
- `src/__support/math/func_<type>_eval.h` - implementation with `<type>`
as intermediate computational type.
- keep different `<type>-eval` in `type_eval` namespace, so that all
options are available to be tested.
- Update smoke, unit, exhaustive tests to test all variants.

Assisted-by: Gemini is used for code size analysis and test refactoring.

---------

Co-authored-by: Muhammad Bassiouni <60100307+bassiounix at users.noreply.github.com>
DeltaFile
+164-96libc/test/src/math/expf_test.cpp
+157-99libc/test/src/math/exp10f_test.cpp
+151-93libc/test/src/math/exp2f_test.cpp
+178-0libc/src/__support/math/exp2f_double_eval.h
+23-152libc/src/__support/math/exp2f.h
+106-50libc/test/src/math/smoke/expf_test.cpp
+779-49024 files not shown
+2,104-1,15430 files

LLVM/project f18dc81clang/test/Modules bounds-safety-attributed-type-late-parsed.c, clang/test/PCH bounds-safety-attributed-type-late-parsed.c

[BoundsSafety][test] Add late-parsed counted_by type-attribute coverage

New tests exercising the late-parse fill-in mechanism:
  - Sema/attr-counted-by-weird-type-positions{,-late-parsed}.c: counted_by
    in assorted type positions, nested pointers, and rejection cases.
  - Sema/attr-bounds-safety-function-ptr-param.c: attributes on
    function-pointer-typed members.
  - Modules/ and PCH/ bounds-safety-attributed-type-late-parsed: the
    resolved type round-trips through serialization.

  - Sema/attr-counted-by-late-parsed-regressions.c: guards against the
    double-free on a nested-record decl-spec attribute and the null-count
    escape on a free-function parameter.
DeltaFile
+456-0clang/test/Sema/attr-counted-by-weird-type-positions-late-parsed.c
+454-0clang/test/Sema/attr-counted-by-weird-type-positions.c
+173-0clang/test/Sema/attr-bounds-safety-function-ptr-param.c
+111-0clang/test/Modules/bounds-safety-attributed-type-late-parsed.c
+104-0clang/test/Sema/attr-counted-by-late-parsed-regressions.c
+69-0clang/test/PCH/bounds-safety-attributed-type-late-parsed.c
+1,367-04 files not shown
+1,517-010 files

LLVM/project ba8b232clang/lib/Parse ParseDecl.cpp, clang/lib/Sema SemaType.cpp

[BoundsSafety] Create incomplete counted_by types and wire up the refill

Activate late parsing for the counted_by family (counted_by / sized_by and
their _or_null variants) in type-attribute position, under
-fexperimental-late-parse-attributes, on top of the type-attribute handling,
the validation helper and the refill machinery added in the previous commits.

When such an attribute is seen during type construction and its argument
can't be resolved yet, build the CountAttributedType immediately with
getIncompleteCountAttributedType and record it against the enclosing record;
its count expression is filled in at the closing brace via the refill logic.
Because enclosing types refer to the node by pointer, completing it in place
leaves the type chain untouched -- no rebuild, no TypeLoc re-emission.

  - Sema::ActOnLateParsedTypeAttr builds the incomplete node; the parser
    callback stores it on the LateParsedTypeAttribute and records the
    attribute in the record currently being parsed.
    Parser::CompleteLateParsedTypeAttributes drains that list at the closing
    brace; a nested anonymous record hands its pending attributes up to the

    [9 lines not shown]
DeltaFile
+178-25clang/lib/Parse/ParseDecl.cpp
+29-50clang/test/Sema/attr-counted-by-late-parsed-struct-ptrs.c
+65-0clang/lib/Sema/SemaType.cpp
+14-50clang/test/Sema/attr-counted-by-or-null-late-parsed-struct-ptrs.c
+11-42clang/test/Sema/attr-sized-by-or-null-late-parsed-struct-ptrs.c
+10-42clang/test/Sema/attr-sized-by-late-parsed-struct-ptrs.c
+307-20914 files not shown
+407-38520 files

LLVM/project 53a7f75clang/lib/Sema SemaDecl.cpp SemaDeclAttr.cpp

[BoundsSafety] Handle the counted_by family as a type attribute

counted_by / sized_by (and their _or_null variants) were handled in only one
way: a declaration-position attribute went through handleCountedByAttrField,
which validated it and then patched the field afterwards with
FieldDecl::setType. There was no type-position handling at all.

Build the type during type construction instead, from a single handler that
serves both positions:

  - Add HandleCountedByAttrOnType and dispatch the counted_by family to it
    from processTypeAttrs, going through the shared
    validateBoundsAttrTypeForTypePosition leaf.
  - Remove handleCountedByAttrField. Its FieldDecl-based type-shape checks in
    Sema::CheckCountedByAttrOnField are superseded by
    Sema::ValidateBoundsAttrTypeShape, added in the previous commit and now
    reached from the type path, and are deleted; no diagnostic is dropped. The
    checks that genuinely need the FieldDecl (union member, non-flexible
    array, cross-struct count) stay in CheckCountedByAttrOnField and run from

    [11 lines not shown]
DeltaFile
+3-109clang/lib/Sema/SemaBoundsSafety.cpp
+69-1clang/lib/Sema/SemaType.cpp
+0-44clang/lib/Sema/SemaDeclAttr.cpp
+22-1clang/lib/Sema/SemaDecl.cpp
+94-1554 files

LLVM/project 126740dclang/include/clang/Parse Parser.h, clang/include/clang/Sema DeclSpec.h

[BoundsSafety][NFC] Thread a late-parsed attribute list through declarators

A late-parsed type attribute is written in the middle of a declarator, so the
list it lands in has to travel with the declarator pieces until the enclosing
record can supply its argument. Add that storage and plumbing, with nothing
producing or consuming it yet:

  - Move CachedTokens and LateParsedAttrList earlier in DeclSpec.h so DeclSpec,
    Declarator and DeclaratorChunk can hold one.
  - Give DeclSpec, Declarator and DeclaratorChunk a LateParsedAttrList, and let
    Declarator::AddTypeInfo carry one onto the chunk it appends.
  - Give ParseSpecifierQualifierList and ParseTypeQualifierListOpt an optional
    LateParsedAttrList parameter, passed down to ParseDeclarationSpecifiers.

No functional change: the lists stay empty and no caller passes one. The next
commit populates them.
DeltaFile
+54-33clang/include/clang/Sema/DeclSpec.h
+14-9clang/include/clang/Parse/Parser.h
+12-3clang/lib/Parse/ParseDecl.cpp
+80-453 files

LLVM/project 201c99bclang/include/clang/Parse Parser.h, clang/include/clang/Sema Sema.h

[BoundsSafety][NFC] Add the Sema/Parser bridge for late-parsed type attributes

A late-parsed bounds attribute has to build its type when the attribute is
seen, but its argument isn't parseable until the enclosing record is complete.
Building that type needs the Parser (which owns the cached tokens) and Sema
(which owns type construction) to meet:

  - Sema::ActOnLateParsedTypeAttr validates a counted_by-family attribute for
    the type position and, if valid, wraps the type in a CountAttributedType
    whose count is not yet known, handing the node back for completion.

  - Parser::ProcessLateParsedTypeAttrCallback is the Parser-side entry point,
    registered on Sema so Sema can call back without including Parser.h (the
    same pattern as LateTemplateParserCallback). It reuses an already-built
    node so several declarators sharing one attribute share one type.

No functional change: nothing records late-parsed type attributes yet, so the
callback is never invoked. The next commit wires it up.
DeltaFile
+32-0clang/lib/Parse/ParseDecl.cpp
+21-0clang/lib/Sema/SemaType.cpp
+21-0clang/include/clang/Sema/Sema.h
+14-0clang/include/clang/Parse/Parser.h
+5-0clang/lib/Parse/Parser.cpp
+93-05 files