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

Nicolas Lesser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 20 12:16:24 PDT 2017


Rakete1111 added a comment.

Thanks! That was an oversight on my part, sorry.



================
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())
----------------
I think you should update the comment to something like "also 'const', but not if they're 'volatile'."


https://reviews.llvm.org/D38075





More information about the cfe-commits mailing list