1 //= ObjCNoReturn.h - Handling of Cocoa APIs known not to return --*- C++ -*---//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements special handling of recognizing ObjC API hooks that
11 // do not return but aren't marked as such in API headers.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CLANG_ANALYSIS_DS_OBJCNORETURN
16 #define LLVM_CLANG_ANALYSIS_DS_OBJCNORETURN
18 #include "clang/Basic/IdentifierTable.h"
23 class ObjCMessageExpr;
26 /// Cached "raise" selector.
29 /// Cached identifier for "NSException".
30 IdentifierInfo *NSExceptionII;
32 enum { NUM_RAISE_SELECTORS = 2 };
34 /// Cached set of selectors in NSException that are 'noreturn'.
35 Selector NSExceptionInstanceRaiseSelectors[NUM_RAISE_SELECTORS];
38 ObjCNoReturn(ASTContext &C);
40 /// Return true if the given message expression is known to never
42 bool isImplicitNoReturn(const ObjCMessageExpr *ME);