47 #include "llvm/ADT/ArrayRef.h" 48 #include "llvm/ADT/SmallString.h" 49 #include "llvm/ADT/SmallVector.h" 50 #include "llvm/ADT/StringRef.h" 51 #include "llvm/Support/Casting.h" 52 #include "llvm/Support/Compiler.h" 53 #include "llvm/Support/ErrorHandling.h" 54 #include "llvm/Support/Format.h" 55 #include "llvm/Support/raw_ostream.h" 59 using namespace clang;
67 class StmtPrinter :
public StmtVisitor<StmtPrinter> {
78 : OS(os), IndentLevel(Indentation), Helper(helper), Policy(Policy),
81 void PrintStmt(
Stmt *S) {
85 void PrintStmt(
Stmt *S,
int SubIndent) {
86 IndentLevel += SubIndent;
87 if (S && isa<Expr>(S)) {
95 Indent() <<
"<<<NULL STATEMENT>>>\n";
97 IndentLevel -= SubIndent;
101 void PrintRawDecl(
Decl *D);
102 void PrintRawDeclStmt(
const DeclStmt *S);
103 void PrintRawIfStmt(
IfStmt *If);
109 bool ForceNoStmt =
false);
111 void PrintExpr(
Expr *E) {
118 raw_ostream &Indent(
int Delta = 0) {
119 for (
int i = 0, e = IndentLevel+Delta; i < e; ++i)
124 void Visit(
Stmt* S) {
130 void VisitStmt(
Stmt *
Node) LLVM_ATTRIBUTE_UNUSED {
131 Indent() <<
"<<unknown stmt type>>\n";
134 void VisitExpr(
Expr *
Node) LLVM_ATTRIBUTE_UNUSED {
135 OS <<
"<<unknown expr type>>";
140 #define ABSTRACT_STMT(CLASS) 141 #define STMT(CLASS, PARENT) \ 142 void Visit##CLASS(CLASS *Node); 143 #include "clang/AST/StmtNodes.inc" 156 for (
auto *I : Node->
body())
162 void StmtPrinter::PrintRawDecl(
Decl *D) {
163 D->
print(OS, Policy, IndentLevel);
166 void StmtPrinter::PrintRawDeclStmt(
const DeclStmt *S) {
175 void StmtPrinter::VisitDeclStmt(
DeclStmt *Node) {
177 PrintRawDeclStmt(Node);
181 void StmtPrinter::VisitCompoundStmt(
CompoundStmt *Node) {
183 PrintRawCompoundStmt(Node);
187 void StmtPrinter::VisitCaseStmt(
CaseStmt *Node) {
188 Indent(-1) <<
"case ";
189 PrintExpr(Node->
getLHS());
192 PrintExpr(Node->
getRHS());
199 void StmtPrinter::VisitDefaultStmt(
DefaultStmt *Node) {
200 Indent(-1) <<
"default:\n";
204 void StmtPrinter::VisitLabelStmt(
LabelStmt *Node) {
205 Indent(-1) << Node->
getName() <<
":\n";
217 void StmtPrinter::PrintRawIfStmt(
IfStmt *If) {
220 PrintRawDeclStmt(DS);
225 if (
auto *CS = dyn_cast<CompoundStmt>(If->
getThen())) {
227 PrintRawCompoundStmt(CS);
228 OS << (If->
getElse() ?
' ' :
'\n');
238 if (
auto *CS = dyn_cast<CompoundStmt>(Else)) {
240 PrintRawCompoundStmt(CS);
242 }
else if (
auto *ElseIf = dyn_cast<IfStmt>(Else)) {
244 PrintRawIfStmt(ElseIf);
252 void StmtPrinter::VisitIfStmt(
IfStmt *If) {
257 void StmtPrinter::VisitSwitchStmt(
SwitchStmt *Node) {
258 Indent() <<
"switch (";
260 PrintRawDeclStmt(DS);
266 if (
auto *CS = dyn_cast<CompoundStmt>(Node->
getBody())) {
268 PrintRawCompoundStmt(CS);
276 void StmtPrinter::VisitWhileStmt(
WhileStmt *Node) {
277 Indent() <<
"while (";
279 PrintRawDeclStmt(DS);
286 void StmtPrinter::VisitDoStmt(
DoStmt *Node) {
288 if (
auto *CS = dyn_cast<CompoundStmt>(Node->
getBody())) {
289 PrintRawCompoundStmt(CS);
302 void StmtPrinter::VisitForStmt(
ForStmt *Node) {
305 if (
auto *DS = dyn_cast<DeclStmt>(Node->
getInit()))
306 PrintRawDeclStmt(DS);
308 PrintExpr(cast<Expr>(Node->
getInit()));
318 PrintExpr(Node->
getInc());
322 if (
auto *CS = dyn_cast<CompoundStmt>(Node->
getBody())) {
323 PrintRawCompoundStmt(CS);
333 if (
auto *DS = dyn_cast<DeclStmt>(Node->
getElement()))
334 PrintRawDeclStmt(DS);
341 if (
auto *CS = dyn_cast<CompoundStmt>(Node->
getBody())) {
342 PrintRawCompoundStmt(CS);
366 OS <<
"__if_exists (";
368 OS <<
"__if_not_exists (";
372 Qualifier->print(OS, Policy);
379 void StmtPrinter::VisitGotoStmt(
GotoStmt *Node) {
385 Indent() <<
"goto *";
391 void StmtPrinter::VisitContinueStmt(
ContinueStmt *Node) {
392 Indent() <<
"continue;";
396 void StmtPrinter::VisitBreakStmt(
BreakStmt *Node) {
397 Indent() <<
"break;";
401 void StmtPrinter::VisitReturnStmt(
ReturnStmt *Node) {
402 Indent() <<
"return";
411 void StmtPrinter::VisitGCCAsmStmt(
GCCAsmStmt *Node) {
425 for (
unsigned i = 0, e = Node->
getNumOutputs(); i != e; ++i) {
445 for (
unsigned i = 0, e = Node->
getNumInputs(); i != e; ++i) {
476 void StmtPrinter::VisitMSAsmStmt(
MSAsmStmt *Node) {
478 Indent() <<
"__asm ";
486 void StmtPrinter::VisitCapturedStmt(
CapturedStmt *Node) {
492 if (
auto *TS = dyn_cast<CompoundStmt>(Node->
getTryBody())) {
493 PrintRawCompoundStmt(TS);
499 Indent() <<
"@catch(";
505 if (
auto *CS = dyn_cast<CompoundStmt>(catchStmt->
getCatchBody())) {
506 PrintRawCompoundStmt(CS);
511 if (
auto *FS = static_cast<ObjCAtFinallyStmt *>(Node->
getFinallyStmt())) {
512 Indent() <<
"@finally";
513 PrintRawCompoundStmt(dyn_cast<CompoundStmt>(FS->getFinallyBody()));
522 Indent() <<
"@catch (...) { /* todo */ } \n";
526 Indent() <<
"@throw";
534 void StmtPrinter::VisitObjCAvailabilityCheckExpr(
536 OS <<
"@available(...)";
540 Indent() <<
"@synchronized (";
548 Indent() <<
"@autoreleasepool";
549 PrintRawCompoundStmt(dyn_cast<CompoundStmt>(Node->
getSubStmt()));
553 void StmtPrinter::PrintRawCXXCatchStmt(
CXXCatchStmt *Node) {
556 PrintRawDecl(ExDecl);
563 void StmtPrinter::VisitCXXCatchStmt(
CXXCatchStmt *Node) {
565 PrintRawCXXCatchStmt(Node);
569 void StmtPrinter::VisitCXXTryStmt(
CXXTryStmt *Node) {
579 void StmtPrinter::VisitSEHTryStmt(
SEHTryStmt *Node) {
580 Indent() << (Node->
getIsCXXTry() ?
"try " :
"__try ");
585 PrintRawSEHExceptHandler(E);
587 assert(F &&
"Must have a finally block...");
588 PrintRawSEHFinallyStmt(F);
595 PrintRawCompoundStmt(Node->
getBlock());
599 void StmtPrinter::PrintRawSEHExceptHandler(
SEHExceptStmt *Node) {
603 PrintRawCompoundStmt(Node->
getBlock());
609 PrintRawSEHExceptHandler(Node);
615 PrintRawSEHFinallyStmt(Node);
619 void StmtPrinter::VisitSEHLeaveStmt(
SEHLeaveStmt *Node) {
620 Indent() <<
"__leave;";
635 template <
typename T>
636 void VisitOMPClauseList(T *Node,
char StartSym);
640 : OS(OS), Policy(Policy) {}
642 #define OPENMP_CLAUSE(Name, Class) \ 643 void Visit##Class(Class *S); 644 #include "clang/Basic/OpenMPKinds.def" 649 void OMPClausePrinter::VisitOMPIfClause(
OMPIfClause *Node) {
657 void OMPClausePrinter::VisitOMPFinalClause(
OMPFinalClause *Node) {
664 OS <<
"num_threads(";
723 Num->printPretty(OS,
nullptr, Policy, 0);
744 void OMPClausePrinter::VisitOMPReadClause(
OMPReadClause *) { OS <<
"read"; }
746 void OMPClausePrinter::VisitOMPWriteClause(
OMPWriteClause *) { OS <<
"write"; }
764 void OMPClausePrinter::VisitOMPSIMDClause(
OMPSIMDClause *) { OS <<
"simd"; }
779 OS <<
"thread_limit(";
802 void OMPClausePrinter::VisitOMPHintClause(
OMPHintClause *Node) {
809 void OMPClausePrinter::VisitOMPClauseList(T *Node,
char StartSym) {
810 for (
typename T::varlist_iterator I = Node->varlist_begin(),
811 E = Node->varlist_end();
813 assert(*I &&
"Expected non-null Stmt");
814 OS << (I == Node->varlist_begin() ? StartSym :
',');
815 if (
auto *DRE = dyn_cast<DeclRefExpr>(*I)) {
816 if (isa<OMPCapturedExprDecl>(DRE->getDecl()))
817 DRE->printPretty(OS,
nullptr, Policy, 0);
819 DRE->getDecl()->printQualifiedName(OS);
821 (*I)->printPretty(OS,
nullptr, Policy, 0);
828 VisitOMPClauseList(Node,
'(');
835 OS <<
"firstprivate";
836 VisitOMPClauseList(Node,
'(');
844 VisitOMPClauseList(Node,
'(');
852 VisitOMPClauseList(Node,
'(');
864 if (QualifierLoc ==
nullptr && OOK !=
OO_None) {
869 if (QualifierLoc !=
nullptr)
870 QualifierLoc->
print(OS, Policy);
874 VisitOMPClauseList(Node,
' ');
879 void OMPClausePrinter::VisitOMPTaskReductionClause(
882 OS <<
"task_reduction(";
887 if (QualifierLoc ==
nullptr && OOK !=
OO_None) {
892 if (QualifierLoc !=
nullptr)
893 QualifierLoc->
print(OS, Policy);
897 VisitOMPClauseList(Node,
' ');
904 OS <<
"in_reduction(";
909 if (QualifierLoc ==
nullptr && OOK !=
OO_None) {
914 if (QualifierLoc !=
nullptr)
915 QualifierLoc->
print(OS, Policy);
919 VisitOMPClauseList(Node,
' ');
927 if (Node->getModifierLoc().isValid()) {
931 VisitOMPClauseList(Node,
'(');
932 if (Node->getModifierLoc().isValid())
934 if (Node->getStep() !=
nullptr) {
936 Node->getStep()->printPretty(OS,
nullptr, Policy, 0);
943 if (!Node->varlist_empty()) {
945 VisitOMPClauseList(Node,
'(');
955 if (!Node->varlist_empty()) {
957 VisitOMPClauseList(Node,
'(');
963 if (!Node->varlist_empty()) {
965 VisitOMPClauseList(Node,
'(');
970 void OMPClausePrinter::VisitOMPFlushClause(
OMPFlushClause *Node) {
971 if (!Node->varlist_empty()) {
972 VisitOMPClauseList(Node,
'(');
981 if (!Node->varlist_empty()) {
983 VisitOMPClauseList(Node,
' ');
988 void OMPClausePrinter::VisitOMPMapClause(
OMPMapClause *Node) {
989 if (!Node->varlist_empty()) {
1000 VisitOMPClauseList(Node,
' ');
1005 void OMPClausePrinter::VisitOMPToClause(
OMPToClause *Node) {
1006 if (!Node->varlist_empty()) {
1008 VisitOMPClauseList(Node,
'(');
1013 void OMPClausePrinter::VisitOMPFromClause(
OMPFromClause *Node) {
1014 if (!Node->varlist_empty()) {
1016 VisitOMPClauseList(Node,
'(');
1032 OS <<
"defaultmap(";
1042 if (!Node->varlist_empty()) {
1043 OS <<
"use_device_ptr";
1044 VisitOMPClauseList(Node,
'(');
1050 if (!Node->varlist_empty()) {
1051 OS <<
"is_device_ptr";
1052 VisitOMPClauseList(Node,
'(');
1063 OMPClausePrinter Printer(OS, Policy);
1065 for (
auto *Clause : Clauses)
1066 if (Clause && !Clause->isImplicit()) {
1068 Printer.Visit(Clause);
1076 Indent() <<
"#pragma omp parallel";
1077 PrintOMPExecutableDirective(Node);
1081 Indent() <<
"#pragma omp simd";
1082 PrintOMPExecutableDirective(Node);
1086 Indent() <<
"#pragma omp for";
1087 PrintOMPExecutableDirective(Node);
1091 Indent() <<
"#pragma omp for simd";
1092 PrintOMPExecutableDirective(Node);
1096 Indent() <<
"#pragma omp sections";
1097 PrintOMPExecutableDirective(Node);
1101 Indent() <<
"#pragma omp section";
1102 PrintOMPExecutableDirective(Node);
1106 Indent() <<
"#pragma omp single";
1107 PrintOMPExecutableDirective(Node);
1111 Indent() <<
"#pragma omp master";
1112 PrintOMPExecutableDirective(Node);
1116 Indent() <<
"#pragma omp critical";
1122 PrintOMPExecutableDirective(Node);
1126 Indent() <<
"#pragma omp parallel for";
1127 PrintOMPExecutableDirective(Node);
1130 void StmtPrinter::VisitOMPParallelForSimdDirective(
1132 Indent() <<
"#pragma omp parallel for simd";
1133 PrintOMPExecutableDirective(Node);
1136 void StmtPrinter::VisitOMPParallelSectionsDirective(
1138 Indent() <<
"#pragma omp parallel sections";
1139 PrintOMPExecutableDirective(Node);
1143 Indent() <<
"#pragma omp task";
1144 PrintOMPExecutableDirective(Node);
1148 Indent() <<
"#pragma omp taskyield";
1149 PrintOMPExecutableDirective(Node);
1153 Indent() <<
"#pragma omp barrier";
1154 PrintOMPExecutableDirective(Node);
1158 Indent() <<
"#pragma omp taskwait";
1159 PrintOMPExecutableDirective(Node);
1163 Indent() <<
"#pragma omp taskgroup";
1164 PrintOMPExecutableDirective(Node);
1168 Indent() <<
"#pragma omp flush";
1169 PrintOMPExecutableDirective(Node);
1173 Indent() <<
"#pragma omp ordered";
1178 Indent() <<
"#pragma omp atomic";
1179 PrintOMPExecutableDirective(Node);
1183 Indent() <<
"#pragma omp target";
1184 PrintOMPExecutableDirective(Node);
1188 Indent() <<
"#pragma omp target data";
1189 PrintOMPExecutableDirective(Node);
1192 void StmtPrinter::VisitOMPTargetEnterDataDirective(
1194 Indent() <<
"#pragma omp target enter data";
1195 PrintOMPExecutableDirective(Node,
true);
1198 void StmtPrinter::VisitOMPTargetExitDataDirective(
1200 Indent() <<
"#pragma omp target exit data";
1201 PrintOMPExecutableDirective(Node,
true);
1204 void StmtPrinter::VisitOMPTargetParallelDirective(
1206 Indent() <<
"#pragma omp target parallel";
1207 PrintOMPExecutableDirective(Node);
1210 void StmtPrinter::VisitOMPTargetParallelForDirective(
1212 Indent() <<
"#pragma omp target parallel for";
1213 PrintOMPExecutableDirective(Node);
1217 Indent() <<
"#pragma omp teams";
1218 PrintOMPExecutableDirective(Node);
1221 void StmtPrinter::VisitOMPCancellationPointDirective(
1223 Indent() <<
"#pragma omp cancellation point " 1225 PrintOMPExecutableDirective(Node);
1229 Indent() <<
"#pragma omp cancel " 1231 PrintOMPExecutableDirective(Node);
1235 Indent() <<
"#pragma omp taskloop";
1236 PrintOMPExecutableDirective(Node);
1239 void StmtPrinter::VisitOMPTaskLoopSimdDirective(
1241 Indent() <<
"#pragma omp taskloop simd";
1242 PrintOMPExecutableDirective(Node);
1246 Indent() <<
"#pragma omp distribute";
1247 PrintOMPExecutableDirective(Node);
1250 void StmtPrinter::VisitOMPTargetUpdateDirective(
1252 Indent() <<
"#pragma omp target update";
1253 PrintOMPExecutableDirective(Node,
true);
1256 void StmtPrinter::VisitOMPDistributeParallelForDirective(
1258 Indent() <<
"#pragma omp distribute parallel for";
1259 PrintOMPExecutableDirective(Node);
1262 void StmtPrinter::VisitOMPDistributeParallelForSimdDirective(
1264 Indent() <<
"#pragma omp distribute parallel for simd";
1265 PrintOMPExecutableDirective(Node);
1268 void StmtPrinter::VisitOMPDistributeSimdDirective(
1270 Indent() <<
"#pragma omp distribute simd";
1271 PrintOMPExecutableDirective(Node);
1274 void StmtPrinter::VisitOMPTargetParallelForSimdDirective(
1276 Indent() <<
"#pragma omp target parallel for simd";
1277 PrintOMPExecutableDirective(Node);
1281 Indent() <<
"#pragma omp target simd";
1282 PrintOMPExecutableDirective(Node);
1285 void StmtPrinter::VisitOMPTeamsDistributeDirective(
1287 Indent() <<
"#pragma omp teams distribute";
1288 PrintOMPExecutableDirective(Node);
1291 void StmtPrinter::VisitOMPTeamsDistributeSimdDirective(
1293 Indent() <<
"#pragma omp teams distribute simd";
1294 PrintOMPExecutableDirective(Node);
1297 void StmtPrinter::VisitOMPTeamsDistributeParallelForSimdDirective(
1299 Indent() <<
"#pragma omp teams distribute parallel for simd";
1300 PrintOMPExecutableDirective(Node);
1303 void StmtPrinter::VisitOMPTeamsDistributeParallelForDirective(
1305 Indent() <<
"#pragma omp teams distribute parallel for";
1306 PrintOMPExecutableDirective(Node);
1310 Indent() <<
"#pragma omp target teams";
1311 PrintOMPExecutableDirective(Node);
1314 void StmtPrinter::VisitOMPTargetTeamsDistributeDirective(
1316 Indent() <<
"#pragma omp target teams distribute";
1317 PrintOMPExecutableDirective(Node);
1320 void StmtPrinter::VisitOMPTargetTeamsDistributeParallelForDirective(
1322 Indent() <<
"#pragma omp target teams distribute parallel for";
1323 PrintOMPExecutableDirective(Node);
1326 void StmtPrinter::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
1328 Indent() <<
"#pragma omp target teams distribute parallel for simd";
1329 PrintOMPExecutableDirective(Node);
1332 void StmtPrinter::VisitOMPTargetTeamsDistributeSimdDirective(
1334 Indent() <<
"#pragma omp target teams distribute simd";
1335 PrintOMPExecutableDirective(Node);
1342 void StmtPrinter::VisitDeclRefExpr(
DeclRefExpr *Node) {
1343 if (
const auto *OCED = dyn_cast<OMPCapturedExprDecl>(Node->
getDecl())) {
1344 OCED->getInit()->IgnoreImpCasts()->printPretty(OS,
nullptr, Policy);
1348 Qualifier->print(OS, Policy);
1356 void StmtPrinter::VisitDependentScopeDeclRefExpr(
1359 Qualifier->print(OS, Policy);
1378 if (
const auto *DRE = dyn_cast<DeclRefExpr>(E)) {
1379 if (
const auto *PD = dyn_cast<ImplicitParamDecl>(DRE->getDecl())) {
1381 DRE->getLocStart().isInvalid())
1393 OS << (Node->
isArrow() ?
"->" :
".");
1411 Getter->getSelector().print(OS);
1481 if (value < 256 &&
isPrintable((
unsigned char)value))
1482 OS <<
"'" << (
char)value <<
"'";
1483 else if (value < 256)
1484 OS <<
"'\\x" << llvm::format(
"%02x", value) <<
"'";
1485 else if (value <= 0xFFFF)
1486 OS <<
"'\\u" << llvm::format(
"%04x", value) <<
"'";
1488 OS <<
"'\\U" << llvm::format(
"%08x", value) <<
"'";
1498 bool Invalid =
false;
1513 OS << Node->
getValue().toString(10, isSigned);
1517 default: llvm_unreachable(
"Unexpected type for integer literal!");
1518 case BuiltinType::Char_S:
1519 case BuiltinType::Char_U: OS <<
"i8";
break;
1520 case BuiltinType::UChar: OS <<
"Ui8";
break;
1521 case BuiltinType::Short: OS <<
"i16";
break;
1522 case BuiltinType::UShort: OS <<
"Ui16";
break;
1523 case BuiltinType::Int:
break;
1524 case BuiltinType::UInt: OS <<
'U';
break;
1525 case BuiltinType::Long: OS <<
'L';
break;
1526 case BuiltinType::ULong: OS <<
"UL";
break;
1527 case BuiltinType::LongLong: OS <<
"LL";
break;
1528 case BuiltinType::ULongLong: OS <<
"ULL";
break;
1538 default: llvm_unreachable(
"Unexpected type for fixed point literal!");
1539 case BuiltinType::ShortFract: OS <<
"hr";
break;
1540 case BuiltinType::ShortAccum: OS <<
"hk";
break;
1541 case BuiltinType::UShortFract: OS <<
"uhr";
break;
1542 case BuiltinType::UShortAccum: OS <<
"uhk";
break;
1543 case BuiltinType::Fract: OS <<
"r";
break;
1544 case BuiltinType::Accum: OS <<
"k";
break;
1545 case BuiltinType::UFract: OS <<
"ur";
break;
1546 case BuiltinType::UAccum: OS <<
"uk";
break;
1547 case BuiltinType::LongFract: OS <<
"lr";
break;
1548 case BuiltinType::LongAccum: OS <<
"lk";
break;
1549 case BuiltinType::ULongFract: OS <<
"ulr";
break;
1550 case BuiltinType::ULongAccum: OS <<
"ulk";
break;
1559 if (Str.find_first_not_of(
"-0123456789") == StringRef::npos)
1567 default: llvm_unreachable(
"Unexpected type for float literal!");
1568 case BuiltinType::Half:
break;
1569 case BuiltinType::Double:
break;
1570 case BuiltinType::Float16: OS <<
"F16";
break;
1571 case BuiltinType::Float: OS <<
'F';
break;
1572 case BuiltinType::LongDouble: OS <<
'L';
break;
1573 case BuiltinType::Float128: OS <<
'Q';
break;
1592 void StmtPrinter::VisitParenExpr(
ParenExpr *Node) {
1624 void StmtPrinter::VisitOffsetOfExpr(
OffsetOfExpr *Node) {
1625 OS <<
"__builtin_offsetof(";
1628 bool PrintedSomething =
false;
1636 PrintedSomething =
true;
1649 if (PrintedSomething)
1652 PrintedSomething =
true;
1675 OS <<
"__builtin_omp_required_simd_align";
1697 T.
print(OS, Policy);
1705 PrintExpr(Node->
getLHS());
1707 PrintExpr(Node->
getRHS());
1724 void StmtPrinter::PrintCallArgs(
CallExpr *Call) {
1725 for (
unsigned i = 0, e = Call->
getNumArgs(); i != e; ++i) {
1726 if (isa<CXXDefaultArgExpr>(Call->
getArg(i))) {
1732 PrintExpr(Call->
getArg(i));
1736 void StmtPrinter::VisitCallExpr(
CallExpr *Call) {
1739 PrintCallArgs(Call);
1744 if (
const auto *TE = dyn_cast<CXXThisExpr>(E))
1745 return TE->isImplicit();
1749 void StmtPrinter::VisitMemberExpr(
MemberExpr *Node) {
1755 ParentMember ? dyn_cast<
FieldDecl>(ParentMember->getMemberDecl())
1758 if (!ParentDecl || !ParentDecl->isAnonymousStructOrUnion())
1759 OS << (Node->
isArrow() ?
"->" :
".");
1763 if (FD->isAnonymousStructOrUnion())
1767 Qualifier->
print(OS, Policy);
1775 void StmtPrinter::VisitObjCIsaExpr(
ObjCIsaExpr *Node) {
1777 OS << (Node->
isArrow() ?
"->isa" :
".isa");
1806 PrintExpr(Node->
getLHS());
1808 PrintExpr(Node->
getRHS());
1812 PrintExpr(Node->
getLHS());
1814 PrintExpr(Node->
getRHS());
1820 PrintExpr(Node->
getLHS());
1822 PrintExpr(Node->
getRHS());
1838 void StmtPrinter::VisitStmtExpr(
StmtExpr *E) {
1844 void StmtPrinter::VisitChooseExpr(
ChooseExpr *Node) {
1845 OS <<
"__builtin_choose_expr(";
1848 PrintExpr(Node->
getLHS());
1850 PrintExpr(Node->
getRHS());
1854 void StmtPrinter::VisitGNUNullExpr(
GNUNullExpr *) {
1859 OS <<
"__builtin_shufflevector(";
1868 OS <<
"__builtin_convertvector(";
1875 void StmtPrinter::VisitInitListExpr(
InitListExpr* Node) {
1882 for (
unsigned i = 0, e = Node->
getNumInits(); i != e; ++i) {
1906 for (
unsigned i = 0, e = Node->
getNumExprs(); i != e; ++i) {
1914 bool NeedsEquals =
true;
1916 if (D.isFieldDesignator()) {
1917 if (D.getDotLoc().isInvalid()) {
1919 OS << II->getName() <<
":";
1920 NeedsEquals =
false;
1923 OS <<
"." << D.getFieldName()->getName();
1927 if (D.isArrayDesignator()) {
1945 void StmtPrinter::VisitDesignatedInitUpdateExpr(
1952 OS <<
"/*updater*/";
1957 void StmtPrinter::VisitNoInitExpr(
NoInitExpr *Node) {
1958 OS <<
"/*no init*/";
1963 OS <<
"/*implicit*/";
1967 OS <<
"/*implicit*/(";
1977 void StmtPrinter::VisitVAArgExpr(
VAArgExpr *Node) {
1978 OS <<
"__builtin_va_arg(";
1989 void StmtPrinter::VisitAtomicExpr(
AtomicExpr *Node) {
1990 const char *Name =
nullptr;
1991 switch (Node->
getOp()) {
1992 #define BUILTIN(ID, TYPE, ATTRS) 1993 #define ATOMIC_BUILTIN(ID, TYPE, ATTRS) \ 1994 case AtomicExpr::AO ## ID: \ 1997 #include "clang/Basic/Builtins.def" 2002 PrintExpr(Node->
getPtr());
2003 if (Node->
getOp() != AtomicExpr::AO__c11_atomic_load &&
2004 Node->
getOp() != AtomicExpr::AO__atomic_load_n &&
2005 Node->
getOp() != AtomicExpr::AO__opencl_atomic_load) {
2009 if (Node->
getOp() == AtomicExpr::AO__atomic_exchange ||
2014 if (Node->
getOp() == AtomicExpr::AO__atomic_compare_exchange ||
2015 Node->
getOp() == AtomicExpr::AO__atomic_compare_exchange_n) {
2019 if (Node->
getOp() != AtomicExpr::AO__c11_atomic_init &&
2020 Node->
getOp() != AtomicExpr::AO__opencl_atomic_init) {
2035 #define OVERLOADED_OPERATOR(Name,Spelling,Token,Unary,Binary,MemberOnly) \ 2037 #include "clang/Basic/OperatorKinds.def" 2041 if (Kind == OO_PlusPlus || Kind == OO_MinusMinus) {
2043 OS << OpStrings[
Kind] <<
' ';
2044 PrintExpr(Node->
getArg(0));
2046 PrintExpr(Node->
getArg(0));
2047 OS <<
' ' << OpStrings[
Kind];
2049 }
else if (Kind == OO_Arrow) {
2050 PrintExpr(Node->
getArg(0));
2051 }
else if (Kind == OO_Call) {
2052 PrintExpr(Node->
getArg(0));
2054 for (
unsigned ArgIdx = 1; ArgIdx < Node->
getNumArgs(); ++ArgIdx) {
2057 if (!isa<CXXDefaultArgExpr>(Node->
getArg(ArgIdx)))
2058 PrintExpr(Node->
getArg(ArgIdx));
2061 }
else if (Kind == OO_Subscript) {
2062 PrintExpr(Node->
getArg(0));
2064 PrintExpr(Node->
getArg(1));
2067 OS << OpStrings[
Kind] <<
' ';
2068 PrintExpr(Node->
getArg(0));
2070 PrintExpr(Node->
getArg(0));
2071 OS <<
' ' << OpStrings[
Kind] <<
' ';
2072 PrintExpr(Node->
getArg(1));
2074 llvm_unreachable(
"unknown overloaded operator");
2081 if (MD && isa<CXXConversionDecl>(MD)) {
2085 VisitCallExpr(cast<CallExpr>(Node));
2093 PrintCallArgs(Node);
2106 VisitCXXNamedCastExpr(Node);
2110 VisitCXXNamedCastExpr(Node);
2114 VisitCXXNamedCastExpr(Node);
2118 VisitCXXNamedCastExpr(Node);
2149 Qualifier->print(OS, Policy);
2156 PrintExpr(Node->
getIdx());
2168 cast<FunctionDecl>(DRE->getDecl())->getTemplateSpecializationArgs();
2171 if (Args->size() != 1) {
2180 char C = (char)
P.getAsIntegral().getZExtValue();
2188 OS << Int->getValue().toString(10,
false);
2206 OS << (Node->
getValue() ?
"true" :
"false");
2213 void StmtPrinter::VisitCXXThisExpr(
CXXThisExpr *Node) {
2217 void StmtPrinter::VisitCXXThrowExpr(
CXXThrowExpr *Node) {
2259 Arg != ArgEnd; ++Arg) {
2260 if ((*Arg)->isDefaultArgument())
2274 void StmtPrinter::VisitLambdaExpr(
LambdaExpr *Node) {
2276 bool NeedComma =
false;
2295 if (
C->capturesVLAType())
2302 switch (
C->getCaptureKind()) {
2314 OS <<
C->getCapturedVar()->getName();
2318 OS <<
C->getCapturedVar()->getName();
2322 llvm_unreachable(
"VLA type in explicit captures.");
2326 PrintExpr(
C->getCapturedVar()->getInit());
2340 std::string ParamStr =
P->getNameAsString();
2341 P->getOriginalType().print(OS, Policy, ParamStr);
2361 Proto->getReturnType().print(OS, Policy);
2373 TSInfo->getType().print(OS, Policy);
2379 void StmtPrinter::VisitCXXNewExpr(
CXXNewExpr *E) {
2387 for (
unsigned i = 1; i < NumPlace; ++i) {
2399 llvm::raw_string_ostream s(TypeS);
2401 Size->printPretty(s, Helper, Policy);
2438 OS << II->getName();
2447 for (
unsigned i = 0, e = E->
getNumArgs(); i != e; ++i) {
2448 if (isa<CXXDefaultArgExpr>(E->
getArg(i))) {
2463 OS <<
"<forwarded>";
2476 StmtPrinter::VisitCXXUnresolvedConstructExpr(
2482 Arg != ArgEnd; ++Arg) {
2490 void StmtPrinter::VisitCXXDependentScopeMemberExpr(
2494 OS << (Node->
isArrow() ?
"->" :
".");
2497 Qualifier->print(OS, Policy);
2508 OS << (Node->
isArrow() ?
"->" :
".");
2511 Qualifier->print(OS, Policy);
2521 #define TYPE_TRAIT_1(Spelling, Name, Key) \ 2522 case clang::UTT_##Name: return #Spelling; 2523 #define TYPE_TRAIT_2(Spelling, Name, Key) \ 2524 case clang::BTT_##Name: return #Spelling; 2525 #define TYPE_TRAIT_N(Spelling, Name, Key) \ 2526 case clang::TT_##Name: return #Spelling; 2527 #include "clang/Basic/TokenKinds.def" 2529 llvm_unreachable(
"Type trait not covered by switch");
2537 llvm_unreachable(
"Array type trait not covered by switch");
2545 llvm_unreachable(
"Expression type trait not covered by switch");
2550 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I) {
2582 OS <<
"sizeof...(" << *E->
getPack() <<
")";
2585 void StmtPrinter::VisitSubstNonTypeTemplateParmPackExpr(
2590 void StmtPrinter::VisitSubstNonTypeTemplateParmExpr(
2603 void StmtPrinter::VisitCXXFoldExpr(
CXXFoldExpr *E) {
2632 void StmtPrinter::VisitCoawaitExpr(
CoawaitExpr *S) {
2642 void StmtPrinter::VisitCoyieldExpr(
CoyieldExpr *S) {
2662 for (
auto I = Ch.begin(), E = Ch.end(); I != E; ++I) {
2663 if (I != Ch.begin())
2679 Visit(Element.
Value);
2699 OS <<
"@protocol(" << *Node->
getProtocol() <<
')';
2724 for (
unsigned i = 0, e = Mess->
getNumArgs(); i != e; ++i) {
2726 if (i > 0) OS <<
' ';
2734 PrintExpr(Mess->
getArg(i));
2741 OS << (Node->
getValue() ?
"__objc_yes" :
"__objc_no");
2757 void StmtPrinter::VisitBlockExpr(
BlockExpr *Node) {
2763 if (isa<FunctionNoProtoType>(AFT)) {
2765 }
else if (!BD->
param_empty() || cast<FunctionProtoType>(AFT)->isVariadic()) {
2770 std::string ParamStr = (*AI)->getNameAsString();
2771 (*AI)->getType().print(OS, Policy, ParamStr);
2774 const auto *FT = cast<FunctionProtoType>(AFT);
2775 if (FT->isVariadic()) {
2788 void StmtPrinter::VisitTypoExpr(
TypoExpr *Node) {
2790 llvm_unreachable(
"Cannot print TypoExpr nodes");
2793 void StmtPrinter::VisitAsTypeExpr(
AsTypeExpr *Node) {
2794 OS <<
"__builtin_astype(";
2812 StmtPrinter
P(OS, Helper, Policy, Indentation, Context);
2813 P.Visit(const_cast<Stmt*>(
this));
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
A call to an overloaded operator written using operator syntax.
The receiver is the instance of the superclass object.
ExprIterator arg_iterator
Represents a single C99 designator.
Raw form: operator "" X (const char *)
Defines the clang::ASTContext interface.
const BlockDecl * getBlockDecl() const
This represents '#pragma omp distribute simd' composite directive.
This represents '#pragma omp master' directive.
operator "" X (long double)
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
The null pointer literal (C++11 [lex.nullptr])
capture_iterator explicit_capture_end() const
Retrieve an iterator pointing past the end of the sequence of explicit lambda captures.
This represents '#pragma omp task' directive.
This represents a GCC inline-assembly statement extension.
Represents a 'co_await' expression while the type of the promise is dependent.
Expr * getArrayIndex(const Designator &D) const
This represents 'thread_limit' clause in the '#pragma omp ...' directive.
The receiver is an object instance.
bool hasExplicitTemplateArgs() const
Determines whether this expression had explicit template arguments.
const Stmt * getElse() const
unsigned getNumInputs() const
Expr * getSyntacticForm()
Return the syntactic form of this expression, i.e.
bool hasTemplateKeyword() const
Determines whether the name was preceded by the template keyword.
bool hasTemplateKeyword() const
Determines whether the member name was preceded by the template keyword.
ObjCDictionaryElement getKeyValueElement(unsigned Index) const
const FunctionProtoType * getFunctionType() const
getFunctionType - Return the underlying function type for this block.
CompoundStmt * getBlock() const
Smart pointer class that efficiently represents Objective-C method names.
This represents clause 'copyin' in the '#pragma omp ...' directives.
A (possibly-)qualified type.
ArrayRef< TemplateArgumentLoc > template_arguments() const
bool varlist_empty() const
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
ArrayRef< OMPClause * > clauses()
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
Selector getSelector() const
Defines enumerations for the type traits support.
const Expr * getSubExpr() const
void print(raw_ostream &OS, const PrintingPolicy &Policy, const Twine &PlaceHolder=Twine(), unsigned Indentation=0) const
Expr * getExpr(unsigned Index)
getExpr - Return the Expr at the specified index.
unsigned getNumSubExprs() const
getNumSubExprs - Return the size of the SubExprs array.
bool isSuperReceiver() const
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
CompoundStmt * getSubStmt()
const Expr * getInit(unsigned Init) const
bool hasExplicitResultType() const
Whether this lambda had its result type explicitly specified.
ObjCProtocolDecl * getProtocol() const
Represents a 'co_return' statement in the C++ Coroutines TS.
Stmt - This represents one statement.
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
This represents clause 'in_reduction' in the '#pragma omp task' directives.
const ObjCAtFinallyStmt * getFinallyStmt() const
Retrieve the @finally statement, if any.
FunctionType - C99 6.7.5.3 - Function Declarators.
CXXCatchStmt * getHandler(unsigned i)
IfStmt - This represents an if/then/else.
C Language Family Type Representation.
unsigned getNumOutputs() const
static CharSourceRange getTokenRange(SourceRange R)
This represents '#pragma omp for simd' directive.
bool isRecordType() const
const StringLiteral * getAsmString() const
Decl - This represents one declaration (or definition), e.g.
This represents 'grainsize' clause in the '#pragma omp ...' directive.
This represents '#pragma omp teams distribute parallel for' composite directive.
Expr * getImplicitObjectArgument() const
Retrieves the implicit object argument for the member call.
Stmt * getHandlerBlock() const
llvm::APFloat getValue() const
ObjCMethodDecl * getImplicitPropertySetter() const
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
param_iterator param_end()
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
This represents 'if' clause in the '#pragma omp ...' directive.
const Expr * getSubExpr() const
DeclarationNameInfo getNameInfo() const
Retrieve the name of the entity we're testing for, along with location information.
Defines the C++ template declaration subclasses.
CapturedStmt * getInnermostCapturedStmt()
Get innermost captured statement for the construct.
Represents an attribute applied to a statement.
ParenExpr - This represents a parethesized expression, e.g.
static bool isImplicitThis(const Expr *E)
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies this name, if any.
Expr * getLowerBound()
Get lower bound of array section.
This represents 'priority' clause in the '#pragma omp ...' directive.
This represents '#pragma omp target teams distribute' combined directive.
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies this declaration.
Represents Objective-C's @throw statement.
const char * getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind, unsigned Type)
bool hasExplicitTemplateArgs() const
Determines whether this declaration reference was followed by an explicit template argument list...
llvm::iterator_range< child_iterator > child_range
Represents a call to a C++ constructor.
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
Expr * getCondition() const
Returns condition.
A container of type source information.
This represents 'update' clause in the '#pragma omp atomic' directive.
NestedNameSpecifier * getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
static void printGroup(Decl **Begin, unsigned NumDecls, raw_ostream &Out, const PrintingPolicy &Policy, unsigned Indentation=0)
Expr * getCondition() const
Returns condition.
This represents '#pragma omp parallel for' directive.
MS property subscript expression.
This represents '#pragma omp target teams distribute parallel for' combined directive.
Describes the capture of a variable or of this, or of a C++1y init-capture.
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
MutableArrayRef< ParmVarDecl * >::iterator param_iterator
Expr * getAlignment()
Returns alignment.
void printExceptionSpecification(raw_ostream &OS, const PrintingPolicy &Policy) const
Expr * getNumForLoops() const
Return the number of associated for-loops.
const Expr * getSubExpr() const
Expr * getIndexExpr(unsigned Idx)
This represents '#pragma omp target exit data' directive.
This represents 'read' clause in the '#pragma omp atomic' directive.
This represents clause 'private' in the '#pragma omp ...' directives.
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
CompoundLiteralExpr - [C99 6.5.2.5].
This represents 'num_threads' clause in the '#pragma omp ...' directive.
const T * getAs() const
Member-template getAs<specific type>'.
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
This represents 'defaultmap' clause in the '#pragma omp ...' directive.
ObjCInterfaceDecl * getClassReceiver() const
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
const char * getName() const
unsigned getNumPlacementArgs() const
This represents implicit clause 'flush' for the '#pragma omp flush' directive.
Describes how types, statements, expressions, and declarations should be printed. ...
Defines the Objective-C statement AST node classes.
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
A C++ throw-expression (C++ [except.throw]).
Expr * getExprOperand() const
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
Defines the clang::Expr interface and subclasses for C++ expressions.
StringRef getInputName(unsigned i) const
Expr * getGrainsize() const
Return safe iteration space distance.
This represents 'nogroup' clause in the '#pragma omp ...' directive.
This represents 'safelen' clause in the '#pragma omp ...' directive.
ObjCPropertyDecl * getExplicitProperty() const
A C++ static_cast expression (C++ [expr.static.cast]).
Expr * getExprOperand() const
const Stmt * getSubStmt() const
LabelStmt - Represents a label, which has a substatement.
Expr * IgnoreImpCasts() LLVM_READONLY
IgnoreImpCasts - Skip past any implicit casts which might surround this expression.
Represents a C99 designated initializer expression.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
One of these records is kept for each identifier that is lexed.
Expr * GetTemporaryExpr() const
Retrieve the temporary-generating subexpression whose value will be materialized into a glvalue...
An element in an Objective-C dictionary literal.
This represents '#pragma omp parallel' directive.
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
void print(raw_ostream &Out, unsigned Indentation=0, bool PrintInstantiation=false) const
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Expr * getInit() const
Retrieve the initializer value.
This represents 'simd' clause in the '#pragma omp ...' directive.
Represents a member of a struct/union/class.
This represents clause 'lastprivate' in the '#pragma omp ...' directives.
Expr * getBase()
Retrieve the base object of this member expressions, e.g., the x in x.m.
Represents a place-holder for an object not to be initialized by anything.
const DeclarationNameInfo & getNameInfo() const
Gets the full name info.
StringLiteral * getString()
CompoundStmt * getBody() const
Retrieve the body of the lambda.
unsigned getArrayExprIndex() const
For an array element node, returns the index into the array of expressions.
const Expr * getRetValue() const
bool SuppressInitializers
Suppress printing of variable initializers.
bool hasExplicitTemplateArgs() const
Determines whether the member name was followed by an explicit template argument list.
Expr * getChunkSize()
Get chunk size.
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
This represents clause 'map' in the '#pragma omp ...' directives.
QualType getDestroyedType() const
Retrieve the type being destroyed.
This represents clause 'to' in the '#pragma omp ...' directives.
Expr * getPlacementArg(unsigned i)
This represents '#pragma omp target simd' directive.
Expr * getSourceExpr() const
The source expression of an opaque value expression is the expression which originally generated the ...
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
Defines some OpenMP-specific enums and functions.
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Expr * getSafelen() const
Return safe iteration space distance.
This represents '#pragma omp barrier' directive.
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
Expr * getNumTeams()
Return NumTeams number.
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
This represents '#pragma omp critical' directive.
LambdaCaptureDefault getCaptureDefault() const
Determine the default capture kind for this lambda.
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
ArrayRef< TemplateArgumentLoc > template_arguments() const
bool hasExplicitTemplateArgs() const
Determines whether this lookup had explicit template arguments.
Selector getSelector() const
ArrayRef< ParmVarDecl * > parameters() const
bool isUnarySelector() const
Represents Objective-C's @catch statement.
StringRef getOpcodeStr() const
This represents clause 'copyprivate' in the '#pragma omp ...' directives.
IndirectGotoStmt - This represents an indirect goto.
Describes an C or C++ initializer list.
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
This represents '#pragma omp distribute parallel for' composite directive.
Stmt * getBody() const override
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
Expr * getKeyExpr() const
This represents '#pragma omp teams distribute parallel for simd' composite directive.
ForStmt - This represents a 'for (init;cond;inc)' stmt.
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
Expr * getBaseExpr() const
Expr * getOperand() const
const Expr * getThrowExpr() const
< Capturing the *this object by copy
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Expr * getInitializer()
The initializer of this new-expression.
A builtin binary operation expression such as "x + y" or "x <= y".
const Expr * getAssocExpr(unsigned i) const
Expr * getOutputExpr(unsigned i)
ArrayRef< TemplateArgumentLoc > template_arguments() const
bool isClassReceiver() const
const StringLiteral * getInputConstraintLiteral(unsigned i) const
static bool isPostfix(Opcode Op)
isPostfix - Return true if this is a postfix operation, like x++.
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
This represents '#pragma omp cancellation point' directive.
This represents 'default' clause in the '#pragma omp ...' directive.
ObjCStringLiteral, used for Objective-C string literals i.e.
void printPretty(raw_ostream &OS, PrinterHelper *Helper, const PrintingPolicy &Policy, unsigned Indentation=0, const ASTContext *Context=nullptr) const
const CallExpr * getConfig() const
New-expression has a C++98 paren-delimited initializer.
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
This represents 'final' clause in the '#pragma omp ...' directive.
This represents 'mergeable' clause in the '#pragma omp ...' directive.
This represents '#pragma omp teams' directive.
OpenMPDependClauseKind getDependencyKind() const
Get dependency type.
NestedNameSpecifier * getQualifier() const
Fetches the nested-name qualifier, if one was given.
const Expr * getControllingExpr() const
This represents clause 'reduction' in the '#pragma omp ...' directives.
Helper class for OffsetOfExpr.
Expr * getOperand() const
This represents '#pragma omp teams distribute simd' combined directive.
Represents binding an expression to a temporary.
StringLiteral * getClobberStringLiteral(unsigned i)
StringRef getOutputName(unsigned i) const
ArrayTypeTrait
Names for the array type traits.
Expr * Key
The key for the dictionary element.
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Represents a C++ member access expression where the actual member referenced could not be resolved be...
This represents clause 'is_device_ptr' in the '#pragma omp ...' directives.
bool isInitCapture(const LambdaCapture *Capture) const
Determine whether one of this lambda's captures is an init-capture.
TypeSourceInfo * getTypeSourceInfo() const
A default argument (C++ [dcl.fct.default]).
bool isTypeOperand() const
const IdentifierInfo * getUDSuffix() const
Returns the ud-suffix specified for this literal.
This represents clause 'from' in the '#pragma omp ...' directives.
Represents the this expression in C++.
TypeTrait
Names for traits that operate specifically on types.
const ObjCAtCatchStmt * getCatchStmt(unsigned I) const
Retrieve a @catch statement.
This represents '#pragma omp target parallel for simd' directive.
QualType getTypeAsWritten() const
getTypeAsWritten - Returns the type that this expression is casting to, as written in the source code...
OpenMP 4.0 [2.4, Array Sections].
ConditionalOperator - The ?: ternary operator.
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
CompoundStmt - This represents a group of statements like { stmt stmt }.
OpenMPDefaultClauseKind getDefaultKind() const
Returns kind of the clause.
CXXRecordDecl * getAsCXXRecordDecl() const
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...
Represents a prototype with parameter type info, e.g.
QualType getQueriedType() const
This represents 'threads' clause in the '#pragma omp ...' directive.
CompoundStmt * getSubStmt() const
Retrieve the compound statement that will be included in the program only if the existence of the sym...
This represents '#pragma omp taskgroup' directive.
Expr * getSimdlen() const
Return safe iteration space distance.
NestedNameSpecifier * getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
This represents clause 'aligned' in the '#pragma omp ...' directives.
OverloadedOperatorKind getCXXOverloadedOperator() const
getCXXOverloadedOperator - If this name is the name of an overloadable operator in C++ (e...
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
This represents clause 'task_reduction' in the '#pragma omp taskgroup' directives.
InitListExpr * getUpdater() const
Represents a call to the builtin function __builtin_va_arg.
void print(raw_ostream &OS, const PrintingPolicy &Policy) const
Print this nested name specifier to the given output stream.
void outputString(raw_ostream &OS) const
const DeclStmt * getConditionVariableDeclStmt() const
If this IfStmt has a condition variable, return the faux DeclStmt associated with the creation of tha...
OpenMPProcBindClauseKind getProcBindKind() const
Returns kind of the clause.
static StringRef getSourceText(CharSourceRange Range, const SourceManager &SM, const LangOptions &LangOpts, bool *Invalid=nullptr)
Returns a string for the source that the range encompasses.
unsigned getValue() const
This represents '#pragma omp distribute' directive.
This represents implicit clause 'depend' for the '#pragma omp task' directive.
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
Pepresents a block literal declaration, which is like an unnamed FunctionDecl.
llvm::MutableArrayRef< Designator > designators()
This represents 'proc_bind' clause in the '#pragma omp ...' directive.
This represents 'capture' clause in the '#pragma omp atomic' directive.
Expr - This represents one expression.
bool isVariadic() const
Whether this function is variadic.
IdentifierInfo * getFieldName() const
For a field or identifier offsetof node, returns the name of the field.
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
static void PrintFloatingLiteral(raw_ostream &OS, FloatingLiteral *Node, bool PrintSuffix)
This represents 'simdlen' clause in the '#pragma omp ...' directive.
Expr * getNumTasks() const
Return safe iteration space distance.
bool isImplicitAccess() const
True if this is an implicit access, i.e., one in which the member being accessed was not written in t...
Represents a C++ functional cast expression that builds a temporary object.
const Stmt * getThen() const
A C++ const_cast expression (C++ [expr.const.cast]).
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
VarDecl * getExceptionDecl() const
IdentifierInfo * getDestroyedTypeIdentifier() const
In a dependent pseudo-destructor expression for which we do not have full type information on the des...
unsigned getNumInits() const
bool isImplicitAccess() const
True if this is an implicit access, i.e.
Expr * getSubExpr() const
Get the initializer to use for each array element.
Defines an enumeration for C++ overloaded operators.
const Expr * getCallee() const
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
QualType getArgumentType() const
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an '->' (otherwise, it used a '.
StringRef getNameForSlot(unsigned argIndex) const
Retrieve the name at a given position in the selector.
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
const CompoundStmt * getSynchBody() const
Represents Objective-C's @synchronized statement.
ObjCSelectorExpr used for @selector in Objective-C.
TypeSourceInfo * getTypeSourceInfo() const
Represents an expression that computes the length of a parameter pack.
CXXTryStmt - A C++ try block, including all handlers.
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
OpenMPDistScheduleClauseKind getDistScheduleKind() const
Get kind of the clause.
IdentifierInfo & getAccessor() const
This represents '#pragma omp target teams distribute simd' combined directive.
ArrayTypeTrait getTrait() const
void printTemplateArgumentList(raw_ostream &OS, ArrayRef< TemplateArgument > Args, const PrintingPolicy &Policy)
Print a template argument list, including the '<' and '>' enclosing the template arguments.
This represents 'ordered' clause in the '#pragma omp ...' directive.
bool isSignedIntegerType() const
Return true if this is an integer type that is signed, according to C99 6.2.5p4 [char, signed char, short, int, long..], or an enum decl which has a signed representation.
Kind getKind() const
Determine what kind of offsetof node this is.
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
void print(llvm::raw_ostream &OS) const
Prints the full selector name (e.g. "foo:bar:").
virtual bool handledStmt(Stmt *E, raw_ostream &OS)=0
This represents '#pragma omp for' directive.
LabelDecl * getLabel() const
const Stmt * getTryBody() const
Retrieve the @try body.
Represents a folding of a pack over an operator.
QualType getEncodedType() const
ReturnStmt - This represents a return, optionally of an expression: return; return 4;...
This represents '#pragma omp target teams' directive.
An expression that sends a message to the given Objective-C object or class.
This represents a Microsoft inline-assembly statement extension.
ObjCMethodDecl * getImplicitPropertyGetter() const
UnaryOperator - This represents the unary-expression's (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
CXXMethodDecl * getMethodDecl() const
Retrieves the declaration of the called method.
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
A member reference to an MSPropertyDecl.
Represents a reference to a non-type template parameter that has been substituted with a template arg...
const OffsetOfNode & getComponent(unsigned Idx) const
unsigned getNumArgs() const
Expr * getDevice()
Return device number.
This represents '#pragma omp cancel' directive.
This represents 'collapse' clause in the '#pragma omp ...' directive.
This represents clause 'firstprivate' in the '#pragma omp ...' directives.
Selector getSelector() const
const Expr * getSubExpr() const
const Expr * getSubExpr() const
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr.cast]), which uses the syntax (Type)expr.
CXXMethodDecl * getCallOperator() const
Retrieve the function call operator associated with this lambda expression.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
Expr * getLHS()
An array access can be written A[4] or 4[A] (both are equivalent).
This file defines OpenMP AST classes for clauses.
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1...
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
This represents '#pragma omp flush' directive.
bool hasClausesOfKind() const
Returns true if the current directive has one or more clauses of a specific kind. ...
This represents '#pragma omp parallel for simd' directive.
DoStmt - This represents a 'do/while' stmt.
This represents 'seq_cst' clause in the '#pragma omp atomic' directive.
This represents 'untied' clause in the '#pragma omp ...' directive.
StringRef getBridgeKindName() const
Retrieve the kind of bridge being performed as a string.
param_iterator param_begin()
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the member name.
const DeclarationNameInfo & getNameInfo() const
Retrieve the name that this expression refers to.
LiteralOperatorKind getLiteralOperatorKind() const
Returns the kind of literal operator invocation which this expression represents. ...
This represents '#pragma omp target enter data' directive.
This represents 'num_teams' clause in the '#pragma omp ...' directive.
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
This captures a statement into a function.
Represents a call to an inherited base class constructor from an inheriting constructor.
operator "" X (const CharT *, size_t)
ExpressionTrait getTrait() const
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
bool isImplicitProperty() const
IdentifierInfo * getIdentifierInfoForSlot(unsigned argIndex) const
Retrieve the identifier at a given position in the selector.
Raw form: operator "" X<cs...> ()
unsigned getNumExprs() const
This represents '#pragma omp single' directive.
unsigned Indentation
The number of spaces to use to indent each line.
capture_iterator explicit_capture_begin() const
Retrieve an iterator pointing to the first explicit lambda capture.
This represents 'hint' clause in the '#pragma omp ...' directive.
Defines enumerations for expression traits intrinsics.
unsigned UnderscoreAlignof
Whether we can use '_Alignof' rather than '__alignof'.
const Stmt * getCatchBody() const
unsigned getNumHandlers() const
Expr * getSubExpr() const
bool hasExplicitTemplateArgs() const
Determines whether this member expression actually had a C++ template argument list explicitly specif...
This is a basic class for representing single OpenMP executable directive.
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
static const char * getExpressionTraitName(ExpressionTrait ET)
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
DeclarationName getName() const
getName - Returns the embedded declaration name.
ArrayRef< const Attr * > getAttrs() const
This represents 'schedule' clause in the '#pragma omp ...' directive.
Represents a call to a member function that may be written either with member call syntax (e...
Defines several types used to describe C++ lambda expressions that are shared between the parser and ...
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
This represents clause 'shared' in the '#pragma omp ...' directives.
const Expr * getExpr(unsigned Init) const
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
Represents a static or instance method of a struct/union/class.
std::string getValueAsString(unsigned Radix) const
Expr * getPriority()
Return Priority number.
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
SourceLocation getColonLoc() const
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
This represents '#pragma omp taskwait' directive.
QualType getAllocatedType() const
OpenMPMapClauseKind getMapType() const LLVM_READONLY
Fetches mapping kind for the clause.
This file defines OpenMP nodes for declarative directives.
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load, __atomic_store, and __atomic_compare_exchange_*, for the similarly-named C++11 instructions, and __c11 variants for <stdatomic.h>, and corresponding __opencl_atomic_* for OpenCL 2.0.
UnaryExprOrTypeTrait getKind() const
ObjCProtocolExpr used for protocol expression in Objective-C.
const StringLiteral * getOutputConstraintLiteral(unsigned i) const
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Stmt * getCapturedStmt()
Retrieve the statement being captured.
bool hasTemplateKeyword() const
Determines whether the member name was preceded by the template keyword.
OpenMPMapClauseKind getMapTypeModifier() const LLVM_READONLY
Fetches the map type modifier for the clause.
CharacterKind getKind() const
This represents '#pragma omp target' directive.
Expr * getInputExpr(unsigned i)
static const char * getTypeTraitName(TypeTrait TT)
void dumpPretty(const ASTContext &Context) const
dumpPretty/printPretty - These two methods do a "pretty print" of the AST back to its original source...
Expr * getNumForLoops() const
Return the number of associated for-loops.
bool isParenTypeId() const
IdentType getIdentType() const
void printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const
Expr * getArrayRangeStart(const Designator &D) const
An expression trait intrinsic.
This represents '#pragma omp ordered' directive.
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
This represents '#pragma omp target update' directive.
ObjCBoxedExpr - used for generalized expression boxing.
bool isArgumentType() const
ArrayRef< TemplateArgumentLoc > template_arguments() const
LLVM_READONLY bool isPrintable(unsigned char c)
Return true if this character is an ASCII printable character; that is, a character that should take ...
const DeclStmt * getConditionVariableDeclStmt() const
If this WhileStmt has a condition variable, return the faux DeclStmt associated with the creation of ...
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name...
void printName(raw_ostream &OS) const
printName - Print the human-readable name to a stream.
bool hasTemplateKeyword() const
Determines whether the name in this declaration reference was preceded by the template keyword...
A qualified reference to a name whose declaration cannot yet be resolved.
Expr * Value
The value of the dictionary element.
const Expr * getInitializer() const
InitializationStyle getInitializationStyle() const
The kind of initializer this new-expression has.
ArrayRef< TemplateArgument > pack_elements() const
Iterator range referencing all of the elements of a template argument pack.
CompoundAssignOperator - For compound assignments (e.g.
Represents a C11 generic selection.
StringRef getName() const
Return the actual identifier string.
const Expr * getBase() const
Expr * getInstanceReceiver()
Returns the object expression (receiver) for an instance message, or null for a message that is not a...
AddrLabelExpr - The GNU address of label extension, representing &&label.
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
ast_type_traits::DynTypedNode Node
Represents a reference to a function parameter pack that has been substituted but not yet expanded...
Represents a template argument.
Expr * getFalseExpr() const
getFalseExpr - Return the subexpression which will be evaluated if the condnition evaluates to false;...
NullStmt - This is the null statement ";": C99 6.8.3p3.
bool isMutable() const
Determine whether the lambda is mutable, meaning that any captures values can be modified.
bool isTypeOperand() const
unsigned getNumAssocs() const
Dataflow Directional Tag Classes.
static std::string getPropertyNameFromSetterSelector(Selector Sel)
Return the property name for the given setter selector.
This represents 'device' clause in the '#pragma omp ...' directive.
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
bool isValid() const
Return true if this is a valid SourceLocation object.
OpenMPDefaultmapClauseKind getDefaultmapKind() const
Get kind of the clause.
[C99 6.4.2.2] - A predefined identifier such as func.
DeclarationNameInfo getMemberNameInfo() const
Retrieve the member declaration name info.
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
MSPropertyDecl * getPropertyDecl() const
Parameter for Objective-C 'self' argument.
This represents '#pragma omp section' directive.
This represents '#pragma omp teams distribute' directive.
QualType getAssocType(unsigned i) const
A runtime availability query.
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
This represents '#pragma omp simd' directive.
Represents a 'co_yield' expression.
Expr * getOperand() const
Retrieve the operand of the 'co_return' statement.
Represents a C++11 pack expansion that produces a sequence of expressions.
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
SEHExceptStmt * getExceptHandler() const
Returns 0 if not defined.
This represents clause 'linear' in the '#pragma omp ...' directives.
const Expr * getSynchExpr() const
bool isIfExists() const
Determine whether this is an __if_exists statement.
NestedNameSpecifierLoc getQualifierLoc() const
const DeclarationNameInfo & getMemberNameInfo() const
Retrieve the full name info for the member that this expression refers to.
OpenMPDefaultmapClauseModifier getDefaultmapModifier() const
Get the modifier of the clause.
This represents '#pragma omp atomic' directive.
bool SuppressImplicitBase
When true, don't print the implicit 'self' or 'this' expressions.
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Expr * getArrayRangeEnd(const Designator &D) const
const Stmt * getBody() const
llvm::APInt getValue() const
Represents a __leave statement.
LabelDecl * getLabel() const
QualType getClassReceiver() const
Returns the type of a class message send, or NULL if the message is not a class message.
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
SwitchStmt - This represents a 'switch' stmt.
Capturing variable-length array type.
Not an overloaded operator.
Expr * getOrderFail() const
DeclarationNameInfo getNameInfo() const
Represents the body of a coroutine.
bool hasTemplateKeyword() const
Determines whether the name was preceded by the template keyword.
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
OpenMPDirectiveKind getNameModifier() const
Return directive name modifier associated with the clause.
This file defines OpenMP AST classes for executable directives and clauses.
Represents Objective-C's collection statement.
static StringRef getIdentTypeName(IdentType IT)
ObjCEncodeExpr, used for @encode in Objective-C.
const char * getOperatorSpelling(OverloadedOperatorKind Operator)
Retrieve the spelling of the given overloaded operator, without the preceding "operator" keyword...
An implicit indirection through a C++ base class, when the field found is in a base class...
Represents a call to a CUDA kernel function.
Represents a 'co_await' expression.
Expr * getReplacement() const
Expr * getArg(unsigned Arg)
Return the specified argument.
Represents Objective-C's @finally statement.
StringRef getAsmString() const
unsigned Alignof
Whether we can use 'alignof' rather than '__alignof'.
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
const Expr * getBase() const
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
Capturing the *this object by reference.
This represents 'write' clause in the '#pragma omp atomic' directive.
const char * getOpenMPDirectiveName(OpenMPDirectiveKind Kind)
unsigned getNumClobbers() const
ObjCIvarRefExpr - A reference to an ObjC instance variable.
bool ConstantsAsWritten
Whether we should print the constant expressions as written in the sources.
SourceManager & getSourceManager()
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
SEHFinallyStmt * getFinallyHandler() const
GotoStmt - This represents a direct goto.
A use of a default initializer in a constructor or in aggregate initialization.
A template argument list.
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
ArrayRef< TemplateArgumentLoc > template_arguments() const
CapturedDecl * getCapturedDecl()
Retrieve the outlined function declaration.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
OpenMPScheduleClauseModifier getSecondScheduleModifier() const
Get the second modifier of the clause.
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Defines the clang::SourceLocation class and associated facilities.
This represents '#pragma omp target parallel' directive.
This represents 'nowait' clause in the '#pragma omp ...' directive.
ContinueStmt - This represents a continue.
OpenMPScheduleClauseModifier getFirstScheduleModifier() const
Get the first modifier of the clause.
Represents a loop initializing the elements of an array.
This represents 'num_tasks' clause in the '#pragma omp ...' directive.
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Expr * getFilterExpr() const
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
CXXCatchStmt - This represents a C++ catch block.
VarDecl * getLoopVariable()
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
OpenMPScheduleClauseKind getScheduleKind() const
Get kind of the clause.
bool isPackExpansion() const
Determines whether this dictionary element is a pack expansion.
Expr * getOperand() const
WhileStmt - This represents a 'while' stmt.
SourceLocation getLParenLoc() const
Expr * getThreadLimit()
Return ThreadLimit number.
This class is used for builtin types like 'int'.
CompoundStmt * getTryBlock()
Represents Objective-C's @try ... @catch ... @finally statement.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
bool isGlobalDelete() const
This represents '#pragma omp taskloop simd' directive.
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
Expr * getBase() const
Retrieve the base object of this member expressions, e.g., the x in x.m.
StringLiteral - This represents a string literal expression, e.g.
bool hasExplicitParameters() const
Determine whether this lambda has an explicit parameter list vs.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Expr * getPattern()
Retrieve the pattern of the pack expansion.
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
This represents 'dist_schedule' clause in the '#pragma omp ...' directive.
RetTy Visit(PTR(Stmt) S, ParamTys... P)
Stmt * getBody() const
Retrieve the body of the coroutine as written.
static Decl::Kind getKind(const Decl *D)
Abstract class common to all of the C++ "named"/"keyword" casts.
This represents '#pragma omp sections' directive.
Expr * getHint() const
Returns number of threads.
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
bool isObjectReceiver() const
unsigned getNumComponents() const
This represents '#pragma omp target data' directive.
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
A reference to a declared variable, function, enum, etc.
static bool printExprAsWritten(raw_ostream &OS, Expr *E, const ASTContext *Context)
Prints the given expression using the original source text.
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
unsigned IncludeNewlines
When true, include newlines after statements like "break", etc.
BreakStmt - This represents a break.
Expr * getChunkSize()
Get chunk size.
const VarDecl * getCatchParamDecl() const
static bool isImplicitSelf(const Expr *E)
const char * getCastName() const
getCastName - Get the name of the C++ cast being used, e.g., "static_cast", "dynamic_cast", "reinterpret_cast", or "const_cast".
Expr * getOperand() const
Expr * getNumThreads() const
Returns number of threads.
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
ParmVarDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
unsigned getNumArgs() const
const Expr * getBase() const
const Expr * getCond() const
static StringRef getOpcodeStr(Opcode Op)
getOpcodeStr - Turn an Opcode enum value into the punctuation char it corresponds to...
This represents '#pragma omp taskyield' directive.
This represents '#pragma omp distribute parallel for simd' composite directive.
A boolean literal, per ([C++ lex.bool] Boolean literals).
NestedNameSpecifier * getQualifier() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name.
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type, member-designator).
Expr * getQueriedExpression() const
This represents '#pragma omp parallel sections' directive.
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
Expr * getCommon() const
getCommon - Return the common expression, written to the left of the condition.
const Expr * getCond() const
The receiver is a superclass.
BinaryOperatorKind getOperator() const
const LangOptions & getLangOpts() const
NamedDecl * getPack() const
Retrieve the parameter pack.
Represents Objective-C's @autoreleasepool Statement.
CompoundStmt * getTryBlock() const
InitListExpr * getSyntacticForm() const
Expr * getBaseExpr() const
Represents an implicitly-generated value initialization of an object of a given type.
CompoundStmt * getBlock() const
This represents '#pragma omp target parallel for' directive.
Attr - This represents one attribute.
This represents clause 'use_device_ptr' in the '#pragma omp ...' directives.
operator "" X (unsigned long long)
QualType getType() const
Return the type wrapped by this type source info.
TypeTrait getTrait() const
Determine which type trait this expression uses.
Expr * getLength()
Get length of array section.
const DeclarationNameInfo & getMemberNameInfo() const
Retrieve the name of the member that this expression refers to.
Expr * getCookedLiteral()
If this is not a raw user-defined literal, get the underlying cooked literal (representing the litera...
Expr * getBase()
An array section can be written only as Base[LowerBound:Length].
const DeclStmt * getConditionVariableDeclStmt() const
If this SwitchStmt has a condition variable, return the faux DeclStmt associated with the creation of...
This represents '#pragma omp taskloop' directive.