clang API Documentation
#include "clang/Parse/Parser.h"
#include "RAIIObjectsForParser.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/Basic/AddressSpaces.h"
#include "clang/Basic/Attributes.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Parse/ParseDiagnostic.h"
#include "clang/Sema/Lookup.h"
#include "clang/Sema/ParsedTemplate.h"
#include "clang/Sema/PrettyDeclStackTrace.h"
#include "clang/Sema/Scope.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringSwitch.h"
#include "clang/Parse/AttrParserStringSwitches.inc"
Go to the source code of this file.
Defines | |
#define | CLANG_ATTR_LATE_PARSED_LIST |
#define | CLANG_ATTR_IDENTIFIER_ARG_LIST |
#define | CLANG_ATTR_TYPE_ARG_LIST |
#define | CLANG_ATTR_ARG_CONTEXT_LIST |
Functions | |
static bool | isAttributeLateParsed (const IdentifierInfo &II) |
static StringRef | normalizeAttrName (StringRef Name) |
Normalizes an attribute name by dropping prefixed and suffixed __. | |
static bool | attributeHasIdentifierArg (const IdentifierInfo &II) |
Determine whether the given attribute has an identifier argument. | |
static bool | attributeIsTypeArgAttr (const IdentifierInfo &II) |
Determine whether the given attribute parses a type argument. | |
static bool | attributeParsedArgsUnevaluated (const IdentifierInfo &II) |
Determine whether the given attribute requires parsing its arguments in an unevaluated context or not. | |
static bool | VersionNumberSeparator (const char Separator) |
static bool | isValidAfterIdentifierInDeclarator (const Token &T) |
static bool | isPtrOperatorToken (tok::TokenKind Kind, const LangOptions &Lang, unsigned TheContext) |
static SourceLocation | getMissingDeclaratorIdLoc (Declarator &D, SourceLocation Loc) |
#define CLANG_ATTR_ARG_CONTEXT_LIST |
#define CLANG_ATTR_IDENTIFIER_ARG_LIST |
#define CLANG_ATTR_LATE_PARSED_LIST |
#define CLANG_ATTR_TYPE_ARG_LIST |
static bool attributeHasIdentifierArg | ( | const IdentifierInfo & | II | ) | [static] |
Determine whether the given attribute has an identifier argument.
Definition at line 202 of file ParseDecl.cpp.
References clang::IdentifierInfo::getName(), and normalizeAttrName().
static bool attributeIsTypeArgAttr | ( | const IdentifierInfo & | II | ) | [static] |
Determine whether the given attribute parses a type argument.
Definition at line 211 of file ParseDecl.cpp.
References clang::IdentifierInfo::getName(), and normalizeAttrName().
static bool attributeParsedArgsUnevaluated | ( | const IdentifierInfo & | II | ) | [static] |
Determine whether the given attribute requires parsing its arguments in an unevaluated context or not.
Definition at line 221 of file ParseDecl.cpp.
References clang::IdentifierInfo::getName(), and normalizeAttrName().
static SourceLocation getMissingDeclaratorIdLoc | ( | Declarator & | D, |
SourceLocation | Loc | ||
) | [static] |
Definition at line 4772 of file ParseDecl.cpp.
References clang::UnqualifiedId::EndLocation, clang::Declarator::getName(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), and clang::UnqualifiedId::StartLocation.
static bool isAttributeLateParsed | ( | const IdentifierInfo & | II | ) | [static] |
isAttributeLateParsed - Return true if the attribute has arguments that require late parsing.
Definition at line 73 of file ParseDecl.cpp.
References clang::IdentifierInfo::getName().
static bool isPtrOperatorToken | ( | tok::TokenKind | Kind, |
const LangOptions & | Lang, | ||
unsigned | TheContext | ||
) | [static] |
Definition at line 4569 of file ParseDecl.cpp.
References clang::Declarator::ConversionIdContext, and clang::Declarator::CXXNewContext.
static bool isValidAfterIdentifierInDeclarator | ( | const Token & | T | ) | [static] |
isValidAfterIdentifierInDeclaratorAfterDeclSpec - Return true if the specified token is valid after the identifier in a declarator which immediately follows the declspec. For example, these things are valid:
int x [ 4]; // direct-declarator int x ( int y); // direct-declarator int(int x ) // direct-declarator int x ; // simple-declaration int x = 17; // init-declarator-list int x , y; // init-declarator-list int x __asm__ ("foo"); // init-declarator-list int x : 4; // struct-declarator int x { 5}; // C++'0x unified initializers
This is not, because 'x' does not immediately follow the declspec (though ')' happens to be valid anyway). int (x)
Definition at line 2077 of file ParseDecl.cpp.
References clang::Token::is().
static StringRef normalizeAttrName | ( | StringRef | Name | ) | [static] |
Normalizes an attribute name by dropping prefixed and suffixed __.
Definition at line 195 of file ParseDecl.cpp.
Referenced by attributeHasIdentifierArg(), attributeIsTypeArgAttr(), and attributeParsedArgsUnevaluated().
static bool VersionNumberSeparator | ( | const char | Separator | ) | [static] |
Definition at line 643 of file ParseDecl.cpp.