clang  3.9.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
clang::LangStandard Struct Reference

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

#include <LangStandard.h>

Collaboration diagram for clang::LangStandard:
[legend]

Public Types

enum  Kind { lang_unspecified }
 

Public Member Functions

const char * getName () const
 getName - Get the name of this standard. More...
 
const char * getDescription () const
 getDescription - Get the description of this standard. More...
 
bool hasLineComments () const
 Language supports '//' comments. More...
 
bool isC89 () const
 isC89 - Language is a superset of C89. More...
 
bool isC99 () const
 isC99 - Language is a superset of C99. More...
 
bool isC11 () const
 isC11 - Language is a superset of C11. More...
 
bool isCPlusPlus () const
 isCPlusPlus - Language is a C++ variant. More...
 
bool isCPlusPlus11 () const
 isCPlusPlus11 - Language is a C++11 variant (or later). More...
 
bool isCPlusPlus14 () const
 isCPlusPlus14 - Language is a C++14 variant (or later). More...
 
bool isCPlusPlus1z () const
 isCPlusPlus1z - Language is a C++17 variant (or later). More...
 
bool hasDigraphs () const
 hasDigraphs - Language supports digraphs. More...
 
bool isGNUMode () const
 isGNUMode - Language includes GNU extensions. More...
 
bool hasHexFloats () const
 hasHexFloats - Language supports hexadecimal float constants. More...
 
bool hasImplicitInt () const
 hasImplicitInt - Language allows variables to be typed as int implicitly. More...
 

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 39 of file LangStandard.h.

Member Enumeration Documentation

Enumerator
lang_unspecified 

Definition at line 40 of file LangStandard.h.

Member Function Documentation

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

getDescription - Get the description of this standard.

Definition at line 56 of file LangStandard.h.

References Description.

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

Definition at line 20 of file LangStandards.cpp.

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

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

Definition at line 31 of file LangStandards.cpp.

References LANGSTANDARD, and clang::Name.

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

getName - Get the name of this standard.

Definition at line 53 of file LangStandard.h.

References ShortName.

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

hasDigraphs - Language supports digraphs.

Definition at line 83 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 89 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 92 of file LangStandard.h.

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

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

bool clang::LangStandard::hasLineComments ( ) const
inline

Language supports '//' comments.

Definition at line 59 of file LangStandard.h.

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

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

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

isC11 - Language is a superset of C11.

Definition at line 68 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 62 of file LangStandard.h.

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

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

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

isC99 - Language is a superset of C99.

Definition at line 65 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 71 of file LangStandard.h.

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

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

bool clang::LangStandard::isCPlusPlus11 ( ) const
inline

isCPlusPlus11 - Language is a C++11 variant (or later).

Definition at line 74 of file LangStandard.h.

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

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

bool clang::LangStandard::isCPlusPlus14 ( ) const
inline

isCPlusPlus14 - Language is a C++14 variant (or later).

Definition at line 77 of file LangStandard.h.

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

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

bool clang::LangStandard::isCPlusPlus1z ( ) const
inline

isCPlusPlus1z - Language is a C++17 variant (or later).

Definition at line 80 of file LangStandard.h.

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

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

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

isGNUMode - Language includes GNU extensions.

Definition at line 86 of file LangStandard.h.

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

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

Member Data Documentation

const char* clang::LangStandard::Description

Definition at line 48 of file LangStandard.h.

Referenced by getDescription().

unsigned clang::LangStandard::Flags
const char* clang::LangStandard::ShortName

Definition at line 47 of file LangStandard.h.

Referenced by getName().


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