ComputeDependence.h 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===--- ComputeDependence.h -------------------------------------- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // Calculate various template dependency flags for the AST.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_CLANG_AST_COMPUTEDEPENDENCE_H
  18. #define LLVM_CLANG_AST_COMPUTEDEPENDENCE_H
  19. #include "clang/AST/DependenceFlags.h"
  20. #include "clang/Basic/ExceptionSpecificationType.h"
  21. #include "llvm/ADT/ArrayRef.h"
  22. namespace clang {
  23. class ASTContext;
  24. class Expr;
  25. class FullExpr;
  26. class OpaqueValueExpr;
  27. class ParenExpr;
  28. class UnaryOperator;
  29. class UnaryExprOrTypeTraitExpr;
  30. class ArraySubscriptExpr;
  31. class MatrixSubscriptExpr;
  32. class CompoundLiteralExpr;
  33. class CastExpr;
  34. class BinaryOperator;
  35. class ConditionalOperator;
  36. class BinaryConditionalOperator;
  37. class StmtExpr;
  38. class ConvertVectorExpr;
  39. class VAArgExpr;
  40. class ChooseExpr;
  41. class NoInitExpr;
  42. class ArrayInitLoopExpr;
  43. class ImplicitValueInitExpr;
  44. class InitListExpr;
  45. class ExtVectorElementExpr;
  46. class BlockExpr;
  47. class AsTypeExpr;
  48. class DeclRefExpr;
  49. class RecoveryExpr;
  50. class CXXRewrittenBinaryOperator;
  51. class CXXStdInitializerListExpr;
  52. class CXXTypeidExpr;
  53. class MSPropertyRefExpr;
  54. class MSPropertySubscriptExpr;
  55. class CXXUuidofExpr;
  56. class CXXThisExpr;
  57. class CXXThrowExpr;
  58. class CXXBindTemporaryExpr;
  59. class CXXScalarValueInitExpr;
  60. class CXXDeleteExpr;
  61. class ArrayTypeTraitExpr;
  62. class ExpressionTraitExpr;
  63. class CXXNoexceptExpr;
  64. class PackExpansionExpr;
  65. class SubstNonTypeTemplateParmExpr;
  66. class CoroutineSuspendExpr;
  67. class DependentCoawaitExpr;
  68. class CXXNewExpr;
  69. class CXXPseudoDestructorExpr;
  70. class OverloadExpr;
  71. class DependentScopeDeclRefExpr;
  72. class CXXConstructExpr;
  73. class CXXDefaultInitExpr;
  74. class CXXDefaultArgExpr;
  75. class LambdaExpr;
  76. class CXXUnresolvedConstructExpr;
  77. class CXXDependentScopeMemberExpr;
  78. class MaterializeTemporaryExpr;
  79. class CXXFoldExpr;
  80. class TypeTraitExpr;
  81. class ConceptSpecializationExpr;
  82. class SYCLUniqueStableNameExpr;
  83. class PredefinedExpr;
  84. class CallExpr;
  85. class OffsetOfExpr;
  86. class MemberExpr;
  87. class ShuffleVectorExpr;
  88. class GenericSelectionExpr;
  89. class DesignatedInitExpr;
  90. class ParenListExpr;
  91. class PseudoObjectExpr;
  92. class AtomicExpr;
  93. class OMPArraySectionExpr;
  94. class OMPArrayShapingExpr;
  95. class OMPIteratorExpr;
  96. class ObjCArrayLiteral;
  97. class ObjCDictionaryLiteral;
  98. class ObjCBoxedExpr;
  99. class ObjCEncodeExpr;
  100. class ObjCIvarRefExpr;
  101. class ObjCPropertyRefExpr;
  102. class ObjCSubscriptRefExpr;
  103. class ObjCIsaExpr;
  104. class ObjCIndirectCopyRestoreExpr;
  105. class ObjCMessageExpr;
  106. // The following functions are called from constructors of `Expr`, so they
  107. // should not access anything beyond basic
  108. ExprDependence computeDependence(FullExpr *E);
  109. ExprDependence computeDependence(OpaqueValueExpr *E);
  110. ExprDependence computeDependence(ParenExpr *E);
  111. ExprDependence computeDependence(UnaryOperator *E, const ASTContext &Ctx);
  112. ExprDependence computeDependence(UnaryExprOrTypeTraitExpr *E);
  113. ExprDependence computeDependence(ArraySubscriptExpr *E);
  114. ExprDependence computeDependence(MatrixSubscriptExpr *E);
  115. ExprDependence computeDependence(CompoundLiteralExpr *E);
  116. ExprDependence computeDependence(CastExpr *E);
  117. ExprDependence computeDependence(BinaryOperator *E);
  118. ExprDependence computeDependence(ConditionalOperator *E);
  119. ExprDependence computeDependence(BinaryConditionalOperator *E);
  120. ExprDependence computeDependence(StmtExpr *E, unsigned TemplateDepth);
  121. ExprDependence computeDependence(ConvertVectorExpr *E);
  122. ExprDependence computeDependence(VAArgExpr *E);
  123. ExprDependence computeDependence(ChooseExpr *E);
  124. ExprDependence computeDependence(NoInitExpr *E);
  125. ExprDependence computeDependence(ArrayInitLoopExpr *E);
  126. ExprDependence computeDependence(ImplicitValueInitExpr *E);
  127. ExprDependence computeDependence(InitListExpr *E);
  128. ExprDependence computeDependence(ExtVectorElementExpr *E);
  129. ExprDependence computeDependence(BlockExpr *E);
  130. ExprDependence computeDependence(AsTypeExpr *E);
  131. ExprDependence computeDependence(DeclRefExpr *E, const ASTContext &Ctx);
  132. ExprDependence computeDependence(RecoveryExpr *E);
  133. ExprDependence computeDependence(CXXRewrittenBinaryOperator *E);
  134. ExprDependence computeDependence(CXXStdInitializerListExpr *E);
  135. ExprDependence computeDependence(CXXTypeidExpr *E);
  136. ExprDependence computeDependence(MSPropertyRefExpr *E);
  137. ExprDependence computeDependence(MSPropertySubscriptExpr *E);
  138. ExprDependence computeDependence(CXXUuidofExpr *E);
  139. ExprDependence computeDependence(CXXThisExpr *E);
  140. ExprDependence computeDependence(CXXThrowExpr *E);
  141. ExprDependence computeDependence(CXXBindTemporaryExpr *E);
  142. ExprDependence computeDependence(CXXScalarValueInitExpr *E);
  143. ExprDependence computeDependence(CXXDeleteExpr *E);
  144. ExprDependence computeDependence(ArrayTypeTraitExpr *E);
  145. ExprDependence computeDependence(ExpressionTraitExpr *E);
  146. ExprDependence computeDependence(CXXNoexceptExpr *E, CanThrowResult CT);
  147. ExprDependence computeDependence(PackExpansionExpr *E);
  148. ExprDependence computeDependence(SubstNonTypeTemplateParmExpr *E);
  149. ExprDependence computeDependence(CoroutineSuspendExpr *E);
  150. ExprDependence computeDependence(DependentCoawaitExpr *E);
  151. ExprDependence computeDependence(CXXNewExpr *E);
  152. ExprDependence computeDependence(CXXPseudoDestructorExpr *E);
  153. ExprDependence computeDependence(OverloadExpr *E, bool KnownDependent,
  154. bool KnownInstantiationDependent,
  155. bool KnownContainsUnexpandedParameterPack);
  156. ExprDependence computeDependence(DependentScopeDeclRefExpr *E);
  157. ExprDependence computeDependence(CXXConstructExpr *E);
  158. ExprDependence computeDependence(CXXDefaultInitExpr *E);
  159. ExprDependence computeDependence(CXXDefaultArgExpr *E);
  160. ExprDependence computeDependence(LambdaExpr *E,
  161. bool ContainsUnexpandedParameterPack);
  162. ExprDependence computeDependence(CXXUnresolvedConstructExpr *E);
  163. ExprDependence computeDependence(CXXDependentScopeMemberExpr *E);
  164. ExprDependence computeDependence(MaterializeTemporaryExpr *E);
  165. ExprDependence computeDependence(CXXFoldExpr *E);
  166. ExprDependence computeDependence(TypeTraitExpr *E);
  167. ExprDependence computeDependence(ConceptSpecializationExpr *E,
  168. bool ValueDependent);
  169. ExprDependence computeDependence(SYCLUniqueStableNameExpr *E);
  170. ExprDependence computeDependence(PredefinedExpr *E);
  171. ExprDependence computeDependence(CallExpr *E, llvm::ArrayRef<Expr *> PreArgs);
  172. ExprDependence computeDependence(OffsetOfExpr *E);
  173. ExprDependence computeDependence(MemberExpr *E);
  174. ExprDependence computeDependence(ShuffleVectorExpr *E);
  175. ExprDependence computeDependence(GenericSelectionExpr *E,
  176. bool ContainsUnexpandedPack);
  177. ExprDependence computeDependence(DesignatedInitExpr *E);
  178. ExprDependence computeDependence(ParenListExpr *E);
  179. ExprDependence computeDependence(PseudoObjectExpr *E);
  180. ExprDependence computeDependence(AtomicExpr *E);
  181. ExprDependence computeDependence(OMPArraySectionExpr *E);
  182. ExprDependence computeDependence(OMPArrayShapingExpr *E);
  183. ExprDependence computeDependence(OMPIteratorExpr *E);
  184. ExprDependence computeDependence(ObjCArrayLiteral *E);
  185. ExprDependence computeDependence(ObjCDictionaryLiteral *E);
  186. ExprDependence computeDependence(ObjCBoxedExpr *E);
  187. ExprDependence computeDependence(ObjCEncodeExpr *E);
  188. ExprDependence computeDependence(ObjCIvarRefExpr *E);
  189. ExprDependence computeDependence(ObjCPropertyRefExpr *E);
  190. ExprDependence computeDependence(ObjCSubscriptRefExpr *E);
  191. ExprDependence computeDependence(ObjCIsaExpr *E);
  192. ExprDependence computeDependence(ObjCIndirectCopyRestoreExpr *E);
  193. ExprDependence computeDependence(ObjCMessageExpr *E);
  194. } // namespace clang
  195. #endif
  196. #ifdef __GNUC__
  197. #pragma GCC diagnostic pop
  198. #endif