Go to the documentation of this file.
13 #ifndef LLVM_CLANG_AST_COMMENT_H
14 #define LLVM_CLANG_AST_COMMENT_H
20 #include "llvm/ADT/ArrayRef.h"
21 #include "llvm/ADT/StringRef.h"
26 class TemplateParameterList;
75 unsigned HasTrailingNewline : 1;
85 mutable unsigned IsWhitespaceValid : 1;
88 mutable unsigned IsWhitespace : 1;
97 unsigned RenderKind : 3;
110 unsigned IsMalformed : 1;
121 unsigned IsSelfClosing : 1;
131 mutable unsigned IsWhitespaceValid : 1;
134 mutable unsigned IsWhitespace : 1;
147 unsigned CommandMarker : 1;
158 unsigned Direction : 2;
161 unsigned IsDirectionExplicit : 1;
188 #define COMMENT(CLASS, PARENT) CLASS##Kind,
189 #define COMMENT_RANGE(BASE, FIRST, LAST) \
190 First##BASE##Constant=FIRST##Kind, Last##BASE##Constant=LAST##Kind,
191 #define LAST_COMMENT_RANGE(BASE, FIRST, LAST) \
192 First##BASE##Constant=FIRST##Kind, Last##BASE##Constant=LAST##Kind
193 #define ABSTRACT_COMMENT(COMMENT)
194 #include "clang/AST/CommentNodes.inc"
252 return C->getCommentKind() >= FirstInlineContentCommentConstant &&
253 C->getCommentKind() <= LastInlineContentCommentConstant;
279 return C->getCommentKind() == TextCommentKind;
298 bool isWhitespaceNoCache()
const;
331 return C->getCommentKind() == InlineCommandCommentKind;
359 return Args[Idx].Text;
363 return Args[Idx].Range;
389 return C->getCommentKind() >= FirstHTMLTagCommentConstant &&
390 C->getCommentKind() <= LastHTMLTagCommentConstant;
449 LocBegin, LocBegin.getLocWithOffset(1 +
TagName.size()),
451 LocBegin.getLocWithOffset(1),
452 LocBegin.getLocWithOffset(1 +
TagName.size())) {
457 return C->getCommentKind() == HTMLStartTagCommentKind;
465 return Attributes.size();
469 return Attributes[Idx];
474 if (!Attrs.empty()) {
507 LocBegin.getLocWithOffset(2),
508 LocBegin.getLocWithOffset(2 +
TagName.size()))
512 return C->getCommentKind() == HTMLEndTagCommentKind;
532 return C->getCommentKind() >= FirstBlockContentCommentConstant &&
533 C->getCommentKind() <= LastBlockContentCommentConstant;
547 if (Content.empty()) {
556 Content.back()->getEndLoc()));
561 return C->getCommentKind() == ParagraphCommentKind;
582 bool isWhitespaceNoCache()
const;
621 return C->getCommentKind() >= FirstBlockCommandCommentConstant &&
622 C->getCommentKind() <= LastBlockCommandCommentConstant;
656 return Args[Idx].Text;
660 return Args[Idx].Range;
665 if (
Args.size() > 0) {
710 CommandID, CommandMarker),
717 return C->getCommentKind() == ParamCommandCommentKind;
752 return Args[0].Range;
808 return C->getCommentKind() == TParamCommandCommentKind;
822 return Args[0].Range;
826 return !Position.empty();
831 return Position.size();
836 return Position[
Depth];
840 Position = NewPosition;
852 Comment(VerbatimBlockLineCommentKind,
854 LocBegin.getLocWithOffset(
Text.size())),
859 return C->getCommentKind() == VerbatimBlockLineCommentKind;
883 unsigned CommandID) :
885 LocBegin, LocEnd, CommandID,
890 return C->getCommentKind() == VerbatimBlockCommentKind;
919 return Lines[LineIdx]->getText();
946 return C->getCommentKind() == VerbatimLineCommentKind;
1084 Blocks(Blocks), ThisDeclInfo(D) {
1089 SourceRange(Blocks.front()->getBeginLoc(), Blocks.back()->getEndLoc()));
1094 return C->getCommentKind() == FullCommentKind;
1111 ThisDeclInfo->
fill();
1112 return ThisDeclInfo;
BoundNodesTreeBuilder Nodes
A trivial tuple used to represent a source range.
const internal::VariadicAllOfMatcher< Stmt > stmt
Matches statements.
@ RewriteTest
Rewriter playground.
include(CheckIncludeFiles) set(LLVM_LINK_COMPONENTS support) set(DIRECTORY_WATCHER_SOURCES DirectoryScanner.cpp) set(DIRECTORY_WATCHER_LINK_LIBS "") if(APPLE) check_include_files("CoreServices/CoreServices.h" HAVE_CORESERVICES) if(HAVE_CORESERVICES) list(APPEND DIRECTORY_WATCHER_SOURCES mac/DirectoryWatcher-mac.cpp) set(DIRECTORY_WATCHER_LINK_LIBS "-framework CoreServices") endif() elseif(CMAKE_SYSTEM_NAME MATCHES "Linux") check_include_files("sys/inotify.h" HAVE_INOTIFY) if(HAVE_INOTIFY) list(APPEND DIRECTORY_WATCHER_SOURCES linux/DirectoryWatcher-linux.cpp) find_package(Threads REQUIRED) endif() elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") list(APPEND DIRECTORY_WATCHER_SOURCES windows/DirectoryWatcher-windows.cpp) else() list(APPEND DIRECTORY_WATCHER_SOURCES default/DirectoryWatcher-not-implemented.cpp) endif() add_clang_library(clangDirectoryWatcher $
Encodes a location in the source.
SourceLocation getLocWithOffset(IntTy Offset) const
Return a source location with the specified offset from this SourceLocation.
SourceLocation getBegin() const
target_link_libraries(clangDirectoryWatcher PUBLIC ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(clangDirectoryWatcher PRIVATE $
A (possibly-)qualified type.
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
const void * Store
Store - This opaque type encapsulates an immutable mapping from locations to values.
@ RewriteObjC
ObjC->C Rewriter.
internal::Matcher< T > traverse(TraversalKind TK, const internal::Matcher< T > &InnerMatcher)
Causes all nested matchers to be matched with the specified traversal kind.
macro(clang_diag_gen component) clang_tablegen(Diagnostic$
@ GeneratePCH
Generate pre-compiled header.
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
const internal::VariadicAllOfMatcher< Attr > attr
Matches attributes.
clang_tablegen(AttrParserStringSwitches.inc -gen-clang-attr-parser-string-switches -I ${CMAKE_CURRENT_SOURCE_DIR}/../../SOURCE ../Basic/Attr.td TARGET ClangAttrParserStringSwitches) clang_tablegen(AttrSubMatchRulesParserStringSwitches.inc -gen-clang-attr-subject-match-rules-parser-string-switches -I $
SourceLocation getEnd() const
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
PrimType
Enumeration of the primitive types of the VM.
set(LLVM_LINK_COMPONENTS Support) set(LLVM_EXPORTED_SYMBOL_FILE $
Stores a list of template parameters for a TemplateDecl and its derived classes.
void setEnd(SourceLocation e)
SelectorLocationsKind
Whether all locations of the selector identifiers are in a "standard" position.
@ RewriteMacros
Expand macros but not #includes.
bool ExecuteCompilerInvocation(CompilerInstance *Clang)
ExecuteCompilerInvocation - Execute the given actions described by the compiler invocation object in ...
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
if(NOT XCODE) add_library(clangSupport_tablegen ALIAS obj.clangSupport) elseif(NOT LLVM_LINK_LLVM_DYLIB) add_library(clangSupport_tablegen ALIAS clangSupport) else() add_llvm_library(clangSupport_tablegen BUILDTREE_ONLY STATIC DISABLE_LLVM_LINK_LLVM_DYLIB $
#define ALIAS(NAME, TOK, FLAGS)
static void dump(llvm::raw_ostream &OS, StringRef FunctionName, ArrayRef< CounterExpression > Expressions, ArrayRef< CounterMappingRegion > Regions)
bool isNull() const
Return true if this QualType doesn't point to a type yet.
Decl - This represents one declaration (or definition), e.g.
and static some checkers Checker The latter are built on top of the former via the Checker and CheckerVisitor and attempts to isolate them from much of the gore of the internal analysis the analyzer is basically a source code simulator that traces out possible paths of execution The state of the and the combination of state and program point is a node in an exploded which has the entry program point and initial and then simulate transitions by analyzing individual expressions The analysis of an expression can cause the state to resulting in a new node in the ExplodedGraph with an updated program point and an updated state A bug is found by hitting a node that satisfies some bug condition(basically a violation of a checking invariant). The analyzer traces out multiple paths by reasoning about branches and then bifurcating the state it can contain cycles as paths loop back onto each other and cache out ProgramState and ExplodedNodes are basically immutable once created Once one creates a ProgramState
static void CheckObjCInstMethSignature(const ObjCImplementationDecl *ID, BugReporter &BR, const CheckerBase *Checker)
endif() if(clang_vc AND LLVM_APPEND_VC_REV) set(clang_source_dir $
SmallVector< BoundNodes, 1 > match(MatcherT Matcher, const NodeT &Node, ASTContext &Context)
Returns the results of matching Matcher on Node.
bool isValid() const
Return true if this is a valid SourceLocation object.
Attr - This represents one attribute.
__device__ __2f16 float c
llvm_vc find_first_existing_vc_file("${CLANG_SOURCE_DIR}" clang_vc) set(version_inc "$
void ParseAST(Preprocessor &pp, ASTConsumer *C, ASTContext &Ctx, bool PrintStats=false, TranslationUnitKind TUKind=TU_Complete, CodeCompleteConsumer *CompletionConsumer=nullptr, bool SkipFunctionBodies=false)
Parse the entire file specified, notifying the ASTConsumer as the file is parsed.
const internal::ArgumentAdaptingMatcherFunc< internal::HasMatcher > has
Matches AST nodes that have child AST nodes that match the provided matcher.