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

            Bug ID: 47369
           Summary: No compiler error when having an invalid definition in
                    friend declaration
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++17
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

Program (main.cpp):

  template<typename T>
  void f()
  {
  }

  class C
  {
      friend void f<int>()
      {
      }
  };

  int main()
  {
  }

Compilation command line:

  clang++ -std=c++17 -pedantic-errors main.cpp

Observed behaviour:

  No compilation errors.

Expected behaviour:

  Compilation error about the definition in the friend declaration being
invalid.

Note:

  g++ gives the expected error message.

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

Reply via email to