[PATCH] D60912: MS ABI: handle inline static data member as template static data member

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 19 13:01:58 PDT 2019


rnk added a comment.

Thanks, I think there's another case to handle, though.



================
Comment at: lib/CodeGen/CGDeclCXX.cpp:471-473
+             (getTarget().getCXXABI().isMicrosoft() &&
+              D->isInlineSpecified() && D->isStaticDataMember() &&
+              getLangOpts().CPlusPlus17)) {
----------------
I think the whole second condition can be simplified to just `D->isIinlineSpecified()`. We have to consider plain inline global variables, not just static data members, as in:
```
int f();
inline int gvinit_inline = f();
int useit() { return gvinit_inline ; }
```


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60912/new/

https://reviews.llvm.org/D60912





More information about the cfe-commits mailing list