diff options
Diffstat (limited to 'include/clang/AST/Decl.h')
-rw-r--r-- | include/clang/AST/Decl.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 77b7bf6..f594db2 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -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 @@ -687,7 +694,6 @@ public: return SourceRange(getLocation(), EndRangeLoc); } void setLocEnd(SourceLocation E) { - assert(getLocation() <= E && "Invalid end location"); EndRangeLoc = E; } |