[clang-tools-extra] r324083 - [clang-tidy] Widen anonymous namespace.

Benjamin Kramer via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 2 05:39:00 PST 2018


Author: d0k
Date: Fri Feb  2 05:39:00 2018
New Revision: 324083

URL: http://llvm.org/viewvc/llvm-project?rev=324083&view=rev
Log:
[clang-tidy] Widen anonymous namespace.

The matchers in this check are prone to create ODR violations otherwise.
No functionality change.

Modified:
    clang-tools-extra/trunk/clang-tidy/misc/RedundantExpressionCheck.cpp

Modified: clang-tools-extra/trunk/clang-tidy/misc/RedundantExpressionCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/RedundantExpressionCheck.cpp?rev=324083&r1=324082&r2=324083&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/RedundantExpressionCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/RedundantExpressionCheck.cpp Fri Feb  2 05:39:00 2018
@@ -32,10 +32,8 @@ using namespace clang::tidy::matchers;
 namespace clang {
 namespace tidy {
 namespace misc {
-
 namespace {
 using llvm::APSInt;
-} // namespace
 
 static constexpr llvm::StringLiteral KnownBannedMacroNames[] = {
     "EAGAIN",
@@ -629,6 +627,7 @@ static bool areExprsMacroAndNonMacro(con
 
   return LhsLoc.isMacroID() != RhsLoc.isMacroID();
 }
+} // namespace
 
 void RedundantExpressionCheck::registerMatchers(MatchFinder *Finder) {
   const auto AnyLiteralExpr = ignoringParenImpCasts(




More information about the cfe-commits mailing list