Skip to content

Commit b487226

Browse files
committed
Fix tests
1 parent 6d427d3 commit b487226

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

clang-tools-extra/clangd/unittests/HoverTests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2794,7 +2794,7 @@ TEST(Hover, All) {
27942794
})cpp",
27952795
[](HoverInfo &HI) {
27962796
HI.Name = "expression";
2797-
HI.Type = "__size_t (aka unsigned long)";
2797+
HI.Type = {"__size_t", "unsigned long"};
27982798
HI.Value = "1";
27992799
}},
28002800
{
@@ -2804,7 +2804,7 @@ TEST(Hover, All) {
28042804
})cpp",
28052805
[](HoverInfo &HI) {
28062806
HI.Name = "expression";
2807-
HI.Type = "__size_t (aka unsigned long)";
2807+
HI.Type = {"__size_t", "unsigned long"};
28082808
HI.Value = "1";
28092809
}},
28102810
{

clang/lib/AST/ASTContext.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14598,7 +14598,9 @@ static QualType getCommonSugarTypeNode(ASTContext &Ctx, const Type *X,
1459814598
DX->isCountInBytes(), DX->isOrNull(),
1459914599
CDX);
1460014600
}
14601-
case Type::PredefinedSugar:;
14601+
case Type::PredefinedSugar:
14602+
// FIXME: Should this be reachable here?
14603+
return QualType();
1460214604
}
1460314605
llvm_unreachable("Unhandled Type Class");
1460414606
}

clang/lib/CodeGen/CodeGenFunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ static bool matchesStlAllocatorFn(const Decl *D, const ASTContext &Ctx) {
722722
return false;
723723

724724
if (MD->parameters()[0]->getType().getCanonicalType() !=
725-
Ctx.getCanonicalSizeType())
725+
Ctx.getCanonicalSizeType())
726726
return false;
727727

728728
if (MD->getNumParams() == 2) {

clang/lib/Sema/TreeTransform.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7257,7 +7257,8 @@ QualType TreeTransform<Derived>::TransformPredefinedSugarType(
72577257
QualType Result = TL.getType();
72587258

72597259
if (getDerived().AlwaysRebuild()) {
7260-
Result = getDerived().RebuildPredefinedSugarType(llvm::to_underlying(EIT->getKind()));
7260+
Result = getDerived().RebuildPredefinedSugarType(
7261+
llvm::to_underlying(EIT->getKind()));
72617262
}
72627263

72637264
PredefinedSugarTypeLoc NewTL = TLB.push<PredefinedSugarTypeLoc>(Result);

0 commit comments

Comments
 (0)