Suppress bogus gcc -Wreturn-type warnings.
authorNico Weber <nicolasweber@gmx.de>
Sat, 20 Jun 2015 00:06:30 +0000 (00:06 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sat, 20 Jun 2015 00:06:30 +0000 (00:06 +0000)
llvm-svn: 240199

clang/include/clang/AST/Type.h
clang/lib/AST/Type.cpp
clang/lib/Basic/IdentifierTable.cpp
clang/lib/Sema/SemaType.cpp

index d821258..d903b9d 100644 (file)
@@ -3544,6 +3544,7 @@ public:
     case NullabilityKind::Unspecified:
       return attr_null_unspecified;
     }
+    llvm_unreachable("Unknown nullability kind.");
   }
 
   /// Strip off the top-level nullability annotation on the given
index 15f3d39..3ac1171 100644 (file)
@@ -2466,6 +2466,7 @@ bool Type::canHaveNullability() const {
   case Type::Atomic:
     return false;
   }
+  llvm_unreachable("bad type kind!");
 }
 
 llvm::Optional<NullabilityKind> AttributedType::getImmediateNullability() const {
index 0349ef4..b295008 100644 (file)
@@ -658,4 +658,5 @@ StringRef clang::getNullabilitySpelling(NullabilityKind kind) {
   case NullabilityKind::Unspecified:
     return "__null_unspecified";
   }
+  llvm_unreachable("Unknown nullability kind.");
 }
index 44c9257..ff0e26c 100644 (file)
@@ -2581,6 +2581,7 @@ IdentifierInfo *Sema::getNullabilityKeyword(NullabilityKind nullability) {
       Ident___null_unspecified = PP.getIdentifierInfo("__null_unspecified");
     return Ident___null_unspecified;
   }
+  llvm_unreachable("Unknown nullability kind.");
 }
 
 /// Retrieve the identifier "NSError".