Author: David Blaikie
Date: 2021-07-21T17:12:22-07:00
New Revision: a46c63c878a9e82ac2646926bb3d8237293ad15d

URL: 
https://github.com/llvm/llvm-project/commit/a46c63c878a9e82ac2646926bb3d8237293ad15d
DIFF: 
https://github.com/llvm/llvm-project/commit/a46c63c878a9e82ac2646926bb3d8237293ad15d.diff

LOG: Fix assigned-but-unused (except in an assert) warning with a void cast

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp

Removed: 
    


################################################################################
diff  --git 
a/clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp 
b/clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp
index 9e3f0883ccd9a..f58cc06987fe8 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp
@@ -192,6 +192,7 @@ void OwningMemoryCheck::check(const 
MatchFinder::MatchResult &Result) {
   CheckExecuted |= handleReturnValues(Nodes);
   CheckExecuted |= handleOwnerMembers(Nodes);
 
+  (void)CheckExecuted;
   assert(CheckExecuted &&
          "None of the subroutines executed, logic error in matcher!");
 }


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to