forked from OSchip/llvm-project
Addressing Doug's suggestions:
-Added comment for FunctionDecl::EndRangeLoc -Removed a redundant check from FunctionDecl::setBody llvm-svn: 73886
This commit is contained in:
parent
246219bc9f
commit
49abd4d95b
|
@ -647,6 +647,13 @@ private:
|
|||
// Move to DeclGroup when it is implemented.
|
||||
SourceLocation TypeSpecStartLoc;
|
||||
|
||||
/// \brief End part of this FunctionDecl's source range.
|
||||
///
|
||||
/// We could compute the full range in getSourceRange(). However, when we're
|
||||
/// dealing with a function definition deserialized from a PCH/AST file,
|
||||
/// we can only compute the full range once the function body has been
|
||||
/// de-serialized, so it's far better to have the (sometimes-redundant)
|
||||
/// EndRangeLoc.
|
||||
SourceLocation EndRangeLoc;
|
||||
|
||||
/// \brief The template or declaration that this declaration
|
||||
|
|
|
@ -379,7 +379,7 @@ Stmt *FunctionDecl::getBodyIfAvailable() const {
|
|||
|
||||
void FunctionDecl::setBody(Stmt *B) {
|
||||
Body = B;
|
||||
if (B && EndRangeLoc < B->getLocEnd())
|
||||
if (B)
|
||||
EndRangeLoc = B->getLocEnd();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue