diff options
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r-- | clang/lib/Analysis/BugReporter.cpp | 6 | ||||
-rw-r--r-- | clang/lib/Analysis/CheckDeadStores.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Analysis/CheckNSError.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Analysis/CheckObjCDealloc.cpp | 9 | ||||
-rw-r--r-- | clang/lib/Analysis/CheckObjCInstMethSignature.cpp | 6 | ||||
-rw-r--r-- | clang/lib/Analysis/CheckObjCUnusedIVars.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Analysis/MemRegion.cpp | 4 |
7 files changed, 17 insertions, 16 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp index 0074a93b5bc..905c697ffbb 100644 --- a/clang/lib/Analysis/BugReporter.cpp +++ b/clang/lib/Analysis/BugReporter.cpp @@ -400,8 +400,8 @@ public: FullSourceLoc L(S->getLocStart(), BR.getSourceManager()); if (VD->getType()->isPointerLikeType()) { - std::string msg = "'" + std::string(VD->getName()) + - "' now aliases '" + MostRecent->getName() + "'"; + std::string msg = "'" + std::string(VD->getNameAsString()) + + "' now aliases '" + MostRecent->getNameAsString() + "'"; PD.push_front(new PathDiagnosticPiece(L, msg)); } @@ -579,7 +579,7 @@ void GRBugReporter::GeneratePathDiagnostic(PathDiagnostic& PD, EnumConstantDecl* D = dyn_cast<EnumConstantDecl>(DR->getDecl()); if (D) { GetRawInt = false; - os << D->getName(); + os << D->getNameAsString(); } } diff --git a/clang/lib/Analysis/CheckDeadStores.cpp b/clang/lib/Analysis/CheckDeadStores.cpp index 2afc7e0235f..51943d50166 100644 --- a/clang/lib/Analysis/CheckDeadStores.cpp +++ b/clang/lib/Analysis/CheckDeadStores.cpp @@ -41,7 +41,7 @@ public: void Report(VarDecl* V, DeadStoreKind dsk, SourceLocation L, SourceRange R) { - std::string name(V->getName()); + std::string name = V->getNameAsString(); const char* BugType = 0; std::string msg; diff --git a/clang/lib/Analysis/CheckNSError.cpp b/clang/lib/Analysis/CheckNSError.cpp index f76b601e2d5..919c17d0646 100644 --- a/clang/lib/Analysis/CheckNSError.cpp +++ b/clang/lib/Analysis/CheckNSError.cpp @@ -251,7 +251,7 @@ void NSErrorCheck::CheckParamDeref(VarDecl* Param, GRStateRef rootState, else os << "documented in CoreFoundation/CFError.h the parameter '"; - os << Param->getName() << "' may be null."; + os << Param->getNameAsString() << "' may be null."; desc = os.str().c_str(); BR.addNotableSymbol(SV->getSymbol()); diff --git a/clang/lib/Analysis/CheckObjCDealloc.cpp b/clang/lib/Analysis/CheckObjCDealloc.cpp index 6fba9aeea9a..a9e5675ce21 100644 --- a/clang/lib/Analysis/CheckObjCDealloc.cpp +++ b/clang/lib/Analysis/CheckObjCDealloc.cpp @@ -149,7 +149,7 @@ void clang::CheckObjCDealloc(ObjCImplementationDecl* D, std::string buf; llvm::raw_string_ostream os(buf); - os << "Objective-C class '" << D->getName() + os << "Objective-C class '" << D->getNameAsString() << "' lacks a 'dealloc' instance method"; BR.EmitBasicReport(name, os.str().c_str(), D->getLocStart()); @@ -165,7 +165,8 @@ void clang::CheckObjCDealloc(ObjCImplementationDecl* D, std::string buf; llvm::raw_string_ostream os(buf); - os << "The 'dealloc' instance method in Objective-C class '" << D->getName() + os << "The 'dealloc' instance method in Objective-C class '" + << D->getNameAsString() << "' does not send a 'dealloc' message to its super class" " (missing [super dealloc])"; @@ -220,7 +221,7 @@ void clang::CheckObjCDealloc(ObjCImplementationDecl* D, ? "missing ivar release (leak)" : "missing ivar release (Hybrid MM, non-GC)"; - os << "The '" << ID->getName() + os << "The '" << ID->getNameAsString() << "' instance variable was retained by a synthesized property but " "wasn't released in 'dealloc'"; } else { @@ -228,7 +229,7 @@ void clang::CheckObjCDealloc(ObjCImplementationDecl* D, ? "extra ivar release (use-after-release)" : "extra ivar release (Hybrid MM, non-GC)"; - os << "The '" << ID->getName() + os << "The '" << ID->getNameAsString() << "' instance variable was not retained by a synthesized property " "but was released in 'dealloc'"; } diff --git a/clang/lib/Analysis/CheckObjCInstMethSignature.cpp b/clang/lib/Analysis/CheckObjCInstMethSignature.cpp index 00dbe9f2b26..2d100793c21 100644 --- a/clang/lib/Analysis/CheckObjCInstMethSignature.cpp +++ b/clang/lib/Analysis/CheckObjCInstMethSignature.cpp @@ -49,16 +49,16 @@ static void CompareReturnTypes(ObjCMethodDecl* MethDerived, std::ostringstream os; os << "The Objective-C class '" - << MethDerived->getClassInterface()->getName() + << MethDerived->getClassInterface()->getNameAsString() << "', which is derived from class '" - << MethAncestor->getClassInterface()->getName() + << MethAncestor->getClassInterface()->getNameAsString() << "', defines the instance method '" << MethDerived->getSelector().getAsString() << "' whose return type is '" << ResDerived.getAsString() << "'. A method with the same name (same selector) is also defined in " "class '" - << MethAncestor->getClassInterface()->getName() + << MethAncestor->getClassInterface()->getNameAsString() << "' and has a return type of '" << ResAncestor.getAsString() << "'. These two types are incompatible, and may result in undefined " diff --git a/clang/lib/Analysis/CheckObjCUnusedIVars.cpp b/clang/lib/Analysis/CheckObjCUnusedIVars.cpp index c2deeeff8fe..ef7b318b769 100644 --- a/clang/lib/Analysis/CheckObjCUnusedIVars.cpp +++ b/clang/lib/Analysis/CheckObjCUnusedIVars.cpp @@ -98,8 +98,8 @@ void clang::CheckObjCUnusedIvar(ObjCImplementationDecl* D, BugReporter& BR) { if (I->second == Unused) { std::ostringstream os; - os << "Instance variable '" << I->first->getName() - << "' in class '" << ID->getName() + os << "Instance variable '" << I->first->getNameAsString() + << "' in class '" << ID->getNameAsString() << "' is never used by the methods in its @implementation " "(although it may be used by category methods)."; diff --git a/clang/lib/Analysis/MemRegion.cpp b/clang/lib/Analysis/MemRegion.cpp index 28a27b048ae..86f8571bc97 100644 --- a/clang/lib/Analysis/MemRegion.cpp +++ b/clang/lib/Analysis/MemRegion.cpp @@ -145,7 +145,7 @@ void AllocaRegion::print(llvm::raw_ostream& os) const { } void VarRegion::print(llvm::raw_ostream& os) const { - os << cast<VarDecl>(D)->getName(); + os << cast<VarDecl>(D)->getNameAsString(); } void SymbolicRegion::print(llvm::raw_ostream& os) const { @@ -154,7 +154,7 @@ void SymbolicRegion::print(llvm::raw_ostream& os) const { void FieldRegion::print(llvm::raw_ostream& os) const { superRegion->print(os); - os << "->" << getDecl()->getName(); + os << "->" << getDecl()->getNameAsString(); } void ElementRegion::print(llvm::raw_ostream& os) const { |