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

            Bug ID: 47417
           Summary: Class member used in a member function has not yet
                    been instantiated
           Product: new-bugs
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedb...@nondot.org
          Reporter: lozanb...@gmail.com
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

Created attachment 23927
  --> https://bugs.llvm.org/attachment.cgi?id=23927&action=edit
Minimal case that describes the issue

If in a template class we have a constexpr member function which also has
'used' attribute, then in the function we cannot use member variables which are
declared below the member function. In such a case, we'll get the following
error:

error: no member 'X' in 'Y'; it has not yet been instantiated


If we move the declaration of the member variables above the function
definition, then everything works properly.

Also, if we remove constexpr or __attribute__((used)) then it works properly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to