[clang-tidy] Added a check for forward declaration in the potentially wrong namespace
authorAlexander Kornienko <alexfh@google.com>
Wed, 24 Feb 2016 13:35:32 +0000 (13:35 +0000)
committerAlexander Kornienko <alexfh@google.com>
Wed, 24 Feb 2016 13:35:32 +0000 (13:35 +0000)
commitea9fd99215088b136c224d40074f2faa735a073b
treece0a473299df3a7a7a170d5d61d61bb419f06831
parent31bcca47d3c5e988826416a42a1bd92d511f5d38
[clang-tidy] Added a check for forward declaration in the potentially wrong namespace

Adds a new check "misc-forward-declaration-namespace".
In check, A forward declaration is considerred in a potentially wrong namespace
if there is any definition/declaration with the same name exists in a different
namespace.

Reviewers: akuegel, hokein, alexfh

Patch by Eric Liu!

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

llvm-svn: 261737
clang-tools-extra/clang-tidy/misc/CMakeLists.txt
clang-tools-extra/clang-tidy/misc/ForwardDeclarationNamespaceCheck.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/misc/ForwardDeclarationNamespaceCheck.h [new file with mode: 0644]
clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/misc-forward-declaration-namespace.rst [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/misc-forward-declaration-namespace.cpp [new file with mode: 0644]