[clang] [clang][ExtractAPI] Stop dropping fields of nested anonymous record types when they aren't attached to variable declaration (PR #104600)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 19 08:01:09 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-fuzzer` running on `sanitizer-buildbot5` while building `clang` at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/32/builds/3740

Here is the relevant piece of the build log for the reference:
```
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[5/48] Linking CXX shared module unittests/Analysis/InlineOrderPlugin.so
[6/48] Linking CXX shared module unittests/Passes/Plugins/TestPlugin.so
[7/48] Linking CXX shared module unittests/Analysis/InlineAdvisorPlugin.so
[8/48] Linking CXX shared module unittests/Passes/Plugins/DoublerPlugin.so
[9/48] Generating VCSVersion.inc
[10/45] Building CXX object tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[11/45] Linking CXX executable bin/llvm-config
[12/45] Building CXX object tools/clang/lib/ExtractAPI/CMakeFiles/obj.clangExtractAPI.dir/API.cpp.o
[13/45] Building CXX object tools/clang/lib/ExtractAPI/CMakeFiles/obj.clangExtractAPI.dir/TypedefUnderlyingTypeResolver.cpp.o
[14/45] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o
FAILED: tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_CINDEX_LIB_ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm_build0/tools/clang/tools/libclang -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm_build0/tools/clang/include -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm_build0/include -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -fPIC  -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o -MF tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o.d -o tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o -c /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp
In file included from /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:164:38: error: member access into incomplete type 'SourceManager'
  164 |     return Context.getSourceManager().isInSystemHeader(D->getLocation());
      |                                      ^
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:293:33: error: member access into incomplete type 'SourceManager'
  293 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:366:33: error: member access into incomplete type 'SourceManager'
  366 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:404:33: error: member access into incomplete type 'SourceManager'
  404 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:535:33: error: member access into incomplete type 'SourceManager'
  535 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:581:33: error: member access into incomplete type 'SourceManager'
Step 7 (stage1 build all) failure: stage1 build all (failure)
...
[5/48] Linking CXX shared module unittests/Analysis/InlineOrderPlugin.so
[6/48] Linking CXX shared module unittests/Passes/Plugins/TestPlugin.so
[7/48] Linking CXX shared module unittests/Analysis/InlineAdvisorPlugin.so
[8/48] Linking CXX shared module unittests/Passes/Plugins/DoublerPlugin.so
[9/48] Generating VCSVersion.inc
[10/45] Building CXX object tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[11/45] Linking CXX executable bin/llvm-config
[12/45] Building CXX object tools/clang/lib/ExtractAPI/CMakeFiles/obj.clangExtractAPI.dir/API.cpp.o
[13/45] Building CXX object tools/clang/lib/ExtractAPI/CMakeFiles/obj.clangExtractAPI.dir/TypedefUnderlyingTypeResolver.cpp.o
[14/45] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o
FAILED: tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_CINDEX_LIB_ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm_build0/tools/clang/tools/libclang -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm_build0/tools/clang/include -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm_build0/include -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -fPIC  -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o -MF tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o.d -o tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o -c /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp
In file included from /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:164:38: error: member access into incomplete type 'SourceManager'
  164 |     return Context.getSourceManager().isInSystemHeader(D->getLocation());
      |                                      ^
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:293:33: error: member access into incomplete type 'SourceManager'
  293 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:366:33: error: member access into incomplete type 'SourceManager'
  366 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:404:33: error: member access into incomplete type 'SourceManager'
  404 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:535:33: error: member access into incomplete type 'SourceManager'
  535 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:581:33: error: member access into incomplete type 'SourceManager'

```

https://github.com/llvm/llvm-project/pull/104600


More information about the cfe-commits mailing list