This is an archive of the discontinued LLVM Phabricator instance.

[tooling] Fix missing inline keyworkd, breaking build bot.
ClosedPublic

Authored by etienneb on May 11 2016, 12:26 PM.

Diff Detail

Event Timeline

etienneb updated this revision to Diff 56949.May 11 2016, 12:26 PM
etienneb retitled this revision from to [tooling] Fix missing inline keyworkd, breaking build bot..
etienneb updated this object.
etienneb added a reviewer: rnk.
etienneb added a subscriber: cfe-commits.
rnk accepted this revision.May 11 2016, 12:43 PM
rnk edited edge metadata.

lgtm

I don't see how this could be causing the problem, but it's worth a try. They should be marked inline anyway.

This revision is now accepted and ready to land.May 11 2016, 12:43 PM
This revision was automatically updated to reflect the committed changes.
alexfh added a subscriber: alexfh.May 11 2016, 3:39 PM

inline seems to be completely redundant here. Can you try removing it and running whatever build configurations were failing without D20182?

I'm sure you're right: they are redundant keywords.
I'm preparing the revert patch, and I'm running tests over multiple build types.

rnk added a comment.May 11 2016, 4:51 PM

inline seems to be completely redundant here. Can you try removing it and running whatever build configurations were failing without D20182?

My bad, it's explicit function template specializations that need to be marked inline when in headers.

In D20180#427893, @rnk wrote:

inline seems to be completely redundant here. Can you try removing it and running whatever build configurations were failing without D20182?

My bad, it's explicit function template specializations that need to be marked inline when in headers.

Hmm, it's my bad! I tried it to solve broken bot.
I try it that way because it is implemented with "inline" in ASTMatcherInternal:

Example:

template <>
inline const Stmt *GetBodyMatcher<FunctionDecl>::get(const FunctionDecl &Node) {
  return Node.doesThisDeclarationHaveABody() ? Node.getBody() : nullptr;
}

But, it's "explicit template specialisation" in the above case.

Revert patch is ready: http://reviews.llvm.org/D20189

Still thanks Reid for helping finding the repro case.