diff options
author | David Blaikie <dblaikie@gmail.com> | 2011-09-23 05:06:16 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2011-09-23 05:06:16 +0000 |
commit | b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 (patch) | |
tree | 2b708dc00bedcc6a6204d29c915ac7fce8fb028f /lib/Sema/SemaTemplate.cpp | |
parent | c535d9730e11ca335790359bfbd4600be71c5410 (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/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 43fdcb6d4a..4f90a72ea2 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -2323,7 +2323,8 @@ TemplateNameKind Sema::ActOnDependentTemplateName(Scope *S, return TNK_Dependent_template_name; case UnqualifiedId::IK_LiteralOperatorId: - assert(false && "We don't support these; Parse shouldn't have allowed propagation"); + llvm_unreachable( + "We don't support these; Parse shouldn't have allowed propagation"); default: break; @@ -2681,7 +2682,7 @@ bool Sema::CheckTemplateArgument(NamedDecl *Param, switch (Arg.getArgument().getKind()) { case TemplateArgument::Null: - assert(false && "Should never see a NULL template argument here"); + llvm_unreachable("Should never see a NULL template argument here"); return true; case TemplateArgument::Expression: { @@ -2804,7 +2805,7 @@ bool Sema::CheckTemplateArgument(NamedDecl *Param, switch (Arg.getArgument().getKind()) { case TemplateArgument::Null: - assert(false && "Should never see a NULL template argument here"); + llvm_unreachable("Should never see a NULL template argument here"); return true; case TemplateArgument::Template: @@ -5216,7 +5217,7 @@ Sema::CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, switch (NewTSK) { case TSK_Undeclared: case TSK_ImplicitInstantiation: - assert(false && "Don't check implicit instantiations here"); + llvm_unreachable("Don't check implicit instantiations here"); return false; case TSK_ExplicitSpecialization: @@ -5349,7 +5350,7 @@ Sema::CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, break; } - assert(false && "Missing specialization/instantiation case?"); + llvm_unreachable("Missing specialization/instantiation case?"); return false; } |