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

Djordje Todorovic via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 22 06:22:57 PST 2019


djtodoro marked 2 inline comments as done.
djtodoro added a comment.

> I was under the impression that space inside VarDecl was quite constrained. Pardon the likely naive question, but: is there any way to make the representation more compact (maybe sneak a bit into ParmVarDeclBitfields)?

@vsk  Thanks for the comment! Sure, it is better idea. Initially, we thought this could be used even for local variables, but since we are using it only for parameters it makes more sense.



================
Comment at: lib/Sema/SemaExpr.cpp:11282
+static void EmitArgumentsValueModification(Expr *E) {
+  if (const DeclRefExpr *LHSDeclRef =
+          dyn_cast<DeclRefExpr>(E->IgnoreParenCasts()))
----------------
probinson wrote:
> Does this fit on one line if you use `const auto *LHSDeclRef ...`? Given you have the dyn_cast on the RHS there's no real need to give the type name twice.
>Does this fit on one line if you use const auto *LHSDeclRef ...? Given you have the dyn_cast on the RHS there's no real need to give the type name twice.

@probinson Thanks for the comment! Sure, it will be refactored.


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

https://reviews.llvm.org/D58035





More information about the cfe-commits mailing list