[PATCH] D58035: [clang/DIVar] Emit flag for params that have unchanged values

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 22 06:51:44 PST 2019


riccibruno added inline comments.


================
Comment at: lib/Sema/SemaExpr.cpp:11301
+    EmitArgumentsValueModification(E);
+
   SourceLocation OrigLoc = Loc;
----------------
Comments:

1. Shouldn't you mark the variable to be modified only if `CheckForModifiableLvalue` returns true ?

2. I think that you need to handle way more than just member expressions. For example are you handling `(x, y)` (comma operator) ? But hard-coding every cases here is probably not ideal. It would be nice if there was already some code somewhere that could help you do this.

3. I believe that a `MemberExpr` has always a base. Similarly `DeclRefExpr`s always have a referenced declaration (so you can omit the `if`).


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

https://reviews.llvm.org/D58035





More information about the cfe-commits mailing list