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

            Bug ID: 37969
           Summary: Incorrect ownership of implicit declarations of things
                    like operator delete
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Modules
          Assignee: unassignedclangb...@nondot.org
          Reporter: dblai...@gmail.com
                CC: dgre...@apple.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

foo.cppm:
  export module foo
  void f(int *x) {
    delete x;
  }

bar.cpp:
  void operator delete(void*)noexcept(true);

$ clang++ -fmodules-ts -c -std=c++17 --precompile foo.cppm
$ clang++ -fmodules-ts -c -std=c++17 bar.cpp -fmodule-file=foo.pcm
bar.cpp:2:6: error: declaration of 'operator delete' in the global module
follows declaration in module foo
void operator delete(void *)noexcept(true);
     ^
note: previous declaration is here
1 error generated.

-- 
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