[PATCH] D52446: Annotate LookupResult::clear() as LLVM_ATTRIBUTE_REINITIALIZES to silence bugprone-use-after-move after rC342925
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 24 22:11:07 PDT 2018
MaskRay updated this revision to Diff 166805.
MaskRay added a comment.
Depends on https://reviews.llvm.org/D52451 (adding LLVM_ATTRIBUTE_REINITIALIZES)
Repository:
rC Clang
https://reviews.llvm.org/D52446
Files:
include/clang/Sema/Lookup.h
Index: include/clang/Sema/Lookup.h
===================================================================
--- include/clang/Sema/Lookup.h
+++ include/clang/Sema/Lookup.h
@@ -540,7 +540,7 @@
}
/// Clears out any current state.
- void clear() {
+ LLVM_ATTRIBUTE_REINITIALIZES void clear() {
ResultKind = NotFound;
Decls.clear();
if (Paths) deletePaths(Paths);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52446.166805.patch
Type: text/x-patch
Size: 380 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180925/4ff01bee/attachment.bin>
More information about the cfe-commits
mailing list