Revert "Remove redundant check discovered in post-commit review of r209505."
This breaks with MSVC. With IsLateTemplateParsed, FunctionDecl::doesThisDeclarationHaveABody() returns true regardless of Body. This reinstates what was fixed in r208985. llvm-svn: 209896
This commit is contained in:
parent
86f60b7266
commit
a2332425c4
|
@ -96,8 +96,10 @@ void UseOverride::check(const MatchFinder::MatchResult &Result) {
|
|||
}
|
||||
}
|
||||
|
||||
if (InsertLoc.isInvalid() && Method->doesThisDeclarationHaveABody())
|
||||
if (InsertLoc.isInvalid() && Method->doesThisDeclarationHaveABody() &&
|
||||
Method->getBody()) {
|
||||
InsertLoc = Method->getBody()->getLocStart();
|
||||
}
|
||||
|
||||
if (!InsertLoc.isValid()) {
|
||||
if (Tokens.size() > 2 && GetText(Tokens.back(), Sources) == "0" &&
|
||||
|
|
Loading…
Reference in New Issue