[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:37:51 PDT 2024


llvm-ci wrote:

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

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

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)
...
[5187/5214] Copying llvm-locstats into /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/./bin
[5188/5214] Linking CXX executable bin/llvm-lto2
[5189/5214] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark_main.dir/benchmark_main.cc.o
[5190/5214] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/sysinfo.cc.o
[5191/5214] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/timers.cc.o
[5192/5214] Linking CXX executable bin/obj2yaml
[5193/5214] Linking CXX static library lib/libbenchmark.a
[5194/5214] Linking CXX executable bin/verify-uselistorder
[5195/5214] Linking CXX static library lib/libbenchmark_main.a
[5196/5214] 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 /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -D_CINDEX_LIB_ -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/tools/clang/tools/libclang -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/tools/clang/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -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 -UNDEBUG -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 /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp
In file included from /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/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());
      |                                      ^
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:293:33: error: member access into incomplete type 'SourceManager'
  293 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:366:33: error: member access into incomplete type 'SourceManager'
  366 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:404:33: error: member access into incomplete type 'SourceManager'
  404 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:535:33: error: member access into incomplete type 'SourceManager'
  535 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:581:33: error: member access into incomplete type 'SourceManager'
Step 8 (bootstrap clang) failure: bootstrap clang (failure)
...
[5187/5214] Copying llvm-locstats into /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/./bin
[5188/5214] Linking CXX executable bin/llvm-lto2
[5189/5214] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark_main.dir/benchmark_main.cc.o
[5190/5214] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/sysinfo.cc.o
[5191/5214] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/timers.cc.o
[5192/5214] Linking CXX executable bin/obj2yaml
[5193/5214] Linking CXX static library lib/libbenchmark.a
[5194/5214] Linking CXX executable bin/verify-uselistorder
[5195/5214] Linking CXX static library lib/libbenchmark_main.a
[5196/5214] 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 /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -D_CINDEX_LIB_ -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/tools/clang/tools/libclang -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/tools/clang/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -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 -UNDEBUG -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 /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp
In file included from /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/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());
      |                                      ^
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:293:33: error: member access into incomplete type 'SourceManager'
  293 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:366:33: error: member access into incomplete type 'SourceManager'
  366 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:404:33: error: member access into incomplete type 'SourceManager'
  404 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:535:33: error: member access into incomplete type 'SourceManager'
  535 |       Context.getSourceManager().getPresumedLoc(Decl->getLocation());
      |                                 ^
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/Basic/SourceLocation.h:34:7: note: forward declaration of 'clang::SourceManager'
   34 | class SourceManager;
      |       ^
In file included from /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/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