]> granicus.if.org Git - clang/commitdiff
Annotate LookupResult::clear() as LLVM_ATTRIBUTE_REINITIALIZES to silence bugprone...
authorFangrui Song <maskray@google.com>
Tue, 25 Sep 2018 08:07:42 +0000 (08:07 +0000)
committerFangrui Song <maskray@google.com>
Tue, 25 Sep 2018 08:07:42 +0000 (08:07 +0000)
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

include/clang/Sema/Lookup.h

index e28b847f4ae5ace75770dc1b7abddc01c3760e53..faf2343d39cf8cf920e198a8783db9e9dcc90ee3 100644 (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);