Browse Source

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342950 91177308-0d34-0410-b5e6-96231b3b80d8
Fangrui Song 7 năm trước cách đây
mục cha
commit
35fee8ed33
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      include/clang/Sema/Lookup.h

+ 1 - 1
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);