summaryrefslogtreecommitdiff
path: root/include/clang/AST/Expr.h
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2018-05-22 10:13:06 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2018-05-22 10:13:06 +0000
commitb8a49afcfaf72e7c258cb074301f8c389ca1aacb (patch)
tree08652c447ea31e7fa6065fb1e8fe639919c6d902 /include/clang/AST/Expr.h
parenta96a9be6e7f2e6eee5e2527db1a1bc2f399076cc (diff)
downloadclang-b8a49afcfaf72e7c258cb074301f8c389ca1aacb.tar.gz
Revert "Revert r332955 "GNUstep Objective-C ABI version 2""
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332963 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Expr.h')
-rw-r--r--include/clang/AST/Expr.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h
index 47e8261abf..c51ba8ddc0 100644
--- a/include/clang/AST/Expr.h
+++ b/include/clang/AST/Expr.h
@@ -1620,6 +1620,14 @@ public:
bool isUTF32() const { return Kind == UTF32; }
bool isPascal() const { return IsPascal; }
+ bool containsNonAscii() const {
+ StringRef Str = getString();
+ for (unsigned i = 0, e = Str.size(); i != e; ++i)
+ if (!isASCII(Str[i]))
+ return true;
+ return false;
+ }
+
bool containsNonAsciiOrNull() const {
StringRef Str = getString();
for (unsigned i = 0, e = Str.size(); i != e; ++i)