[clang] a5af260 - Silence warning with MSVC compiler.

Alexandre Ganea via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 6 13:51:59 PST 2022


Author: Alexandre Ganea
Date: 2022-01-06T16:51:37-05:00
New Revision: a5af260d3e8b00a3353e813b73f83391edbef493

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

LOG: Silence warning with MSVC compiler.

D:\git\llvm-project\clang\unittests\Analysis\FlowSensitive\MultiVarConstantPropagationTest.cpp(104) : warning C4715: 'clang::dataflow::`anonymous namespace'::operator<<': not all control paths return a value

Added: 
    

Modified: 
    clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp b/clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp
index c5b792a64d557..d5275b10e946e 100644
--- a/clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp
+++ b/clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp
@@ -101,6 +101,7 @@ std::ostream &operator<<(std::ostream &OS, const ValueLattice &L) {
   case ValueLattice::ValueState::Defined:
     return OS << "Any";
   }
+  llvm_unreachable("unknown ValueState!");
 }
 
 using ConstantPropagationLattice = VarMapLattice<ValueLattice>;


        


More information about the cfe-commits mailing list