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

Tim Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 20 12:57:14 PDT 2017


tcanens 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())
----------------
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?


https://reviews.llvm.org/D38075





More information about the cfe-commits mailing list