[PATCH] D74935: [LangRef][AliasAnalysis] Clarify `noalias` affects only modified objects

Jeroen Dobbelaere via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 4 02:53:01 PST 2020


jeroen.dobbelaere added a comment.

Be aware that c99 restrict has a special case for nested restrict that makes the rules stronger:

  void f(int* restrict *restrict pA, int* restrict * restrict pB) {
    **pA=**pB;
  }

although pA and pB are only read,  (c99 6.7.3.1 #4) specifies that, writing to **pA is as if you are also writing to *pA.
Which means for this case, that pA and pB will point to there own sets of objects, and because of that, *pA and *pB also point to their own (different) sets of objects.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74935





More information about the cfe-commits mailing list