Annotate LookupResult::clear() as LLVM_ATTRIBUTE_REINITIALIZES to silence bugprone-use-after-move after rC342925

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D52446

llvm-svn: 342950
This commit is contained in:
Fangrui Song 2018-09-25 08:07:42 +00:00
parent 037720ba4f
commit b5305be699
1 changed files with 1 additions and 1 deletions

View File

@ -540,7 +540,7 @@ public:
}
/// Clears out any current state.
void clear() {
LLVM_ATTRIBUTE_REINITIALIZES void clear() {
ResultKind = NotFound;
Decls.clear();
if (Paths) deletePaths(Paths);