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: unassignedclangb...@nondot.org
          Reporter: geek4ci...@gmail.com
                CC: dgre...@apple.com, llvm-bugs@lists.llvm.org,
                    richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to