[LLVMbugs] [Bug 8681] New: clang ToT can't parse boost::addressof any more

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 24 09:21:57 PST 2010


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

           Summary: clang ToT can't parse boost::addressof any more
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: richard-llvm at metafoo.co.uk
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


This code (simplified from boost::addressof) stopped compiling with clang ToT
in the past day or so:

template<typename T> void a(T c) {
const_cast<char&>(reinterpret_cast<char&>(c)); }


It fails as follows:

$ clang++ clang-addressof.cpp
clang: <...>/clang-svn/lib/AST/ExprClassification.cpp:69: Cl
clang::Expr::ClassifyImpl(clang::ASTContext&, clang::SourceLocation*) const:
Assertion `getValueKind() == VK_LValue' failed.
0  libLLVM-2.9svn.so 0xf7822c48
Stack dump:
0.      Program arguments: <...>/llvm-svn-build/Release+Asserts/bin/clang -cc1
-triple i386-pc-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
clang-addressof.cpp -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.17.50.0.6
-resource-dir <...>/llvm-svn-build/Release+Asserts/bin/../lib/clang/2.9
-ferror-limit 19 -fmessage-length 239 -fexceptions -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-m3JX8A.o -x c++
clang-addressof.cpp 
1.      clang-addressof.cpp:1:81: current parser token ';'
2.      clang-addressof.cpp:1:34: parsing function body 'a'
3.      clang-addressof.cpp:1:34: in compound statement ('{}')
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list