skc7 added inline comments.
================
Comment at: clang/lib/CodeGen/CGCall.cpp:2050-2066
+static bool IsArgumentMayBeUndef(const Decl *TargetDecl, unsigned ArgNo) {
+ if (!TargetDecl)
+ return false;
+
+ bool ArgHasMayBeUndefAttr = false;
+ if (TargetDecl) {
+ if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(TargetDecl)) {
----------------
aaron.ballman wrote:
> One question I have is whether you ever need to mark the variadic arguments
> as being maybe undef. e.g., `void func(int i, ...);` do you need to signal
> that arguments passed to `...` are maybe undef?
>
Current change assumes variadic arguments will not have "maybe_undef"
attribute. If its a function attribute, variadic arguments can inherit them
(Have seen such cases in clang codebase). But "maybe_undef" is function
argument attribute and I'm not sure on how to add it to variadic arguments.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130224/new/
https://reviews.llvm.org/D130224
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits