Kaydet (Commit) 83ff2a4f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:stringconstant: Adapt to definition of OSL_THIS_FUNC on Windows

Change-Id: I93a23799ad9a76ed9f4f86d69adb610d0962da20
üst 9ed9ca61
......@@ -687,6 +687,17 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
{
return true;
}
// OSL_THIS_FUNC may be defined as "" or as something other
// than a string literal in include/osl/diagnose.h:
auto loc = arg->getLocStart();
if (compiler.getSourceManager().isMacroBodyExpansion(loc)
&& (Lexer::getImmediateMacroName(
loc, compiler.getSourceManager(),
compiler.getLangOpts())
== "OSL_THIS_FUNC"))
{
return true;
}
if (non) {
report(
DiagnosticsEngine::Warning,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment