[LLVMbugs] [Bug 19928] New: Clang incorrectly detects is_constructible when compiling from AST

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 2 15:52:12 PDT 2014


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: unassignedclangbugs at nondot.org
          Reporter: slambright at coverity.com
                CC: clang-support at coverity.com, llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140602/48c0f0c1/attachment.html>


More information about the llvm-bugs mailing list