Skip to content

Commit de8261c

Browse files
committed
Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4. PR: 276104 MFC after: 1 month (cherry picked from commit 647cbc5)
1 parent 7e83d42 commit de8261c

File tree

335 files changed

+5221
-3749
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

335 files changed

+5221
-3749
lines changed

ObsoleteFiles.inc

Lines changed: 54 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,14 @@ OLD_FILES+=usr/lib/clang/17/include/cmpccxaddintrin.h
136136
OLD_FILES+=usr/lib/clang/17/include/cpuid.h
137137
OLD_FILES+=usr/lib/clang/17/include/crc32intrin.h
138138
OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/algorithm
139+
OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/bits/basic_string.h
140+
OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/bits/basic_string.tcc
139141
OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/bits/shared_ptr_base.h
140142
OLD_DIRS+=usr/lib/clang/17/include/cuda_wrappers/bits
141143
OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/cmath
142144
OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/complex
143145
OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/new
146+
OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/shared_ptr_base.h
144147
OLD_DIRS+=usr/lib/clang/17/include/cuda_wrappers
145148
OLD_FILES+=usr/lib/clang/17/include/emmintrin.h
146149
OLD_FILES+=usr/lib/clang/17/include/enqcmdintrin.h
@@ -440,57 +443,57 @@ OLD_DIRS+=usr/lib/clang/17/share
440443
OLD_DIRS+=usr/lib/clang/17
441444

442445
# 20240419: new libc++ import which bumps version from 17 to 18
443-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/algorithm_fwd.h
444-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/algorithm_impl.h
445-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/execution_defs.h
446-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/execution_impl.h
447-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/glue_algorithm_defs.h
448-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/glue_algorithm_impl.h
449-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/glue_memory_defs.h
450-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/glue_memory_impl.h
451-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/glue_numeric_defs.h
452-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/glue_numeric_impl.h
453-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/memory_impl.h
454-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/numeric_fwd.h
455-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/numeric_impl.h
456-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_for.h
457-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_for_each.h
458-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_invoke.h
459-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_merge.h
460-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_scan.h
461-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_stable_partial_sort.h
462-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_stable_sort.h
463-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_transform_reduce.h
464-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_transform_scan.h
465-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/util.h
466-
OLD_DIRS+=usr/include/include/c++/v1/__pstl/internal/omp
467-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/parallel_backend.h
468-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/parallel_backend_omp.h
469-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/parallel_backend_serial.h
470-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/parallel_backend_tbb.h
471-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/parallel_backend_utils.h
472-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/unseq_backend_simd.h
473-
OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/utils.h
474-
OLD_DIRS+=usr/include/include/c++/v1/__pstl/internal
475-
OLD_DIRS+=usr/include/include/c++/v1/__pstl
476-
OLD_FILES+=usr/include/include/c++/v1/__pstl_algorithm
477-
OLD_FILES+=usr/include/include/c++/v1/__pstl_memory
478-
OLD_FILES+=usr/include/include/c++/v1/__pstl_numeric
479-
OLD_FILES+=usr/include/include/c++/v1/__type_traits/predicate_traits.h
480-
OLD_FILES+=usr/include/include/c++/v1/__utility/terminate_on_exception.h
481-
OLD_FILES+=usr/include/include/c++/v1/experimental/deque
482-
OLD_FILES+=usr/include/include/c++/v1/experimental/forward_list
483-
OLD_FILES+=usr/include/include/c++/v1/experimental/list
484-
OLD_FILES+=usr/include/include/c++/v1/experimental/map
485-
OLD_FILES+=usr/include/include/c++/v1/experimental/memory_resource
486-
OLD_FILES+=usr/include/include/c++/v1/experimental/regex
487-
OLD_FILES+=usr/include/include/c++/v1/experimental/set
488-
OLD_FILES+=usr/include/include/c++/v1/experimental/string
489-
OLD_FILES+=usr/include/include/c++/v1/experimental/unordered_map
490-
OLD_FILES+=usr/include/include/c++/v1/experimental/unordered_set
491-
OLD_FILES+=usr/include/include/c++/v1/experimental/vector
492-
OLD_FILES+=usr/include/include/c++/v1/limits.h
493-
OLD_FILES+=usr/include/include/c++/v1/setjmp.h
446+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/algorithm_fwd.h
447+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/algorithm_impl.h
448+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/execution_defs.h
449+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/execution_impl.h
450+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/glue_algorithm_defs.h
451+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/glue_algorithm_impl.h
452+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/glue_memory_defs.h
453+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/glue_memory_impl.h
454+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/glue_numeric_defs.h
455+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/glue_numeric_impl.h
456+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/memory_impl.h
457+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/numeric_fwd.h
458+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/numeric_impl.h
459+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_for.h
460+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_for_each.h
461+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_invoke.h
462+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_merge.h
463+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_scan.h
464+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_stable_partial_sort.h
465+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_stable_sort.h
466+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_transform_reduce.h
467+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_transform_scan.h
468+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/util.h
469+
OLD_DIRS+=usr/include/c++/v1/__pstl/internal/omp
470+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/parallel_backend.h
471+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/parallel_backend_omp.h
472+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/parallel_backend_serial.h
473+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/parallel_backend_tbb.h
474+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/parallel_backend_utils.h
475+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/unseq_backend_simd.h
476+
OLD_FILES+=usr/include/c++/v1/__pstl/internal/utils.h
477+
OLD_DIRS+=usr/include/c++/v1/__pstl/internal
478+
OLD_DIRS+=usr/include/c++/v1/__pstl
479+
OLD_FILES+=usr/include/c++/v1/__pstl_algorithm
480+
OLD_FILES+=usr/include/c++/v1/__pstl_memory
481+
OLD_FILES+=usr/include/c++/v1/__pstl_numeric
482+
OLD_FILES+=usr/include/c++/v1/__type_traits/predicate_traits.h
483+
OLD_FILES+=usr/include/c++/v1/__utility/terminate_on_exception.h
484+
OLD_FILES+=usr/include/c++/v1/experimental/deque
485+
OLD_FILES+=usr/include/c++/v1/experimental/forward_list
486+
OLD_FILES+=usr/include/c++/v1/experimental/list
487+
OLD_FILES+=usr/include/c++/v1/experimental/map
488+
OLD_FILES+=usr/include/c++/v1/experimental/memory_resource
489+
OLD_FILES+=usr/include/c++/v1/experimental/regex
490+
OLD_FILES+=usr/include/c++/v1/experimental/set
491+
OLD_FILES+=usr/include/c++/v1/experimental/string
492+
OLD_FILES+=usr/include/c++/v1/experimental/unordered_map
493+
OLD_FILES+=usr/include/c++/v1/experimental/unordered_set
494+
OLD_FILES+=usr/include/c++/v1/experimental/vector
495+
OLD_FILES+=usr/include/c++/v1/limits.h
496+
OLD_FILES+=usr/include/c++/v1/setjmp.h
494497

495498
# 20240213: caroot bundle updated
496499
OLD_FILES+=usr/share/certs/trusted/Security_Communication_Root_CA.pem

contrib/llvm-project/clang/include/clang/AST/Type.h

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2383,10 +2383,6 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
23832383
/// Check if the type is the CUDA device builtin texture type.
23842384
bool isCUDADeviceBuiltinTextureType() const;
23852385

2386-
bool isRVVType(unsigned ElementCount) const;
2387-
2388-
bool isRVVType(unsigned Bitwidth, bool IsFloat, bool IsBFloat = false) const;
2389-
23902386
/// Return the implicit lifetime for this type, which must not be dependent.
23912387
Qualifiers::ObjCLifetime getObjCARCImplicitLifetime() const;
23922388

@@ -7283,28 +7279,6 @@ inline bool Type::isOpenCLSpecificType() const {
72837279
isQueueT() || isReserveIDT() || isPipeType() || isOCLExtOpaqueType();
72847280
}
72857281

7286-
inline bool Type::isRVVType(unsigned ElementCount) const {
7287-
bool Ret = false;
7288-
#define RVV_VECTOR_TYPE(Name, Id, SingletonId, NumEls, ElBits, NF, IsSigned, \
7289-
IsFP, IsBF) \
7290-
if (NumEls == ElementCount) \
7291-
Ret |= isSpecificBuiltinType(BuiltinType::Id);
7292-
#include "clang/Basic/RISCVVTypes.def"
7293-
return Ret;
7294-
}
7295-
7296-
inline bool Type::isRVVType(unsigned Bitwidth, bool IsFloat,
7297-
bool IsBFloat) const {
7298-
bool Ret = false;
7299-
#define RVV_TYPE(Name, Id, SingletonId)
7300-
#define RVV_VECTOR_TYPE(Name, Id, SingletonId, NumEls, ElBits, NF, IsSigned, \
7301-
IsFP, IsBF) \
7302-
if (ElBits == Bitwidth && IsFloat == IsFP && IsBFloat == IsBF) \
7303-
Ret |= isSpecificBuiltinType(BuiltinType::Id);
7304-
#include "clang/Basic/RISCVVTypes.def"
7305-
return Ret;
7306-
}
7307-
73087282
inline bool Type::isTemplateTypeParmType() const {
73097283
return isa<TemplateTypeParmType>(CanonicalType);
73107284
}

contrib/llvm-project/clang/include/clang/Basic/BuiltinsAArch64.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ TARGET_BUILTIN(__builtin_arm_ldg, "v*v*", "t", "mte")
6868
TARGET_BUILTIN(__builtin_arm_stg, "vv*", "t", "mte")
6969
TARGET_BUILTIN(__builtin_arm_subp, "Uiv*v*", "t", "mte")
7070

71+
// SME state function
72+
BUILTIN(__builtin_arm_get_sme_state, "vULi*ULi*", "n")
73+
7174
// Memory Operations
7275
TARGET_BUILTIN(__builtin_arm_mops_memset_tag, "v*v*iz", "", "mte,mops")
7376

contrib/llvm-project/clang/include/clang/Basic/riscv_sifive_vector.td

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,25 @@ multiclass RVVVFWMACCBuiltinSet<list<list<string>> suffixes_prototypes> {
109109
Name = NAME,
110110
HasMasked = false,
111111
Log2LMUL = [-2, -1, 0, 1, 2] in
112-
defm NAME : RVVOutOp1Op2BuiltinSet<NAME, "b", suffixes_prototypes>;
112+
defm NAME : RVVOutOp1Op2BuiltinSet<NAME, "y", suffixes_prototypes>;
113113
}
114114

115-
multiclass RVVVQMACCBuiltinSet<list<list<string>> suffixes_prototypes> {
115+
multiclass RVVVQMACCDODBuiltinSet<list<list<string>> suffixes_prototypes> {
116116
let OverloadedName = NAME,
117117
Name = NAME,
118118
HasMasked = false,
119119
Log2LMUL = [0, 1, 2, 3] in
120120
defm NAME : RVVOutOp1Op2BuiltinSet<NAME, "i", suffixes_prototypes>;
121121
}
122122

123+
multiclass RVVVQMACCQOQBuiltinSet<list<list<string>> suffixes_prototypes> {
124+
let OverloadedName = NAME,
125+
Name = NAME,
126+
HasMasked = false,
127+
Log2LMUL = [-1, 0, 1, 2] in
128+
defm NAME : RVVOutOp1Op2BuiltinSet<NAME, "s", suffixes_prototypes>;
129+
}
130+
123131
multiclass RVVVFNRCLIPBuiltinSet<string suffix, string prototype, string type_range> {
124132
let Log2LMUL = [-3, -2, -1, 0, 1, 2],
125133
Name = NAME,
@@ -130,18 +138,18 @@ multiclass RVVVFNRCLIPBuiltinSet<string suffix, string prototype, string type_ra
130138

131139
let UnMaskedPolicyScheme = HasPolicyOperand in
132140
let RequiredFeatures = ["Xsfvqmaccdod"] in {
133-
defm sf_vqmaccu_2x8x2 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)SUv(FixedSEW:8)Uv"]]>;
134-
defm sf_vqmacc_2x8x2 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)Sv(FixedSEW:8)v"]]>;
135-
defm sf_vqmaccus_2x8x2 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)SUv(FixedSEW:8)v"]]>;
136-
defm sf_vqmaccsu_2x8x2 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)Sv(FixedSEW:8)Uv"]]>;
141+
defm sf_vqmaccu_2x8x2 : RVVVQMACCDODBuiltinSet<[["", "v", "vv(FixedSEW:8)SUv(FixedSEW:8)Uv"]]>;
142+
defm sf_vqmacc_2x8x2 : RVVVQMACCDODBuiltinSet<[["", "v", "vv(FixedSEW:8)Sv(FixedSEW:8)v"]]>;
143+
defm sf_vqmaccus_2x8x2 : RVVVQMACCDODBuiltinSet<[["", "v", "vv(FixedSEW:8)SUv(FixedSEW:8)v"]]>;
144+
defm sf_vqmaccsu_2x8x2 : RVVVQMACCDODBuiltinSet<[["", "v", "vv(FixedSEW:8)Sv(FixedSEW:8)Uv"]]>;
137145
}
138146

139147
let UnMaskedPolicyScheme = HasPolicyOperand in
140148
let RequiredFeatures = ["Xsfvqmaccqoq"] in {
141-
defm sf_vqmaccu_4x8x4 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)SUv(FixedSEW:8)Uv"]]>;
142-
defm sf_vqmacc_4x8x4 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)Sv(FixedSEW:8)v"]]>;
143-
defm sf_vqmaccus_4x8x4 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)SUv(FixedSEW:8)v"]]>;
144-
defm sf_vqmaccsu_4x8x4 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)Sv(FixedSEW:8)Uv"]]>;
149+
defm sf_vqmaccu_4x8x4 : RVVVQMACCQOQBuiltinSet<[["", "w", "ww(FixedSEW:8)SUv(FixedSEW:8)Uv"]]>;
150+
defm sf_vqmacc_4x8x4 : RVVVQMACCQOQBuiltinSet<[["", "w", "ww(FixedSEW:8)Sv(FixedSEW:8)v"]]>;
151+
defm sf_vqmaccus_4x8x4 : RVVVQMACCQOQBuiltinSet<[["", "w", "ww(FixedSEW:8)SUv(FixedSEW:8)v"]]>;
152+
defm sf_vqmaccsu_4x8x4 : RVVVQMACCQOQBuiltinSet<[["", "w", "ww(FixedSEW:8)Sv(FixedSEW:8)Uv"]]>;
145153
}
146154

147155
let UnMaskedPolicyScheme = HasPolicyOperand in

contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2441,11 +2441,9 @@ let HasMasked = false, HasVL = false, IRName = "" in {
24412441
return Builder.CreateInsertVector(ResultType, Ops[0], Ops[2], Ops[1]);
24422442
}
24432443
}] in {
2444-
let Log2LMUL = [0, 1, 2] in {
2445-
foreach dst_lmul = ["(LFixedLog2LMUL:1)", "(LFixedLog2LMUL:2)", "(LFixedLog2LMUL:3)"] in {
2446-
def : RVVBuiltin<"v" # dst_lmul # "v", dst_lmul # "v" # dst_lmul # "vKzv", "csilxfd">;
2447-
def : RVVBuiltin<"Uv" # dst_lmul # "Uv", dst_lmul # "Uv" # dst_lmul #"UvKzUv", "csil">;
2448-
}
2444+
foreach dst_lmul = ["(LFixedLog2LMUL:1)", "(LFixedLog2LMUL:2)", "(LFixedLog2LMUL:3)"] in {
2445+
def : RVVBuiltin<"v" # dst_lmul # "v", dst_lmul # "v" # dst_lmul # "vKzv", "csilxfd">;
2446+
def : RVVBuiltin<"Uv" # dst_lmul # "Uv", dst_lmul # "Uv" # dst_lmul #"UvKzUv", "csil">;
24492447
}
24502448
foreach nf = NFList in {
24512449
defvar T = "(Tuple:" # nf # ")";

contrib/llvm-project/clang/include/clang/Basic/riscv_vector_common.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
// x: float16_t (half)
4242
// f: float32_t (float)
4343
// d: float64_t (double)
44-
// b: bfloat16_t (bfloat16)
44+
// y: bfloat16_t (bfloat16)
4545
//
4646
// This way, given an LMUL, a record with a TypeRange "sil" will cause the
4747
// definition of 3 builtins. Each type "t" in the TypeRange (in this example

contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
namespace clang {
1414
namespace ento {
1515
namespace categories {
16+
extern const char *const AppleAPIMisuse;
1617
extern const char *const CoreFoundationObjectiveC;
1718
extern const char *const LogicError;
1819
extern const char *const MemoryRefCount;

contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/Checker.h

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,8 @@ class PostCall {
193193

194194
class Location {
195195
template <typename CHECKER>
196-
static void _checkLocation(void *checker,
197-
const SVal &location, bool isLoad, const Stmt *S,
198-
CheckerContext &C) {
196+
static void _checkLocation(void *checker, SVal location, bool isLoad,
197+
const Stmt *S, CheckerContext &C) {
199198
((const CHECKER *)checker)->checkLocation(location, isLoad, S, C);
200199
}
201200

@@ -209,8 +208,7 @@ class Location {
209208

210209
class Bind {
211210
template <typename CHECKER>
212-
static void _checkBind(void *checker,
213-
const SVal &location, const SVal &val, const Stmt *S,
211+
static void _checkBind(void *checker, SVal location, SVal val, const Stmt *S,
214212
CheckerContext &C) {
215213
((const CHECKER *)checker)->checkBind(location, val, S, C);
216214
}
@@ -456,10 +454,8 @@ namespace eval {
456454

457455
class Assume {
458456
template <typename CHECKER>
459-
static ProgramStateRef _evalAssume(void *checker,
460-
ProgramStateRef state,
461-
const SVal &cond,
462-
bool assumption) {
457+
static ProgramStateRef _evalAssume(void *checker, ProgramStateRef state,
458+
SVal cond, bool assumption) {
463459
return ((const CHECKER *)checker)->evalAssume(state, cond, assumption);
464460
}
465461

contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -488,13 +488,11 @@ class CheckerManager {
488488
using CheckCallFunc =
489489
CheckerFn<void (const CallEvent &, CheckerContext &)>;
490490

491-
using CheckLocationFunc =
492-
CheckerFn<void (const SVal &location, bool isLoad, const Stmt *S,
493-
CheckerContext &)>;
491+
using CheckLocationFunc = CheckerFn<void(SVal location, bool isLoad,
492+
const Stmt *S, CheckerContext &)>;
494493

495494
using CheckBindFunc =
496-
CheckerFn<void (const SVal &location, const SVal &val, const Stmt *S,
497-
CheckerContext &)>;
495+
CheckerFn<void(SVal location, SVal val, const Stmt *S, CheckerContext &)>;
498496

499497
using CheckEndAnalysisFunc =
500498
CheckerFn<void (ExplodedGraph &, BugReporter &, ExprEngine &)>;
@@ -530,8 +528,7 @@ class CheckerManager {
530528
RegionAndSymbolInvalidationTraits *ITraits)>;
531529

532530
using EvalAssumeFunc =
533-
CheckerFn<ProgramStateRef (ProgramStateRef, const SVal &cond,
534-
bool assumption)>;
531+
CheckerFn<ProgramStateRef(ProgramStateRef, SVal cond, bool assumption)>;
535532

536533
using EvalCallFunc = CheckerFn<bool (const CallEvent &, CheckerContext &)>;
537534

contrib/llvm-project/clang/lib/AST/Interp/Interp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
namespace clang {
3838
namespace interp {
3939

40-
using APInt = llvm::APInt;
4140
using APSInt = llvm::APSInt;
4241

4342
/// Convert a value to an APValue.

contrib/llvm-project/clang/lib/ASTMatchers/Dynamic/Parser.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,8 @@ class Parser::CodeTokenizer {
299299

300300
/// Consume all leading whitespace from \c Code.
301301
void consumeWhitespace() {
302-
Code = Code.drop_while([](char c) {
303-
// Don't trim newlines.
304-
return StringRef(" \t\v\f\r").contains(c);
305-
});
302+
// Don't trim newlines.
303+
Code = Code.ltrim(" \t\v\f\r");
306304
}
307305

308306
SourceLocation currentLocation() {

contrib/llvm-project/clang/lib/Basic/IdentifierTable.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,7 @@ ObjCMethodFamily Selector::getMethodFamilyImpl(Selector sel) {
628628
return OMF_performSelector;
629629

630630
// The other method families may begin with a prefix of underscores.
631-
while (!name.empty() && name.front() == '_')
632-
name = name.substr(1);
631+
name = name.ltrim('_');
633632

634633
if (name.empty()) return OMF_None;
635634
switch (name.front()) {

contrib/llvm-project/clang/lib/Basic/Targets/AArch64.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,8 +1365,7 @@ bool AArch64TargetInfo::validateConstraintModifier(
13651365
StringRef Constraint, char Modifier, unsigned Size,
13661366
std::string &SuggestedModifier) const {
13671367
// Strip off constraint modifiers.
1368-
while (Constraint[0] == '=' || Constraint[0] == '+' || Constraint[0] == '&')
1369-
Constraint = Constraint.substr(1);
1368+
Constraint = Constraint.ltrim("=+&");
13701369

13711370
switch (Constraint[0]) {
13721371
default:

contrib/llvm-project/clang/lib/Basic/Targets/ARM.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,8 +1230,7 @@ bool ARMTargetInfo::validateConstraintModifier(
12301230
bool isInOut = (Constraint[0] == '+');
12311231

12321232
// Strip off constraint modifiers.
1233-
while (Constraint[0] == '=' || Constraint[0] == '+' || Constraint[0] == '&')
1234-
Constraint = Constraint.substr(1);
1233+
Constraint = Constraint.ltrim("=+&");
12351234

12361235
switch (Constraint[0]) {
12371236
default:

contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,7 @@ static void handleFullArchString(StringRef FullArchStr,
416416
Features.push_back("__RISCV_TargetAttrNeedOverride");
417417
auto RII = llvm::RISCVISAInfo::parseArchString(
418418
FullArchStr, /* EnableExperimentalExtension */ true);
419-
if (!RII) {
420-
consumeError(RII.takeError());
419+
if (llvm::errorToBool(RII.takeError())) {
421420
// Forward the invalid FullArchStr.
422421
Features.push_back("+" + FullArchStr.str());
423422
} else {

contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,8 +1613,7 @@ bool X86TargetInfo::validateOutputSize(const llvm::StringMap<bool> &FeatureMap,
16131613
StringRef Constraint,
16141614
unsigned Size) const {
16151615
// Strip off constraint modifiers.
1616-
while (Constraint[0] == '=' || Constraint[0] == '+' || Constraint[0] == '&')
1617-
Constraint = Constraint.substr(1);
1616+
Constraint = Constraint.ltrim("=+&");
16181617

16191618
return validateOperandSize(FeatureMap, Constraint, Size);
16201619
}

0 commit comments

Comments
 (0)