loplugin:externvar (clang-cl)
Change-Id: I638199f1455bead71f0a03f15e4b6f418a0cd0e2
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "check.hxx"
|
||||
#include "compat.hxx"
|
||||
#include "plugin.hxx"
|
||||
|
||||
// Find variable declarations at namespace scope that need not have external
|
||||
@@ -72,6 +73,14 @@ public:
|
||||
// not needed and will not be emitted"
|
||||
return true;
|
||||
}
|
||||
SourceLocation argLoc;
|
||||
if (compat::isMacroArgExpansion(compiler, def->getLocation(), &argLoc)
|
||||
&& (Lexer::getImmediateMacroName(
|
||||
argLoc, compiler.getSourceManager(), compiler.getLangOpts())
|
||||
== "DEFINE_GUID"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
report(
|
||||
DiagnosticsEngine::Warning,
|
||||
"variable with external linkage not declared in an include file",
|
||||
|
Reference in New Issue
Block a user