[llvm-bugs] [Bug 28082] New: ms-extensions: Assertion failed: (hasUninstantiatedDefaultArg() && "Wrong kind of initialization expression!"), function getUninstantiatedDefaultArg, file tools/clang/lib/AST/Decl.cpp, line 2417.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 10 12:19:34 PDT 2016


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

            Bug ID: 28082
           Summary: ms-extensions: Assertion failed:
                    (hasUninstantiatedDefaultArg() && "Wrong kind of
                    initialization expression!"), function
                    getUninstantiatedDefaultArg, file
                    tools/clang/lib/AST/Decl.cpp, line 2417.
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16510
  --> https://llvm.org/bugs/attachment.cgi?id=16510&action=edit
Reduced test case from ChakraCore

This bug was reported to me by Steve Wills (swills at FreeBSD.org); it occurs
during compilation of ChakraCore (see https://github.com/microsoft/ChakraCore)

The assertion only occurs when -fms-extensions is used, e.g.:

$ clang++ -fms-extensions -c chakra-testcase.cpp
chakra-testcase.cpp:7:20: warning: explicit specialization of 'EncodeT' within
class scope is a Microsoft extension [-Wmicrosoft-template]
  template <> uint EncodeT<SmallLayout>(OpCodeAsmJs, ByteCodeWriter *, bool);
                   ^
Assertion failed: (hasUninstantiatedDefaultArg() && "Wrong kind of
initialization expression!"), function getUninstantiatedDefaultArg, file
/usr/src/lib/clang/libclangast/../../../contrib/llvm/tools/clang/lib/AST/Decl.cpp,
line 2416.

Without -fms-extensions, there is only an error about the explicit
specialization, but no assertion:

$ clang++ -c chakra-testcase.cpp
chakra-testcase.cpp:7:20: error: explicit specialization of 'EncodeT' in class
scope
  template <> uint EncodeT<SmallLayout>(OpCodeAsmJs, ByteCodeWriter *, bool);
                   ^
chakra-testcase.cpp:8:2: error: expected ';' after struct
}
 ^
 ;
2 errors generated.

-- 
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/20160610/882e4613/attachment.html>


More information about the llvm-bugs mailing list