[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:13:02 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-a-1` while building `clang` at step 4 "annotate".

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

Here is the relevant piece of the build log for the reference:
```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/fuchsia-linux.py ...' (failure)
...
[128/1326] Building CXX object tools/clang/unittests/Lex/CMakeFiles/LexTests.dir/DependencyDirectivesScannerTest.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[129/1326] Building CXX object tools/lto/CMakeFiles/LTO.dir/lto.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[130/1326] Linking CXX executable bin/diagtool
[131/1326] Building CXX object tools/clang/tools/clang-diff/CMakeFiles/clang-diff.dir/ClangDiff.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[132/1326] Building CXX object tools/clang/unittests/Lex/CMakeFiles/LexTests.dir/HeaderMapTest.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[133/1326] 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/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-xh9u2_ol/tools/clang/tools/libclang -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/include -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-xh9u2_ol/tools/clang/include -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-xh9u2_ol/include -I/var/lib/buildbot/fuchsia-x86_64-linux/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 -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffat-lto-objects -no-canonical-prefixes -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -fPIC -fvisibility=default  -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-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 /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang/CXExtractAPI.cpp
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
In file included from /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
Step 7 (check) failure: check (failure)
...
[128/1326] Building CXX object tools/clang/unittests/Lex/CMakeFiles/LexTests.dir/DependencyDirectivesScannerTest.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[129/1326] Building CXX object tools/lto/CMakeFiles/LTO.dir/lto.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[130/1326] Linking CXX executable bin/diagtool
[131/1326] Building CXX object tools/clang/tools/clang-diff/CMakeFiles/clang-diff.dir/ClangDiff.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[132/1326] Building CXX object tools/clang/unittests/Lex/CMakeFiles/LexTests.dir/HeaderMapTest.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[133/1326] 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/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-xh9u2_ol/tools/clang/tools/libclang -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/include -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-xh9u2_ol/tools/clang/include -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-xh9u2_ol/include -I/var/lib/buildbot/fuchsia-x86_64-linux/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 -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffat-lto-objects -no-canonical-prefixes -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -fPIC -fvisibility=default  -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-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 /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang/CXExtractAPI.cpp
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
In file included from /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:
/var/lib/buildbot/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/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/fuchsia-x86_64-linux/llvm-project/clang/tools/libclang/CXExtractAPI.cpp:25:

```

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


More information about the cfe-commits mailing list