summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-23 21:45:46 +0000
committerChris Lattner <sabre@nondot.org>2008-11-23 21:45:46 +0000
commite3d20d954503fef1256b50977f7e2c9507452c1e (patch)
tree8473d3824da844a9fcc3808aa798a1bdcf5b2b16 /clang/lib/Sema/SemaExpr.cpp
parentf7e69d5a77b21fd98e29df84411506527faa62b3 (diff)
downloadbcm5719-llvm-e3d20d954503fef1256b50977f7e2c9507452c1e.tar.gz
bcm5719-llvm-e3d20d954503fef1256b50977f7e2c9507452c1e.zip
Convert IdentifierInfo's to be printed the same as DeclarationNames
with implicit quotes around them. This has a bunch of follow-on effects and requires tweaking to a whole lot of code. This causes a regression in two tests (xfailed) by causing it to emit things like: Line 10: duplicate interface declaration for category 'MyClass1' ('Category1') instead of: Line 10: duplicate interface declaration for category 'MyClass1(Category1)' I will fix this in a follow-up commit. As part of this, I had to start switching stuff to use ->getDeclName() instead of Decl::getName() for consistency. This is good, but I was planning to do this as an independent patch. There will be several follow-on patches to clean up some of the mess, but this patch is already too big. llvm-svn: 59917
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index bebde38a18b..fd726511fd6 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -417,12 +417,12 @@ Sema::ExprResult Sema::ActOnDeclarationNameExpr(Scope *S, SourceLocation Loc,
// diagnose the problem.
if (SS && !SS->isEmpty())
return Diag(Loc, diag::err_typecheck_no_member)
- << Name.getAsString() << SS->getRange();
+ << Name << SS->getRange();
else if (Name.getNameKind() == DeclarationName::CXXOperatorName ||
Name.getNameKind() == DeclarationName::CXXConversionFunctionName)
return Diag(Loc, diag::err_undeclared_use) << Name.getAsString();
else
- return Diag(Loc, diag::err_undeclared_var_use) << Name.getAsString();
+ return Diag(Loc, diag::err_undeclared_var_use) << Name;
}
}
OpenPOWER on IntegriCloud