zahiraam added a comment. In D146148#4213475 <https://reviews.llvm.org/D146148#4213475>, @rjmccall wrote:
> The user isn't modifying the `float_t` type definition, they're using it. I > think the diagnostic should say something like `cannot use type 'float_t' > within '#pragma clang fp eval_method'; type is set according to the default > eval method for the translation unit`. > > Is there any way we can infer an attribute for these typedefs when they're > declared, then diagnose it in `DiagnoseUseOfDecl`? Some sort of > "available_only_in_default_eval_method" attribute? @rjmccall Thanks for the review. I might be able to call the DiagnoseUseOfDecl here https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaType.cpp#L1609 but I don't seem to have access to the NameDecl (first argument of the function). I am not familiar with the attribute. Can you point me to an example? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146148/new/ https://reviews.llvm.org/D146148 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits