From b5305be6994f294288b6318832eb67d6d5bc32c9 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 25 Sep 2018 08:07:42 +0000 Subject: [PATCH] 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 --- clang/include/clang/Sema/Lookup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/include/clang/Sema/Lookup.h b/clang/include/clang/Sema/Lookup.h index e28b847..faf2343 100644 --- a/clang/include/clang/Sema/Lookup.h +++ b/clang/include/clang/Sema/Lookup.h @@ -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); -- 2.7.4