aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2011-09-23 05:06:16 +0000
committerDavid Blaikie <dblaikie@gmail.com>2011-09-23 05:06:16 +0000
commitb219cfc4d75f0a03630b7c4509ef791b7e97b2c8 (patch)
tree2b708dc00bedcc6a6204d29c915ac7fce8fb028f /lib/Analysis
parentc535d9730e11ca335790359bfbd4600be71c5410 (diff)
Switch assert(0/false) llvm_unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/CFG.cpp4
-rw-r--r--lib/Analysis/FormatString.cpp4
-rw-r--r--lib/Analysis/PrintfFormatString.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp
index 0775dcfb79..0b2577dec4 100644
--- a/lib/Analysis/CFG.cpp
+++ b/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/lib/Analysis/FormatString.cpp b/lib/Analysis/FormatString.cpp
index 3550a5415c..3848c2c38f 100644
--- a/lib/Analysis/FormatString.cpp
+++ b/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/lib/Analysis/PrintfFormatString.cpp b/lib/Analysis/PrintfFormatString.cpp
index eb018f1eb5..770cd37e9c 100644
--- a/lib/Analysis/PrintfFormatString.cpp
+++ b/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;