clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
clang::LangStandard Struct Reference

#include <LangStandard.h>

Collaboration diagram for clang::LangStandard:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Kind

Public Member Functions

const char * getName () const
 getName - Get the name of this standard.
const char * getDescription () const
 getDescription - Get the description of this standard.
bool hasBCPLComments () const
 hasBCPLComments - Language supports '//' comments.
bool isC89 () const
 isC89 - Language is a superset of C89.
bool isC99 () const
 isC99 - Language is a superset of C99.
bool isC11 () const
 isC11 - Language is a superset of C11.
bool isCPlusPlus () const
 isCPlusPlus - Language is a C++ variant.
bool isCPlusPlus0x () const
 isCPlusPlus0x - Language is a C++0x variant.
bool hasDigraphs () const
 hasDigraphs - Language supports digraphs.
bool isGNUMode () const
 isGNUMode - Language includes GNU extensions.
bool hasHexFloats () const
 hasHexFloats - Language supports hexadecimal float constants.
bool hasImplicitInt () const
 hasImplicitInt - Language allows variables to be typed as int implicitly.

Static Public Member Functions

static const LangStandardgetLangStandardForKind (Kind K)
static const LangStandardgetLangStandardForName (StringRef Name)

Public Attributes

const char * ShortName
const char * Description
unsigned Flags

Detailed Description

LangStandard - Information about the properties of a particular language standard.

Definition at line 37 of file LangStandard.h.


Member Enumeration Documentation

Definition at line 38 of file LangStandard.h.


Member Function Documentation

const char* clang::LangStandard::getDescription ( ) const [inline]

getDescription - Get the description of this standard.

Definition at line 54 of file LangStandard.h.

References Description.

const LangStandard & LangStandard::getLangStandardForKind ( Kind  K) [static]

LANGSTANDARD(IDENT, NAME, DESC, FEATURES)

Parameters:
IDENT- The name of the standard as a C++ identifier.
NAME- The name of the standard.
DESC- A short description of the standard.
FEATURES- The standard features as flags, these are enums from the clang::frontend namespace, which is assumed to be be available.

Definition at line 20 of file LangStandards.cpp.

Referenced by ParseLangArgs(), and clang::CompilerInvocation::setLangDefaults().

const LangStandard * LangStandard::getLangStandardForName ( StringRef  Name) [static]

LANGSTANDARD(IDENT, NAME, DESC, FEATURES)

Parameters:
IDENT- The name of the standard as a C++ identifier.
NAME- The name of the standard.
DESC- A short description of the standard.
FEATURES- The standard features as flags, these are enums from the clang::frontend namespace, which is assumed to be be available.

Definition at line 31 of file LangStandards.cpp.

References LANGSTANDARD.

const char* clang::LangStandard::getName ( ) const [inline]

getName - Get the name of this standard.

Definition at line 51 of file LangStandard.h.

References ShortName.

bool clang::LangStandard::hasBCPLComments ( ) const [inline]

hasBCPLComments - Language supports '//' comments.

Definition at line 57 of file LangStandard.h.

References clang::frontend::BCPLComment, and Flags.

Referenced by clang::CompilerInvocation::setLangDefaults().

bool clang::LangStandard::hasDigraphs ( ) const [inline]

hasDigraphs - Language supports digraphs.

Definition at line 75 of file LangStandard.h.

References clang::frontend::Digraphs, and Flags.

Referenced by clang::CompilerInvocation::setLangDefaults().

bool clang::LangStandard::hasHexFloats ( ) const [inline]

hasHexFloats - Language supports hexadecimal float constants.

Definition at line 81 of file LangStandard.h.

References Flags, and clang::frontend::HexFloat.

Referenced by clang::CompilerInvocation::setLangDefaults().

bool clang::LangStandard::hasImplicitInt ( ) const [inline]

hasImplicitInt - Language allows variables to be typed as int implicitly.

Definition at line 84 of file LangStandard.h.

References Flags, and clang::frontend::ImplicitInt.

Referenced by clang::CompilerInvocation::setLangDefaults().

bool clang::LangStandard::isC11 ( ) const [inline]

isC11 - Language is a superset of C11.

Definition at line 66 of file LangStandard.h.

References clang::frontend::C11, and Flags.

Referenced by clang::CompilerInvocation::setLangDefaults().

bool clang::LangStandard::isC89 ( ) const [inline]

isC89 - Language is a superset of C89.

Definition at line 60 of file LangStandard.h.

References clang::frontend::C89, and Flags.

Referenced by ParseLangArgs().

bool clang::LangStandard::isC99 ( ) const [inline]

isC99 - Language is a superset of C99.

Definition at line 63 of file LangStandard.h.

References clang::frontend::C99, and Flags.

Referenced by ParseLangArgs(), and clang::CompilerInvocation::setLangDefaults().

bool clang::LangStandard::isCPlusPlus ( ) const [inline]

isCPlusPlus - Language is a C++ variant.

Definition at line 69 of file LangStandard.h.

References clang::frontend::CPlusPlus, and Flags.

Referenced by ParseLangArgs(), and clang::CompilerInvocation::setLangDefaults().

bool clang::LangStandard::isCPlusPlus0x ( ) const [inline]

isCPlusPlus0x - Language is a C++0x variant.

Definition at line 72 of file LangStandard.h.

References clang::frontend::CPlusPlus0x, and Flags.

Referenced by clang::CompilerInvocation::setLangDefaults().

bool clang::LangStandard::isGNUMode ( ) const [inline]

isGNUMode - Language includes GNU extensions.

Definition at line 78 of file LangStandard.h.

References Flags, and clang::frontend::GNUMode.

Referenced by clang::CompilerInvocation::setLangDefaults().


Member Data Documentation

Definition at line 46 of file LangStandard.h.

Referenced by getDescription().

Definition at line 45 of file LangStandard.h.

Referenced by getName().


The documentation for this struct was generated from the following files: