37
37
#include < set>
38
38
#include < sstream>
39
39
40
- using namespace llvm ;
41
40
using namespace clang ;
42
41
43
42
#ifndef NDEBUG
@@ -474,7 +473,7 @@ static bool isSafeSpanTwoParamConstruct(const CXXConstructExpr &Node,
474
473
auto HaveEqualConstantValues = [&Ctx](const Expr *E0 , const Expr *E1 ) {
475
474
if (auto E0CV = E0 ->getIntegerConstantExpr (Ctx))
476
475
if (auto E1CV = E1 ->getIntegerConstantExpr (Ctx)) {
477
- return APSInt::compareValues (*E0CV, *E1CV) == 0 ;
476
+ return llvm:: APSInt::compareValues (*E0CV, *E1CV) == 0 ;
478
477
}
479
478
return false ;
480
479
};
@@ -485,7 +484,7 @@ static bool isSafeSpanTwoParamConstruct(const CXXConstructExpr &Node,
485
484
}
486
485
return false ;
487
486
};
488
- std::optional<APSInt> Arg1CV = Arg1->getIntegerConstantExpr (Ctx);
487
+ std::optional<llvm:: APSInt> Arg1CV = Arg1->getIntegerConstantExpr (Ctx);
489
488
490
489
if (Arg1CV && Arg1CV->isZero ())
491
490
// Check form 5:
@@ -528,10 +527,10 @@ static bool isSafeSpanTwoParamConstruct(const CXXConstructExpr &Node,
528
527
QualType Arg0Ty = Arg0->IgnoreImplicit ()->getType ();
529
528
530
529
if (auto *ConstArrTy = Ctx.getAsConstantArrayType (Arg0Ty)) {
531
- const APSInt ConstArrSize = APSInt (ConstArrTy->getSize ());
530
+ const llvm:: APSInt ConstArrSize = llvm:: APSInt (ConstArrTy->getSize ());
532
531
533
532
// Check form 4:
534
- return Arg1CV && APSInt::compareValues (ConstArrSize, *Arg1CV) == 0 ;
533
+ return Arg1CV && llvm:: APSInt::compareValues (ConstArrSize, *Arg1CV) == 0 ;
535
534
}
536
535
// Check form 6:
537
536
if (auto CCast = dyn_cast<CStyleCastExpr>(Arg0)) {
@@ -1099,9 +1098,10 @@ static bool hasUnsafeSnprintfBuffer(const CallExpr &Node,
1099
1098
// explicit cast will be needed, which will make this check unreachable.
1100
1099
// Therefore, the array extent is same as its' bytewise size.
1101
1100
if (Size->EvaluateAsInt (ER, Ctx)) {
1102
- APSInt EVal = ER.Val .getInt (); // Size must have integer type
1101
+ llvm:: APSInt EVal = ER.Val .getInt (); // Size must have integer type
1103
1102
1104
- return APSInt::compareValues (EVal, APSInt (CAT->getSize (), true )) != 0 ;
1103
+ return llvm::APSInt::compareValues (
1104
+ EVal, llvm::APSInt (CAT->getSize (), true )) != 0 ;
1105
1105
}
1106
1106
}
1107
1107
}
@@ -2148,8 +2148,8 @@ namespace {
2148
2148
// declarations to its uses and make sure we've covered all uses with our
2149
2149
// analysis before we try to fix the declaration.
2150
2150
class DeclUseTracker {
2151
- using UseSetTy = SmallSet<const DeclRefExpr *, 16 >;
2152
- using DefMapTy = DenseMap<const VarDecl *, const DeclStmt *>;
2151
+ using UseSetTy = llvm:: SmallSet<const DeclRefExpr *, 16 >;
2152
+ using DefMapTy = llvm:: DenseMap<const VarDecl *, const DeclStmt *>;
2153
2153
2154
2154
// Allocate on the heap for easier move.
2155
2155
std::unique_ptr<UseSetTy> Uses{std::make_unique<UseSetTy>()};
@@ -3640,7 +3640,7 @@ static FixItList fixVarDeclWithArray(const VarDecl *D, const ASTContext &Ctx,
3640
3640
}
3641
3641
3642
3642
SmallString<32 > Replacement;
3643
- raw_svector_ostream OS (Replacement);
3643
+ llvm:: raw_svector_ostream OS (Replacement);
3644
3644
OS << " std::array<" << ElemTypeTxt << " , " << ArraySizeTxt << " > "
3645
3645
<< IdentText->str ();
3646
3646
@@ -4064,7 +4064,8 @@ static void applyGadgets(const Decl *D, FixableGadgetList FixableGadgets,
4064
4064
#endif
4065
4065
4066
4066
// Fixpoint iteration for pointer assignments
4067
- using DepMapTy = DenseMap<const VarDecl *, llvm::SetVector<const VarDecl *>>;
4067
+ using DepMapTy =
4068
+ llvm::DenseMap<const VarDecl *, llvm::SetVector<const VarDecl *>>;
4068
4069
DepMapTy DependenciesMap{};
4069
4070
DepMapTy PtrAssignmentGraph{};
4070
4071
0 commit comments