http://llvm.org/bugs/show_bug.cgi?id=21502

            Bug ID: 21502
           Summary: __has_feature(cxx_reference_qualified_functions)
                    should be checked when defining
                    LLVM_HAS_RVALUE_REFERENCE_THIS
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

LLVM_HAS_RVALUE_REFERENCE_THIS macro is defined int Compiler.h:
http://llvm.org/docs/doxygen/html/Compiler_8h.html#a563b0d795936bbc69d7a40c6791c5827

in the way as follows:
00080 #if __has_feature(cxx_rvalue_references) || LLVM_GNUC_PREREQ(4, 8, 1)
00081 #define LLVM_HAS_RVALUE_REFERENCE_THIS 1
00082 #else
00083 #define LLVM_HAS_RVALUE_REFERENCE_THIS 0
00084 #endif

Shouldn't its definition look like:

00080 #if __has_feature(cxx_reference_qualified_functions) ||
LLVM_GNUC_PREREQ(4, 8, 1)
00081 #define LLVM_HAS_RVALUE_REFERENCE_THIS 1
00082 #else
00083 #define LLVM_HAS_RVALUE_REFERENCE_THIS 0
00084 #endif

instead? __has_feature(cxx_reference_qualified_functions) checks whether Clang
support "Extending move semantics to *this" C+11 feature:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm

and that's exactly what the LLVM_HAS_RVALUE_REFERENCE_THIS is intended for.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to