]> granicus.if.org Git - clang/commitdiff
Add an assert() suggested by Richard.
authorNico Weber <nicolasweber@gmx.de>
Fri, 21 Jun 2013 01:29:36 +0000 (01:29 +0000)
committerNico Weber <nicolasweber@gmx.de>
Fri, 21 Jun 2013 01:29:36 +0000 (01:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184516 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTContext.cpp

index f91182b9bd5b63408c6d783f2396b19724d9457b..70c933e75215e9b96233e7c97c11a1c702a941b6 100644 (file)
@@ -858,6 +858,7 @@ TypedefDecl *ASTContext::getUInt128Decl() const {
 }
 
 TypeDecl *ASTContext::getFloat128StubType() const {
+  assert(LangOpts.CPlusPlus && "should only be called for c++");
   if (!Float128StubDecl) {
     Float128StubDecl = CXXRecordDecl::Create(const_cast<ASTContext &>(*this), 
                                              TTK_Struct,