]> granicus.if.org Git - clang/commitdiff
clang-c: de-anonymize structure declaration
authorSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 24 May 2016 01:23:24 +0000 (01:23 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 24 May 2016 01:23:24 +0000 (01:23 +0000)
The statement constructed an anonymous structure which was typedefed.  The
anonymous structure has internal linkage, and that would cause an error when
building with modules.  Give the type declaration a tag name to address the
error when building with modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270520 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang-c/Index.h

index 06f369a9faa50dff00b4655e23da088131c25865..794c49047fecdc07fc9abe101e47caba5aab648f 100644 (file)
@@ -5301,7 +5301,7 @@ enum CXVisitorResult {
   CXVisit_Continue
 };
 
-typedef struct {
+typedef struct CXCursorAndRangeVisitor {
   void *context;
   enum CXVisitorResult (*visit)(void *context, CXCursor, CXSourceRange);
 } CXCursorAndRangeVisitor;