[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 11 05:31:45 PST 2018


riccibruno added inline comments.


================
Comment at: include/clang/AST/Expr.h:2425
   CallExpr(const ASTContext &C, StmtClass SC, unsigned NumPreArgs,
-           unsigned NumArgs, EmptyShell Empty);
+           unsigned NumArgs, bool UsesADL, EmptyShell Empty);
 
----------------
There is no need to pass this flag to the empty constructor
since it is going to be deserialized in `ASTReaderStmt`.
Only what is strictly needed to create the empty `CallExpr`
is passed here. In fact if you wanted to pass the flag when creating
the empty `CallExpr` you would have to update what is
under `case EXPR_CALL:` in `ASTReader::ReadStmtFromStream`.


================
Comment at: include/clang/AST/ExprCXX.h:106
       : CallExpr(C, CXXOperatorCallExprClass, /*NumPreArgs=*/0, NumArgs,
-                 Empty) {}
+                 /*UsesADL=*/false, Empty) {}
 
----------------
same


================
Comment at: include/clang/AST/ExprCXX.h:178
+      : CallExpr(C, CXXMemberCallExprClass, /*NumPreArgs=*/0, NumArgs,
+                 /*UsesADL=*/false, Empty) {}
 
----------------
same


================
Comment at: include/clang/AST/ExprCXX.h:224
       : CallExpr(C, CUDAKernelCallExprClass, /*NumPreArgs=*/END_PREARG, NumArgs,
-                 Empty) {}
+                 /*UsesADL=*/false, Empty) {}
 
----------------
same


================
Comment at: include/clang/AST/ExprCXX.h:505
       : CallExpr(C, UserDefinedLiteralClass, /*NumPreArgs=*/0, NumArgs,
-                 Empty) {}
+                 /*UsesADL=*/false, Empty) {}
 
----------------
same


================
Comment at: lib/Serialization/ASTReaderStmt.cpp:741
     E->setArg(I, Record.readSubExpr());
+  E->setUsesADL(UsesADL);
 }
----------------
`E->setUsesADL(Record.readInt())` with the
` bool UsesADL = Record.readInt();` removed ?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55534/new/

https://reviews.llvm.org/D55534





More information about the cfe-commits mailing list