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

llvm-svn: 342950

clang/include/clang/Sema/Lookup.h

index e28b847..faf2343 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);