r240199 - Suppress bogus gcc -Wreturn-type warnings.

Nico Weber nicolasweber at gmx.de
Fri Jun 19 17:06:30 PDT 2015


Author: nico
Date: Fri Jun 19 19:06:30 2015
New Revision: 240199

URL: http://llvm.org/viewvc/llvm-project?rev=240199&view=rev
Log:
Suppress bogus gcc -Wreturn-type warnings.

Modified:
    cfe/trunk/include/clang/AST/Type.h
    cfe/trunk/lib/AST/Type.cpp
    cfe/trunk/lib/Basic/IdentifierTable.cpp
    cfe/trunk/lib/Sema/SemaType.cpp

Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=240199&r1=240198&r2=240199&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Fri Jun 19 19:06:30 2015
@@ -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

Modified: cfe/trunk/lib/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=240199&r1=240198&r2=240199&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Fri Jun 19 19:06:30 2015
@@ -2466,6 +2466,7 @@ bool Type::canHaveNullability() const {
   case Type::Atomic:
     return false;
   }
+  llvm_unreachable("bad type kind!");
 }
 
 llvm::Optional<NullabilityKind> AttributedType::getImmediateNullability() const {

Modified: cfe/trunk/lib/Basic/IdentifierTable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/IdentifierTable.cpp?rev=240199&r1=240198&r2=240199&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/IdentifierTable.cpp (original)
+++ cfe/trunk/lib/Basic/IdentifierTable.cpp Fri Jun 19 19:06:30 2015
@@ -658,4 +658,5 @@ StringRef clang::getNullabilitySpelling(
   case NullabilityKind::Unspecified:
     return "__null_unspecified";
   }
+  llvm_unreachable("Unknown nullability kind.");
 }

Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=240199&r1=240198&r2=240199&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Fri Jun 19 19:06:30 2015
@@ -2581,6 +2581,7 @@ IdentifierInfo *Sema::getNullabilityKeyw
       Ident___null_unspecified = PP.getIdentifierInfo("__null_unspecified");
     return Ident___null_unspecified;
   }
+  llvm_unreachable("Unknown nullability kind.");
 }
 
 /// Retrieve the identifier "NSError".





More information about the cfe-commits mailing list