Don't play smart* use proper empty str as default arg.

This commit is contained in:
Vassil Vassilev 2013-08-28 11:12:44 +02:00 committed by sftnight
parent eaadf9d492
commit a6f245a8b4
2 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ namespace cling {
void dump() const;
void print(llvm::raw_ostream& Out, const clang::PrintingPolicy& Policy,
unsigned Indent, bool PrintInstantiation,
llvm::StringRef prependInfo = 0) const;
llvm::StringRef prependInfo = "") const;
};
private:

View File

@ -192,7 +192,7 @@ namespace cling {
const PrintingPolicy& Policy,
unsigned Indent,
bool PrintInstantiation,
llvm::StringRef prependInfo /*=0*/) const {
llvm::StringRef prependInfo /*=""*/) const {
static const char* const stateNames[Transaction::kCCINumStates] = {
"kCCINone",
"kCCIHandleTopLevelDecl",
@ -204,7 +204,7 @@ namespace cling {
};
assert((sizeof(stateNames) /sizeof(void*)) == Transaction::kCCINumStates
&& "Missing states?");
if (prependInfo != 0) {
if (!prependInfo.empty()) {
Out.changeColor(llvm::raw_ostream::RED);
Out << prependInfo;
Out.resetColor();