clang  10.0.0git
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 "clang/Basic/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...
 
clang::Language getLanguage () const
 Get the language that this standard describes. More...
 
bool hasLineComments () const
 Language supports '//' comments. More...
 
bool isC99 () const
 isC99 - Language is a superset of C99. More...
 
bool isC11 () const
 isC11 - Language is a superset of C11. More...
 
bool isC17 () const
 isC17 - Language is a superset of C17. More...
 
bool isC2x () const
 isC2x - Language is a superset of C2x. 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 isCPlusPlus17 () const
 isCPlusPlus17 - Language is a C++17 variant (or later). More...
 
bool isCPlusPlus2a () const
 isCPlusPlus2a - Language is a post-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...
 
bool isOpenCL () const
 isOpenCL - Language is a OpenCL variant. More...
 

Static Public Member Functions

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

Public Attributes

const char * ShortName
 
const char * Description
 
unsigned Flags
 
clang::Language Language
 

Detailed Description

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

Definition at line 61 of file LangStandard.h.

Member Enumeration Documentation

◆ Kind

Enumerator
lang_unspecified 

Definition at line 62 of file LangStandard.h.

Member Function Documentation

◆ getDescription()

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

getDescription - Get the description of this standard.

Definition at line 79 of file LangStandard.h.

Referenced by ParseLangArgs().

◆ getLangKind()

LangStandard::Kind LangStandard::getLangKind ( StringRef  Name)
static

Definition at line 29 of file LangStandards.cpp.

Referenced by ParseLangArgs().

◆ getLangStandardForKind()

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

Definition at line 18 of file LangStandards.cpp.

References lang_unspecified.

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

◆ getLangStandardForName()

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

◆ getLanguage()

clang::Language clang::LangStandard::getLanguage ( ) const
inline

Get the language that this standard describes.

Definition at line 82 of file LangStandard.h.

Referenced by clang::driver::tools::solaris::Linker::ConstructJob().

◆ getName()

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

getName - Get the name of this standard.

Definition at line 76 of file LangStandard.h.

Referenced by ParseLangArgs().

◆ hasDigraphs()

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

hasDigraphs - Language supports digraphs.

Definition at line 115 of file LangStandard.h.

References clang::Digraphs.

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

◆ hasHexFloats()

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

hasHexFloats - Language supports hexadecimal float constants.

Definition at line 121 of file LangStandard.h.

References clang::HexFloat.

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

◆ hasImplicitInt()

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

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

Definition at line 124 of file LangStandard.h.

References clang::ImplicitInt.

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

◆ hasLineComments()

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

Language supports '//' comments.

Definition at line 85 of file LangStandard.h.

References clang::LineComment.

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

◆ isC11()

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

isC11 - Language is a superset of C11.

Definition at line 91 of file LangStandard.h.

References clang::C11.

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

◆ isC17()

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

isC17 - Language is a superset of C17.

Definition at line 94 of file LangStandard.h.

References clang::C17.

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

◆ isC2x()

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

isC2x - Language is a superset of C2x.

Definition at line 97 of file LangStandard.h.

References clang::C2x.

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

◆ isC99()

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

isC99 - Language is a superset of C99.

Definition at line 88 of file LangStandard.h.

References clang::C99.

Referenced by clang::driver::tools::solaris::Linker::ConstructJob(), and clang::CompilerInvocation::setLangDefaults().

◆ isCPlusPlus()

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

isCPlusPlus - Language is a C++ variant.

Definition at line 100 of file LangStandard.h.

References clang::CPlusPlus.

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

◆ isCPlusPlus11()

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

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

Definition at line 103 of file LangStandard.h.

References clang::CPlusPlus11.

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

◆ isCPlusPlus14()

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

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

Definition at line 106 of file LangStandard.h.

References clang::CPlusPlus14.

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

◆ isCPlusPlus17()

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

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

Definition at line 109 of file LangStandard.h.

References clang::CPlusPlus17.

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

◆ isCPlusPlus2a()

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

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

Definition at line 112 of file LangStandard.h.

References clang::CPlusPlus2a.

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

◆ isGNUMode()

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

isGNUMode - Language includes GNU extensions.

Definition at line 118 of file LangStandard.h.

References clang::GNUMode.

Referenced by clang::driver::tools::solaris::Linker::ConstructJob(), and clang::CompilerInvocation::setLangDefaults().

◆ isOpenCL()

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

isOpenCL - Language is a OpenCL variant.

Definition at line 127 of file LangStandard.h.

References clang::OpenCL.

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

Member Data Documentation

◆ Description

const char* clang::LangStandard::Description

Definition at line 70 of file LangStandard.h.

◆ Flags

unsigned clang::LangStandard::Flags

Definition at line 71 of file LangStandard.h.

◆ Language

clang::Language clang::LangStandard::Language

Definition at line 72 of file LangStandard.h.

◆ ShortName

const char* clang::LangStandard::ShortName

Definition at line 69 of file LangStandard.h.


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