diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-10-15 14:58:19 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-10-15 15:40:33 +0200 |
commit | 41d6a0ea2d2d3c8daa758771bf956036d84cbe1a (patch) | |
tree | c75bc715ffda0b0dd3496c0c89e081203a1d3945 /compilerplugins | |
parent | 683928f27cb34fcfaf071fde5c308848ab3b4786 (diff) |
some namespacing improvements
Change-Id: I95bd78340519bc1457385561b64c74e938b40bb2
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/bodynotinblock.hxx | 2 | ||||
-rw-r--r-- | compilerplugins/clang/compileplugin.cxx | 2 | ||||
-rw-r--r-- | compilerplugins/clang/compileplugin.hxx | 2 | ||||
-rw-r--r-- | compilerplugins/clang/sallogareas.cxx | 4 | ||||
-rw-r--r-- | compilerplugins/clang/sallogareas.hxx | 2 | ||||
-rw-r--r-- | compilerplugins/clang/unusedvariablecheck.cxx | 2 |
6 files changed, 6 insertions, 8 deletions
diff --git a/compilerplugins/clang/bodynotinblock.hxx b/compilerplugins/clang/bodynotinblock.hxx index a2c47e6683cd..0d3425213a30 100644 --- a/compilerplugins/clang/bodynotinblock.hxx +++ b/compilerplugins/clang/bodynotinblock.hxx @@ -25,7 +25,7 @@ class BodyNotInBlock void run(); bool VisitFunctionDecl( FunctionDecl* declaration ); private: - typedef std::vector< const Stmt* > StmtParents; + typedef vector< const Stmt* > StmtParents; void traverseStatement( const Stmt* stmt, StmtParents& parents ); void checkBody( const Stmt* body, const StmtParents& parents, int stmtType, bool dontGoUp = false ); }; diff --git a/compilerplugins/clang/compileplugin.cxx b/compilerplugins/clang/compileplugin.cxx index c243b7a24baa..0bb378a73d95 100644 --- a/compilerplugins/clang/compileplugin.cxx +++ b/compilerplugins/clang/compileplugin.cxx @@ -21,8 +21,6 @@ #include "sallogareas.hxx" #include "unusedvariablecheck.hxx" -using namespace clang; - namespace loplugin { diff --git a/compilerplugins/clang/compileplugin.hxx b/compilerplugins/clang/compileplugin.hxx index c8ad29641b14..a413501fea95 100644 --- a/compilerplugins/clang/compileplugin.hxx +++ b/compilerplugins/clang/compileplugin.hxx @@ -14,6 +14,8 @@ #include <clang/AST/RecursiveASTVisitor.h> using namespace clang; +using namespace llvm; +using namespace std; namespace loplugin { diff --git a/compilerplugins/clang/sallogareas.cxx b/compilerplugins/clang/sallogareas.cxx index caf2a474d6b0..f1a524ca5164 100644 --- a/compilerplugins/clang/sallogareas.cxx +++ b/compilerplugins/clang/sallogareas.cxx @@ -14,8 +14,6 @@ #include <fstream> -using namespace std; - namespace loplugin { @@ -50,7 +48,7 @@ bool SalLogAreas::VisitCallExpr( CallExpr* call ) if( func->getNumParams() == 4 && func->getIdentifier() != NULL && ( func->getName() == "sal_detail_log" || func->getName() == "log" )) { - std::string qualifiedName = func->getQualifiedNameAsString(); + string qualifiedName = func->getQualifiedNameAsString(); if( qualifiedName == "sal_detail_log" || qualifiedName == "sal::detail::log" ) { if( const StringLiteral* area = dyn_cast< StringLiteral >( call->getArg( 1 )->IgnoreParenImpCasts())) diff --git a/compilerplugins/clang/sallogareas.hxx b/compilerplugins/clang/sallogareas.hxx index 520762973743..f17b8aa1ace4 100644 --- a/compilerplugins/clang/sallogareas.hxx +++ b/compilerplugins/clang/sallogareas.hxx @@ -31,7 +31,7 @@ class SalLogAreas void checkArea( StringRef area, SourceLocation location ); void readLogAreas(); const FunctionDecl* inFunction; - std::set< std::string > logAreas; + set< string > logAreas; }; } // namespace diff --git a/compilerplugins/clang/unusedvariablecheck.cxx b/compilerplugins/clang/unusedvariablecheck.cxx index 733c2be42d78..340cd9ef863b 100644 --- a/compilerplugins/clang/unusedvariablecheck.cxx +++ b/compilerplugins/clang/unusedvariablecheck.cxx @@ -67,7 +67,7 @@ bool UnusedVariableCheck::VisitVarDecl( VarDecl* var ) } if( !warn_unused ) { - std::string n = type->getQualifiedNameAsString(); + string n = type->getQualifiedNameAsString(); // Check some common non-LO types. if( n == "std::string" || n == "std::basic_string" || n == "std::list" || n == "std::__debug::list" |