[PATCH] D85960: [AST][FPEnv] Keep FP options in trailing storage of CastExpr

Serge Pavlov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 8 08:13:24 PDT 2020


sepavloff marked 3 inline comments as done.
sepavloff added a comment.

In D85960#2259703 <https://reviews.llvm.org/D85960#2259703>, @riccibruno wrote:

>> This change allow a CallExpr to have optional FPOptionsOverride object,
>
> Should this be `CastExpr` instead?

Yes, thank you for the catch.

>> stored in trailing storage. The implementaion is made similar to the way
>> used in CallExpr.
>
> Nit, but that's not really similar. In the `CallExpr` case the trailing objects are directly managed by `CallExpr` without using `TrailingObjects` in the sub-classes.

This implementation was obtained by applying changes similar to those made for CallExpr. But you are right, there is some difference in the implementations. I think this statement is not too useful so removed it.



================
Comment at: clang/include/clang/AST/Expr.h:3612
 
+  unsigned numTrailingObjects(OverloadToken<CXXBaseSpecifier *>) const {
+    return path_size();
----------------
riccibruno wrote:
> Here and elsewhere: `numTrailingObjects` is not part of the public interface.
Moved these methods to private section.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85960



More information about the cfe-commits mailing list