[clang] cec30e2 - [dataflow] Fix complie on gcc7 part 2

Donát Nagy via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 30 07:32:15 PDT 2023


Author: Donát Nagy
Date: 2023-06-30T16:27:36+02:00
New Revision: cec30e2b190bd58a26f54b5fd4232d3828632466

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

LOG: [dataflow] Fix complie on gcc7 part 2

Change c2bb68078eb9 triggered a bug in gcc7 by disabling a copy
constructor. Commit 2f7d30dee826 fixed one occurrence of this issue, but
after that the compilation still failed with another very similar error.

This commit eliminates this second compilation error, and ensures that
`ninja check-clang-analysis` can be successfully executed with gcc 7.5.

Added: 
    

Modified: 
    clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h b/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
index c6e9f848477f8a..33eb42897b8a1a 100644
--- a/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
+++ b/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
@@ -235,7 +235,7 @@ runDataflowAnalysis(
                   std::move(State.Env)};
             });
       });
-  return BlockStates;
+  return std::move(BlockStates);
 }
 
 /// Abstract base class for dataflow "models": reusable analysis components that


        


More information about the cfe-commits mailing list