diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-10-14 18:45:37 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-10-14 18:45:37 +0000 |
commit | b89514a9b84ae625a1cfca1e4dfdf4542c61cee5 (patch) | |
tree | c547581de4165e8a3b2dec2cc579bd21a4983867 /clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp | |
parent | 47b5b31e616488865468dcec195b3d16b1a15fce (diff) | |
download | bcm5719-llvm-b89514a9b84ae625a1cfca1e4dfdf4542c61cee5.tar.gz bcm5719-llvm-b89514a9b84ae625a1cfca1e4dfdf4542c61cee5.zip |
Change operator<< for raw_ostream and NamedDecl to take a reference instead of a pointer.
Passing a pointer was a bad idea as it collides with the overload for void*.
llvm-svn: 141971
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp index 20c045fe6b2..bf7ba185b5a 100644 --- a/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp @@ -477,11 +477,11 @@ void WalkAST::checkCall_rand(const CallExpr *CE, const FunctionDecl *FD) { // Issue a warning. llvm::SmallString<256> buf1; llvm::raw_svector_ostream os1(buf1); - os1 << '\'' << FD << "' is a poor random number generator"; + os1 << '\'' << *FD << "' is a poor random number generator"; llvm::SmallString<256> buf2; llvm::raw_svector_ostream os2(buf2); - os2 << "Function '" << FD + os2 << "Function '" << *FD << "' is obsolete because it implements a poor random number generator." << " Use 'arc4random' instead"; @@ -588,12 +588,12 @@ void WalkAST::checkUncheckedReturnValue(CallExpr *CE) { // Issue a warning. llvm::SmallString<256> buf1; llvm::raw_svector_ostream os1(buf1); - os1 << "Return value is not checked in call to '" << FD << '\''; + os1 << "Return value is not checked in call to '" << *FD << '\''; llvm::SmallString<256> buf2; llvm::raw_svector_ostream os2(buf2); - os2 << "The return value from the call to '" << FD - << "' is not checked. If an error occurs in '" << FD + os2 << "The return value from the call to '" << *FD + << "' is not checked. If an error occurs in '" << *FD << "', the following code may execute with unexpected privileges"; SourceRange R = CE->getCallee()->getSourceRange(); |