[all-commits] [llvm/llvm-project] 03a5f7: Try to make GCC5 happy about the CfgTraits thing

Hans via All-commits all-commits at lists.llvm.org
Tue Oct 20 08:19:29 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 03a5f7ce12e2111c8b7bc5a95cff4c51b516250f
      https://github.com/llvm/llvm-project/commit/03a5f7ce12e2111c8b7bc5a95cff4c51b516250f
  Author: Hans Wennborg <hans at chromium.org>
  Date:   2020-10-20 (Tue, 20 Oct 2020)

  Changed paths:
    M clang/include/clang/Analysis/Analyses/Dominators.h

  Log Message:
  -----------
  Try to make GCC5 happy about the CfgTraits thing

It was failing with:

In file included from /work/llvm.monorepo/clang/lib/Analysis/Dominators.cpp:9:0:
/work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h: At global scope:
/work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h:111:26:
error: specialization of ‘template<class CfgRelatedTypeT> struct llvm::CfgTraitsFor’ in different namespace [-fpermissive]
 template <> struct llvm::CfgTraitsFor<clang::CFGBlock> {
                          ^
In file included from /work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h:21:0,
                 from /work/llvm.monorepo/clang/lib/Analysis/Dominators.cpp:9:
/work/llvm.monorepo/llvm/include/llvm/Support/CfgTraits.h:294:44:
error:   from definition of ‘template<class CfgRelatedTypeT> struct llvm::CfgTraitsFor’ [-fpermissive]
 template <typename CfgRelatedTypeT> struct CfgTraitsFor;
                                            ^


  Commit: c76cdeac93380b434349738d96f83d3ffda9869c
      https://github.com/llvm/llvm-project/commit/c76cdeac93380b434349738d96f83d3ffda9869c
  Author: Hans Wennborg <hans at chromium.org>
  Date:   2020-10-20 (Tue, 20 Oct 2020)

  Changed paths:
    M clang/include/clang/Basic/Diagnostic.h
    M clang/include/clang/Basic/PartialDiagnostic.h

  Log Message:
  -----------
  Explicitly initialize StreamingDiagnostic in derived class copy ctors

To pacify a GCC warning:

[1/1] Building CXX object tools/clang/lib/Analysis/CMakeFiles/obj.clangAnalysis.dir/Dominators.cpp.o
In file included from /work/llvm.monorepo/clang/include/clang/AST/NestedNameSpecifier.h:18:0,
                 from /work/llvm.monorepo/clang/include/clang/AST/Type.h:21,
                 from /work/llvm.monorepo/clang/include/clang/AST/DeclarationName.h:16,
                 from /work/llvm.monorepo/clang/include/clang/AST/DeclBase.h:18,
                 from /work/llvm.monorepo/clang/include/clang/Analysis/AnalysisDeclContext.h:20,
                 from /work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h:16,
                 from /work/llvm.monorepo/clang/lib/Analysis/Dominators.cpp:9:
/work/llvm.monorepo/clang/include/clang/Basic/Diagnostic.h:
In copy constructor ‘clang::DiagnosticBuilder::DiagnosticBuilder(const clang::DiagnosticBuilder&)’:
/work/llvm.monorepo/clang/include/clang/Basic/Diagnostic.h:1287:3:
warning: base class ‘class clang::StreamingDiagnostic’ should be explicitly initialized in the copy constructor [-Wextra]
   DiagnosticBuilder(const DiagnosticBuilder &D) {
   ^
In file included from /work/llvm.monorepo/clang/include/clang/AST/Type.h:29:0,
                 from /work/llvm.monorepo/clang/include/clang/AST/DeclarationName.h:16,
                 from /work/llvm.monorepo/clang/include/clang/AST/DeclBase.h:18,
                 from /work/llvm.monorepo/clang/include/clang/Analysis/AnalysisDeclContext.h:20,
                 from /work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h:16,
                 from /work/llvm.monorepo/clang/lib/Analysis/Dominators.cpp:9:
/work/llvm.monorepo/clang/include/clang/Basic/PartialDiagnostic.h:
In copy constructor ‘clang::PartialDiagnostic::PartialDiagnostic(const clang::PartialDiagnostic&)’:
/work/llvm.monorepo/clang/include/clang/Basic/PartialDiagnostic.h:52:3:
warning: base class ‘class clang::StreamingDiagnostic’ should be explicitly initialized in the copy constructor [-Wextra]
   PartialDiagnostic(const PartialDiagnostic &Other) : DiagID(Other.DiagID) {
   ^


Compare: https://github.com/llvm/llvm-project/compare/234c47ae2a8e...c76cdeac9338


More information about the All-commits mailing list