summaryrefslogtreecommitdiff
blob: 4556f257bf3b3a1be58625f93a99fc70dc40b96e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 25aa102cc49def9573ffbed88155589cd60a2e8f Mon Sep 17 00:00:00 2001
From: Egor Gabov <egor.gabov@waveaccess.ru>
Date: Fri, 5 Jun 2020 16:52:53 +0300
Subject: [PATCH] updated for compatibility with LLVM 10 (clazy-standalone)

In LLVM 10 llvm::StringRef operator std::string() is marked as explicit.
In this commit all implicit conversion from llvm::StringRef to
std::string are changed by explicit.
---
 src/checks/manuallevel/jnisignatures.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/checks/manuallevel/jnisignatures.cpp b/src/checks/manuallevel/jnisignatures.cpp
index 81e61d4..5d4fe20 100644
--- a/src/checks/manuallevel/jnisignatures.cpp
+++ b/src/checks/manuallevel/jnisignatures.cpp
@@ -103,7 +103,7 @@ void JniSignatures::checkFunctionCall(Stmt *stm)
         return;
     }
 
-    const std::string name = clazy::name(funDecl);
+    const std::string name = static_cast<std::string>(clazy::name(funDecl));
 
     if (name == "callObjectMethod" || name == "callMethod") {
         checkArgAt(callExpr, 0, methodNameRegex, "Invalid method name");
-- 
GitLab