From 3f284c0927e23b3d2327cde09fab19e5b79660ef Mon Sep 17 00:00:00 2001 From: Chris Kitching Date: Sun, 15 Oct 2017 10:16:39 +0100 Subject: [PATCH] Refer to clang::StringLiteral explicitly Newer versions of llvm/clang mean there is both an llvm::StringLiteral and a clang::StringLiteral. Since we're dumping both namespaces wholesale into the global namespace with `using` declarations, this creates a name collision, which must be resolved. This change is backwards-compatible, and fixes a problem you encounter when using newer versions of the llvm/clang API. [ROCm/clr commit: 73984ed8094db75070a37c7120cf7c4cc8b57081] --- projects/clr/hipamd/hipify-clang/src/Cuda2Hip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/hipify-clang/src/Cuda2Hip.cpp b/projects/clr/hipamd/hipify-clang/src/Cuda2Hip.cpp index 5e03e9732d..cf11dc9546 100644 --- a/projects/clr/hipamd/hipify-clang/src/Cuda2Hip.cpp +++ b/projects/clr/hipamd/hipify-clang/src/Cuda2Hip.cpp @@ -3799,7 +3799,7 @@ private: } bool stringLiteral(const MatchFinder::MatchResult &Result) { - if (const StringLiteral *sLiteral = Result.Nodes.getNodeAs("stringLiteral")) { + if (const clang::StringLiteral *sLiteral = Result.Nodes.getNodeAs("stringLiteral")) { if (sLiteral->getCharByteWidth() == 1) { StringRef s = sLiteral->getString(); SourceManager *SM = Result.SourceManager;