[PATCH] D142388: [clang] Add builtin_nondeterministic_value
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 1 11:35:07 PST 2023
erichkeane accepted this revision.
erichkeane added a comment.
This revision is now accepted and ready to land.
Last set of comments, docs and release notes look fine to me. feel free to fix the last comments while committing.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:17816
+ if (!TyArg->isBuiltinType() && !TyArg->isVectorType()) {
+ Diag(TheCall->getArg(0)->getBeginLoc(), diag::err_builtin_invalid_arg_type)
+ << 1 << /*vector, integer or floating point ty*/ 0 << TyArg;
----------------
================
Comment at: clang/lib/Sema/SemaChecking.cpp:17818
+ << 1 << /*vector, integer or floating point ty*/ 0 << TyArg;
+ return true;
+ }
----------------
Diag always returns true for exactly this situation, omit the {} and return true;, and just return Diag.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142388/new/
https://reviews.llvm.org/D142388
More information about the cfe-commits
mailing list