[PATCH] D38075: Fix PR34668 - P0704R1 implementation is too permissive

Nicolas Lesser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 21 09:43:55 PDT 2017


Rakete1111 added inline comments.


================
Comment at: lib/Sema/SemaExprCXX.cpp:5185
       if (!isIndirect && !LHS.get()->Classify(Context).isLValue()) {
         // C++2a allows functions with ref-qualifier & if they are also 'const'.
+        if (Proto->isConst() && !Proto->isVolatile())
----------------
tcanens wrote:
> Rakete1111 wrote:
> > I think you should update the comment to something like "also 'const', but not if they're 'volatile'."
> "if their cv-qualifier-seq is (exactly) 'const'", maybe?
Sure that works too :)


https://reviews.llvm.org/D38075





More information about the cfe-commits mailing list