[cfe-commits] r156495 - in /cfe/trunk: include/clang/Tooling/ArgumentsAdjusters.h lib/Tooling/ArgumentsAdjusters.cpp

David Blaikie dblaikie at gmail.com
Wed May 9 11:31:50 PDT 2012


Author: dblaikie
Date: Wed May  9 13:31:50 2012
New Revision: 156495

URL: http://llvm.org/viewvc/llvm-project?rev=156495&view=rev
Log:
Fix -Wdelete-non-virtual-dtor in Tooling code.

Also, add an anchor as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch

Modified:
    cfe/trunk/include/clang/Tooling/ArgumentsAdjusters.h
    cfe/trunk/lib/Tooling/ArgumentsAdjusters.cpp

Modified: cfe/trunk/include/clang/Tooling/ArgumentsAdjusters.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/ArgumentsAdjusters.h?rev=156495&r1=156494&r2=156495&view=diff
==============================================================================
--- cfe/trunk/include/clang/Tooling/ArgumentsAdjusters.h (original)
+++ cfe/trunk/include/clang/Tooling/ArgumentsAdjusters.h Wed May  9 13:31:50 2012
@@ -32,6 +32,7 @@
 /// which is responsible for command line arguments modification before
 /// the arguments are used to run a frontend action.
 class ArgumentsAdjuster {
+  virtual void anchor();
 public:
   /// \brief Returns adjusted command line arguments.
   ///
@@ -39,6 +40,8 @@
   ///
   /// \returns Modified sequence of command line arguments.
   virtual CommandLineArguments Adjust(const CommandLineArguments &Args) = 0;
+  virtual ~ArgumentsAdjuster() {
+  }
 };
 
 /// \brief Syntax check only command line adjuster.

Modified: cfe/trunk/lib/Tooling/ArgumentsAdjusters.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/ArgumentsAdjusters.cpp?rev=156495&r1=156494&r2=156495&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/ArgumentsAdjusters.cpp (original)
+++ cfe/trunk/lib/Tooling/ArgumentsAdjusters.cpp Wed May  9 13:31:50 2012
@@ -17,6 +17,9 @@
 namespace clang {
 namespace tooling {
 
+void ArgumentsAdjuster::anchor() {
+}
+
 /// Add -fsyntax-only option to the commnand line arguments.
 CommandLineArguments
 ClangSyntaxOnlyAdjuster::Adjust(const CommandLineArguments &Args) {





More information about the cfe-commits mailing list