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:
@@ -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;
|
||||
|
||||
Referencia en una nueva incidencia
Block a user