Skip to content

Commit fec25a5

Browse files
authored
Merge pull request #11868 from dcci/constqual
[AST/Unittest] Don't swallow a const qualifier.
2 parents 864456c + e30b1f5 commit fec25a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

unittests/AST/SourceLocTests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ namespace swift {
2323
void PrintTo(SourceLoc loc, std::ostream *os) {
2424
*os << loc.getOpaquePointerValue();
2525
if (loc.isValid())
26-
*os << " '" << *(char *)loc.getOpaquePointerValue() << "'";
26+
*os << " '" << *static_cast<const char *>(loc.getOpaquePointerValue())
27+
<< "'";
2728
}
2829

2930
void PrintTo(SourceRange range, std::ostream *os) {

0 commit comments

Comments
 (0)