diff options
| author | Alp Toker <alp@nuanti.com> | 2014-05-05 12:38:48 +0000 |
|---|---|---|
| committer | Alp Toker <alp@nuanti.com> | 2014-05-05 12:38:48 +0000 |
| commit | a030cd0558a3c25285102f9d6cd387caa0454229 (patch) | |
| tree | b7b4c7fde82c28873a3dbd1758c4bab17c2c6293 /clang/lib | |
| parent | 0e6c51c889bcc2088613b05ae2ca2acb64dfedbf (diff) | |
| download | bcm5719-llvm-a030cd0558a3c25285102f9d6cd387caa0454229.tar.gz bcm5719-llvm-a030cd0558a3c25285102f9d6cd387caa0454229.zip | |
StringRefize and take out an old FIXME
llvm-svn: 207962
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/AST/Type.cpp | 3 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 7 |
2 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index dc3fcc8c78b..e9002b4e873 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -1431,8 +1431,7 @@ TypeWithKeyword::KeywordIsTagTypeKind(ElaboratedTypeKeyword Keyword) { llvm_unreachable("Unknown elaborated type keyword."); } -const char* -TypeWithKeyword::getKeywordName(ElaboratedTypeKeyword Keyword) { +StringRef TypeWithKeyword::getKeywordName(ElaboratedTypeKeyword Keyword) { switch (Keyword) { case ETK_None: return ""; case ETK_Typename: return "typename"; diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 34954a8eeb8..54a332aa99e 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -11390,9 +11390,10 @@ FriendDecl *Sema::CheckFriendTypeDecl(SourceLocation LocStart, // a tag in front. if (const RecordType *RT = T->getAs<RecordType>()) { RecordDecl *RD = RT->getDecl(); - - std::string InsertionText = std::string(" ") + RD->getKindName(); - + + SmallString<16> InsertionText(" "); + InsertionText += RD->getKindName(); + Diag(TypeRange.getBegin(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_unelaborated_friend_type : |

