Disambiguate clang::StringLiteral

...vs. recently introduced llvm::StringLiteral (llvm/ADT/StringRef.h)

Change-Id: I4d74546b0d1401a74b0c15368bbc93794ecd0b1d
This commit is contained in:
Stephan Bergmann 2016-12-14 15:52:33 +01:00
parent c10e82ada2
commit 4e9dd6e1b7
5 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -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?)",

View File

@ -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:

View File

@ -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;