[PATCH] D125882: Correct the diagnostic behavior for unreachable _Generic associations in C++

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 18 06:44:42 PDT 2022


erichkeane accepted this revision.
erichkeane added a comment.
This revision is now accepted and ready to land.

Took me a bit to get the prose, but I think I got it now.  PERHAPS there is use to 'finish the thought' on the outcome there?  Either way, LGTM.



================
Comment at: clang/lib/Sema/SemaExpr.cpp:1699
+          // If T is a non-class type, the type of the prvalue is the cv-
+          // unqualified version of T. Otherwise, the type of the prvalue is T.
           unsigned Reason = 0;
----------------
This seems like it is a sentence short (or perhaps I'm a few synapses short?). 

The fallout from these rules is that "Non-class-types" never have qualifiers, thus cannot match a qualified type, but a class-type can, because it keeps its qualifiers?

 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125882



More information about the cfe-commits mailing list