diff options
author | Michael Liao <michael.hliao@gmail.com> | 2019-12-06 11:48:15 -0500 |
---|---|---|
committer | Michael Liao <michael.hliao@gmail.com> | 2019-12-06 13:08:55 -0500 |
commit | f2ace9d6005b4ffc6f6fc068c1aac897d871df7a (patch) | |
tree | 019c3f35015a7749a58db4537b106a9651cf91f1 /clang/lib/Sema/SemaExpr.cpp | |
parent | 72942459d070cbfe6f3524e89c3ac37440be7890 (diff) | |
download | bcm5719-llvm-f2ace9d6005b4ffc6f6fc068c1aac897d871df7a.tar.gz bcm5719-llvm-f2ace9d6005b4ffc6f6fc068c1aac897d871df7a.zip |
Add `QualType::hasAddressSpace`. NFC.
- Add that as a shorthand of <T>.getQualifiers().hasAddressSpace().
- Simplify related code.
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index c53a4b789be..e2c37f8f523 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -5445,15 +5445,15 @@ static FunctionDecl *rewriteBuiltinFunctionDecl(Sema *Sema, ASTContext &Context, Expr *Arg = ArgRes.get(); QualType ArgType = Arg->getType(); if (!ParamType->isPointerType() || - ParamType.getQualifiers().hasAddressSpace() || + ParamType.hasAddressSpace() || !ArgType->isPointerType() || - !ArgType->getPointeeType().getQualifiers().hasAddressSpace()) { + !ArgType->getPointeeType().hasAddressSpace()) { OverloadParams.push_back(ParamType); continue; } QualType PointeeType = ParamType->getPointeeType(); - if (PointeeType.getQualifiers().hasAddressSpace()) + if (PointeeType.hasAddressSpace()) continue; NeedsNewDecl = true; |