https://bugs.llvm.org/show_bug.cgi?id=48006
Bug ID: 48006
Summary: Bad error "uuid does not match previous declaration"
when a duplicate __declspec(uuid) is in the precomp
Product: clang
Version: 11.0
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: shigo...@microsoft.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
This is valid C++.
This error only repros with Clang 11 when using a precomp.
Does not repro at all in Clang 10 and also doesn't repro when not using precomp
in Clang 11.
============
Repro Steps:
precomp.h:
struct __declspec(uuid("edbf631b-8001-47bd-8b77-ca235e14d4c5")) Foo;
foo.cpp:
#include "precomp.h"
struct __declspec(uuid("edbf631b-8001-47bd-8b77-ca235e14d4c5")) Bar;
struct __declspec(uuid("edbf631b-8001-47bd-8b77-ca235e14d4c5")) Foo;
Commands to run the build:
clang-cl.exe /c /Yc /Fpprecomp.pch /Foprecomp.obj /Tp precomp.h
clang-cl.exe /c /Yuprecomp.h /Fpprecomp.pch /Fo"." foo.cpp
Error:
foo.cpp(4,19): error: uuid does not match previous declaration
struct __declspec(uuid("edbf631b-8001-47bd-8b77-ca235e14d4c5")) Foo;
^
./precomp.h(1,19): note: previous uuid specified here
struct __declspec(uuid("edbf631b-8001-47bd-8b77-ca235e14d4c5")) Foo;
--
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