[all-commits] [llvm/llvm-project] e16959: Don't delete default constructor of PathDiagnostic...

Moritz Sichert via All-commits all-commits at lists.llvm.org
Fri Jan 22 04:47:15 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e16959c9b8553a60ec5e9aa55d101154d5805292
      https://github.com/llvm/llvm-project/commit/e16959c9b8553a60ec5e9aa55d101154d5805292
  Author: Moritz Sichert <sichert at in.tum.de>
  Date:   2021-01-22 (Fri, 22 Jan 2021)

  Changed paths:
    M clang/include/clang/Analysis/PathDiagnostic.h

  Log Message:
  -----------
  Don't delete default constructor of PathDiagnosticConsumerOptions

This type is used as an aggregate, i.e. it has no member functions.
Starting with C++20 types with deleted default constructors are not
aggregate types anymore which means that aggregate initialization will
not work for this class anymore. This leads to a compile error in
clang::AnalyzerOptions::getDiagOpts() for example.

Also set the boolean flags to false by default to avoid undefined
behavior. Previously this was prevented by deleting the default
constructor, now we explicitly initialize them.

Differential Revision: https://reviews.llvm.org/D92221




More information about the All-commits mailing list