aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-09-11 06:45:03 +0000
committerJohn McCall <rjmccall@apple.com>2009-09-11 06:45:03 +0000
commit136a6988960ac3aeb96f298da7a1a182db7217cd (patch)
tree09fb77402986a09d43cc27f50893bfa28496c44a /lib/Sema/Sema.cpp
parenta4d3282683b22608b05a3d4566c96af269d99c5c (diff)
When stringizing a NamedDecl for a diagnostic, treat the template
specialization types differently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81512 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r--lib/Sema/Sema.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index b158c85414..080266c75f 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -85,13 +85,17 @@ static void ConvertArgToStringFn(Diagnostic::ArgumentKind Kind, intptr_t Val,
assert(ModLen == 0 && ArgLen == 0 &&
"Invalid modifier for DeclarationName argument");
} else if (Kind == Diagnostic::ak_nameddecl) {
+ bool Qualified;
if (ModLen == 1 && Modifier[0] == 'q' && ArgLen == 0)
- S = reinterpret_cast<NamedDecl*>(Val)->getQualifiedNameAsString();
+ Qualified = true;
else {
assert(ModLen == 0 && ArgLen == 0 &&
"Invalid modifier for NamedDecl* argument");
- S = reinterpret_cast<NamedDecl*>(Val)->getNameAsString();
+ Qualified = false;
}
+ reinterpret_cast<NamedDecl*>(Val)->getNameForDiagnostic(S,
+ Context.PrintingPolicy,
+ Qualified);
} else {
llvm::raw_string_ostream OS(S);
assert(Kind == Diagnostic::ak_nestednamespec);