rmaz added a comment.

In D133586#3831618 <https://reviews.llvm.org/D133586#3831618>, @vsapsai wrote:

> How correct is it to access `isConst`, `isVolatile`, `isRestrict` for 
> `FunctionNoProtoType`? Yes, we can provide some default value but I'm curious 
> if accessing that default value is correct.
>
> For the record, I've tried to fix the same problem in 
> https://reviews.llvm.org/D104963 in a different way.

That was my initial solution as well, but it seemed safer to ensure these 
methods always returned a consistent value without auditing all the possible 
call sites. I agree that it doesn't seem right that these methods are on the 
base class at all if they are only valid in one of the subclasses.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133586

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to