[PATCH] D126602: [Clang][OpenMP] Replace IgnoreImpCasts with IgnoreImplicitAsWritten in atomic compare
Shilei Tian via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat May 28 15:37:06 PDT 2022
tianshilei1992 created this revision.
tianshilei1992 added reviewers: jdoerfert, ABataev.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
tianshilei1992 requested review of this revision.
Herald added subscribers: cfe-commits, sstefan1.
Herald added a project: clang.
This patch replaces all `IgnoreImpCasts` with `IgnoreImplicitAsWritten`
to avoid potential ignore of necessary casts.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D126602
Files:
clang/lib/Sema/SemaOpenMP.cpp
Index: clang/lib/Sema/SemaOpenMP.cpp
===================================================================
--- clang/lib/Sema/SemaOpenMP.cpp
+++ clang/lib/Sema/SemaOpenMP.cpp
@@ -11429,11 +11429,11 @@
switch (Cond->getOpcode()) {
case BO_EQ: {
C = Cond;
- D = BO->getRHS()->IgnoreImpCasts();
+ D = BO->getRHS()->IgnoreImplicitAsWritten();
if (checkIfTwoExprsAreSame(ContextRef, X, Cond->getLHS())) {
- E = Cond->getRHS()->IgnoreImpCasts();
+ E = Cond->getRHS()->IgnoreImplicitAsWritten();
} else if (checkIfTwoExprsAreSame(ContextRef, X, Cond->getRHS())) {
- E = Cond->getLHS()->IgnoreImpCasts();
+ E = Cond->getLHS()->IgnoreImplicitAsWritten();
} else {
ErrorInfo.Error = ErrorTy::InvalidComparison;
ErrorInfo.ErrorLoc = ErrorInfo.NoteLoc = Cond->getExprLoc();
@@ -11444,7 +11444,7 @@
}
case BO_LT:
case BO_GT: {
- E = BO->getRHS()->IgnoreImpCasts();
+ E = BO->getRHS()->IgnoreImplicitAsWritten();
if (checkIfTwoExprsAreSame(ContextRef, X, Cond->getLHS()) &&
checkIfTwoExprsAreSame(ContextRef, E, Cond->getRHS())) {
C = Cond;
@@ -11524,11 +11524,11 @@
switch (Cond->getOpcode()) {
case BO_EQ: {
C = Cond;
- D = CO->getTrueExpr()->IgnoreImpCasts();
+ D = CO->getTrueExpr()->IgnoreImplicitAsWritten();
if (checkIfTwoExprsAreSame(ContextRef, X, Cond->getLHS())) {
- E = Cond->getRHS()->IgnoreImpCasts();
+ E = Cond->getRHS()->IgnoreImplicitAsWritten();
} else if (checkIfTwoExprsAreSame(ContextRef, X, Cond->getRHS())) {
- E = Cond->getLHS()->IgnoreImpCasts();
+ E = Cond->getLHS()->IgnoreImplicitAsWritten();
} else {
ErrorInfo.Error = ErrorTy::InvalidComparison;
ErrorInfo.ErrorLoc = ErrorInfo.NoteLoc = Cond->getExprLoc();
@@ -11539,7 +11539,7 @@
}
case BO_LT:
case BO_GT: {
- E = CO->getTrueExpr()->IgnoreImpCasts();
+ E = CO->getTrueExpr()->IgnoreImplicitAsWritten();
if (checkIfTwoExprsAreSame(ContextRef, X, Cond->getLHS()) &&
checkIfTwoExprsAreSame(ContextRef, E, Cond->getRHS())) {
C = Cond;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126602.432755.patch
Type: text/x-patch
Size: 2101 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220528/97608cf5/attachment-0001.bin>
More information about the cfe-commits
mailing list