diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-12-14 15:52:33 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-12-14 15:52:33 +0100 |
commit | 4e9dd6e1b79983db087790a50c811b8b14b65f8f (patch) | |
tree | 35f722aefe659bf5ec8e2af849fefacca6218221 | |
parent | c10e82ada28a49a7d4d44e804f49949fcd3417fc (diff) |
Disambiguate clang::StringLiteral
...vs. recently introduced llvm::StringLiteral (llvm/ADT/StringRef.h)
Change-Id: I4d74546b0d1401a74b0c15368bbc93794ecd0b1d
-rw-r--r-- | compilerplugins/clang/getimplementationname.cxx | 2 | ||||
-rw-r--r-- | compilerplugins/clang/literaltoboolconversion.cxx | 4 | ||||
-rw-r--r-- | compilerplugins/clang/sallogareas.cxx | 4 | ||||
-rw-r--r-- | compilerplugins/clang/stringconcat.cxx | 2 | ||||
-rw-r--r-- | compilerplugins/clang/stringconstant.cxx | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/compilerplugins/clang/getimplementationname.cxx b/compilerplugins/clang/getimplementationname.cxx index 6b4c7348ede2..eac0bb5fd3fb 100644 --- a/compilerplugins/clang/getimplementationname.cxx +++ b/compilerplugins/clang/getimplementationname.cxx @@ -170,7 +170,7 @@ bool GetImplementationName::isStringConstant( } } } - StringLiteral const * lit = dyn_cast<StringLiteral>(expr); + clang::StringLiteral const * lit = dyn_cast<clang::StringLiteral>(expr); if (lit != nullptr) { if (!lit->isAscii()) { return false; diff --git a/compilerplugins/clang/literaltoboolconversion.cxx b/compilerplugins/clang/literaltoboolconversion.cxx index 973527d30af9..2a1c6f960b24 100644 --- a/compilerplugins/clang/literaltoboolconversion.cxx +++ b/compilerplugins/clang/literaltoboolconversion.cxx @@ -133,7 +133,7 @@ void LiteralToBoolConversion::handleImplicitCastSubExpr( } } } - if (isa<StringLiteral>(subExpr)) { + if (isa<clang::StringLiteral>(subExpr)) { SourceLocation loc { subExpr->getLocStart() }; if (compiler.getSourceManager().isMacroArgExpansion(loc) && (Lexer::getImmediateMacroName( @@ -145,7 +145,7 @@ void LiteralToBoolConversion::handleImplicitCastSubExpr( } if (isa<IntegerLiteral>(subExpr) || isa<CharacterLiteral>(subExpr) || isa<FloatingLiteral>(subExpr) || isa<ImaginaryLiteral>(subExpr) - || isa<StringLiteral>(subExpr)) + || isa<clang::StringLiteral>(subExpr)) { bool bRewritten = false; if (rewriter != nullptr) { diff --git a/compilerplugins/clang/sallogareas.cxx b/compilerplugins/clang/sallogareas.cxx index 512177d4cdb2..c170074bb4a1 100644 --- a/compilerplugins/clang/sallogareas.cxx +++ b/compilerplugins/clang/sallogareas.cxx @@ -64,9 +64,9 @@ bool SalLogAreas::VisitCallExpr( const CallExpr* call ) if( expansionLocation == lastSalDetailLogStreamMacro ) return true; lastSalDetailLogStreamMacro = expansionLocation; - if( const StringLiteral* area = dyn_cast< StringLiteral >( call->getArg( 1 )->IgnoreParenImpCasts())) + if( const clang::StringLiteral* area = dyn_cast< clang::StringLiteral >( call->getArg( 1 )->IgnoreParenImpCasts())) { - if( area->getKind() == StringLiteral::Ascii ) + if( area->getKind() == clang::StringLiteral::Ascii ) checkArea( area->getBytes(), area->getExprLoc()); else report( DiagnosticsEngine::Warning, "unsupported string literal kind (plugin needs fixing?)", diff --git a/compilerplugins/clang/stringconcat.cxx b/compilerplugins/clang/stringconcat.cxx index f58e8c41bae3..fe842f6162e7 100644 --- a/compilerplugins/clang/stringconcat.cxx +++ b/compilerplugins/clang/stringconcat.cxx @@ -37,7 +37,7 @@ Expr const * stripCtor(Expr const * expr) { } bool isStringLiteral(Expr const * expr) { - return isa<StringLiteral>(stripCtor(expr)); + return isa<clang::StringLiteral>(stripCtor(expr)); } class StringConcat: diff --git a/compilerplugins/clang/stringconstant.cxx b/compilerplugins/clang/stringconstant.cxx index 6a04092a0205..d67d41c3fdf1 100644 --- a/compilerplugins/clang/stringconstant.cxx +++ b/compilerplugins/clang/stringconstant.cxx @@ -960,7 +960,7 @@ bool StringConstant::isStringConstant( { return false; } - StringLiteral const * lit = dyn_cast<StringLiteral>(expr); + clang::StringLiteral const * lit = dyn_cast<clang::StringLiteral>(expr); if (lit != nullptr) { if (!lit->isAscii()) { return false; |