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

            Bug ID: 19928
           Summary: Clang incorrectly detects is_constructible when
                    compiling from AST
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Created attachment 12595
  --> http://llvm.org/bugs/attachment.cgi?id=12595&action=edit
Source code reproducer

> clang --version
Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix

# Normal compilation is successful.
> clang -std=c++11 -c reproducer.cpp 
# Creating an AST from the source file is successful
> clang -std=c++11 -emit-ast -o reproducer.cpp.ast reproducer.cpp
# Compiling the source code from the AST is not successful when it should be.
> clang -std=c++11 reproducer.cpp.ast -o reproducer.o
reproducer.cpp:62:3: error: static_assert failed ""
  static_assert(!is_constructible<T, T const &>::value, "");
  ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
reproducer.cpp:68:3: note: in instantiation of function template specialization
'try_ctor<class test_t>' requested here
  try_ctor<test_t>();
  ^
1 error generated.
Exit 1

-- 
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