[llvm-bugs] [Bug 25368] New: Namespace lost in modules

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Nov 1 09:43:54 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25368

            Bug ID: 25368
           Summary: Namespace lost in modules
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Modules
          Assignee: unassignedclangbugs at nondot.org
          Reporter: geek4civic at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk
    Classification: Unclassified

Created attachment 15198
  --> https://llvm.org/bugs/attachment.cgi?id=15198&action=edit
Small testcase.zip

I didn't compile lib/CodeGen/CGExprConstant.cpp with -fcxx-modules.

clang/lib/CodeGen/CGExprConstant.cpp:1041:16: error:
      no matching function for call to 'cast'
        return cast<ConstantAddress>(Res.getAddress());
               ^~~~~~~~~~~~~~~~~~~~~
llvm/include/llvm/Support/Casting.h:229:44: note:
      candidate function [with X = clang::CodeGen::ConstantAddress, Y =
      clang::CodeGen::Address] not viable: expects an l-value for 1st argument
inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
                                           ^

Seems namespace forwarders, Basic/LLVM.h, might not be effective there.
Appeased in r251713.

A small testcase is attached.
$ clang++ -std=c++11 -fmodules -fcxx-modules -c a.cc

-- 
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/20151101/329e9659/attachment.html>


More information about the llvm-bugs mailing list