Delete PrintingPolicy's copy constructor/operator.
authorErich Keane <erich.keane@intel.com>
Fri, 23 Jul 2021 18:22:52 +0000 (11:22 -0700)
committerErich Keane <erich.keane@intel.com>
Fri, 23 Jul 2021 18:22:52 +0000 (11:22 -0700)
This type is 'fat' now thanks to the callbacks, so it should never be
copied as far as I know.  Delete the copy operations so that we don't do
so accidentially.

clang/include/clang/AST/PrettyPrinter.h

index 3baf2b2..3b09c60 100644 (file)
@@ -76,6 +76,9 @@ struct PrintingPolicy {
         SuppressImplicitBase(false), FullyQualifiedName(false),
         PrintCanonicalTypes(false), PrintInjectedClassNameWithArguments(true) {}
 
+  PrintingPolicy(const PrintingPolicy&) = delete;
+  PrintingPolicy &operator=(const PrintingPolicy &) = delete;
+
   /// Adjust this printing policy for cases where it's known that we're
   /// printing C++ code (for instance, if AST dumping reaches a C++-only
   /// construct). This should not be used if a real LangOptions object is