Skip to content

Commit 9f1dc01

Browse files
committed
[clang][NFC] Fix table of contents in Sema.h
Add APINotes and bounds safety to the table of contents, and move their declarations appropriately.
1 parent 9931357 commit 9f1dc01

File tree

1 file changed

+85
-83
lines changed
  • clang/include/clang/Sema

1 file changed

+85
-83
lines changed

clang/include/clang/Sema/Sema.h

Lines changed: 85 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -536,38 +536,40 @@ class Sema final : public SemaBase {
536536
// Table of Contents
537537
// -----------------
538538
// 1. Semantic Analysis (Sema.cpp)
539-
// 2. C++ Access Control (SemaAccess.cpp)
540-
// 3. Attributes (SemaAttr.cpp)
541-
// 4. Availability Attribute Handling (SemaAvailability.cpp)
542-
// 5. Casts (SemaCast.cpp)
543-
// 6. Extra Semantic Checking (SemaChecking.cpp)
544-
// 7. C++ Coroutines (SemaCoroutine.cpp)
545-
// 8. C++ Scope Specifiers (SemaCXXScopeSpec.cpp)
546-
// 9. Declarations (SemaDecl.cpp)
547-
// 10. Declaration Attribute Handling (SemaDeclAttr.cpp)
548-
// 11. C++ Declarations (SemaDeclCXX.cpp)
549-
// 12. C++ Exception Specifications (SemaExceptionSpec.cpp)
550-
// 13. Expressions (SemaExpr.cpp)
551-
// 14. C++ Expressions (SemaExprCXX.cpp)
552-
// 15. Member Access Expressions (SemaExprMember.cpp)
553-
// 16. Initializers (SemaInit.cpp)
554-
// 17. C++ Lambda Expressions (SemaLambda.cpp)
555-
// 18. Name Lookup (SemaLookup.cpp)
556-
// 19. Modules (SemaModule.cpp)
557-
// 20. C++ Overloading (SemaOverload.cpp)
558-
// 21. Statements (SemaStmt.cpp)
559-
// 22. `inline asm` Statement (SemaStmtAsm.cpp)
560-
// 23. Statement Attribute Handling (SemaStmtAttr.cpp)
561-
// 24. C++ Templates (SemaTemplate.cpp)
562-
// 25. C++ Template Argument Deduction (SemaTemplateDeduction.cpp)
563-
// 26. C++ Template Deduction Guide (SemaTemplateDeductionGuide.cpp)
564-
// 27. C++ Template Instantiation (SemaTemplateInstantiate.cpp)
565-
// 28. C++ Template Declaration Instantiation
539+
// 2. API Notes (SemaAPINotes.cpp)
540+
// 3. C++ Access Control (SemaAccess.cpp)
541+
// 4. Attributes (SemaAttr.cpp)
542+
// 5. Availability Attribute Handling (SemaAvailability.cpp)
543+
// 6. Bounds Safety (SemaBoundsSafety.cpp)
544+
// 7. Casts (SemaCast.cpp)
545+
// 8. Extra Semantic Checking (SemaChecking.cpp)
546+
// 9. C++ Coroutines (SemaCoroutine.cpp)
547+
// 10. C++ Scope Specifiers (SemaCXXScopeSpec.cpp)
548+
// 11. Declarations (SemaDecl.cpp)
549+
// 12. Declaration Attribute Handling (SemaDeclAttr.cpp)
550+
// 13. C++ Declarations (SemaDeclCXX.cpp)
551+
// 14. C++ Exception Specifications (SemaExceptionSpec.cpp)
552+
// 15. Expressions (SemaExpr.cpp)
553+
// 16. C++ Expressions (SemaExprCXX.cpp)
554+
// 17. Member Access Expressions (SemaExprMember.cpp)
555+
// 18. Initializers (SemaInit.cpp)
556+
// 19. C++ Lambda Expressions (SemaLambda.cpp)
557+
// 20. Name Lookup (SemaLookup.cpp)
558+
// 21. Modules (SemaModule.cpp)
559+
// 22. C++ Overloading (SemaOverload.cpp)
560+
// 23. Statements (SemaStmt.cpp)
561+
// 24. `inline asm` Statement (SemaStmtAsm.cpp)
562+
// 25. Statement Attribute Handling (SemaStmtAttr.cpp)
563+
// 26. C++ Templates (SemaTemplate.cpp)
564+
// 27. C++ Template Argument Deduction (SemaTemplateDeduction.cpp)
565+
// 28. C++ Template Deduction Guide (SemaTemplateDeductionGuide.cpp)
566+
// 29. C++ Template Instantiation (SemaTemplateInstantiate.cpp)
567+
// 30. C++ Template Declaration Instantiation
566568
// (SemaTemplateInstantiateDecl.cpp)
567-
// 29. C++ Variadic Templates (SemaTemplateVariadic.cpp)
568-
// 30. Constraints and Concepts (SemaConcept.cpp)
569-
// 31. Types (SemaType.cpp)
570-
// 32. FixIt Helpers (SemaFixItUtils.cpp)
569+
// 31. C++ Variadic Templates (SemaTemplateVariadic.cpp)
570+
// 32. Constraints and Concepts (SemaConcept.cpp)
571+
// 33. Types (SemaType.cpp)
572+
// 34. FixIt Helpers (SemaFixItUtils.cpp)
571573

572574
/// \name Semantic Analysis
573575
/// Implementations are in Sema.cpp
@@ -1325,6 +1327,25 @@ class Sema final : public SemaBase {
13251327
//
13261328
//
13271329

1330+
/// \name API Notes
1331+
/// Implementations are in SemaAPINotes.cpp
1332+
///@{
1333+
1334+
public:
1335+
/// Map any API notes provided for this declaration to attributes on the
1336+
/// declaration.
1337+
///
1338+
/// Triggered by declaration-attribute processing.
1339+
void ProcessAPINotes(Decl *D);
1340+
1341+
///@}
1342+
1343+
//
1344+
//
1345+
// -------------------------------------------------------------------------
1346+
//
1347+
//
1348+
13281349
/// \name C++ Access Control
13291350
/// Implementations are in SemaAccess.cpp
13301351
///@{
@@ -2095,6 +2116,39 @@ class Sema final : public SemaBase {
20952116
//
20962117
//
20972118

2119+
/// \name Bounds Safety
2120+
/// Implementations are in SemaBoundsSafety.cpp
2121+
///@{
2122+
public:
2123+
/// Check if applying the specified attribute variant from the "counted by"
2124+
/// family of attributes to FieldDecl \p FD is semantically valid. If
2125+
/// semantically invalid diagnostics will be emitted explaining the problems.
2126+
///
2127+
/// \param FD The FieldDecl to apply the attribute to
2128+
/// \param E The count expression on the attribute
2129+
/// \param CountInBytes If true the attribute is from the "sized_by" family of
2130+
/// attributes. If the false the attribute is from
2131+
/// "counted_by" family of attributes.
2132+
/// \param OrNull If true the attribute is from the "_or_null" suffixed family
2133+
/// of attributes. If false the attribute does not have the
2134+
/// suffix.
2135+
///
2136+
/// Together \p CountInBytes and \p OrNull decide the attribute variant. E.g.
2137+
/// \p CountInBytes and \p OrNull both being true indicates the
2138+
/// `counted_by_or_null` attribute.
2139+
///
2140+
/// \returns false iff semantically valid.
2141+
bool CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes,
2142+
bool OrNull);
2143+
2144+
///@}
2145+
2146+
//
2147+
//
2148+
// -------------------------------------------------------------------------
2149+
//
2150+
//
2151+
20982152
/// \name Casts
20992153
/// Implementations are in SemaCast.cpp
21002154
///@{
@@ -15045,58 +15099,6 @@ class Sema final : public SemaBase {
1504515099
std::string getFixItZeroLiteralForType(QualType T, SourceLocation Loc) const;
1504615100

1504715101
///@}
15048-
15049-
//
15050-
//
15051-
// -------------------------------------------------------------------------
15052-
//
15053-
//
15054-
15055-
/// \name API Notes
15056-
/// Implementations are in SemaAPINotes.cpp
15057-
///@{
15058-
15059-
public:
15060-
/// Map any API notes provided for this declaration to attributes on the
15061-
/// declaration.
15062-
///
15063-
/// Triggered by declaration-attribute processing.
15064-
void ProcessAPINotes(Decl *D);
15065-
15066-
///@}
15067-
15068-
//
15069-
//
15070-
// -------------------------------------------------------------------------
15071-
//
15072-
//
15073-
15074-
/// \name Bounds Safety
15075-
/// Implementations are in SemaBoundsSafety.cpp
15076-
///@{
15077-
public:
15078-
/// Check if applying the specified attribute variant from the "counted by"
15079-
/// family of attributes to FieldDecl \p FD is semantically valid. If
15080-
/// semantically invalid diagnostics will be emitted explaining the problems.
15081-
///
15082-
/// \param FD The FieldDecl to apply the attribute to
15083-
/// \param E The count expression on the attribute
15084-
/// \param CountInBytes If true the attribute is from the "sized_by" family of
15085-
/// attributes. If the false the attribute is from
15086-
/// "counted_by" family of attributes.
15087-
/// \param OrNull If true the attribute is from the "_or_null" suffixed family
15088-
/// of attributes. If false the attribute does not have the
15089-
/// suffix.
15090-
///
15091-
/// Together \p CountInBytes and \p OrNull decide the attribute variant. E.g.
15092-
/// \p CountInBytes and \p OrNull both being true indicates the
15093-
/// `counted_by_or_null` attribute.
15094-
///
15095-
/// \returns false iff semantically valid.
15096-
bool CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes,
15097-
bool OrNull);
15098-
15099-
///@}
1510015102
};
1510115103

1510215104
DeductionFailureInfo

0 commit comments

Comments
 (0)