[PATCH] D39428: [Analyzer] As suggested, use value storage for BodyFarm

Devin Coughlin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 31 17:26:05 PDT 2017


dcoughlin accepted this revision.
dcoughlin added a comment.

Looks good to me with the comments by Gabor addressed.

In https://reviews.llvm.org/D39428#912126, @george.karpenkov wrote:

> On top of that, reference is part of the type, not part of the variable name,


The reference is parsed as part of the declarator (associated with the variable name) rather than as part of the type.

Where this rears its ugly head is when declaring multiple variables in the same statement:

  int g = 7;
  void foo() {
    int& p = g, q = 7;
  }

Here p has type 'int &' but q has type 'int'. The same holds for '*' for pointer types in C.


https://reviews.llvm.org/D39428





More information about the cfe-commits mailing list