[PATCH] D54014: [Sema] Push and Pop Expression Evaluation Context Records at the start and end of function definitions

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 1 17:17:23 PDT 2018


leonardchan created this revision.
leonardchan added reviewers: rsmith, aaron.ballman.
leonardchan added a project: clang.
leonardchan added a dependent revision: D49511: [Sema/Attribute] Check for noderef attribute.
leonardchan removed a dependent revision: D49511: [Sema/Attribute] Check for noderef attribute.
leonardchan added a dependency: D49511: [Sema/Attribute] Check for noderef attribute.

This patch creates a new context for every function definition we enter. Currently we do not push and pop on these, usually working off of the global context record added in the Sema constructor, which never gets popped.

Ideally this will be one of the first patches for pushing and popping records so that we operate less off the global Sema record. I tried doing this as @rsmith recommends in https://reviews.llvm.org/D49511?id=160892#inline-451745, but ended up running into many issues that would be better addressed accross multiple patches.

Parent of https://reviews.llvm.org/D49511 where we would like to check for `noderef` usage on each context.


Repository:
  rC Clang

https://reviews.llvm.org/D54014

Files:
  clang/lib/Sema/SemaDecl.cpp
  clang/lib/Sema/SemaDeclObjC.cpp
  clang/lib/Sema/SemaExpr.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54014.172272.patch
Type: text/x-patch
Size: 3669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181102/a54bb458/attachment-0001.bin>


More information about the cfe-commits mailing list