return true;
}
bool VisitVarDecl(VarDecl *VD) {
+ // Ignore the parameter decl itself (its children were handled elsewhere),
+ // as they don't contribute to the main-file #include.
+ if (llvm::isa<ParmVarDecl>(VD))
+ return true;
// Mark declaration from definition as it needs type-checking.
if (VD->isThisDeclarationADefinition())
report(VD->getLocation(), VD);
#include "header.h"
#include "private.h"
- void $bar^bar($private^Private $p^p) {
+ // No reference reported for the Parameter "p".
+ void $bar^bar($private^Private p) {
$foo^foo();
std::$vector^vector $vconstructor^$v^v;
$builtin^__builtin_popcount(1);
offsetToProviders(AST, SM),
UnorderedElementsAre(
Pair(Code.point("bar"), UnorderedElementsAre(MainFile)),
- Pair(Code.point("p"), UnorderedElementsAre(MainFile)),
Pair(Code.point("private"),
UnorderedElementsAre(PublicFile, PrivateFile)),
Pair(Code.point("foo"), UnorderedElementsAre(HeaderFile)),