summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r--clang/lib/Analysis/CFG.cpp4
-rw-r--r--clang/lib/Analysis/FormatString.cpp4
-rw-r--r--clang/lib/Analysis/PrintfFormatString.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp
index 0775dcfb79e..0b2577dec45 100644
--- a/clang/lib/Analysis/CFG.cpp
+++ b/clang/lib/Analysis/CFG.cpp
@@ -3373,7 +3373,7 @@ public:
OS << " && ...";
return;
default:
- assert(false && "Invalid logical operator.");
+ llvm_unreachable("Invalid logical operator.");
}
}
@@ -3521,7 +3521,7 @@ static void print_block(raw_ostream &OS, const CFG* cfg,
OS << ")";
} else
- assert(false && "Invalid label statement in CFGBlock.");
+ llvm_unreachable("Invalid label statement in CFGBlock.");
OS << ":\n";
}
diff --git a/clang/lib/Analysis/FormatString.cpp b/clang/lib/Analysis/FormatString.cpp
index 3550a5415cb..3848c2c38f2 100644
--- a/clang/lib/Analysis/FormatString.cpp
+++ b/clang/lib/Analysis/FormatString.cpp
@@ -209,7 +209,7 @@ clang::analyze_format_string::ParseLengthModifier(FormatSpecifier &FS,
bool ArgTypeResult::matchesType(ASTContext &C, QualType argTy) const {
switch (K) {
case InvalidTy:
- assert(false && "ArgTypeResult must be valid");
+ llvm_unreachable("ArgTypeResult must be valid");
return true;
case UnknownTy:
@@ -312,7 +312,7 @@ bool ArgTypeResult::matchesType(ASTContext &C, QualType argTy) const {
QualType ArgTypeResult::getRepresentativeType(ASTContext &C) const {
switch (K) {
case InvalidTy:
- assert(false && "No representative type for Invalid ArgTypeResult");
+ llvm_unreachable("No representative type for Invalid ArgTypeResult");
// Fall-through.
case UnknownTy:
return QualType();
diff --git a/clang/lib/Analysis/PrintfFormatString.cpp b/clang/lib/Analysis/PrintfFormatString.cpp
index eb018f1eb5f..770cd37e9ce 100644
--- a/clang/lib/Analysis/PrintfFormatString.cpp
+++ b/clang/lib/Analysis/PrintfFormatString.cpp
@@ -461,7 +461,7 @@ bool PrintfSpecifier::fixType(QualType QT) {
HasAlternativeForm = 0;
HasPlusPrefix = 0;
} else {
- assert(0 && "Unexpected type");
+ llvm_unreachable("Unexpected type");
}
return true;
OpenPOWER on IntegriCloud