aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PPMacroExpansion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Lex/PPMacroExpansion.cpp')
-rw-r--r--lib/Lex/PPMacroExpansion.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp
index b97ab2485d3d..d60cf0804f53 100644
--- a/lib/Lex/PPMacroExpansion.cpp
+++ b/lib/Lex/PPMacroExpansion.cpp
@@ -501,8 +501,10 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
//.Case("cxx_variadic_templates", false)
.Case("attribute_ext_vector_type", true)
.Case("attribute_analyzer_noreturn", true)
- .Case("attribute_ns_returns_retained", true)
+ .Case("attribute_cf_returns_not_retained", true)
.Case("attribute_cf_returns_retained", true)
+ .Case("attribute_ns_returns_not_retained", true)
+ .Case("attribute_ns_returns_retained", true)
.Default(false);
}
@@ -539,13 +541,9 @@ static bool EvaluateHasIncludeCommon(bool &Result, Token &Tok,
return false;
case tok::angle_string_literal:
- case tok::string_literal: {
- FilenameBuffer.resize(Tok.getLength());
- const char *FilenameStart = &FilenameBuffer[0];
- unsigned Len = PP.getSpelling(Tok, FilenameStart);
- Filename = llvm::StringRef(FilenameStart, Len);
+ case tok::string_literal:
+ Filename = PP.getSpelling(Tok, FilenameBuffer);
break;
- }
case tok::less:
// This could be a <foo/bar.h> file coming from a macro expansion. In this