Disambiguate clang::StringLiteral
...vs. recently introduced llvm::StringLiteral (llvm/ADT/StringRef.h) Change-Id: I4d74546b0d1401a74b0c15368bbc93794ecd0b1d
This commit is contained in:
@@ -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 != nullptr) {
|
||||||
if (!lit->isAscii()) {
|
if (!lit->isAscii()) {
|
||||||
return false;
|
return false;
|
||||||
|
@@ -133,7 +133,7 @@ void LiteralToBoolConversion::handleImplicitCastSubExpr(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isa<StringLiteral>(subExpr)) {
|
if (isa<clang::StringLiteral>(subExpr)) {
|
||||||
SourceLocation loc { subExpr->getLocStart() };
|
SourceLocation loc { subExpr->getLocStart() };
|
||||||
if (compiler.getSourceManager().isMacroArgExpansion(loc)
|
if (compiler.getSourceManager().isMacroArgExpansion(loc)
|
||||||
&& (Lexer::getImmediateMacroName(
|
&& (Lexer::getImmediateMacroName(
|
||||||
@@ -145,7 +145,7 @@ void LiteralToBoolConversion::handleImplicitCastSubExpr(
|
|||||||
}
|
}
|
||||||
if (isa<IntegerLiteral>(subExpr) || isa<CharacterLiteral>(subExpr)
|
if (isa<IntegerLiteral>(subExpr) || isa<CharacterLiteral>(subExpr)
|
||||||
|| isa<FloatingLiteral>(subExpr) || isa<ImaginaryLiteral>(subExpr)
|
|| isa<FloatingLiteral>(subExpr) || isa<ImaginaryLiteral>(subExpr)
|
||||||
|| isa<StringLiteral>(subExpr))
|
|| isa<clang::StringLiteral>(subExpr))
|
||||||
{
|
{
|
||||||
bool bRewritten = false;
|
bool bRewritten = false;
|
||||||
if (rewriter != nullptr) {
|
if (rewriter != nullptr) {
|
||||||
|
@@ -64,9 +64,9 @@ bool SalLogAreas::VisitCallExpr( const CallExpr* call )
|
|||||||
if( expansionLocation == lastSalDetailLogStreamMacro )
|
if( expansionLocation == lastSalDetailLogStreamMacro )
|
||||||
return true;
|
return true;
|
||||||
lastSalDetailLogStreamMacro = expansionLocation;
|
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());
|
checkArea( area->getBytes(), area->getExprLoc());
|
||||||
else
|
else
|
||||||
report( DiagnosticsEngine::Warning, "unsupported string literal kind (plugin needs fixing?)",
|
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) {
|
bool isStringLiteral(Expr const * expr) {
|
||||||
return isa<StringLiteral>(stripCtor(expr));
|
return isa<clang::StringLiteral>(stripCtor(expr));
|
||||||
}
|
}
|
||||||
|
|
||||||
class StringConcat:
|
class StringConcat:
|
||||||
|
@@ -960,7 +960,7 @@ bool StringConstant::isStringConstant(
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
StringLiteral const * lit = dyn_cast<StringLiteral>(expr);
|
clang::StringLiteral const * lit = dyn_cast<clang::StringLiteral>(expr);
|
||||||
if (lit != nullptr) {
|
if (lit != nullptr) {
|
||||||
if (!lit->isAscii()) {
|
if (!lit->isAscii()) {
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user