[clang] 1a323c8 - [analyzer] Fix a warning
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 16 09:12:38 PST 2021
Author: Kazu Hirata
Date: 2021-02-16T09:12:07-08:00
New Revision: 1a323c8a96afc53ef965a4268cd419cfde2f1890
URL: https://github.com/llvm/llvm-project/commit/1a323c8a96afc53ef965a4268cd419cfde2f1890
DIFF: https://github.com/llvm/llvm-project/commit/1a323c8a96afc53ef965a4268cd419cfde2f1890.diff
LOG: [analyzer] Fix a warning
This patch fixes a warning from -Wcovered-switch-default. The switch
statement in question handles all the enum values.
Added:
Modified:
clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
Removed:
################################################################################
diff --git a/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp b/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
index 4b146d83c194..a47a28e1e866 100644
--- a/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
+++ b/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
@@ -560,9 +560,9 @@ SVal SValBuilder::evalCast(SVal V, QualType CastTy, QualType OriginalTy) {
return evalCastKind(V.castAs<Loc>(), CastTy, OriginalTy);
case SVal::NonLocKind:
return evalCastKind(V.castAs<NonLoc>(), CastTy, OriginalTy);
- default:
- llvm_unreachable("Unknown SVal kind");
}
+
+ llvm_unreachable("Unknown SVal kind");
}
SVal SValBuilder::evalCastKind(UndefinedVal V, QualType CastTy,
More information about the cfe-commits
mailing list