[PATCH] D97371: [clang][parser] Remove questionable ProhibitAttributes() call in objc parsing

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 17 11:25:04 PDT 2021


rjmccall added a comment.

In D97371#2596643 <https://reviews.llvm.org/D97371#2596643>, @tbaeder wrote:

> They are being applied to the `@try` at least (`-ast-print` prints them) and we do some error checking for missing call expressions in `handleNoMergeAttr()` in `SemaStmtAttr.cpp`. I don't know much about Objective C so I am not sure how to check that the attribute really has any effect in the end.

It's just like `try`/`catch`/`finally` in languages like Java, where you can put arbitrary statements inside the nested blocks.  The attribute should affect all child statements.  Just find an existing `nomerge` test case that checks that IRGen is affected, put that code inside a `@try { <stuff in here> } @catch(...) {}`, and verify that the IRGen for that code is still affected.  Maybe also verify that it works if you put it inside the `@catch` or `@finally` block.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97371



More information about the cfe-commits mailing list