summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-02-14 01:03:10 +0000
committerJohn McCall <rjmccall@apple.com>2010-02-14 01:03:10 +0000
commit38200b081abc43d0d19cf2b1ebd0fdc8b0e65078 (patch)
treef1219a0152c93be253f83f064c21ef7e13d6436c /clang/lib/Parse/ParseDecl.cpp
parent073a0c88ccbd33b44281555cd1dd9b4a07e9cc06 (diff)
downloadbcm5719-llvm-38200b081abc43d0d19cf2b1ebd0fdc8b0e65078.tar.gz
bcm5719-llvm-38200b081abc43d0d19cf2b1ebd0fdc8b0e65078.zip
Improve the diagnostic given when referring to a tag type without a tag (in C)
or that's been hidden by a non-type (in C++). The ideal C++ diagnostic here would note the hiding declaration, but this is a good start. llvm-svn: 96141
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 01156a1e969..8aa69363bee 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -733,7 +733,7 @@ bool Parser::ParseImplicitInt(DeclSpec &DS, CXXScopeSpec *SS,
if (TagName) {
Diag(Loc, diag::err_use_of_tag_name_without_tag)
- << Tok.getIdentifierInfo() << TagName
+ << Tok.getIdentifierInfo() << TagName << getLang().CPlusPlus
<< CodeModificationHint::CreateInsertion(Tok.getLocation(),TagName);
// Parse this as a tag as if the missing tag were present.
OpenPOWER on IntegriCloud