Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
61372fc
[HLSL] Warn on duplicate is_rov attribute; remove unnecessary parenth…
hekota Sep 10, 2024
0b12cd2
[rtsan] Ensure pthread is initialized in test (#108040)
cjappl Sep 10, 2024
b9703cb
[gn build] Port becb03f3c624
llvmgnsyncbot Sep 10, 2024
cb3eb06
[gn build] Port f4e2d7bfc143
llvmgnsyncbot Sep 10, 2024
6dacc38
[OpenACC] Properly ignore side-effects in clause arguments
erichkeane Sep 10, 2024
27a01f6
[clang] correct argument offset for function template partial orderin…
mizvekov Sep 10, 2024
3363760
[SandboxIR] PassManager (#107932)
Sep 10, 2024
99fb150
[gn build] Port 3363760f9a00
llvmgnsyncbot Sep 10, 2024
e3c537f
[VPlan] Consider non-header phis in planContainsAdditionalSimp.
fhahn Sep 10, 2024
0f56ba1
[llvm-lit] Process ANSI color codes in test output when formatting (#…
hnrklssn Sep 10, 2024
b5ce7a9
[flang][cuda] Avoid generating data transfer when calling size intrin…
clementval Sep 10, 2024
d8a8eae
Revert "[libc++][string] Remove potential non-trailing 0-length array…
mysterymath Sep 10, 2024
ce39247
[flang] Silence spurious error on non-CUDA use of CUDA module (#107444)
klausler Sep 10, 2024
5a229db
[flang] Relax error into a warning (#107489)
klausler Sep 10, 2024
d2126ec
[flang] Fix bogus error about procedure incompatbility (#107645)
klausler Sep 10, 2024
fe58527
[flang] Relax ETIME(VALUES=) runtime checking (#107647)
klausler Sep 10, 2024
26ac30b
[flang] Accept initialized SAVE local in specification expression (#1…
klausler Sep 10, 2024
cd92c42
[flang][runtime] Don't emit runtime error for "AA" editing (#107714)
klausler Sep 10, 2024
ea858e3
[flang][runtime] Accept '\n' as space in internal list-directed input…
klausler Sep 10, 2024
15106c2
[flang][runtime] Fix odd "invalid descriptor" runtime crash (#107785)
klausler Sep 10, 2024
37f94cd
[flang] Accept KIND(x) when x is assumed-rank (#107787)
klausler Sep 10, 2024
d418a03
[flang] Fix error from semantics on use associated procedure pointer …
klausler Sep 10, 2024
5a2071b
[compiler-rt][rtsan] Improve error message wording to match ASan styl…
cjappl Sep 10, 2024
5495c36
[WebAssembly] Misc. refactoring in AsmTypeCheck (NFC) (#107978)
aheejin Sep 10, 2024
ace6d5f
[SandboxIR] Fix base class of FenceInst. Verify instructions when bui…
slackito Sep 10, 2024
0fc4147
[RISCV] Add test coverage for mul X, C where C=2^N*(3,5,9)*(3,5,9)
preames Sep 10, 2024
2ddf21b
[SandboxIR] Pass registry (#108084)
Sep 10, 2024
d452429
[flang] Fix shared library flang build (#108101)
klausler Sep 10, 2024
957af73
[sanitizer] Add CHECKs to validate calculated TLS range (#107941)
vitalybuka Sep 10, 2024
10c04d9
[LLDB]Skip Summary Statistics Tests for Windows (#108079)
Jlalond Sep 10, 2024
6007ad7
Revert "[llvm-lit] Process ANSI color codes in test output when forma…
hnrklssn Sep 10, 2024
d14a600
[SandboxIR] Implement BlockAddress (#107940)
Sep 10, 2024
bb72865
[SandboxIR] Implement FixedVectorType (#107930)
Sterling-Augustine Sep 10, 2024
5804193
Revert "[sanitizer] Add CHECKs to validate calculated TLS range" (#10…
fmayer Sep 10, 2024
829ea59
[docs] Add a section on AI-generated content to the developer policy …
rnk Sep 10, 2024
ae5f1a7
[MemProf] Convert CallContextInfo to a struct (NFC) (#108086)
teresajohnson Sep 10, 2024
d2f25e5
[LegalizeTypes] Avoid creating an unused node in ExpandIntRes_ADDSUB.…
topperc Sep 10, 2024
db7e8f2
[compiler-rt] Hardcode uptr/sptr typedefs on Linux Arm (#108105)
aeubanks Sep 11, 2024
6e854a6
[scudo] Fix the logic of MaxAllowedFragmentedPages (#107927)
ChiaHungDuan Sep 11, 2024
68f31aa
[ORC][Runtime] Add `dlupdate` for MachO (#97441)
SahilPatidar Sep 11, 2024
77fc8da
[RISCV] Rematerialize vmv.v.x (#107993)
lukel97 Sep 11, 2024
69ed733
[RISCV] Add testcase for -mcmodel= (#107816)
tclin914 Sep 11, 2024
c641b61
MIPSr6: Add llvm.is.fpclasss intrinsic support (#107857)
wzssyqa Sep 11, 2024
21a0176
[RISCV] Rematerialize vfmv.v.f (#108007)
lukel97 Sep 11, 2024
933fc63
[RISCV] Rematerialize vmv.s.x and vfmv.s.f (#108012)
lukel97 Sep 11, 2024
901006f
[flang] Make flang module hidden dependency explicit to correct build…
klausler Sep 11, 2024
1253001
[RISCV] Add reductions to list of roots in tryToReduceVL (#107595)
preames Sep 11, 2024
5773adb
SelectionDAG: Remove unneeded getSelectCC in expandFMINIMUMNUM_FMAXIM…
wzssyqa Sep 11, 2024
76151c4
Revert "[scudo] Fix the logic of MaxAllowedFragmentedPages" (#108130)
ChiaHungDuan Sep 11, 2024
c571113
[flang] Fix cycle of build dependencies (#108132)
klausler Sep 11, 2024
3b4e7c9
[SandboxIR] Implement ScalableVectorType (#108124)
Sterling-Augustine Sep 11, 2024
e67a666
[flang][cuda] Avoid extra load in c_f_pointer lowering with c_devptr …
clementval Sep 11, 2024
3dad29b
[LTO] Remove unused includes (NFC) (#108110)
kazutakahirata Sep 11, 2024
6bbf7f0
[WebAssembly] Add assembly support for final EH proposal (#107917)
aheejin Sep 11, 2024
d03822d
[clang][bytecode] Fix lookup of source locations in implicit ctors (#…
tbaederr Sep 11, 2024
323911d
Reapply "[scudo] Fix the logic of MaxAllowedFragmentedPages" (#108130…
ChiaHungDuan Sep 11, 2024
203a2ca
[webkit.RefCntblBaseVirtualDtor] Make ThreadSafeRefCounted not genera…
rniwa Sep 11, 2024
3c9022c
Bail out jump threading on indirect branches (#103688)
hiraditya Sep 11, 2024
bc152fb
[llvm-debuginfod-find] Enable multicall driver (#108082)
Prabhuk Sep 11, 2024
6dbdb84
[Clang] Fix crash due to invalid source location in __is_trivially_eq…
philnik777 Sep 11, 2024
cd0e867
[AArch64] Update and cleanup arm64-vector-imm.ll test. NFC
davemgreen Sep 11, 2024
748023d
[libc++][NFC] Replace _LIBCPP_NORETURN and TEST_NORETURN with [[noret…
philnik777 Sep 11, 2024
1e3a24d
[InitUndef] Don't use largest super class (#107885)
nikic Sep 11, 2024
19f604e
[lldb][test] Add test for printing std::string through expression eva…
Michael137 Sep 11, 2024
2afe678
[MemCpyOpt] Allow memcpy elision for non-noalias arguments (#107860)
nikic Sep 11, 2024
34cab2e
[Driver][test] Remove useless LoongArch test checks in mcmodel.c
SixWeining Sep 11, 2024
c9aa55d
[mlir][Linalg] Add speculation for LinalgStructuredOps (#108032)
Groverkss Sep 11, 2024
db64e69
[flang][debug] Handle 'used' module. (#107626)
abidh Sep 11, 2024
3001617
[AArch64] Add tests for scalar_to_vector(load) and extend load into z…
davemgreen Sep 11, 2024
b4bb2f8
[LoopDeletion] Unblock loop deletion with `llvm.experimental.noalias…
dtcxzyw Sep 11, 2024
596e7cc
[RISCV][doc] Add note to RISCVUsage about supported atomics ABIs (#10…
asb Sep 11, 2024
a8f3d30
[mlir] Add dependent TensorDialect to ConvertVectorToLLVM pass (#108045)
CoTinker Sep 11, 2024
a4b0153
[mlir][vector] Support for extracting 1-element vectors in VectorExtr…
CoTinker Sep 11, 2024
f4dd1bc
[AMDGPU] Fix leak and self-assignment in copy assignment operator (#1…
frasercrmck Sep 11, 2024
2e4e918
[bazel] Port bc152fbf43157659f8b6817e8510e1fbe6e175b5
d0k Sep 11, 2024
c4a00be
[bazel] Add missing dependency for a8f3d303122d049e65b699870615d464b7…
d0k Sep 11, 2024
935b9f6
[AMDGPU] Make use of multiclass inheritance. NFC.
jayfoad Sep 11, 2024
7041163
[AMDGPU] Regenerate buffer intrinsic tests with update_llc_test_check…
RKSimon Sep 11, 2024
7e0008d
[LLD][COFF][NFC] Create import thunks in ImportFile::parse. (#107929)
cjacek Sep 11, 2024
e1ee07d
[AMDGPU][NewPM] Port SIPeepholeSDWA pass to NPM (#107049)
optimisan Sep 11, 2024
da69449
[lldb][test] Add test for no_unique_address when mixed with bitfields…
Michael137 Sep 11, 2024
2f3d061
[MLIR][OpenMP] Automate operand structure definition (#99508)
skatrak Sep 11, 2024
e50131a
[clang] Diagnose dangling issues for the "Container<GSLPointer>" case…
hokein Sep 11, 2024
334873f
[MLIR][Python] Python binding support for IntegerSet attribute (#107640)
kaitingwang Sep 11, 2024
7c25ae8
Set dllimport on Objective C ivar offsets (#107604)
qmfrederik Sep 11, 2024
b35bb7b
[mlir] Fix 'StringSet' may not intend to support class template argum…
DamonFool Sep 11, 2024
0856f12
[mlir] Fix -Wunused-variable in OmpOpGen.cpp (NFC)
DamonFool Sep 11, 2024
ed22029
[SPIR-V] Address the case when optimization uses GEP operator and Gen…
VyacheslavLevytskyy Sep 11, 2024
1b0400e
[X86] combineSubABS - handle NEG(ABD()) expanded patterns
RKSimon Sep 11, 2024
b9c2e2e
[bazel] port 2f3d061918ece414d6db544a34b2e44a9950bc23
metaflow Sep 11, 2024
80fcab8
[Docs][clang-query] disclose Windows linetab bug on clang-query tab a…
MichelleCDjunaidi Sep 11, 2024
49b57df
DXIL: Use correct type ID when writing ValueAsMetadata. (#94337)
maleadt Sep 11, 2024
99a2354
[LLD][COFF] Add support for ARM64EC import call thunks. (#107931)
cjacek Sep 11, 2024
5904448
Avoid exposing password and token from git repositories (#105220)
tuliom Sep 11, 2024
5f25b89
[TableGen] Migrate Option Emitters to const RecordKeeper (#107696)
jurahul Sep 11, 2024
6043321
[gn] port bc152fbf4315 (llvm-debuginfod-find driver_exe)
nico Sep 11, 2024
135bd31
[mlir] [tblgen-to-irdl] Refactor tblgen-to-irdl script and support mo…
alexarice Sep 11, 2024
2a130f1
[NFC][Clang][SVE] Refactor AArch64SVEACLETypes.def to enabled more us…
paulwalker-arm Sep 11, 2024
44fc987
[lldb][test] Toolchain detection rewrite in Python (#102185)
dzhidzhoev Sep 11, 2024
ba4bcce
[GlobalIsel] Combine trunc of binop (#107721)
tschuett Sep 11, 2024
b88aced
[flang][lowering] handle procedure pointers with generic name (#108043)
jeanPerier Sep 11, 2024
7be6ea1
[Dialect] Avoid repeated hash lookups (NFC) (#108137)
kazutakahirata Sep 11, 2024
7dfaedf
[TableGen] Avoid repeated hash lookups (NFC) (#108138)
kazutakahirata Sep 11, 2024
4b1b450
[Transforms] Avoid repeated hash lookups (NFC) (#108139)
kazutakahirata Sep 11, 2024
6ffa7cd
[Interfaces] Avoid repeated hash lookups (NFC) (#108140)
kazutakahirata Sep 11, 2024
01967e2
[AMDGPU] Shrink a live interval instead of recomputing it. NFCI. (#10…
jayfoad Sep 11, 2024
7a30b9c
[AMDGPU] Make more use of getWaveMaskRegClass. NFC. (#108186)
jayfoad Sep 11, 2024
ccc4fa1
[TableGen] Fix MacOS failure in Option Emitter. (#108225)
jurahul Sep 11, 2024
35f7cfb
[clang][bytecode] Check for Pointer dereference in EvaluationResult (…
tbaederr Sep 11, 2024
43da8a7
[DAG] Add test coverage for ABD "sub of selects" patterns based off #…
RKSimon Sep 11, 2024
ee61a4d
AMDGPU: Add tests for minimumnum/maximumnum intrinsics
arsenm Sep 11, 2024
1741b9c
[LV] Generalize check lines for interleave group costs.
fhahn Sep 11, 2024
9a9f155
[Coroutines] Split buildCoroutineFrame into normalization and frame b…
Sep 11, 2024
193e81e
[Coroutines] Move materialization code into its own utils
Aug 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 14 additions & 12 deletions clang-tools-extra/docs/clang-tidy/Contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -344,18 +344,20 @@ matching expressions to simplify your matcher.
clang-query> let c1 cxxRecordDecl()
clang-query> match c1

Alternatively, pressing the tab key after a previous matcher's open parentheses would also
show which matchers can be chained with the previous matcher, though some matchers that work
may not be listed.

Just like breaking up a huge function into smaller chunks with intention-revealing names
can help you understand a complex algorithm, breaking up a matcher into smaller matchers
with intention-revealing names can help you understand a complicated matcher.

Once you have a working clang-query matcher, the C++ API matchers will be the same or similar
to your interactively constructed matcher (there can be cases where they differ slightly).
You can use local variables to preserve your intention-revealing names that you applied
to nested matchers.
Alternatively, pressing the tab key after a previous matcher's open parentheses
would also show which matchers can be chained with the previous matcher,
though some matchers that work may not be listed. Note that tab completion
does not currently work on Windows.

Just like breaking up a huge function into smaller chunks with
intention-revealing names can help you understand a complex algorithm, breaking
up a matcher into smaller matchers with intention-revealing names can help
you understand a complicated matcher.

Once you have a working :program:`clang-query` matcher, the C++ API matchers
will be the same or similar to your interactively constructed matcher (there
can be cases where they differ slightly). You can use local variables to preserve
your intention-revealing names that you applied to nested matchers.

Creating private matchers
^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 2 additions & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ Improvements to Clang's diagnostics

- Clang now warns for u8 character literals used in C23 with ``-Wpre-c23-compat`` instead of ``-Wpre-c++17-compat``.

- Clang now diagnoses cases where a dangling ``GSLOwner<GSLPointer>`` object is constructed, e.g. ``std::vector<string_view> v = {std::string()};`` (#GH100526).

Improvements to Clang's time-trace
----------------------------------

Expand Down
178 changes: 115 additions & 63 deletions clang/include/clang/Basic/AArch64SVEACLETypes.def
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,48 @@
//
// This file defines various SVE builtin types. The macros are:
//
// SVE_TYPE(Name, Id, SingletonId) - A builtin type that has not been
// covered by any other #define. Defining this macro covers all
// the builtins.
// SVE_TYPE:
// - (Name, MangledName, Id, SingletonId)
// A builtin type that has not been covered by any other #define. Defining
// this macro covers all the builtin types.
//
// SVE_VECTOR_TYPE(Name, Id, SingletonId, ElKind, ElBits, IsSigned, IsFP) -
// An SVE scalable vector.
// SVE_VECTOR_TYPE, SVE_PREDICATE_TYPE, SVE_OPAQUE_TYPE:
// - (Name, MangledName, Id, SingletonId)
// A builtin type that has not been covered by any other #define. Defining
// this macro covers the named subset of builtin types.
//
// SVE_PREDICATE_TYPE(Name, Id, SingletonId, ElKind) - An SVE scalable
// predicate.
// SVE_VECTOR_TYPE_INT
// - (Name, MangledName, Id, SingletonId, NumEls, ElBits, NF, IsSigned)
// Defining the macro covers the integer vector types.
//
// SVE_VECTOR_TYPE_FLOAT, SVE_VECTOR_TYPE_BFLOAT:
// - (Name, MangledName, Id, SingletonId, NumEls, ElBits, NF)
// Defining the macro covers the floating point vector types.
//
// SVE_PREDICATE_TYPE_ALL:
// - (Name, MangledName, Id, SingletonId, NumEls, NF)
// Defining the macro covers the boolean vector types.
//
// where:
//
// - Name is the name of the builtin type.
//
// - MangledName is the mangled name of the builtin type.
//
// - BuiltinType::Id is the enumerator defining the type.
//
// - Context.SingletonId is the global singleton of this type.
//
// - ElKind enumerates the type of the elements.
//
// - NumEls enumerates the number of the elements.
//
// - ElBits is the size of one element in bits.
//
// - NF enumerates the number of sub-vectors.
// TODO: Tuple types are represented as a concatination of "NumEls x ElBits"
// vectors. This will be changed to become a struct containing NF vectors.
//
// - IsSigned is true for vectors of signed integer elements and
// for vectors of floating-point elements.
//
Expand All @@ -39,102 +59,134 @@
//===----------------------------------------------------------------------===//

#ifndef SVE_VECTOR_TYPE
#define SVE_VECTOR_TYPE(Name, MangledName, Id, SingletonId, NumEls, ElBits, \
IsSigned, IsFP, IsBF) \
#define SVE_VECTOR_TYPE(Name, MangledName, Id, SingletonId) \
SVE_TYPE(Name, Id, SingletonId)
#endif

#ifndef SVE_VECTOR_TYPE_DETAILS
#define SVE_VECTOR_TYPE_DETAILS(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF, IsSigned, IsFP, IsBF) \
SVE_VECTOR_TYPE(Name, MangledName, Id, SingletonId)
#endif

#ifndef SVE_VECTOR_TYPE_BFLOAT
#define SVE_VECTOR_TYPE_BFLOAT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF) \
SVE_VECTOR_TYPE_DETAILS(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF, false, false, true)
#endif

#ifndef SVE_VECTOR_TYPE_FLOAT
#define SVE_VECTOR_TYPE_FLOAT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF) \
SVE_VECTOR_TYPE_DETAILS(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF, false, true, false)
#endif

#ifndef SVE_VECTOR_TYPE_INT
#define SVE_VECTOR_TYPE_INT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF, IsSigned) \
SVE_VECTOR_TYPE_DETAILS(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF, IsSigned, false, false)
#endif

#ifndef SVE_PREDICATE_TYPE
#define SVE_PREDICATE_TYPE(Name, MangledName, Id, SingletonId, NumEls) \
#define SVE_PREDICATE_TYPE(Name, MangledName, Id, SingletonId) \
SVE_TYPE(Name, Id, SingletonId)
#endif

#ifndef SVE_PREDICATE_TYPE_ALL
#define SVE_PREDICATE_TYPE_ALL(Name, MangledName, Id, SingletonId, NumEls, NF) \
SVE_PREDICATE_TYPE(Name, MangledName, Id, SingletonId)
#endif

#ifndef SVE_OPAQUE_TYPE
#define SVE_OPAQUE_TYPE(Name, MangledName, Id, SingletonId) \
#define SVE_OPAQUE_TYPE(Name, MangledName, Id, SingletonId) \
SVE_TYPE(Name, Id, SingletonId)
#endif

//===- Vector point types -----------------------------------------------===//

SVE_VECTOR_TYPE_INT("__SVInt8_t", "__SVInt8_t", SveInt8, SveInt8Ty, 16, 8, 1, true)
SVE_VECTOR_TYPE_INT("__SVInt16_t", "__SVInt16_t", SveInt16, SveInt16Ty, 8, 16, 1, true)
SVE_VECTOR_TYPE_INT("__SVInt32_t", "__SVInt32_t", SveInt32, SveInt32Ty, 4, 32, 1, true)
SVE_VECTOR_TYPE_INT("__SVInt64_t", "__SVInt64_t", SveInt64, SveInt64Ty, 2, 64, 1, true)

SVE_VECTOR_TYPE("__SVInt8_t", "__SVInt8_t", SveInt8, SveInt8Ty, 16, 8, true, false, false)
SVE_VECTOR_TYPE("__SVInt16_t", "__SVInt16_t", SveInt16, SveInt16Ty, 8, 16, true, false, false)
SVE_VECTOR_TYPE("__SVInt32_t", "__SVInt32_t", SveInt32, SveInt32Ty, 4, 32, true, false, false)
SVE_VECTOR_TYPE("__SVInt64_t", "__SVInt64_t", SveInt64, SveInt64Ty, 2, 64, true, false, false)

SVE_VECTOR_TYPE("__SVUint8_t", "__SVUint8_t", SveUint8, SveUint8Ty, 16, 8, false, false, false)
SVE_VECTOR_TYPE("__SVUint16_t", "__SVUint16_t", SveUint16, SveUint16Ty, 8, 16, false, false, false)
SVE_VECTOR_TYPE("__SVUint32_t", "__SVUint32_t", SveUint32, SveUint32Ty, 4, 32, false, false, false)
SVE_VECTOR_TYPE("__SVUint64_t", "__SVUint64_t", SveUint64, SveUint64Ty, 2, 64, false, false, false)
SVE_VECTOR_TYPE_INT("__SVUint8_t", "__SVUint8_t", SveUint8, SveUint8Ty, 16, 8, 1, false)
SVE_VECTOR_TYPE_INT("__SVUint16_t", "__SVUint16_t", SveUint16, SveUint16Ty, 8, 16, 1, false)
SVE_VECTOR_TYPE_INT("__SVUint32_t", "__SVUint32_t", SveUint32, SveUint32Ty, 4, 32, 1, false)
SVE_VECTOR_TYPE_INT("__SVUint64_t", "__SVUint64_t", SveUint64, SveUint64Ty, 2, 64, 1, false)

SVE_VECTOR_TYPE("__SVFloat16_t", "__SVFloat16_t", SveFloat16, SveFloat16Ty, 8, 16, true, true, false)
SVE_VECTOR_TYPE("__SVFloat32_t", "__SVFloat32_t", SveFloat32, SveFloat32Ty, 4, 32, true, true, false)
SVE_VECTOR_TYPE("__SVFloat64_t", "__SVFloat64_t", SveFloat64, SveFloat64Ty, 2, 64, true, true, false)
SVE_VECTOR_TYPE_FLOAT("__SVFloat16_t", "__SVFloat16_t", SveFloat16, SveFloat16Ty, 8, 16, 1)
SVE_VECTOR_TYPE_FLOAT("__SVFloat32_t", "__SVFloat32_t", SveFloat32, SveFloat32Ty, 4, 32, 1)
SVE_VECTOR_TYPE_FLOAT("__SVFloat64_t", "__SVFloat64_t", SveFloat64, SveFloat64Ty, 2, 64, 1)

SVE_VECTOR_TYPE("__SVBfloat16_t", "__SVBfloat16_t", SveBFloat16, SveBFloat16Ty, 8, 16, true, false, true)
SVE_VECTOR_TYPE_BFLOAT("__SVBfloat16_t", "__SVBfloat16_t", SveBFloat16, SveBFloat16Ty, 8, 16, 1)

//
// x2
//
SVE_VECTOR_TYPE("__clang_svint8x2_t", "svint8x2_t", SveInt8x2, SveInt8x2Ty, 32, 8, true, false, false)
SVE_VECTOR_TYPE("__clang_svint16x2_t", "svint16x2_t", SveInt16x2, SveInt16x2Ty, 16, 16, true, false, false)
SVE_VECTOR_TYPE("__clang_svint32x2_t", "svint32x2_t", SveInt32x2, SveInt32x2Ty, 8, 32, true, false, false)
SVE_VECTOR_TYPE("__clang_svint64x2_t", "svint64x2_t", SveInt64x2, SveInt64x2Ty, 4, 64, true, false, false)

SVE_VECTOR_TYPE("__clang_svuint8x2_t", "svuint8x2_t", SveUint8x2, SveUint8x2Ty, 32, 8, false, false, false)
SVE_VECTOR_TYPE("__clang_svuint16x2_t", "svuint16x2_t", SveUint16x2, SveUint16x2Ty, 16, 16, false, false, false)
SVE_VECTOR_TYPE("__clang_svuint32x2_t", "svuint32x2_t", SveUint32x2, SveUint32x2Ty, 8, 32, false, false, false)
SVE_VECTOR_TYPE("__clang_svuint64x2_t", "svuint64x2_t", SveUint64x2, SveUint64x2Ty, 4, 64, false, false, false)
SVE_VECTOR_TYPE_INT("__clang_svint8x2_t", "svint8x2_t", SveInt8x2, SveInt8x2Ty, 16, 8, 2, true)
SVE_VECTOR_TYPE_INT("__clang_svint16x2_t", "svint16x2_t", SveInt16x2, SveInt16x2Ty, 8, 16, 2, true)
SVE_VECTOR_TYPE_INT("__clang_svint32x2_t", "svint32x2_t", SveInt32x2, SveInt32x2Ty, 4, 32, 2, true)
SVE_VECTOR_TYPE_INT("__clang_svint64x2_t", "svint64x2_t", SveInt64x2, SveInt64x2Ty, 2, 64, 2, true)

SVE_VECTOR_TYPE("__clang_svfloat16x2_t", "svfloat16x2_t", SveFloat16x2, SveFloat16x2Ty, 16, 16, true, true, false)
SVE_VECTOR_TYPE("__clang_svfloat32x2_t", "svfloat32x2_t", SveFloat32x2, SveFloat32x2Ty, 8, 32, true, true, false)
SVE_VECTOR_TYPE("__clang_svfloat64x2_t", "svfloat64x2_t", SveFloat64x2, SveFloat64x2Ty, 4, 64, true, true, false)
SVE_VECTOR_TYPE_INT("__clang_svuint8x2_t", "svuint8x2_t", SveUint8x2, SveUint8x2Ty, 16 , 8, 2, false)
SVE_VECTOR_TYPE_INT("__clang_svuint16x2_t", "svuint16x2_t", SveUint16x2, SveUint16x2Ty, 8, 16, 2, false)
SVE_VECTOR_TYPE_INT("__clang_svuint32x2_t", "svuint32x2_t", SveUint32x2, SveUint32x2Ty, 4, 32, 2, false)
SVE_VECTOR_TYPE_INT("__clang_svuint64x2_t", "svuint64x2_t", SveUint64x2, SveUint64x2Ty, 2, 64, 2, false)

SVE_VECTOR_TYPE_FLOAT("__clang_svfloat16x2_t", "svfloat16x2_t", SveFloat16x2, SveFloat16x2Ty, 8, 16, 2)
SVE_VECTOR_TYPE_FLOAT("__clang_svfloat32x2_t", "svfloat32x2_t", SveFloat32x2, SveFloat32x2Ty, 4, 32, 2)
SVE_VECTOR_TYPE_FLOAT("__clang_svfloat64x2_t", "svfloat64x2_t", SveFloat64x2, SveFloat64x2Ty, 2, 64, 2)

SVE_VECTOR_TYPE_BFLOAT("__clang_svbfloat16x2_t", "svbfloat16x2_t", SveBFloat16x2, SveBFloat16x2Ty, 8, 16, 2)

SVE_VECTOR_TYPE("__clang_svbfloat16x2_t", "svbfloat16x2_t", SveBFloat16x2, SveBFloat16x2Ty, 16, 16, true, false, true)
//
// x3
//
SVE_VECTOR_TYPE("__clang_svint8x3_t", "svint8x3_t", SveInt8x3, SveInt8x3Ty, 48, 8, true, false, false)
SVE_VECTOR_TYPE("__clang_svint16x3_t", "svint16x3_t", SveInt16x3, SveInt16x3Ty, 24, 16, true, false, false)
SVE_VECTOR_TYPE("__clang_svint32x3_t", "svint32x3_t", SveInt32x3, SveInt32x3Ty, 12, 32, true, false, false)
SVE_VECTOR_TYPE("__clang_svint64x3_t", "svint64x3_t", SveInt64x3, SveInt64x3Ty, 6, 64, true, false, false)

SVE_VECTOR_TYPE("__clang_svuint8x3_t", "svuint8x3_t", SveUint8x3, SveUint8x3Ty, 48, 8, false, false, false)
SVE_VECTOR_TYPE("__clang_svuint16x3_t", "svuint16x3_t", SveUint16x3, SveUint16x3Ty, 24, 16, false, false, false)
SVE_VECTOR_TYPE("__clang_svuint32x3_t", "svuint32x3_t", SveUint32x3, SveUint32x3Ty, 12, 32, false, false, false)
SVE_VECTOR_TYPE("__clang_svuint64x3_t", "svuint64x3_t", SveUint64x3, SveUint64x3Ty, 6, 64, false, false, false)
SVE_VECTOR_TYPE_INT("__clang_svint8x3_t", "svint8x3_t", SveInt8x3, SveInt8x3Ty, 16, 8, 3, true)
SVE_VECTOR_TYPE_INT("__clang_svint16x3_t", "svint16x3_t", SveInt16x3, SveInt16x3Ty, 8, 16, 3, true)
SVE_VECTOR_TYPE_INT("__clang_svint32x3_t", "svint32x3_t", SveInt32x3, SveInt32x3Ty, 4, 32, 3, true)
SVE_VECTOR_TYPE_INT("__clang_svint64x3_t", "svint64x3_t", SveInt64x3, SveInt64x3Ty, 2, 64, 3, true)

SVE_VECTOR_TYPE_INT("__clang_svuint8x3_t", "svuint8x3_t", SveUint8x3, SveUint8x3Ty, 16, 8, 3, false)
SVE_VECTOR_TYPE_INT("__clang_svuint16x3_t", "svuint16x3_t", SveUint16x3, SveUint16x3Ty, 8, 16, 3, false)
SVE_VECTOR_TYPE_INT("__clang_svuint32x3_t", "svuint32x3_t", SveUint32x3, SveUint32x3Ty, 4, 32, 3, false)
SVE_VECTOR_TYPE_INT("__clang_svuint64x3_t", "svuint64x3_t", SveUint64x3, SveUint64x3Ty, 2, 64, 3, false)

SVE_VECTOR_TYPE("__clang_svfloat16x3_t", "svfloat16x3_t", SveFloat16x3, SveFloat16x3Ty, 24, 16, true, true, false)
SVE_VECTOR_TYPE("__clang_svfloat32x3_t", "svfloat32x3_t", SveFloat32x3, SveFloat32x3Ty, 12, 32, true, true, false)
SVE_VECTOR_TYPE("__clang_svfloat64x3_t", "svfloat64x3_t", SveFloat64x3, SveFloat64x3Ty, 6, 64, true, true, false)
SVE_VECTOR_TYPE_FLOAT("__clang_svfloat16x3_t", "svfloat16x3_t", SveFloat16x3, SveFloat16x3Ty, 8, 16, 3)
SVE_VECTOR_TYPE_FLOAT("__clang_svfloat32x3_t", "svfloat32x3_t", SveFloat32x3, SveFloat32x3Ty, 4, 32, 3)
SVE_VECTOR_TYPE_FLOAT("__clang_svfloat64x3_t", "svfloat64x3_t", SveFloat64x3, SveFloat64x3Ty, 2, 64, 3)

SVE_VECTOR_TYPE_BFLOAT("__clang_svbfloat16x3_t", "svbfloat16x3_t", SveBFloat16x3, SveBFloat16x3Ty, 8, 16, 3)

SVE_VECTOR_TYPE("__clang_svbfloat16x3_t", "svbfloat16x3_t", SveBFloat16x3, SveBFloat16x3Ty, 24, 16, true, false, true)
//
// x4
//
SVE_VECTOR_TYPE("__clang_svint8x4_t", "svint8x4_t", SveInt8x4, SveInt8x4Ty, 64, 8, true, false, false)
SVE_VECTOR_TYPE("__clang_svint16x4_t", "svint16x4_t", SveInt16x4, SveInt16x4Ty, 32, 16, true, false, false)
SVE_VECTOR_TYPE("__clang_svint32x4_t", "svint32x4_t", SveInt32x4, SveInt32x4Ty, 16, 32, true, false, false)
SVE_VECTOR_TYPE("__clang_svint64x4_t", "svint64x4_t", SveInt64x4, SveInt64x4Ty, 8, 64, true, false, false)

SVE_VECTOR_TYPE("__clang_svuint8x4_t", "svuint8x4_t", SveUint8x4, SveUint8x4Ty, 64, 8, false, false, false)
SVE_VECTOR_TYPE("__clang_svuint16x4_t", "svuint16x4_t", SveUint16x4, SveUint16x4Ty, 32, 16, false, false, false)
SVE_VECTOR_TYPE("__clang_svuint32x4_t", "svuint32x4_t", SveUint32x4, SveUint32x4Ty, 16, 32, false, false, false)
SVE_VECTOR_TYPE("__clang_svuint64x4_t", "svuint64x4_t", SveUint64x4, SveUint64x4Ty, 8, 64, false, false, false)
SVE_VECTOR_TYPE_INT("__clang_svint8x4_t", "svint8x4_t", SveInt8x4, SveInt8x4Ty, 16, 8, 4, true)
SVE_VECTOR_TYPE_INT("__clang_svint16x4_t", "svint16x4_t", SveInt16x4, SveInt16x4Ty, 8, 16, 4, true)
SVE_VECTOR_TYPE_INT("__clang_svint32x4_t", "svint32x4_t", SveInt32x4, SveInt32x4Ty, 4, 32, 4, true)
SVE_VECTOR_TYPE_INT("__clang_svint64x4_t", "svint64x4_t", SveInt64x4, SveInt64x4Ty, 2, 64, 4, true)

SVE_VECTOR_TYPE_INT("__clang_svuint8x4_t", "svuint8x4_t", SveUint8x4, SveUint8x4Ty, 16, 8, 4, false)
SVE_VECTOR_TYPE_INT("__clang_svuint16x4_t", "svuint16x4_t", SveUint16x4, SveUint16x4Ty, 8, 16, 4, false)
SVE_VECTOR_TYPE_INT("__clang_svuint32x4_t", "svuint32x4_t", SveUint32x4, SveUint32x4Ty, 4, 32, 4, false)
SVE_VECTOR_TYPE_INT("__clang_svuint64x4_t", "svuint64x4_t", SveUint64x4, SveUint64x4Ty, 2, 64, 4, false)

SVE_VECTOR_TYPE("__clang_svfloat16x4_t", "svfloat16x4_t", SveFloat16x4, SveFloat16x4Ty, 32, 16, true, true, false)
SVE_VECTOR_TYPE("__clang_svfloat32x4_t", "svfloat32x4_t", SveFloat32x4, SveFloat32x4Ty, 16, 32, true, true, false)
SVE_VECTOR_TYPE("__clang_svfloat64x4_t", "svfloat64x4_t", SveFloat64x4, SveFloat64x4Ty, 8, 64, true, true, false)
SVE_VECTOR_TYPE_FLOAT("__clang_svfloat16x4_t", "svfloat16x4_t", SveFloat16x4, SveFloat16x4Ty, 8, 16, 4)
SVE_VECTOR_TYPE_FLOAT("__clang_svfloat32x4_t", "svfloat32x4_t", SveFloat32x4, SveFloat32x4Ty, 4, 32, 4)
SVE_VECTOR_TYPE_FLOAT("__clang_svfloat64x4_t", "svfloat64x4_t", SveFloat64x4, SveFloat64x4Ty, 2, 64, 4)

SVE_VECTOR_TYPE("__clang_svbfloat16x4_t", "svbfloat16x4_t", SveBFloat16x4, SveBFloat16x4Ty, 32, 16, true, false, true)
SVE_VECTOR_TYPE_BFLOAT("__clang_svbfloat16x4_t", "svbfloat16x4_t", SveBFloat16x4, SveBFloat16x4Ty, 8, 16, 4)

SVE_PREDICATE_TYPE("__SVBool_t", "__SVBool_t", SveBool, SveBoolTy, 16)
SVE_PREDICATE_TYPE("__clang_svboolx2_t", "svboolx2_t", SveBoolx2, SveBoolx2Ty, 32)
SVE_PREDICATE_TYPE("__clang_svboolx4_t", "svboolx4_t", SveBoolx4, SveBoolx4Ty, 64)
SVE_PREDICATE_TYPE_ALL("__SVBool_t", "__SVBool_t", SveBool, SveBoolTy, 16, 1)
SVE_PREDICATE_TYPE_ALL("__clang_svboolx2_t", "svboolx2_t", SveBoolx2, SveBoolx2Ty, 16, 2)
SVE_PREDICATE_TYPE_ALL("__clang_svboolx4_t", "svboolx4_t", SveBoolx4, SveBoolx4Ty, 16, 4)

SVE_OPAQUE_TYPE("__SVCount_t", "__SVCount_t", SveCount, SveCountTy)

#undef SVE_VECTOR_TYPE
#undef SVE_VECTOR_TYPE_BFLOAT
#undef SVE_VECTOR_TYPE_FLOAT
#undef SVE_VECTOR_TYPE_INT
#undef SVE_PREDICATE_TYPE
#undef SVE_PREDICATE_TYPE_ALL
#undef SVE_OPAQUE_TYPE
#undef SVE_TYPE
14 changes: 14 additions & 0 deletions clang/include/clang/Basic/AttrDocs.td
Original file line number Diff line number Diff line change
Expand Up @@ -6690,6 +6690,20 @@ When the Owner's lifetime ends, it will consider the Pointer to be dangling.
P.getInt(); // P is dangling
}

If a template class is annotated with ``[[gsl::Owner]]``, and the first
instantiated template argument is a pointer type (raw pointer, or ``[[gsl::Pointer]]``),
the analysis will consider the instantiated class as a container of the pointer.
When constructing such an object from a GSL owner object, the analysis will
assume that the container holds a pointer to the owner object. Consequently,
when the owner object is destroyed, the pointer will be considered dangling.

.. code-block:: c++

int f() {
std::vector<std::string_view> v = {std::string()}; // v holds a dangling pointer.
std::optional<std::string_view> o = std::string(); // o holds a dangling pointer.
}

}];
}

Expand Down
Loading