diff options
author | Richard Smith <richard@metafoo.co.uk> | 2020-02-05 19:01:33 -0800 |
---|---|---|
committer | Richard Smith <richard@metafoo.co.uk> | 2020-02-06 12:21:54 -0800 |
commit | da3dc0011e06c9f1aebe71d76eae92dc76e3db2e (patch) | |
tree | 5bbd199521902ee70ddb176d4fb81950bcee4ac1 /clang/lib/AST/ExprConstant.cpp | |
parent | 6f5a159eab8d3fecdbbc741a38c970c0149b3c96 (diff) | |
download | llvm-da3dc0011e06c9f1aebe71d76eae92dc76e3db2e.zip llvm-da3dc0011e06c9f1aebe71d76eae92dc76e3db2e.tar.gz llvm-da3dc0011e06c9f1aebe71d76eae92dc76e3db2e.tar.bz2 |
PR44684: Look through parens and similar constructs when determining
whether a call is to a builtin.
We already had a general mechanism to do this but for some reason
weren't using it. In passing, check for the other unary operators that
can intervene in a reasonably-direct function call (we already handled
'&' but missed '*' and '+').
This reverts commit aaae6b1b617378362462c1685e754813ed82b394,
reinstating af80b8ccc5772c14920d4554b7ca7e15f2fad1c4, with a fix to
clang-tidy.
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index f045e5f..860eeb1 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -10684,7 +10684,7 @@ static bool getBuiltinAlignArguments(const CallExpr *E, EvalInfo &Info, bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) { - switch (unsigned BuiltinOp = E->getBuiltinCallee()) { + switch (BuiltinOp) { default: return ExprEvaluatorBaseTy::VisitCallExpr(E); |