[PATCH] D44646: Sema: in msvc compatibility mode, don't allow forceinline on variadics
    Reid Kleckner via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Tue Apr 10 15:04:52 PDT 2018
    
    
  
rnk added inline comments.
================
Comment at: lib/Sema/SemaDeclAttr.cpp:3889
 
+  if (Context.getTargetInfo().getCXXABI().isMicrosoft() &&
+      hasFunctionProto(D) && isFunctionOrMethodVariadic(D)) {
----------------
Why is this warning dependent on the ABI? GCC has a similar warning:
https://godbolt.org/g/3E4NZ1
================
Comment at: lib/Sema/SemaDeclAttr.cpp:3892
+    Diag(Range.getBegin(), diag::warn_always_inline_on_variadic) << Ident;
+    return nullptr;
+  }
----------------
I'd actually rather not ignore the attribute. Clang shouldn't be making decisions about what LLVM is and isn't capable of inlining. It's not too crazy to imagine eventually implementing inlining of variadic function calls.
Repository:
  rC Clang
https://reviews.llvm.org/D44646
    
    
More information about the cfe-commits
mailing list