[PATCH] D133586: [clang] initialize type qualifiers for FunctionNoProtoType

Richard Howell via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 3 13:03:02 PDT 2022


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



More information about the cfe-commits mailing list