Disambiguate clang::StringLiteral
...vs. recently introduced llvm::StringLiteral (llvm/ADT/StringRef.h) Change-Id: I4d74546b0d1401a74b0c15368bbc93794ecd0b1d
This commit is contained in:
parent
c10e82ada2
commit
4e9dd6e1b7
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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?)",
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user