AaronBallman wrote:

> I've fixed the build failure 
> https://buildkite.com/llvm-project/github-pull-requests/builds/55986 in 
> clang-tidy by only taking fast qualifiers from the `uint64_t` opaque value 
> and casting the value to `unsigned` - see 
> [e3cb910](https://github.com/llvm/llvm-project/commit/e3cb910ebce1ffa187816a20ce52e6303799665a).
>  It should be OK to strip bits which not present in `FastMask` since 
> `QualType` constructor seems to expect fast qualifiers only - see this in 
> `QualType` definition:
> 
> ```
> llvm::PointerIntPair<llvm::PointerUnion<const Type *, const ExtQuals *>,
>                      Qualifiers::FastWidth> Value;
> // ...
> QualType(const Type *Ptr, unsigned Quals) : Value(Ptr, Quals) {}
> QualType(const ExtQuals *Ptr, unsigned Quals) : Value(Ptr, Quals) {}
> ```
> 
> @AaronBallman Please let me know if the approach from 
> [e3cb910](https://github.com/llvm/llvm-project/commit/e3cb910ebce1ffa187816a20ce52e6303799665a)
>  is correct or if we should fix the issue somehow differently.

This seems like the correct approach to me. Maybe someday we can use a strong 
typedef for the fast qualifiers so there's less risk of accidents here, but 
that's by no means something you need to handle.

https://github.com/llvm/llvm-project/pull/84384
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to