Home
last modified time | relevance | path

Searched full:comment (Results 1 – 25 of 1605) sorted by relevance

12345678910>>...65

/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/
H A Dargument-comment-literals.cpp1 // RUN: %check_clang_tidy %s bugprone-argument-comment %t -- \
3 // RUN: bugprone-argument-comment.CommentBoolLiterals: true, \
4 // RUN: bugprone-argument-comment.CommentIntegerLiterals: true, \
5 // RUN: bugprone-argument-comment.CommentFloatLiterals: true, \
6 // RUN: bugprone-argument-comment.CommentUserDefinedLiterals: true, \
7 // RUN: bugprone-argument-comment.CommentStringLiterals: true, \
8 // RUN: bugprone-argument-comment.CommentNullPtrs: true, \
9 // RUN: bugprone-argument-comment.CommentCharacterLiterals: true}}" --
38 …ESSAGES: [[@LINE-1]]:9: warning: argument comment missing for literal argument 'abc' [bugprone-arg… in test()
42 …ESSAGES: [[@LINE-1]]:9: warning: argument comment missing for literal argument 'abc' [bugprone-arg… in test()
[all …]
H A Dargument-comment-ignore-single-argument.cpp1 // RUN: %check_clang_tidy %s bugprone-argument-comment %t -- \
3 // RUN: bugprone-argument-comment.IgnoreSingleArgument: true, \
4 // RUN: bugprone-argument-comment.CommentBoolLiterals: true, \
5 // RUN: bugprone-argument-comment.CommentIntegerLiterals: true, \
6 // RUN: bugprone-argument-comment.CommentFloatLiterals: true, \
7 // RUN: bugprone-argument-comment.CommentUserDefinedLiterals: true, \
8 // RUN: bugprone-argument-comment.CommentStringLiterals: true, \
9 // RUN: bugprone-argument-comment.CommentNullPtrs: true, \
10 // RUN: bugprone-argument-comment.CommentCharacterLiterals: true}}" --
41 …ESSAGES: [[@LINE-1]]:9: warning: argument comment missing for literal argument 'abc' [bugprone-arg… in test()
[all …]
/llvm-project/clang/test/Preprocessor/
H A Dpragma-comment-elf.c6 // #pragma comment lib
8 #pragma comment(lib)
9 #pragma comment(lib,"foo")
10 __pragma(comment(lib, "bar"))
12 #pragma comment(linker) // expected-warning {{'#pragma comment linker' ignored}}
13 #pragma comment(linker,"foo") // expected-warning {{'#pragma comment linker' ignored}}
14 __pragma(comment(linker, " bar=" "2")) // expected-warning {{'#pragma comment linker' ignored}}
16 #pragma comment(user) // expected-warning {{'#pragma comment user' ignored}}
17 #pragma comment(user, "Compiled on " __DATE__ " at " __TIME__ ) // expected-warning {{'#pragma comm…
18 __pragma(comment(user, "foo")) // expected-warning {{'#pragma comment user' ignored}}
[all …]
/llvm-project/clang/unittests/Format/
H A DFormatTestComments.cpp32 EXPECT_EQ("// comment", format("//comment")); in TEST_F()
33 EXPECT_EQ("// #comment", format("//#comment")); in TEST_F()
35 EXPECT_EQ("// comment\n" in TEST_F()
37 format("//comment\n" in TEST_F()
49 verifyFormat("void f(int i, // some comment (probably for i)\n" in TEST_F()
50 " int j, // some comment (probably for j)\n" in TEST_F()
51 " int k); // some comment (probably for k)"); in TEST_F()
53 " // some comment (probabl in TEST_F()
[all...]
/llvm-project/clang/include/clang-c/
H A DDocumentation.h1 /*==-- clang-c/Documentation.h - Utilities for comment processing -*- C -*-===*\
25 * \defgroup CINDEX_COMMENT Comment introspection
35 * A parsed comment.
44 * declaration), return the associated parsed comment as a
50 * Describes the type of the comment AST node (\c CXComment). A comment
56 * Null comment. No AST node is constructed at the requested location
95 * A paragraph, contains inline comment. The paragraph itself is
156 * A full comment attached to a declaration, contains block content.
214 * \param Comment AST node of any kind.
218 CINDEX_LINKAGE enum CXCommentKind clang_Comment_getKind(CXComment Comment);
[all …]
/llvm-project/llvm/test/FileCheck/comment/
H A Dbad-comment-prefix.txt1 # Bad comment prefixes are diagnosed.
3 # Check empty comment prefix.
5 RUN: -comment-prefixes= | \
8 RUN: -comment-prefixes=,FOO | \
11 RUN: -comment-prefixes=FOO, | \
14 RUN: -comment-prefixes=FOO,,BAR | \
16 PREFIX-EMPTY: error: supplied comment prefix must not be the empty string
18 # Check invalid characters in comment prefix.
20 RUN: -comment-prefixes=. | \
23 RUN: -comment-prefixes='foo ' | \
[all …]
/llvm-project/compiler-rt/test/profile/
H A Dcoverage_comments.cpp2 // RUN: %clangxx_profgen -fcoverage-mapping -Wno-comment -o %t %s
8 /* comment */ int x = 0; // CHECK-NEXT: [[# @LINE]]| 1| in main()
9 int y = 0; /* comment */ // CHECK-NEXT: [[# @LINE]]| 1| in main()
10 int z = 0; // comment // CHECK-NEXT: [[# @LINE]]| 1| in main()
11 // comment // CHECK-NEXT: [[# @LINE]]| | in main()
14 comment // CHECK-NEXT: [[# @LINE]]| | in main()
18 comment // CHECK-NEXT: [[# @LINE]]| | in main()
21 /* comment */ // CHECK-NEXT: [[# @LINE]]| | in main()
22 // comment // CHECK-NEXT: [[# @LINE]]| | in main()
23 /* comment */ // CHEC in main()
[all...]
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/readability/
H A Delse-after-return.cpp17 else // comment-0 in f()
19 // CHECK-FIXES: {{^}} // comment-0 in f()
24 } else { // comment-1 in f()
26 // CHECK-FIXES: {{^}} } // comment-1 in f()
42 else // comment-2 in f()
43 // CHECK-FIXES-NOT: {{^}} // comment-2 in f()
49 else // comment-3 in f()
50 // CHECK-FIXES-NOT: {{^}} // comment-3 in f()
55 else // comment-4 in f()
56 // CHECK-FIXES-NOT: {{^}} // comment-4 in f()
[all …]
/llvm-project/llvm/tools/llvm-mca/
H A DCodeRegionGenerator.cpp87 StringRef Comment(CommentText); in HandleComment()
88 if (Comment.empty()) in HandleComment() local
92 unsigned Position = Comment.find_first_not_of(" \t"); in HandleComment()
93 if (Position >= Comment.size()) in HandleComment()
94 // We reached the end of the comment. Bail out. in HandleComment()
97 Comment = Comment.drop_front(Position); in HandleComment()
98 if (Comment.consume_front("LLVM-MCA-END")) { in HandleComment()
100 Position = Comment.find_first_not_of(" \t"); in HandleComment()
101 if (Position < Comment in HandleComment()
123 StringRef Comment(CommentText); HandleComment() local
[all...]
/llvm-project/clang/test/Index/
H A Dcomment-xml-schema.c3 // RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML…
5 // RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML…
6 // RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML…
7 // RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML…
8 // RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML…
9 // RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML…
10 // RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML…
11 // RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML…
12 // RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML…
13 // RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML…
[all …]
H A Dparse-all-comments.c6 // Not a Doxygen comment. notdoxy1 NOT_DOXYGEN
9 /* Not a Doxygen comment. notdoxy2 NOT_DOXYGEN */
12 /*/ Not a Doxygen comment. notdoxy3 NOT_DOXYGEN */
15 /** Doxygen comment. isdoxy4 IS_DOXYGEN_SINGLE */
18 /*! Doxygen comment. isdoxy5 IS_DOXYGEN_SINGLE */
21 /// Doxygen comment. isdoxy6 IS_DOXYGEN_SINGLE
25 // ORDINARY COMMENT
26 /// This is a BCPL comment. IS_DOXYGEN_START
28 /** But there are other blocks that are part of the comment, too. IS_DOXYGEN_END */
31 // MULTILINE COMMENT
[all …]
H A Dannotate-comments.cpp6 // Not a Doxygen comment. NOT_DOXYGEN
9 /* Not a Doxygen comment. NOT_DOXYGEN */
12 /*/ Not a Doxygen comment. NOT_DOXYGEN */
15 /** Doxygen comment. isdoxy4 IS_DOXYGEN_SINGLE */
19 * Doxygen comment. isdoxy5 IS_DOXYGEN_SINGLE */
23 * Doxygen comment.
28 * Doxygen comment.
33 /*! Doxygen comment. isdoxy8 IS_DOXYGEN_SINGLE */
36 /// Doxygen comment. isdoxy9 IS_DOXYGEN_SINGLE
39 // Not a Doxygen comment. NOT_DOXYGEN
[all …]
H A Dcomplete-documentation-templates.cpp109 // CHECK-CC1: FunctionTemplate:{ResultType void}{TypedText T1}{{.*}}(brief comment: This is T1.)
110 // CHECK-CC1: FunctionTemplate:{ResultType void}{TypedText T2}{{.*}}(brief comment: This is T2.)
113 // CHECK-CC2: CXXMethod:{ResultType void}{TypedText T4}{{.*}}(brief comment: This is T4.)
114 // CHECK-CC2: VarDecl:{ResultType int}{TypedText T5}{{.*}}(brief comment: This is T5.)
117 // CHECK-CC3: FunctionTemplate:{ResultType void}{TypedText T11}{{.*}}(brief comment: This is T11.)
118 // CHECK-CC3: CXXMethod:{ResultType void}{TypedText T6}{{.*}}(brief comment: This is T6.)
119 // CHECK-CC3: FieldDecl:{ResultType int}{TypedText T7}{{.*}}(brief comment: This is T7.)
122 // CHECK-CC4: EnumConstantDecl:{ResultType T3<int>::T9}{TypedText T10}{{.*}}(brief comment: This is…
125 // comment from class template.
127 // CHECK-CC4-SHOULD-BE: TypedefDecl:{TypedText T12}{{.*}}(brief comment: This is T3.)
[all …]
/llvm-project/llvm/test/MC/AsmParser/AArch64/
H A Ddirective-parse-err.s7 .equ ident1, 0 // EOL COMMENT
11 .equiv ident2, 0 // EOL COMMENT
15 .set ident3, 0 // EOL COMMENT
19 .ascii "string1" // EOL COMMENT
23 .asciz "string2" // EOL COMMENT
27 .string "string3" // EOL COMMENT
31 .byte 0 // EOL COMMENT
35 .dc.b 0 // EOL COMMENT
39 .dc.b 0 // EOL COMMENT
43 .dc.w 0 // EOL COMMENT
[all …]
/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/
H A Dwarnings-as-errors-plural.cpp1 // RUN: clang-tidy %s -checks='-*,llvm-namespace-comment,clang-diagnostic*' -- 2>&1 \
3 // RUN: not clang-tidy %s -checks='-*,llvm-namespace-comment,clang-diagnostic*' \
4 // RUN: -warnings-as-errors='llvm-namespace-comment' -- 2>&1 \
6 // RUN: not clang-tidy %s -checks='-*,llvm-namespace-comment,clang-diagnostic*' \
7 // RUN: -warnings-as-errors='llvm-namespace-comment' -quiet -- 2>&1 \
12 // CHECK-WARN: warning: namespace 'j' not terminated with a closing comment [llvm-namespace-comment]
13 // CHECK-WERR: error: namespace 'j' not terminated with a closing comment [llvm-namespace-comment,-…
14 …RR-QUIET: error: namespace 'j' not terminated with a closing comment [llvm-namespace-comment,-warn…
18 // CHECK-WARN: warning: namespace 'k' not terminated with a closing comment [llvm-namespace-comment]
19 // CHECK-WERR: error: namespace 'k' not terminated with a closing comment [llvm-namespace-comment,-…
[all …]
/llvm-project/clang/unittests/Tooling/
H A DHeaderIncludesTest.cpp277 std::string Code = "// comment\n" in TEST_F()
279 " // comment\n"; in TEST_F()
280 std::string Expected = "// comment\n" in TEST_F()
282 " // comment\n" in TEST_F()
288 std::string Code = "// comment\n" in TEST_F()
289 "// comment \\\n" in TEST_F()
290 " comment continued\n" in TEST_F()
292 "* comment\n" in TEST_F()
294 std::string Expected = "// comment\n" in TEST_F()
295 "// comment \\\n" in TEST_F()
[all …]
/llvm-project/flang/test/Parser/OpenMP/
H A Dsentinels.f24 ! comment line
25 !@fp PRINT *, "This is a comment line"
26 !@f p PRINT *, "This is a comment line"
30 ! $ PRINT *, "This is a comment line 6"
31 c $This is a comment line
32 !0$110This is a comment line
34 ! $ This is a comment line
35 ! $ 0This is a comment line
36 ! &This is a comment line
37 ! $ This is a comment line
[all …]
/llvm-project/llvm/test/MC/ARM/
H A Ddirective_parsing.s7 .word 0 @ EOL COMMENT
11 .short 0 @ EOL COMMENT
15 .hword 0 @ EOL COMMENT
21 .thumb @ EOL COMMENT
26 .arm @ EOL COMMENT
30 .thumb_func @ EOL COMMENT
38 .syntax unified @ EOL COMMENT
48 .fnstart @ EOL COMMENT
52 .cantunwind @ EOL COMMENT
58 .fnend @ EOL COMMENT
[all …]
/llvm-project/llvm/test/DebugInfo/COFF/
H A Djump-table.ll73 ; CHECK: [[INT16:\.short|\.hword]] 4441 [[COMMENT:#|//|@]] Record kind: S_ARMSWITCH…
74 ; I686-NEXT: .long 0 [[COMMENT]] Base offset
75 ; I686-NEXT: .short 0 [[COMMENT]] Base section index
76 ; X64-NEXT: .secrel32 .LJTI0_0 [[COMMENT]] Base offset
77 ; X64-NEXT: .secidx .LJTI0_0 [[COMMENT]] Base section index
78 ; A32-NEXT: .secrel32 .LCPI0_0+4 [[COMMENT]] Base offset
79 ; A32-NEXT: .secidx .LCPI0_0 [[COMMENT]] Base section index
80 ; A64-NEXT: .secrel32 .LBB0_[[FIRSTBLOCK]] [[COMMENT]] Base offset
81 ; A64-NEXT: .secidx .LBB0_[[FIRSTBLOCK]] [[COMMENT]] Base section index
82 ; I686-NEXT: .short 6 [[COMMENT]] Switch type
[all …]
/llvm-project/clang/docs/tools/
H A Ddump_format_style.py110 def __init__(self, name, opt_type, comment, version):
113 self.comment = comment.strip()
126 s += ":ref:`¶ <%s>`\n%s" % (self.name, doxygen2rst(indent(self.comment, 2)))
138 def __init__(self, name, comment):
140 self.comment = comment.strip()
144 return self.comment + "\n" + "\n".join(map(str, self.values))
148 def __init__(self, name, comment, version):
150 self.comment
109 __init__(self, name, opt_type, comment, version) global() argument
137 __init__(self, name, comment) global() argument
147 __init__(self, name, comment, version) global() argument
166 __init__(self, name, comment) global() argument
176 __init__(self, name, enumtype, comment, version, values) global() argument
204 __init__(self, name, comment, config) global() argument
[all...]
H A Ddump_ast_matchers.py34 <tr><td colspan="4" class="doc" id="%(id)s"><pre>%(comment)s</pre></td></tr>
82 def extract_result_types(comment):
83 """Extracts a list of result types from the given comment.
85 We allow annotations in the comment of the matcher to specify what
94 m = re.search(r"Usable as: Any Matcher[\s\n]*$", comment, re.S)
98 m = re.match(r"^(.*)Matcher<([^>]+)>\s*,?[\s\n]*$", comment, re.S)
100 if re.search(r"Usable as:\s*$", comment):
105 comment = m.group(1)
108 def strip_doxygen(comment):
109 """Returns the given comment withou
77 extract_result_types(comment) global() argument
103 strip_doxygen(comment) global() argument
138 add_matcher(result_type, name, args, comment, is_dyncast=False) global() argument
186 act_on_decl(declaration, comment, allowed_types) global() argument
554 comment = "" global() variable
563 comment = "" global() variable
585 comment = "" global() variable
[all...]
/llvm-project/clang/include/clang/ExtractAPI/
H A DExtractAPIVisitor.h302 DocComment Comment; in VisitVarDecl()
305 Comment = RawComment->getFormattedLines(Context.getSourceManager(), in VisitVarDecl()
317 AvailabilityInfo::createFromDecl(Decl), Linkage, Comment, Declaration, in VisitVarDecl()
323 AvailabilityInfo::createFromDecl(Decl), Linkage, Comment, Declaration, in VisitFunctionDecl()
375 DocComment Comment; in VisitFunctionDecl()
378 Comment = RawComment->getFormattedLines(Context.getSourceManager(), in VisitFunctionDecl()
389 AvailabilityInfo::createFromDecl(Decl), Linkage, Comment,
397 AvailabilityInfo::createFromDecl(Decl), Linkage, Comment, in VisitEnumDecl()
412 DocComment Comment; in VisitEnumDecl()
415 Comment in VisitEnumDecl()
288 DocComment Comment; VisitVarDecl() local
361 DocComment Comment; VisitFunctionDecl() local
398 DocComment Comment; VisitEnumDecl() local
529 DocComment Comment; VisitNamespaceDecl() local
562 DocComment Comment; VisitRecordDecl() local
603 DocComment Comment; VisitCXXRecordDecl() local
656 DocComment Comment; VisitCXXMethodDecl() local
717 DocComment Comment; VisitCXXConstructorDecl() local
751 DocComment Comment; VisitCXXDestructorDecl() local
782 DocComment Comment; VisitConceptDecl() local
809 DocComment Comment; VisitClassTemplateSpecializationDecl() local
843 DocComment Comment; VisitClassTemplatePartialSpecializationDecl() local
877 DocComment Comment; VisitVarTemplateDecl() local
921 DocComment Comment; VisitVarTemplateSpecializationDecl() local
953 DocComment Comment; VisitVarTemplatePartialSpecializationDecl() local
986 DocComment Comment; VisitFunctionTemplateDecl() local
1019 DocComment Comment; VisitObjCInterfaceDecl() local
1067 DocComment Comment; VisitObjCProtocolDecl() local
1135 DocComment Comment; VisitTypedefNameDecl() local
1167 DocComment Comment; VisitObjCCategoryDecl() local
1210 DocComment Comment; recordEnumConstants() local
1243 DocComment Comment; VisitFieldDecl() local
1295 DocComment Comment; VisitCXXConversionDecl() local
1340 DocComment Comment; recordObjCMethods() local
1377 DocComment Comment; recordObjCProperties() local
1430 DocComment Comment; recordObjCInstanceVariables() local
1473 if (const auto *Comment = this->Context.getRawCommentForDeclNoCache(D)) fetchRawCommentForDecl() local
[all...]
H A DAPI.h140 /// Each line represents one line of striped documentation comment, in addTemplateParameter()
142 /// location of a character in the doc comment for pointing back to the source in empty()
146 /// /// This is a documentation comment
243 /// Documentation comment lines attached to this symbol declaration.
244 DocComment Comment;
285 const DocComment &Comment, DeclarationFragments Declaration,
290 Comment(Comment), Declaration(Declaration), SubHeading(SubHeading),
385 LinkageInfo Linkage, const DocComment &Comment,
389 Linkage, Comment, Declaratio in NamespaceRecord()
251 DocComment Comment; global() member
[all...]
/llvm-project/clang/lib/AST/
H A DComment.cpp1 //===--- Comment.cpp - Comment AST node implementation --------------------===//
9 #include "clang/AST/Comment.h"
21 // Check that no comment class has a non-trival destructor. They are allocated
23 #define ABSTRACT_COMMENT(COMMENT) argument
24 #define COMMENT(CLASS, PARENT) \ macro
28 #undef COMMENT
35 const char *Comment::getCommentKindName() const { in getCommentKindName()
39 #define ABSTRACT_COMMENT(COMMENT) in getCommentKindName() argument
40 #define COMMENT(CLAS in getCommentKindName() macro
70 ABSTRACT_COMMENT(COMMENT) CheckCommentASTNodes() argument
71 #define COMMENT( CheckCommentASTNodes() macro
87 ABSTRACT_COMMENT(COMMENT) child_begin() argument
88 #define COMMENT( child_begin() macro
102 ABSTRACT_COMMENT(COMMENT) child_end() argument
103 #define COMMENT( child_end() macro
[all...]
H A DRawCommentList.cpp11 #include "clang/AST/Comment.h"
23 /// Get comment kind and bool describing if it is a trailing comment.
24 std::pair<RawComment::CommentKind, bool> getCommentKind(StringRef Comment,
27 if ((Comment.size() < MinCommentLength) || Comment[0] != '/') in getCommentKind()
31 if (Comment[1] == '/') { in getCommentKind()
32 if (Comment.size() < 3) in getCommentKind()
35 if (Comment[2] == '/') in getCommentKind()
37 else if (Comment[ in getCommentKind()
26 getCommentKind(StringRef Comment,bool ParseAllComments) getCommentKind() argument
64 mergedCommentIsTrailingComment(StringRef Comment) mergedCommentIsTrailingComment() argument
[all...]

12345678910>>...65