[llvm-bugs] [Bug 29032] New: Clang ignores "inline" keyword on an out-of-line method definition of a class template.

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 17 21:52:22 PDT 2016


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

            Bug ID: 29032
           Summary: Clang ignores "inline" keyword on an out-of-line
                    method definition of a class template.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mail+llvm at tzik.jp
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Here is a repro case. The "inline" keyword below is unexpectedly ignored.
Note that "inline" on the declaration of |bar| takes effect.

$ clang++ -S -emit-llvm -o - foo.cc | grep inlinehint
-- foo.cc
template <typename>
struct Foo {
  void bar();
};

template <typename T>
inline void Foo<T>::bar() {}

int main() {
  Foo<int> oo;
  oo.bar();
  return 0;
}

-- 
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/20160818/d7545e8d/attachment.html>


More information about the llvm-bugs mailing list