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.
Este commit está contenido en:
Chris Kitching
2017-10-15 10:16:39 +01:00
padre 3a2fe40f78
commit 2975d00edc
+1 -1
Ver fichero
@@ -3799,7 +3799,7 @@ private:
}
bool stringLiteral(const MatchFinder::MatchResult &Result) {
if (const StringLiteral *sLiteral = Result.Nodes.getNodeAs<StringLiteral>("stringLiteral")) {
if (const clang::StringLiteral *sLiteral = Result.Nodes.getNodeAs<clang::StringLiteral>("stringLiteral")) {
if (sLiteral->getCharByteWidth() == 1) {
StringRef s = sLiteral->getString();
SourceManager *SM = Result.SourceManager;