[PATCH] D40705: [Parser] Diagnose storage classes in template parameter declarations
Roger Ferrer Ibanez via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 11 01:43:36 PST 2017
rogfer01 added inline comments.
================
Comment at: lib/Parse/ParseTemplate.cpp:702
+ ReportStorageClass(DS.getStorageClassSpecLoc());
+ if (DS.getThreadStorageClassSpec() != DeclSpec::TSCS_unspecified)
+ ReportStorageClass(DS.getThreadStorageClassSpecLoc());
----------------
You added tests for `SCS_*` but not for `TSCS_*`. Is it worth adding at least one for the latter as well?
```lang=cpp
template <thread_local int X> struct Z2; // expected-error {{storage class specified for template parameter 'X'}}
```
https://reviews.llvm.org/D40705
More information about the cfe-commits
mailing list