diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-01-20 21:50:17 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-01-20 21:50:17 +0000 |
commit | 3026348bd4c13a0f83b59839f64065e0fcbea253 (patch) | |
tree | 03fea993d36918ffd37e05ee83d0db7370befc0c /lib/AST/NestedNameSpecifier.cpp | |
parent | 18932a0f2a94a7813ec461d1118c39ecf8aa936f (diff) |
More dead code removal (using -Wunreachable-code)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148577 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/NestedNameSpecifier.cpp')
-rw-r--r-- | lib/AST/NestedNameSpecifier.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/AST/NestedNameSpecifier.cpp b/lib/AST/NestedNameSpecifier.cpp index 858cf12dc6..c59d40a8c2 100644 --- a/lib/AST/NestedNameSpecifier.cpp +++ b/lib/AST/NestedNameSpecifier.cpp @@ -130,7 +130,7 @@ NestedNameSpecifier::SpecifierKind NestedNameSpecifier::getKind() const { return TypeSpecWithTemplate; } - return Global; + llvm_unreachable("Invalid NNS Kind!"); } /// \brief Retrieve the namespace stored in this nested name @@ -170,8 +170,7 @@ bool NestedNameSpecifier::isDependent() const { return getAsType()->isDependentType(); } - // Necessary to suppress a GCC warning. - return false; + llvm_unreachable("Invalid NNS Kind!"); } /// \brief Whether this nested name specifier refers to a dependent @@ -191,9 +190,8 @@ bool NestedNameSpecifier::isInstantiationDependent() const { case TypeSpecWithTemplate: return getAsType()->isInstantiationDependentType(); } - - // Necessary to suppress a GCC warning. - return false; + + llvm_unreachable("Invalid NNS Kind!"); } bool NestedNameSpecifier::containsUnexpandedParameterPack() const { @@ -211,8 +209,7 @@ bool NestedNameSpecifier::containsUnexpandedParameterPack() const { return getAsType()->containsUnexpandedParameterPack(); } - // Necessary to suppress a GCC warning. - return false; + llvm_unreachable("Invalid NNS Kind!"); } /// \brief Print this nested name specifier to the given output @@ -382,8 +379,8 @@ SourceRange NestedNameSpecifierLoc::getLocalSourceRange() const { LoadSourceLocation(Data, Offset + sizeof(void*))); } } - - return SourceRange(); + + llvm_unreachable("Invalid NNS Kind!"); } TypeLoc NestedNameSpecifierLoc::getTypeLoc() const { |