Skip to content

Commit 0d4b33a

Browse files
committed
Revert last commit due to current EA framework's limitation
Signed-off-by: chenwei.sun <chenwei.sun@intel.com>
1 parent 72b7e24 commit 0d4b33a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

clang/lib/DPCT/RuleInfra/ExprAnalysis.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ void ExprAnalysis::analyzeExpr(const ReturnStmt *RS) {
10311031
}
10321032

10331033
void ExprAnalysis::analyzeExpr(const ImplicitCastExpr *ICE) {
1034-
dispatch(ICE->IgnoreImpCasts());
1034+
dispatch(ICE->getSubExpr());
10351035
}
10361036

10371037
void ExprAnalysis::removeCUDADeviceAttr(const LambdaExpr *LE) {
@@ -2226,6 +2226,7 @@ void IndexAnalysis::dispatch(const Stmt *Expression) {
22262226
switch (Expression->getStmtClass()) {
22272227
ANALYZE_EXPR(UnaryOperator)
22282228
ANALYZE_EXPR(BinaryOperator)
2229+
ANALYZE_EXPR(ImplicitCastExpr)
22292230
ANALYZE_EXPR(DeclRefExpr)
22302231
ANALYZE_EXPR(PseudoObjectExpr)
22312232
ANALYZE_EXPR(ParenExpr)
@@ -2256,7 +2257,9 @@ void IndexAnalysis::analyzeExpr(const BinaryOperator *BO) {
22562257
if (!BO->isAdditiveOp())
22572258
ContainNonAdditiveOp.pop();
22582259
}
2259-
2260+
void IndexAnalysis::analyzeExpr(const ImplicitCastExpr *ICE) {
2261+
dispatch(ICE->getSubExpr());
2262+
}
22602263
void IndexAnalysis::analyzeExpr(const DeclRefExpr *DRE) {
22612264
auto Res = trackInitExprOfDRE(DRE);
22622265
if (Res.first) {

clang/lib/DPCT/RuleInfra/ExprAnalysis.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,7 @@ class IndexAnalysis : public ExprAnalysis {
956956
using Base = ExprAnalysis;
957957
void analyzeExpr(const UnaryOperator *UO);
958958
void analyzeExpr(const BinaryOperator *BO);
959+
void analyzeExpr(const ImplicitCastExpr *ICE);
959960
void analyzeExpr(const DeclRefExpr *DRE);
960961
void analyzeExpr(const PseudoObjectExpr *POE);
961962
void analyzeExpr(const ParenExpr *PE);

0 commit comments

Comments
 (0)