Can you include a test?
On 29 April 2013 14:53, Bernal, Ariel J <[email protected]> wrote: > This patch fixes PR15827, add override options was not checking if the > method declaration was in the main file. > > > > > > > > diff --git a/cpp11-migrate/AddOverride/AddOverrideActions.cpp > b/cpp11-migrate/AddOverride/AddOverrideActions.cpp > > index a40f673..3d1f1ff 100644 > > --- a/cpp11-migrate/AddOverride/AddOverrideActions.cpp > > +++ b/cpp11-migrate/AddOverride/AddOverrideActions.cpp > > @@ -30,10 +30,14 @@ void AddOverrideFixer::run(const > MatchFinder::MatchResult &Result) { > > SourceManager &SM = *Result.SourceManager; > > const CXXMethodDecl *M = Result.Nodes.getDeclAs<CXXMethodDecl>(MethodId); > > assert(M && "Bad Callback. No node provided"); > > + // Check that the method declaration in the main file > > + if (!SM.isFromMainFile(M->getLocStart())) > > + return; > > + > > // First check that there isn't already an override attribute. > > if (!M->hasAttr<OverrideAttr>()) { > > if (M->getLocStart().isFileID()) { > > SourceLocation StartLoc; > > if (M->hasInlineBody()) { > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits > _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
