Skip to content

Commit

Permalink
[IncludeCleaner][NFC] Dont rely on implicit conversion of StringRef
Browse files Browse the repository at this point in the history
Fixes #61221
  • Loading branch information
kadircet committed Mar 14, 2023
1 parent ffcd6ca commit 9b5a934
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions clang-tools-extra/include-cleaner/unittests/LocateSymbolTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,11 @@
#include "clang/Testing/TestAST.h"
#include "clang/Tooling/Inclusions/StandardLibrary.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include "llvm/Testing/Annotations/Annotations.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <cstddef>
#include <memory>
#include <tuple>
#include <unordered_map>
#include <utility>
#include <variant>
#include <vector>

namespace clang::include_cleaner {
Expand Down Expand Up @@ -66,8 +62,8 @@ struct LocateExample {
ND = TD;
if (ND->getName() == NameToFind) {
EXPECT_TRUE(Out == nullptr || Out == ND->getCanonicalDecl())
<< "Found multiple matches for " << NameToFind;
Out = cast<NamedDecl>(ND->getCanonicalDecl());
<< "Found multiple matches for " << NameToFind.str();
Out = llvm::cast<NamedDecl>(ND->getCanonicalDecl());
}
return true;
}
Expand Down

0 comments on commit 9b5a934

Please sign in to comment.