From 3f7c1b1aab8c9deb0ecf527c2a4089bfd68bada1 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 21 Jun 2013 01:29:36 +0000 Subject: [PATCH] Add an assert() suggested by Richard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184516 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/ASTContext.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index f91182b9bd..70c933e752 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -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(*this), TTK_Struct, -- 2.50.1