diff options
-rw-r--r-- | clang/include/clang/AST/DeclarationName.h | 9 | ||||
-rw-r--r-- | clang/lib/AST/DeclarationName.cpp | 1 |
2 files changed, 4 insertions, 6 deletions
diff --git a/clang/include/clang/AST/DeclarationName.h b/clang/include/clang/AST/DeclarationName.h index 77e5024e370..d1cd4ebc958 100644 --- a/clang/include/clang/AST/DeclarationName.h +++ b/clang/include/clang/AST/DeclarationName.h @@ -104,16 +104,14 @@ private: if (getNameKind() >= CXXConstructorName && getNameKind() <= CXXConversionFunctionName) return reinterpret_cast<CXXSpecialName *>(Ptr & ~PtrMask); - else - return 0; + return 0; } /// getAsCXXOperatorIdName CXXOperatorIdName *getAsCXXOperatorIdName() const { if (getNameKind() == CXXOperatorName) return reinterpret_cast<CXXOperatorIdName *>(Ptr & ~PtrMask); - else - return 0; + return 0; } // Construct a declaration name from the name of a C++ constructor, @@ -177,8 +175,7 @@ public: IdentifierInfo *getAsIdentifierInfo() const { if (getNameKind() == Identifier) return reinterpret_cast<IdentifierInfo *>(Ptr); - else - return 0; + return 0; } /// getAsOpaqueInteger - Get the representation of this declaration diff --git a/clang/lib/AST/DeclarationName.cpp b/clang/lib/AST/DeclarationName.cpp index 3815a08a652..e2ed8925951 100644 --- a/clang/lib/AST/DeclarationName.cpp +++ b/clang/lib/AST/DeclarationName.cpp @@ -113,6 +113,7 @@ DeclarationName::NameKind DeclarationName::getNameKind() const { } // Can't actually get here. + assert(0 && "This should be unreachable!"); return Identifier; } |