]> granicus.if.org Git - clang/commitdiff
Fix -Wextra-semi warnings.
authorHans Wennborg <hans@hanshq.net>
Wed, 22 Jul 2015 20:46:26 +0000 (20:46 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 22 Jul 2015 20:46:26 +0000 (20:46 +0000)
Patch by Eugene Zelenko!

Differential Revision: http://reviews.llvm.org/D11401

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242931 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/Analyses/Consumed.h
include/clang/Driver/ToolChain.h
include/clang/Frontend/ASTUnit.h
include/clang/Frontend/SerializedDiagnosticReader.h
include/clang/Sema/ExternalSemaSource.h
lib/CodeGen/TargetInfo.cpp
unittests/Basic/SourceManagerTest.cpp
unittests/Lex/LexerTest.cpp
unittests/Lex/PPCallbacksTest.cpp
unittests/Lex/PPConditionalDirectiveRecordTest.cpp
utils/TableGen/ClangAttrEmitter.cpp

index a7109233987c10e31d26c348325169d381ce1624..6a659a0d40d16dac4e0443773c785723ae41867d 100644 (file)
@@ -71,7 +71,7 @@ namespace consumed {
     virtual void warnParamReturnTypestateMismatch(SourceLocation Loc,
                                                   StringRef VariableName,
                                                   StringRef ExpectedState,
-                                                  StringRef ObservedState) {};
+                                                  StringRef ObservedState) {}
     
     // FIXME: Add documentation.
     virtual void warnParamTypestateMismatch(SourceLocation LOC,
index aba18c9916c3ac9ac23ed4cd758545d036bb2453..f4a726a7d790b9ec748739091c8dc6d1dcf05bdd 100644 (file)
@@ -184,7 +184,7 @@ public:
   /// This is used when handling the verbose option to print detailed,
   /// toolchain-specific information useful for understanding the behavior of
   /// the driver on a specific platform.
-  virtual void printVerboseInfo(raw_ostream &OS) const {};
+  virtual void printVerboseInfo(raw_ostream &OS) const {}
 
   // Platform defaults information
 
index 1c29e50c4e5e3fb59bd417ac99d0d9129e1ba398..abc824bbd2a471ed8979dff1beb5b14b6998b78d 100644 (file)
@@ -909,7 +909,7 @@ public:
   GlobalModuleIndex *loadGlobalModuleIndex(SourceLocation TriggerLoc) override
     { return nullptr; }
   bool lookupMissingImports(StringRef Name, SourceLocation TriggerLoc) override
-    { return 0; };
+    { return 0; }
 };
 
 } // namespace clang
index 92e99d305da5170fca44744c947240db46ed9137..3db362bf3470fe35caa0a4f26bb21d03b4a5a07d 100644 (file)
@@ -81,43 +81,43 @@ protected:
   /// \brief Visit the start of a diagnostic block.
   virtual std::error_code visitStartOfDiagnostic() {
     return std::error_code();
-  };
+  }
   /// \brief Visit the end of a diagnostic block.
-  virtual std::error_code visitEndOfDiagnostic() { return std::error_code(); };
+  virtual std::error_code visitEndOfDiagnostic() { return std::error_code(); }
   /// \brief Visit a category. This associates the category \c ID to a \c Name.
   virtual std::error_code visitCategoryRecord(unsigned ID, StringRef Name) {
     return std::error_code();
-  };
+  }
   /// \brief Visit a flag. This associates the flag's \c ID to a \c Name.
   virtual std::error_code visitDiagFlagRecord(unsigned ID, StringRef Name) {
     return std::error_code();
-  };
+  }
   /// \brief Visit a diagnostic.
   virtual std::error_code
   visitDiagnosticRecord(unsigned Severity, const Location &Location,
                         unsigned Category, unsigned Flag, StringRef Message) {
     return std::error_code();
-  };
+  }
   /// \brief Visit a filename. This associates the file's \c ID to a \c Name.
   virtual std::error_code visitFilenameRecord(unsigned ID, unsigned Size,
                                               unsigned Timestamp,
                                               StringRef Name) {
     return std::error_code();
-  };
+  }
   /// \brief Visit a fixit hint.
   virtual std::error_code
   visitFixitRecord(const Location &Start, const Location &End, StringRef Text) {
     return std::error_code();
-  };
+  }
   /// \brief Visit a source range.
   virtual std::error_code visitSourceRangeRecord(const Location &Start,
                                                  const Location &End) {
     return std::error_code();
-  };
+  }
   /// \brief Visit the version of the set of diagnostics.
   virtual std::error_code visitVersionRecord(unsigned Version) {
     return std::error_code();
-  };
+  }
 };
 
 } // end serialized_diags namespace
index ef3d2dbff1421cfaba19f630cb8acf20a01f969d..97f78f46a613c71ca6ab9e022f4ef48ae2fdbe84 100644 (file)
@@ -139,7 +139,7 @@ public:
   /// be invoked multiple times; the external source should take care not to
   /// introduce the same declarations repeatedly.
   virtual void ReadUnusedLocalTypedefNameCandidates(
-      llvm::SmallSetVector<const TypedefNameDecl *, 4> &Decls) {};
+      llvm::SmallSetVector<const TypedefNameDecl *, 4> &Decls) {}
 
   /// \brief Read the set of referenced selectors known to the
   /// external Sema source.
index 15e50c188943c5aaa6627fa74d21e0ce250b9870..064ba3af37c32489d3123a05c01c028dfd176804 100644 (file)
@@ -6536,7 +6536,7 @@ class TypeStringCache {
   unsigned IncompleteCount;     // Number of Incomplete entries in the Map.
   unsigned IncompleteUsedCount; // Number of IncompleteUsed entries in the Map.
 public:
-  TypeStringCache() : IncompleteCount(0), IncompleteUsedCount(0) {};
+  TypeStringCache() : IncompleteCount(0), IncompleteUsedCount(0) {}
   void addIncomplete(const IdentifierInfo *ID, std::string StubEnc);
   bool removeIncomplete(const IdentifierInfo *ID);
   void addIfComplete(const IdentifierInfo *ID, StringRef Str,
@@ -6550,8 +6550,8 @@ class FieldEncoding {
   bool HasName;
   std::string Enc;
 public:
-  FieldEncoding(bool b, SmallStringEnc &e) : HasName(b), Enc(e.c_str()) {};
-  StringRef str() {return Enc.c_str();};
+  FieldEncoding(bool b, SmallStringEnc &e) : HasName(b), Enc(e.c_str()) {}
+  StringRef str() {return Enc.c_str();}
   bool operator<(const FieldEncoding &rhs) const {
     if (HasName != rhs.HasName) return HasName;
     return Enc < rhs.Enc;
index 494c27a2f1cdfb42eeebaf095208ff4e2f97ab8f..5a1a393fbf02abdba1a6e7030ce7b344a2bc6393 100644 (file)
@@ -66,7 +66,7 @@ class VoidModuleLoader : public ModuleLoader {
   GlobalModuleIndex *loadGlobalModuleIndex(SourceLocation TriggerLoc) override
     { return nullptr; }
   bool lookupMissingImports(StringRef Name, SourceLocation TriggerLoc) override
-    { return 0; };
+    { return 0; }
 };
 
 TEST_F(SourceManagerTest, isBeforeInTranslationUnit) {
index b5a39b303d0018777140de377938fc4adec254ef..42f8eb5a5c7f80bae857bb26dfc28251e6601fc0 100644 (file)
@@ -42,7 +42,7 @@ class VoidModuleLoader : public ModuleLoader {
   GlobalModuleIndex *loadGlobalModuleIndex(SourceLocation TriggerLoc) override
     { return nullptr; }
   bool lookupMissingImports(StringRef Name, SourceLocation TriggerLoc) override
-    { return 0; };
+    { return 0; }
 };
 
 // The test fixture.
index 94812fc93de97ef543e85bfa5e85fcc223e2991c..08bc351e8c587baed8ed2fced2092d169bec0b79 100644 (file)
@@ -47,7 +47,7 @@ class VoidModuleLoader : public ModuleLoader {
   GlobalModuleIndex *loadGlobalModuleIndex(SourceLocation TriggerLoc) override
     { return nullptr; }
   bool lookupMissingImports(StringRef Name, SourceLocation TriggerLoc) override
-    { return 0; };
+    { return 0; }
 };
 
 // Stub to collect data from InclusionDirective callbacks.
@@ -88,7 +88,7 @@ public:
     unsigned State;
   } CallbackParameters;
 
-  PragmaOpenCLExtensionCallbacks() : Name("Not called."), State(99) {};
+  PragmaOpenCLExtensionCallbacks() : Name("Not called."), State(99) {}
 
   void PragmaOpenCLExtension(clang::SourceLocation NameLoc,
                              const clang::IdentifierInfo *Name,
@@ -98,7 +98,7 @@ public:
       this->Name = Name->getName();
       this->StateLoc = StateLoc;
       this->State = State;
-  };
+  }
 
   SourceLocation NameLoc;
   SmallString<16> Name;
index d2e3640501057ce6919422323ebed8f928a6e6ae..9345fc2390266734093df985a934c4b12aaf16d0 100644 (file)
@@ -66,7 +66,7 @@ class VoidModuleLoader : public ModuleLoader {
   GlobalModuleIndex *loadGlobalModuleIndex(SourceLocation TriggerLoc) override
     { return nullptr; }
   bool lookupMissingImports(StringRef Name, SourceLocation TriggerLoc) override
-    { return 0; };
+    { return 0; }
 };
 
 TEST_F(PPConditionalDirectiveRecordTest, PPRecAPI) {
index 9715302d4ae70a671e1aae2a4607a8daa3be4106..d8ecd2b65005484798c3b897359567416aaec707 100644 (file)
@@ -2082,7 +2082,7 @@ void EmitClangAttrASTVisitor(RecordKeeper &Records, raw_ostream &OS) {
     OS << "  bool Visit"
        << R.getName() << "Attr(" << R.getName() << "Attr *A) {\n"
        << "    return true; \n"
-       << "  };\n";
+       << "  }\n";
   }
   OS << "\n#else // ATTR_VISITOR_DECLS_ONLY\n\n";