================
@@ -186,8 +284,28 @@ void FactsGenerator::VisitConditionalOperator(const
ConditionalOperator *CO) {
void FactsGenerator::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *OCE) {
// Assignment operators have special "kill-then-propagate" semantics
// and are handled separately.
- if (OCE->isAssignmentOp() && OCE->getNumArgs() == 2) {
- handleAssignment(OCE->getArg(0), OCE->getArg(1));
+ if (OCE->getOperator() == OO_Equal && OCE->getNumArgs() == 2) {
+
+ const Expr *LHSExpr = OCE->getArg(0);
+ const Expr *RHSExpr = OCE->getArg(1);
+
+ if (const auto *DRE_LHS =
+ dyn_cast<DeclRefExpr>(LHSExpr->IgnoreParenImpCasts())) {
+ OriginList *LHSList = getOriginsList(*DRE_LHS);
----------------
usx95 wrote:
Good point. I missed this. Added a precheck of hasOrigins.
https://github.com/llvm/llvm-project/pull/168344
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits